text:
package org.apache.jackrabbit.ocm.manager.collectionconverter.impl;

import java.util.Iterator;
import java.util.Map;

import javax.jcr.Node;
import javax.jcr.Property;
import javax.jcr.PropertyType;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.UnsupportedRepositoryOperationException;
import javax.jcr.Value;
import javax.jcr.ValueFactory;
import javax.jcr.lock.LockException;
import javax.jcr.nodetype.ConstraintViolationException;
import javax.jcr.version.VersionException;

import org.apache.jackrabbit.ocm.exception.JcrMappingException;
import org.apache.jackrabbit.ocm.exception.ObjectContentManagerException;
import org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableMap;
import org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableObjects;
import org.apache.jackrabbit.ocm.manager.collectionconverter.ManageableObjectsUtil;
import org.apache.jackrabbit.ocm.manager.objectconverter.ObjectConverter;
import org.apache.jackrabbit.ocm.mapper.Mapper;
import org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor;
import org.apache.jackrabbit.ocm.mapper.model.CollectionDescriptor;
import org.apache.jackrabbit.ocm.mapper.model.FieldDescriptor;
import org.apache.jackrabbit.ocm.reflection.ReflectionUtils;

/**
 * Map converter used to map reference/uuid property by key into a java.util.Map.
 *

 * This implementation takes for granted that the keys to the map are of type java.lang.String.
 *

 * Further development will be required to fully support Map<Object, Object>.
 *
 * @author Vincent Giguere
 */
public class BeanReferenceMapConverterImpl extends AbstractCollectionConverterImpl {

    /**
     * Constructor
     *
     * @param atomicTypeConverters
     * @param objectConverter
     * @param mapper
     */
    public BeanReferenceMapConverterImpl(Map atomicTypeConverters,
                                         ObjectConverter objectConverter,
                                         Mapper mapper) {
        super(atomicTypeConverters, objectConverter, mapper);
    }

    protected void doInsertCollection(Session session,
                                      Node parentNode,
                                      CollectionDescriptor collectionDescriptor,
                                      ManageableObjects objects) throws RepositoryException {

        // For maps of bean references, only Maps are supported
        if (!(objects instanceof ManageableMap)) {

            throw new JcrMappingException("Impossible to retrieve the attribute "
                    + collectionDescriptor.getFieldName() + " in the class "
                    + collectionDescriptor.getClassDescriptor().getClassName()
                    + " because it is not a map");
        }

        addUuidProperties(session, parentNode, collectionDescriptor, (ManageableMap) objects);
    }

    protected void doUpdateCollection(Session session,
                                      Node parentNode,
                                      CollectionDescriptor collectionDescriptor,
                                      ManageableObjects objects) throws RepositoryException {

    	// For maps of bean references, only Maps are supported
        if (!(objects instanceof ManageableMap)) {

            throw new JcrMappingException("Impossible to retrieve the attribute "
                    + collectionDescriptor.getFieldName() + " in the class "
                    + collectionDescriptor.getClassDescriptor().getClassName()
                    + " because it is not a map");
        }
        String jcrName = getCollectionJcrName(collectionDescriptor);

        // Delete existing values
        if (parentNode.hasProperty(jcrName)) {
            parentNode.setProperty(jcrName, (Value[]) null);
        }

        if (objects == null) {
            return;
        }

        addUuidProperties(session, parentNode, collectionDescriptor, (ManageableMap) objects);

    }

    /**
     * @see org.apache.jackrabbit.ocm.manager.collectionconverter.impl.AbstractCollectionConverterImpl#doGetCollection(javax.jcr.Session, javax.jcr.Node, org.apache.jackrabbit.ocm.mapper.model.CollectionDescriptor, Class)
     */
    protected ManageableObjects doGetCollection(Session session,
                                                Node parentNode,
                                                CollectionDescriptor collectionDescriptor,
                                                Class collectionFieldClass) throws RepositoryException {

        try {
            String jcrName = getCollectionJcrName(collectionDescriptor);

            if (!parentNode.hasProperty(jcrName)) {
                return null;
            }

            Property property = parentNode.getProperty(jcrName);
            Value[] values = property.getValues();

            ManageableObjects objects = ManageableObjectsUtil.getManageableObjects(collectionFieldClass);

            // For maps of bean references, only Maps are supported
            if (!(objects instanceof ManageableMap)) {

                throw new JcrMappingException("Impossible to retrieve the attribute "
                        + collectionDescriptor.getFieldName() + " in the class "
                        + collectionDescriptor.getClassDescriptor().getClassName()
                        + " because it is not a map");
            }

            for (int i = 0; i < values.length; i++) {

                String encoded = values[i].getString();
                String key = MapReferenceValueEncoder.decodeKey(encoded);
                String uuid = MapReferenceValueEncoder.decodeReference(encoded);

                String path = session.getNodeByIdentifier(uuid).getPath();
                Object object = objectConverter.getObject(session, path);
                ((ManageableMap) objects).addObject(key, object);
            }

            return objects;
        }
        catch (Exception e) {
            throw new ObjectContentManagerException("Cannot get the collection field : "
                    + collectionDescriptor.getFieldName()
                    + "for class " + collectionDescriptor.getClassDescriptor().getClassName(), e);
        }
    }

    /**
     * @see org.apache.jackrabbit.ocm.manager.collectionconverter.impl.AbstractCollectionConverterImpl#doIsNull(javax.jcr.Session, javax.jcr.Node, org.apache.jackrabbit.ocm.mapper.model.CollectionDescriptor, Class)
     */
    protected boolean doIsNull(Session session, Node parentNode, CollectionDescriptor collectionDescriptor, Class collectionFieldClass) throws RepositoryException {
        String jcrName = getCollectionJcrName(collectionDescriptor);
        return !parentNode.hasProperty(jcrName);
    }

    private void addUuidProperties(Session session, Node parentNode,
                                   CollectionDescriptor collectionDescriptor,
                                   ManageableMap manageableMap)
            throws UnsupportedRepositoryOperationException, RepositoryException, VersionException, LockException, ConstraintViolationException {
        try {
            if (manageableMap == null) {
                return;
            }

            String jcrName = getCollectionJcrName(collectionDescriptor);
            Value[] values = new Value[manageableMap.getSize()];
            ValueFactory valueFactory = session.getValueFactory();
            Map map = (Map) manageableMap.getObjects();
            Iterator keyIterator = map.keySet().iterator();

            for (int i = 0; i < manageableMap.getSize(); i++) {
                String key = (String) keyIterator.next();
                Object object = map.get(key);
                if (object != null) {
                    ClassDescriptor classDescriptor = mapper.getClassDescriptorByClass(object.getClass());

                    FieldDescriptor fieldDescriptor = classDescriptor.getUuidFieldDescriptor();
                    if (fieldDescriptor == null) {
                        throw new JcrMappingException("The bean doesn't have an uuid - classdescriptor : "
                                + classDescriptor.getClassName());
                    }

                    String uuid = (String) ReflectionUtils.getNestedProperty(object, fieldDescriptor.getFieldName());
                    values[i] = valueFactory.createValue(MapReferenceValueEncoder.encodeKeyAndReference(key, uuid), PropertyType.STRING);
                }
            }

            parentNode.setProperty(jcrName, values);

        }
        catch (Exception e) {
            throw new ObjectContentManagerException("Cannot insert collection field : "
                    + collectionDescriptor.getFieldName()
                    + " of class "
                    + collectionDescriptor.getClassDescriptor().getClassName(), e);
        }
    }

}


text:
module Adminable
  module Presenters
    class Entries < DelegateClass(ActiveRecord::Relation)
      ENTRIES_LIMIT = 5

      include Adminable::Engine.routes.url_helpers
      include Adminable::Presenters::Helpers
      include Enumerable
      extend Forwardable

      def_delegators :@collection, :each, :first, :last, :empty?
      def_delegators(
        *%i(
          @relation
          current_page
          total_pages
          limit_value
          entry_name
          total_count
          offset_value
          last_page?
        )
      )

      def initialize(relation)
        @relation = relation
        @collection = relation.all.map do |entry|
          Adminable::Presenters::Entry.new(entry)
        end
      end

      def to_s
        string = collection.first(ENTRIES_LIMIT).map do |entry|
          view.link_to(entry.to_name, edit_polymorphic_path(entry))
        end

        string << and_more_tag if collection_size_residue > 0

        string.join(', ').html_safe
      end

      private

        attr_accessor :relation, :collection

        def collection_size_residue
          @collection_residue ||= collection.size - ENTRIES_LIMIT
        end

        def and_more_tag
          view.content_tag(
            :span,
            I18n.t('adminable.ui.and_more', size: collection_size_residue),
            class: 'text-muted'
          )
        end
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
System.register(['aurelia-templating'], function (_export) {
  'use strict';

  var customElement, AiDialogBody;

  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

  return {
    setters: [function (_aureliaTemplating) {
      customElement = _aureliaTemplating.customElement;
    }],
    execute: function () {
      AiDialogBody = (function () {
        function AiDialogBody() {
          _classCallCheck(this, _AiDialogBody);
        }

        var _AiDialogBody = AiDialogBody;
        AiDialogBody = customElement('ai-dialog-body')(AiDialogBody) || AiDialogBody;
        return AiDialogBody;
      })();

      _export('AiDialogBody', AiDialogBody);
    }
  };
});


text:
@interface ProductDetailTableViewCell : UITableViewCell

@property (strong, nonatomic) Product *product;

- (void)bind;
- (void)unbind;
@end


text:
module API
  class GoProxy < Grape::API::Instance
    helpers Gitlab::Golang
    helpers ::API::Helpers::PackagesHelpers

    # basic semver, except case encoded (A => !a)
    MODULE_VERSION_REGEX = /v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([-.!a-z0-9]+))?(?:\+([-.!a-z0-9]+))?/.freeze

    MODULE_VERSION_REQUIREMENTS = { module_version: MODULE_VERSION_REGEX }.freeze

    before { require_packages_enabled! }

    helpers do
      def case_decode(str)
        # Converts "github.com/!azure" to "github.com/Azure"
        #
        # From `go help goproxy`:
        #
        # > To avoid problems when serving from case-sensitive file systems,
        # > the <module> and <version> elements are case-encoded, replacing
        # > every uppercase letter with an exclamation mark followed by the
        # > corresponding lower-case letter: github.com/Azure encodes as
        # > github.com/!azure.

        str.gsub(/![[:alpha:]]/) { |s| s[1..].upcase }
      end

      def find_project!(id)
        # based on API::Helpers::Packages::BasicAuthHelpers#authorized_project_find!

        project = find_project(id)

        return project if project && can?(current_user, :read_project, project)

        if current_user
          not_found!('Project')
        else
          unauthorized!
        end
      end

      def find_module
        not_found! unless Feature.enabled?(:go_proxy, user_project)

        module_name = case_decode params[:module_name]
        bad_request!('Module Name') if module_name.blank?

        mod = ::Packages::Go::ModuleFinder.new(user_project, module_name).execute

        not_found! unless mod

        mod
      end

      def find_version
        module_version = case_decode params[:module_version]
        ver = ::Packages::Go::VersionFinder.new(find_module).find(module_version)

        not_found! unless ver&.valid?

        ver

      rescue ArgumentError
        not_found!
      end
    end

    params do
      requires :id, type: String, desc: 'The ID of a project'
      requires :module_name, type: String, desc: 'Module name', coerce_with: ->(val) { CGI.unescape(val) }
    end
    route_setting :authentication, job_token_allowed: true, basic_auth_personal_access_token: true
    resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
      before do
        authorize_read_package!
      end

      namespace ':id/packages/go/*module_name/@v' do
        desc 'Get all tagged versions for a given Go module' do
          detail 'See `go help goproxy`, GET $GOPROXY/<module>/@v/list. This feature was introduced in GitLab 13.1.'
        end
        get 'list' do
          mod = find_module

          content_type 'text/plain'
          mod.versions.map { |t| t.name }.join("\n")
        end

        desc 'Get information about the given module version' do
          detail 'See `go help goproxy`, GET $GOPROXY/<module>/@v/<version>.info. This feature was introduced in GitLab 13.1.'
          success ::API::Entities::GoModuleVersion
        end
        params do
          requires :module_version, type: String, desc: 'Module version'
        end
        get ':module_version.info', requirements: MODULE_VERSION_REQUIREMENTS do
          ver = find_version

          present ::Packages::Go::ModuleVersionPresenter.new(ver), with: ::API::Entities::GoModuleVersion
        end

        desc 'Get the module file of the given module version' do
          detail 'See `go help goproxy`, GET $GOPROXY/<module>/@v/<version>.mod. This feature was introduced in GitLab 13.1.'
        end
        params do
          requires :module_version, type: String, desc: 'Module version'
        end
        get ':module_version.mod', requirements: MODULE_VERSION_REQUIREMENTS do
          ver = find_version

          content_type 'text/plain'
          ver.gomod
        end

        desc 'Get a zip of the source of the given module version' do
          detail 'See `go help goproxy`, GET $GOPROXY/<module>/@v/<version>.zip. This feature was introduced in GitLab 13.1.'
        end
        params do
          requires :module_version, type: String, desc: 'Module version'
        end
        get ':module_version.zip', requirements: MODULE_VERSION_REQUIREMENTS do
          ver = find_version

          content_type 'application/zip'
          env['api.format'] = :binary
          header['Content-Disposition'] = ActionDispatch::Http::ContentDisposition.format(disposition: 'attachment', filename: ver.name + '.zip')
          header['Content-Transfer-Encoding'] = 'binary'
          status :ok
          body ver.archive.string
        end
      end
    end
  end
end


text:
CREATE OR REPLACE FUNCTION mongolike_tests ( ) RETURNS
json AS $$

// test statuses stored here
var test_statuses = [ ];

// assertion failure
function fail (actual, expected, message, operator) {
  test_statuses.push({
    actual:   actual,
    expected: expected,
    message:  message,
    operator: operator,
    status:  "fail"
  });
}

// assertion ok
function ok (actual, expected, message) {
  test_statuses.push({
    actual:   actual,
    expected: expected,
    status:   "pass",
    message:  message
  });
}

// assert methods
var assert = {
  equal: function (actual, expected, message) {
    if (actual != expected) {
      fail(actual, expected, message, "==");
    } else {
      ok(actual, expected, message);
    }
  }
};

// test_setup is run before any tests run
// create the test collection
function test_setup ( ) {
  plv8.execute("SELECT create_collection('test')");
}

// test_teardown is run after all tests have completed
// remove the collection
function test_teardown ( ) {
  plv8.execute("SELECT drop_collection('test')");
}

// [todo] - more tests
// tests to run, setup is run first, then any tests
// teardown is run after the tests are run
var tests = [
  {
    setup: function ( ) {
      plv8.execute("SELECT save('test', '{ \"foo\": \"bar\" }')");
    },
    teardown: function ( ) {
      plv8.execute("SELECT remove('test', '{ \"foo\": \"bar\" }')");
    },
    'save should work': function ( ) {
      var result = plv8.execute("SELECT * FROM col_test");
      assert.equal(result.length, 1, "save should work");
    }
  },
  {
    setup: function ( ) {
      plv8.execute("SELECT save('test', '{ \"foo\": \"bar\" }')");
      plv8.execute("SELECT remove('test', '{ \"foo\": \"bar\" }')");
    },
    'remove should work': function ( ) {
      var result = plv8.execute("SELECT * FROM col_test");
      assert.equal(result.length, 0, "remove should work");
    }
  },
  {
    setup: function ( ) {
      plv8.execute("SELECT save('test', '{ \"foo\": \"bar\" }')");
    },
    'find should work with an empty search': function ( ) {
      var result = plv8.execute("SELECT find('test', '{ }')");
      assert.equal(result.length, 1, "find should work with an empty search");
    },
    teardown: function ( ) {
      plv8.execute("SELECT remove('test', '{ \"foo\": \"bar\" }')");
    }
  },
  {
    setup: function ( ) {
      plv8.execute("SELECT save('test', '{ \"foo\": \"bar\" }')");
    },
    'find should work with just a collection': function ( ) {
      var result = plv8.execute("SELECT find('test')");
      assert.equal(result.length, 1, "find should work just a collection");
    },
    teardown: function ( ) {
      plv8.execute("SELECT remove('test', '{ \"foo\": \"bar\" }')");
    }
  },
  {
    setup: function ( ) {
      plv8.execute("SELECT save('test', '{ \"foo\": \"bar\" }')");
    },
    'find should work with a real search': function ( ) {
      var result = plv8.execute("SELECT find('test', '{ \"foo\": \"bar\" }')");
      assert.equal(result.length, 1, "find should work with a real search");
    },
    teardown: function ( ) {
      plv8.execute("SELECT remove('test', '{ \"foo\": \"bar\" }')");
    }
  },
  {
    setup: function ( ) {
      plv8.execute("SELECT ensureIndex('test', '{ \"foo\": \"bar\" }')");
    },
    'ensureIndex should create an index': function ( ) {
      var result = plv8.execute("SELECT * FROM collection_index");
      assert.equal(result.length, 1, "ensureIndex should create an index");
    },
    teardown: function ( ) {
      plv8.execute("SELECT removeIndex('test', '{ \"foo\": \"bar\" }'::json)");
    }
  },
  {
    setup: function ( ) {
      plv8.execute("SELECT ensureIndex('test', '{ \"foo\": \"bar\" }')");
    },
    'removeIndex should remove an index': function ( ) {
      plv8.execute("SELECT removeIndex('test', '{ \"foo\": \"bar\" }'::json)");
      var result = plv8.execute("SELECT * FROM collection_index");
      assert.equal(result.length, 0, "removeIndex should remove an index");
    },
    teardown: function ( ) {
    }
  }

];

test_setup();

// iterate through the tests, running each
for (var i = 0; i < tests.length; i++) {
  var test = tests[i];
  var keys = Object.keys(test).filter(function (item) {
    if (item === "setup" || item === "teardown") {
      return false;
    }

    return true;
  });

  // run the setup
  if (test.setup) {
    test.setup();
  }

  // run the tests
  for (var j = 0; j < keys.length; j++) {
    test[keys[j]]();
  }

  // run the teardown
  if (test.teardown) {
    test.teardown();
  }
}

test_teardown();

return test_statuses;
$$ LANGUAGE plv8 IMMUTABLE STRICT;


text:
Ext.namespace('Gemma');

Gemma.DIFF_THRESHOLD = 0.01;
Gemma.MAX_DIFF_RESULTS = 125;
/**
 *
 * Top level container for all sections of gene info
 *
 * To open the page at a specific tab, include ?tab=[tabName] suffix in the URL. Tab names are each tab's itemId.
 *
 * @class Gemma.GenePage
 * @extends Ext.TabPanel
 *
 */

Gemma.GenePage = Ext.extend(Ext.TabPanel, {

    defaults: {
        width: 850,
        autoScroll: true
    },
    deferredRender: true,
    listeners: {
        'tabchange': function (tabPanel, newTab) {
            newTab.fireEvent('tabChanged');
        },
        'beforetabchange': function (tabPanel, newTab, currTab) {
            // if false is returned, tab isn't changed
            if (currTab) {
                return currTab.fireEvent('leavingTab');
            }
            return true;
        }
    },
    initComponent: function () {

        var geneId = this.geneId;
        Gemma.GenePage.superclass.initComponent.call(this);

        // DETAILS TAB
        var details = new Gemma.GeneDetails({
            title: 'Overview',
            itemId: 'details',
            geneId: geneId
        });
        details.on('changeTab', function (tabName) {
            this.setActiveTab(tabName);
        }, this);
        this.add(details);

        this.add(new Gemma.GeneElementsPanel({
            title: 'Elements',
            itemId: 'elements',
            geneId: geneId
        }));

        this.add(this.initDiffExTab(geneId));

        this.add(this.initCoexTab(geneId));

        // Phenotype tab: don't show unless supported 13=fly, 14=worm
        if (this.geneTaxonId == 1 || this.geneTaxonId == 2 || this.geneTaxonId == 3 || this.geneTaxonId == 13
            || this.geneTaxonId == 14) {
            this.add(this.initPhenotypeTab(geneId));
        }

        this.add({
            title: 'Gene Ontology Terms',
            xtype: 'genegogrid',
            border: true,
            geneid: this.geneId,
            minHeight: 150,
            deferLoadToRender: true,
            itemId: 'goGrid'
        });

        // console.log( this.geneTaxonId );
        // ALLEN BRAIN ATLAS IMAGES don't add unless it's a mammal (human, mouse rat; taxon ids 1,2,3)
        if (this.geneTaxonId == 1 || this.geneTaxonId == 2 || this.geneTaxonId == 3) {
            this.add({
                xtype: 'geneallenbrainatlasimages',
                geneId: geneId,
                title: 'Expression Images',
                itemId: 'expression'
            });
        }

        var initialTab = 'details';
        this.loadSpecificTab = (document.URL.indexOf("?") > -1 && (document.URL.indexOf("tab=") > -1));
        if (this.loadSpecificTab) {
            var param = Ext.urlDecode(document.URL.substr(document.URL.indexOf("?") + 1));
            if (param.tab) {
                if (this.getComponent(param.tab) != undefined) {
                    initialTab = param.tab;
                }
            }
        }

        this.on('render', function () {
            this.setActiveTab(initialTab);
        });
    },

    initCoexTab: function (geneId) {
        var coexpressedGeneGrid = new Gemma.CoexpressionGridLight({
            title: 'Coexpression',
            colspan: 2,
            noSmallGemma: true,
            itemId: 'coex'
        });

        /*
         */
        coexpressedGeneGrid.on('render', function () {
            coexpressedGeneGrid.doSearch({
                geneIds: [geneId],
                quick: true,
                stringency: 1
            });
        });
        return coexpressedGeneGrid;

    },

    initDiffExTab: function (geneId) {
        var diffExGrid = new Gemma.ProbeLevelDiffExGrid({
            title: 'Differential Expression',
            itemId: 'diffEx'
        });
        diffExGrid.on('render', function () {
            var visColumnIndex = diffExGrid.getColumnModel().getIndexById('visualize');
            diffExGrid.getColumnModel().setHidden(visColumnIndex, false);
            // this should go in grid itself, but it wasn't working properly (or at all)
            if (!this.loadMask && this.getEl()) {
                this.loadMask = new Ext.LoadMask(this.getEl(), {
                    msg: Gemma.StatusText.Loading.generic,
                    msgCls: 'absolute-position-loading-mask ext-el-mask-msg x-mask-loading'
                });
            }
            this.loadMask.show();
            diffExGrid.getStore().load({
                params: [geneId, Gemma.DIFF_THRESHOLD, Gemma.MAX_DIFF_RESULTS]
            });
        });
        return diffExGrid;
    },

    /**
     * @memberOf Gemma.GenePage
     */
    initPhenotypeTab: function (geneId) {
        var phenotypeEvidenceGridPanel = new Gemma.PhenotypeEvidenceGridPanel({
            title: 'Phenocarta',
            iconCls: 'icon-neurocarta',
            itemId: 'phenotypes',
            hasRelevanceColumn: false,
            displayPhenotypeAsLink: true,
            displayEvidenceCodeFullName: true,
            deferLoadToRender: true,
            currentGene: {
                id: this.geneId,
                ncbiId: this.geneNcbiId,
                officialSymbol: this.geneSymbol,
                officialName: this.geneName,
                taxonCommonName: this.geneTaxonName,
                taxonId: this.geneTaxonId
            },
            listeners: {
                phenotypeAssociationChanged: function (phenotypes, gene) {
                    this.getStore().reload();
                }
            }
        });

        phenotypeEvidenceGridPanel.getView().emptyText = Gemma.HelpText.WidgetDefaults.PhenotypePanel.noRecordEmptyText;

        // This code fails because reload() is called when there are no valid parameters for the call. See bug 4348

        // In PhenotypePanel, when a user logs in, PhenotypeGridPanel will be reloaded first, followed by
        // PhenotypeGeneGridPanel and then PhenotypeEvidenceGridPanel. So, the following code should not
        // be done in PhenotypeEvidenceGridPanel. Otherwise, PhenotypeEvidenceGridPanel would be reloaded twice.
        // Gemma.Application.currentUser.on( "logIn", function( userName, isAdmin ) {
        // phenotypeEvidenceGridPanel.getStore().reload();
        // }, this );

        return phenotypeEvidenceGridPanel;
    }

});


text:
//-----------------------------------------------------------------------
// <copyright file="UserStreamOptions.cs" company="Patrick 'Ricky' Smith">
//  This file is part of the Twitterizer library (http://www.twitterizer.net/)
//
//  Copyright (c) 2010, Patrick "Ricky" Smith (ricky@digitally-born.com)
//  All rights reserved.
//
//  Redistribution and use in source and binary forms, with or without modification, are
//  permitted provided that the following conditions are met:
//
//  - Redistributions of source code must retain the above copyright notice, this list
//    of conditions and the following disclaimer.
//  - Redistributions in binary form must reproduce the above copyright notice, this list
//    of conditions and the following disclaimer in the documentation and/or other
//    materials provided with the distribution.
//  - Neither the name of the Twitterizer nor the names of its contributors may be
//    used to endorse or promote products derived from this software without specific
//    prior written permission.
//
//  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
//  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
//  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
//  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
//  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
//  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
//  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
//  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
//  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//  POSSIBILITY OF SUCH DAMAGE.
// </copyright>
// <author>David Golden</author>
// <summary>The User Stream Options parameters class.</summary>
//-----------------------------------------------------------------------
namespace Twitterizer.Streaming
{
    using System.Collections.Generic;

    public class UserStreamOptions : StreamOptions
    {
        public UserStreamOptions() { }

        /// <summary>
        /// Gets or sets whether to request all replies from the stream.
        /// </summary>
        /// <value>Boolean.</value>
        /// <remarks>Will return all replies to a users stream (eg where the user doesn't follow both people replying to each other).</remarks>
        public bool AllReplies { get; set; }
    }
}


text:
from beritest_tools import BaseBERITestCase
from nose.plugins.attrib import attr

#
# XXX: our test code saves the CP0 config register in self.MIPS.s1 so that
# we can determine how this test should behave.  Our test cases don't
# currently check that, so may return undesired failures.  The third check
# below should be conditioned on (DC > 0) || (SC == 1) -- i.e., a cache is
# present, which might cause it not to incorrectly fire for gxemul.
#

class test_cache_instruction_data(BaseBERITestCase):

    @attr('cache')
    @attr('counterdev')
    def test_initial_uncached_read(self):
        self.assertRegisterEqual(self.MIPS.a0, 0, "Initial read of count register is incorrect")

    @attr('cache')
    @attr('counterdev')
    def test_initial_cached_read(self):
        self.assertRegisterEqual(self.MIPS.a1, 1, "Initial cached read failure")

    @attr('cache')
    @attr('counterdev')
    def test_second_cached_read(self):
        self.assertRegisterEqual(self.MIPS.a2, 1, "Second cached read failure")

    @attr('cache')
    @attr('counterdev')
    def test_after_L1_writeback_cached_read(self):
        self.assertRegisterEqual(self.MIPS.a3, 1, "Cached read after data L1 writeback is incorrect")

    @attr('cache')
    @attr('counterdev')
    def test_after_L1_writeback_invalidate_cached_read(self):
        self.assertRegisterEqual(self.MIPS.a4, 1, "Cached read after data L1 writeback/invalidate is incorrect")

    @attr('cache')
    @attr('counterdev')
    def test_after_L1_invalidate_cached_read(self):
        self.assertRegisterEqual(self.MIPS.a5, 1, "Cached read after data L1 invalidate is incorrect")

    @attr('cache')
    @attr('counterdev')
    def test_after_L1_and_L2_invalidate_cached_read(self):
        self.assertRegisterEqual(self.MIPS.a6, 1, "Cached read after data and L2 invalidate is incorrect")

    @attr('cache')
    @attr('loadcachetag')
    def test_index_load_tag_dcache(self):
        self.assertRegisterEqual(self.MIPS.a7, 0x000000004001fe00, "Index load tag dCache unexpected value")


text:
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/background_sync/background_sync_controller_impl.h"

#include <stdint.h>

#include "base/macros.h"
#include "chrome/common/features.h"
#include "chrome/test/base/testing_profile.h"
#include "components/rappor/test_rappor_service.h"
#include "components/variations/variations_associated_data.h"
#include "content/public/browser/background_sync_parameters.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

#if BUILDFLAG(ANDROID_JAVA_UI)
#include "chrome/browser/android/background_sync_launcher_android.h"
#endif

namespace {

using content::BackgroundSyncController;

const char kFieldTrialGroup[] = "GroupA";

class TestBackgroundSyncControllerImpl : public BackgroundSyncControllerImpl {
 public:
  TestBackgroundSyncControllerImpl(Profile* profile,
                                   rappor::TestRapporService* rappor_service)
      : BackgroundSyncControllerImpl(profile),
        rappor_service_(rappor_service) {}

 protected:
  rappor::RapporService* GetRapporService() override { return rappor_service_; }

 private:
  rappor::TestRapporService* rappor_service_;

  DISALLOW_COPY_AND_ASSIGN(TestBackgroundSyncControllerImpl);
};

class BackgroundSyncControllerImplTest : public testing::Test {
 protected:
  BackgroundSyncControllerImplTest()
      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
        controller_(
            new TestBackgroundSyncControllerImpl(&profile_, &rappor_service_)) {
    ResetFieldTrialList();
#if BUILDFLAG(ANDROID_JAVA_UI)
    BackgroundSyncLauncherAndroid::SetPlayServicesVersionCheckDisabledForTests(
        true);
#endif
  }

  void ResetFieldTrialList() {
    field_trial_list_.reset(
        new base::FieldTrialList(nullptr /* entropy provider */));
    variations::testing::ClearAllVariationParams();
    base::FieldTrialList::CreateFieldTrial(
        BackgroundSyncControllerImpl::kFieldTrialName, kFieldTrialGroup);
  }

  content::TestBrowserThreadBundle thread_bundle_;
  TestingProfile profile_;
  rappor::TestRapporService rappor_service_;
  std::unique_ptr<TestBackgroundSyncControllerImpl> controller_;
  std::unique_ptr<base::FieldTrialList> field_trial_list_;

  DISALLOW_COPY_AND_ASSIGN(BackgroundSyncControllerImplTest);
};

TEST_F(BackgroundSyncControllerImplTest, RapporTest) {
  GURL url("http://www.example.com/foo/");
  EXPECT_EQ(0, rappor_service_.GetReportsCount());
  controller_->NotifyBackgroundSyncRegistered(url.GetOrigin());
  EXPECT_EQ(1, rappor_service_.GetReportsCount());

  std::string sample;
  rappor::RapporType type;
  LOG(ERROR) << url.GetOrigin().GetOrigin();
  EXPECT_TRUE(rappor_service_.GetRecordedSampleForMetric(
      "BackgroundSync.Register.Origin", &sample, &type));
  EXPECT_EQ("example.com", sample);
  EXPECT_EQ(rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, type);
}

TEST_F(BackgroundSyncControllerImplTest, NoRapporWhenOffTheRecord) {
  GURL url("http://www.example.com/foo/");
  controller_.reset(new TestBackgroundSyncControllerImpl(
      profile_.GetOffTheRecordProfile(), &rappor_service_));

  controller_->NotifyBackgroundSyncRegistered(url.GetOrigin());
  EXPECT_EQ(0, rappor_service_.GetReportsCount());
}

TEST_F(BackgroundSyncControllerImplTest, NoFieldTrial) {
  content::BackgroundSyncParameters original;
  content::BackgroundSyncParameters overrides;
  controller_->GetParameterOverrides(&overrides);
  EXPECT_EQ(original, overrides);
}

TEST_F(BackgroundSyncControllerImplTest, SomeParamsSet) {
  std::map<std::string, std::string> field_parameters;
  field_parameters[BackgroundSyncControllerImpl::kDisabledParameterName] =
      "TrUe";
  field_parameters[BackgroundSyncControllerImpl::kInitialRetryParameterName] =
      "100";
  ASSERT_TRUE(variations::AssociateVariationParams(
      BackgroundSyncControllerImpl::kFieldTrialName, kFieldTrialGroup,
      field_parameters));

  content::BackgroundSyncParameters original;
  content::BackgroundSyncParameters sync_parameters;
  controller_->GetParameterOverrides(&sync_parameters);
  EXPECT_TRUE(sync_parameters.disable);
  EXPECT_EQ(base::TimeDelta::FromSeconds(100),
            sync_parameters.initial_retry_delay);

  EXPECT_EQ(original.max_sync_attempts, sync_parameters.max_sync_attempts);
  EXPECT_EQ(original.retry_delay_factor, sync_parameters.retry_delay_factor);
  EXPECT_EQ(original.min_sync_recovery_time,
            sync_parameters.min_sync_recovery_time);
  EXPECT_EQ(original.max_sync_event_duration,
            sync_parameters.max_sync_event_duration);
}

TEST_F(BackgroundSyncControllerImplTest, AllParamsSet) {
  std::map<std::string, std::string> field_parameters;
  field_parameters[BackgroundSyncControllerImpl::kDisabledParameterName] =
      "FALSE";
  field_parameters[BackgroundSyncControllerImpl::kInitialRetryParameterName] =
      "100";
  field_parameters[BackgroundSyncControllerImpl::kMaxAttemptsParameterName] =
      "200";
  field_parameters
      [BackgroundSyncControllerImpl::kRetryDelayFactorParameterName] = "300";
  field_parameters[BackgroundSyncControllerImpl::kMinSyncRecoveryTimeName] =
      "400";
  field_parameters[BackgroundSyncControllerImpl::kMaxSyncEventDurationName] =
      "500";
  ASSERT_TRUE(variations::AssociateVariationParams(
      BackgroundSyncControllerImpl::kFieldTrialName, kFieldTrialGroup,
      field_parameters));

  content::BackgroundSyncParameters sync_parameters;
  controller_->GetParameterOverrides(&sync_parameters);

  EXPECT_FALSE(sync_parameters.disable);
  EXPECT_EQ(base::TimeDelta::FromSeconds(100),
            sync_parameters.initial_retry_delay);
  EXPECT_EQ(200, sync_parameters.max_sync_attempts);
  EXPECT_EQ(300, sync_parameters.retry_delay_factor);
  EXPECT_EQ(base::TimeDelta::FromSeconds(400),
            sync_parameters.min_sync_recovery_time);
  EXPECT_EQ(base::TimeDelta::FromSeconds(500),
            sync_parameters.max_sync_event_duration);
}

}  // namespace


text:
cask 'google-play-music-desktop-player' do
  version '3.0.0'
  sha256 '7196a2a6e179ec085c33849e735a6f6725b009d0415cf7c19f4f2dfd199ec7a3'

  # github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL- was verified as official when first introduced to the cask
  url "https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/releases/download/#{version}/Google.Play.Music.Desktop.Player.OSX.zip"
  appcast 'https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/releases.atom',
          checkpoint: '4764609a96b400945bcaa7e0ae48da9428159f18314050f2ba9692aaa6e5afc6'
  name 'Google Play Music Desktop Player'
  homepage 'http://www.googleplaymusicdesktopplayer.com/'
  license :mit

  app 'Google Play Music Desktop Player.app'

  zap delete: [
                '~/Library/Application\ Support/Google\ Play\ Music\ Desktop\ Player',
                '~/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/google-play-music-desktop-player.sfl',
                '~/Library/Application\ Support/google-play-music-desktop-player.ShipIt',
                '~/Library/Caches/Google\ Play\ Music\ Desktop\ Player',
                '~/Library/Caches/google-play-music-desktop-player',
                '~/Library/Cookies/google-play-music-desktop-player.binarycookies',
                '~/Library/Preferences/google-play-music-desktop-player.plist',
                '~/Library/Saved\ Application\ State/google-play-music-desktop-player.savedState'
              ]
end


text:
layout: module-doc
title: Grid
description: "Sass module for simple float style grids"
name: designkit-grid
source: https://github.com/rightscale-design/designkit-grid
npm: https://www.npmjs.com/package/designkit-grid
version: 0.0.3
updated: 8/09/2016
css-link: https://raw.githubusercontent.com/rightscale-design/designkit-grid/master/css/designkit-grid.css
install: "npm install designkit-grid --save"

slug: modules
weight: 13
---

## Install

```bash
{{ page.install }}
```

## Examples

### Basic Usage

Using floats, padding, and widths to construct a simple grid.

**HTML**

```html
<!-- Column -->
<div class="container">
  <div class="row">
    <div class="col-md-4"></div>
    <div class="col-md-4"></div>
    <div class="col-md-4"></div>
  </div>
</div>
```

## CSS


text: CKEDITOR.plugins.setLang("codesnippet","eo",{button:"Enmeti kodaĵon",codeContents:"Code content",emptySnippetError:"A code snippet cannot be empty.",language:"Language",title:"Code snippet"});


text:
<Record>
<Term>Combined Anesthetics</Term>
<SemanticType>Pharmacologic Substance</SemanticType>
<ParentTerm>Anesthetics</ParentTerm>
<ClassificationPath>Chemical Actions and Uses/Pharmacologic Actions/Therapeutic Uses/Central Nervous System Agents/Central Nervous System Depressants/Anesthetics/Anesthetics, Combined</ClassificationPath>
<ClassificationPath>Chemical Actions and Uses/Pharmacologic Actions/Physiological Effects of Drugs/Central Nervous System Depressants/Anesthetics/Anesthetics, Combined</ClassificationPath>
<BroaderTerm>Therapeutic Uses</BroaderTerm>
<BroaderTerm>Pharmacologic Actions</BroaderTerm>
<BroaderTerm>Anesthetics</BroaderTerm>
<BroaderTerm>Central Nervous System Depressants</BroaderTerm>
<BroaderTerm>Chemical Actions and Uses</BroaderTerm>
<BroaderTerm>Physiological Effects of Drugs</BroaderTerm>
<BroaderTerm>Anesthetics, Combined</BroaderTerm>
<BroaderTerm>Central Nervous System Agents</BroaderTerm>
<Synonym>Combined Anesthetics</Synonym>
<Description>The use of two or more chemicals simultaneously or sequentially to induce anesthesia. The drugs need not be in the same dosage form.</Description>
<Source>MeSH</Source>
</Record>


text:
layout: archive
title: "Group"
date: 2015-07-15
modified:
excerpt: "Collaborators."
tags: []
image:
  feature: Dolomites_1500x500.jpg
  teaser: Default_400x250.jpg
---

I've been lucky to collaborate with some amazing PhD students and postdocs. I can only hope they learned as much from me as I learned from them.

{% include toc.html %}

## Current Students and postdocs

Louis Kinnear | [**_Profile_**](https://www.ed.ac.uk/geosciences/people/person.html?indv=4127) | Soil weathering fluxes and clay formation rates as a function of erosion.
Noorzalianee Ghazali | [**_Profile_**](https://www.ed.ac.uk/geosciences/people/person.html?indv=4433) | Mangrove change.
Marina Ruiz Sánchez-Oro | [**_Profile_**](https://www.ed.ac.uk/geosciences/people/person.html?indv=13531) | Climate and landscape evolution.
Callum Strong | [**_Profile_**](https://www.ed.ac.uk/geosciences/people/person.html?indv=11090) | Evolution of African drainage systems. Co-supervised with Mikael Attal and Hugh Sinclair.
Justine Domingo | [**_Profile_**](https://www.ed.ac.uk/geosciences/people/person.html?indv=7001) | Sediment and pollutant transport in the Philippines. Co-supervised with Mikael Attal and Bryne Ngwenya.
Donny Wahyudi | [**_Profile_**](https://www.ed.ac.uk/geosciences/people/person.html?indv=12284) | Tectonic geomorphology. Co-supervised with Hugh Sinclair.
Saraswati Thapa | [**_Profile_**](https://scholar.google.com/citations?user=X5zT-UgAAAAJ&hl=en) | Flooding and sediment transport. Co-supervised with Hugh Sinclair and Mikael Attal.
Prakash Pokhrel | | Tectonic geomorphology of the Kathmandu Basin. Co-supervised with Hugh Sinclair and Mikael Attal.
Anthony Hoskins | |  Drainage reorganization in South Baja California. Co-supervised with Mikael Attal, David Sanderson (SUERC), and Miguel Castillo (UNAM).
Anya Towers | [**_Research site_**](https://storymaps.arcgis.com/stories/3c048dc7f1fd4c468ef2ec7086c84d82) | Grain sizes in Scotland. Co-supervised with Mikael Attal and Hugh Sinclair.
Qiuyang Chen | | River meandering and vegetation Co supervised with Mikael Attal and Stephen Hancock

## Current visitors

Feng Zhiyong | | Mangrove evolution

## Former PhD students, postdocs and researchers

Lynsey MacLeary (nee Callaghan) | [**_linkedin_**](https://www.linkedin.com/in/lynsey-macleary-a0b3633b/?originalSubdomain=uk ) | [**_PhD in 2012_**](https://era.ed.ac.uk/handle/1842/6213). Vegetation and landscape evolution. Now an environmental consultant.
Martin D. Hurst | [**_Scholar_**](https://scholar.google.com/citations?user=9--6x5sAAAAJ&hl=en) [**_Profile_**](https://www.gla.ac.uk/schools/ges/staff/martinhurst/) | [**_PhD in 2013_**](https://era.ed.ac.uk/handle/1842/12228). Hillslope and coastal geomorphlogy. Now lecturer Glasgow University.
David T. Milodowski | [**_Scholar_**](https://scholar.google.com/citations?user=ay1R3UgAAAAJ&hl=en) [**_Profile_**](https://www.research.ed.ac.uk/portal/en/persons/david-milodowski(0130326f-fa97-48ed-843b-7bcc72e89065).html) | [**_PhD in 2016_**](https://era.ed.ac.uk/handle/1842/20438). Vegetation, topographic analysis, lidar, geomorphlogy. Now PDRA at Edinburgh University.
Stuart W.D. Grieve | [**_Scholar_**](https://scholar.google.com/citations?user=LnCvUwwAAAAJ&hl=en) [**_Profile_**](https://swdg.io/) | [**_PhD in 2016_**](https://era.ed.ac.uk/handle/1842/25398). Hillslope geomorphology, natural hazards, topographic analysis. Now lecturer at Queen Mary University London
Fiona J. Clubb | [**_Scholar_**](https://scholar.google.com/citations?user=LnCvUwwAAAAJ&hl=en) [**_Profile_**](https://fclubb.github.io/) | [**_PhD in 2017_**](https://era.ed.ac.uk/handle/1842/28817). Topographic analysis, hydrology, landscape evolution, geomorphology. Now assistant professor at Durham University
John Preston | [**_linkedin_**](https://www.linkedin.com/in/john-preston-61b76a22/?originalSubdomain=uk) | [**_PhD in 2017_**](https://era.ed.ac.uk/handle/1842/31430). Coastal landscape evolution and Vikings. Now environmental consultant.
Calum Bradbury | [**_linkedin_**](https://www.linkedin.com/in/calum-bradbury-gis/?originalSubdomain=nz) | Masters by research in 2018. Controls on channel steepness in the Himalyas. Now environmental consultant in New Zealand.
Dan Hobley | [**_Scholar_**](https://scholar.google.com/citations?user=kJ13b-kAAAAJ&hl=en) [**_Profile_**](https://www.cardiff.ac.uk/people/view/481890-) | Postdoc in 2013, on project with Hugh Sinclair. Numerical modelling, landscape evolution, planetary geomorphology, sedimentology. Now lecturer at Cardiff University
Marie-Alice Harel | [**_Profile_**](http://www.maharel.com/) | Postdoc in 2015. Cosmogenics, landscape evolution, and hillslope hydrology. [**_Now an illustrator_**](https://www.etsy.com/uk/shop/maharelillo).
Declan Valters | [**_Scholar_**](https://scholar.google.com/citations?user=0OIHQmIAAAAJ&hl=en) [**_Profile_**](https://www.bgs.ac.uk/staff/profiles/52311.html) | Landscape evolution, hydrology. Declan was an MEarthSci student at Edinburgh and during his PhD at Manchester and as a research software engineer helped develop LSDTopoTools. Now research software engineer at British Geological Survey
Guillaume Goodwin | [**_Scholar_**](https://scholar.google.com/citations?user=Or3grvoAAAAJ&hl=en&oi=ao) [**_Profile_**](https://www.ed.ac.uk/geosciences/people/person.html?indv=4505) | Salt marsh evolution. Now at University of Padova
Boris Gailleton | [**_Scholar_**](https://scholar.google.com/citations?user=r5HIc00AAAAJ&hl=en&oi=ao) [**_Profile_**](https://www.gfz-potsdam.de/en/staff/boris-gailleton/) | Tectonic evolution of the Carpathians and topographic analysis. Co-supervised with Hugh Sinclair. Now at GFZ Potsdam
Wang Yanzai |  | Soil erosion and tectonic geomorphology
Yan Luobin | [**_Scholar_**](https://scholar.google.com/citations?user=_ASOJmAAAAAJ&hl=en&oi=ao) | Evolution of sandstone landscapes

## Opportunities in the Land Surface Dynamics Group

### Studentships

Our group has a wide range of both PhD and Master by research students. Our students often work collaboratively (see our publication lists: frequently papers have more than one student author) and our vibrant group meets weekly for informal talks, paper discussions, etc. We are open to enquiries about PhD projects. If you are considering doing a PhD with us, please don't hesitate to contact some of our past or current students.

#### PhD

The main source of funding for our PhD students is through the E4 Doctoral Training Partnership: [E4DTP](https://www.ed.ac.uk/e4-dtp)

E4 studentships are open to any nationality, but there are a limited number of places for studnets who are not resident in the UK. Please see the following website for details: [Applications for non UK residents](https://www.ed.ac.uk/e4-dtp/how-to-apply/entry-and-eligibility-criteria)

There are several other sources of potential PhD funding, and information about these can be found here: [Funding sources for PhD](https://www.ed.ac.uk/geosciences/postgraduate/phd/fees-funding/funding)

#### Masters by research

We are open to students doing a Masters by research, but we cannot supply funding for this so you will need to secure your own funding. See this link: [Funding for MSc by research](https://www.ed.ac.uk/geosciences/postgraduate/phd/fees-funding/funding)

#### Taught Masters

We welcome students in taught Masters who wish to do a thesis on topics in geomorphology. To apply for taught masters, see this website: [Taught master's at Edinburgh](https://www.ed.ac.uk/geosciences/postgraduate/taught-masters)

### Post-doctoral and Staff opportunities

If you have a PhD and want a research position with us, there are three options:
* Competitive fellowships
* Post-docs linked to funding we have received
* Funding from your country

#### Fellowships

We welcome enquiries about fellowships. One thing to note is that all of these fellowships are very competitive. You will need both a strong proposal and an excellent publication record. The most common fellowships are (please see links for deadlines)
* NERC fellowships. Most potential fellows apply to the Independent Research fellowships but note that other schemes have higher success rates. See the NERC website: [NERC Fellowships](https://nerc.ukri.org/funding/available/fellowships/)
* Marie Skłodowska-Curie fellowships. Again, these are both prestigious and very competitive. See information here: [M S-C fellowships](https://ec.europa.eu/research/mariecurieactions/node_en)
* Leverhulme fellowships:  [Leverhulme fellowship information](https://www.leverhulme.ac.uk/early-career-fellowships)
* Newton International fellowships: [Newton fellowship information](https://royalsociety.org/grants-schemes-awards/grants/newton-international/)
* Royal Society of Edinburgh Fellowships: [RSE fellowship information](https://www.rse.org.uk/awards/rse-personal-research-fellowships/)
* If you are from the United States, the NSF considers post-doctoral fellowships that are based abroad. See this website for information: [NSF fellowship information](https://www.nsf.gov/funding/pgm_summ.jsp?pims_id=503144&org=NSF)

#### Post-docs linked to Land Surface Dynamics funded projects

We occasionally have funding for post-doctoral researchers. The best way to see if any are available is to follow our twitter account: [Edinburgh landsurf twitter](https://twitter.com/EdinLandSurf)

#### Funding from your country

There are many opportunities for funding from other countries (China, in particular, has many funding opportunities): if your native country has researcher funding we are happy to discuss letters of support and co-developed projects.

### Visiting Students

We frequently host visiting students, researchers and staff. See this website for information: [visiting student information](https://www.ed.ac.uk/geosciences/postgraduate/phd/visiting-students). Please get in touch about the organising a visit. Note that we do not have funding for visitors.

#### Collaborations

We welcome collaborative proposals. Come and see us at conferences or drop us an e-mail!


text:
Helps you to navigate a file structure based on *function* definition and jump to the line.

It has more structural view than what `cmd + R` has.

## Usage:
1. Focus on editor area

2. Press `cmd + F12` or `ctrl + F12` to toggle visibility, also press `cmd + F12`, `ctrl + F12` or `ESC` to hide.

![](https://github.com/liujingbreak/atom-js-grammar/raw/master/preview.png)

Excellent viewer for test spec-like file structure.
![](https://github.com/liujingbreak/atom-js-grammar/raw/master/preview2.jpg)

### Supported grammar structure
This plugin uses `acorn-jsx` to parse JS grammar structure, so it should support parsing all versions of ECMAScript and JSX script.

#### What will be shown in popup list
- Class decalaration node which has any member function
- Function type node
- Arrow function node
- Nested function type node
- Variable name which is assigned to a function type node
- JSON object literal which contains any property whose value is a function type node
- Object property whose value is a function type node
- Function call expression whose second argument is a function callback (helps to view Test spec-like file structure)


text:
<!DOCTYPE html>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, minimal-ui" />

        <title>JS Dotty</title>

        <link href="/css/greyspots.css" type="text/css" rel="stylesheet" />

        <gs-page>
            <gs-header>

JSDotty

            </gs-header>
            <gs-body padded>
                Input:
                <gs-memo id="memo-input" rows="6"></gs-memo>

                <gs-button onclick="jsdotty();">Run JSDotty</gs-button>

                Output:
                <gs-memo id="memo-output" rows="6"></gs-memo>

            </gs-body>
        </gs-page>


text:
package org.onosproject.pcepio.types;

import java.util.LinkedList;
import java.util.ListIterator;

import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.exceptions.PcepParseException;
import org.onosproject.pcepio.protocol.PcepVersion;

import com.google.common.base.MoreObjects;

/**
 * Provides Pcep Rsvp User Error Spec.
 */
public class PcepRsvpUserErrorSpec implements PcepRsvpErrorSpec {

    /*
        RSVP error spec object header.
        0             1              2             3
    +-------------+-------------+-------------+-------------+
    |       Length (bytes)      |  Class-Num  |   C-Type    |
    +-------------+-------------+-------------+-------------+
    |                                                       |
    //                  (Object contents)                   //
    |                                                       |
    +-------------+-------------+-------------+-------------+

    Ref : USER_ERROR_SPEC @ RFC5284.
    USER_ERROR_SPEC object: Class = 194, C-Type = 1

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +---------------+---------------+---------------+---------------+
    |                       Enterprise Number                       |
    +---------------+---------------+---------------+---------------+
    |    Sub Org    |  Err Desc Len |        User Error Value       |
    +---------------+---------------+---------------+---------------+
    |                                                               |
    ~                       Error Description                       ~
    |                                                               |
    +---------------+---------------+---------------+---------------+
    |                                                               |
    ~                     User-Defined Subobjects                   ~
    |                                                               |
    +---------------+---------------+---------------+---------------+
     */

    public static final byte CLASS_NUM = (byte) 0xc2;
    public static final byte CLASS_TYPE = 0x01;

    private PcepRsvpSpecObjHeader objHeader;
    private int enterpriseNum;
    private byte subOrg;
    private byte errDescLen;
    private short userErrorValue;
    private byte[] errDesc;
    private LinkedList<PcepValueType> llRsvpUserSpecSubObj;

    /**
     * Default constructor.
     *
     * @param objHeader pcep rsvp spec object header
     * @param enterpriseNum enterprise number
     * @param subOrg organization identifier value
     * @param errDescLen error description length
     * @param userErrorValue user error value
     * @param errDesc error description
     * @param llRsvpUserSpecSubObj list of subobjects
     */
    public PcepRsvpUserErrorSpec(PcepRsvpSpecObjHeader objHeader, int enterpriseNum, byte subOrg, byte errDescLen,
            short userErrorValue, byte[] errDesc, LinkedList<PcepValueType> llRsvpUserSpecSubObj) {
        this.objHeader = objHeader;
        this.enterpriseNum = enterpriseNum;
        this.subOrg = subOrg;
        this.errDescLen = errDescLen;
        this.userErrorValue = userErrorValue;
        this.errDesc = errDesc;
        this.llRsvpUserSpecSubObj = llRsvpUserSpecSubObj;
    }

    @Override
    public int write(ChannelBuffer cb) {
        int objLenIndex = objHeader.write(cb);
        cb.writeInt(enterpriseNum);
        cb.writeByte(subOrg);
        cb.writeByte(errDescLen);
        cb.writeShort(userErrorValue);
        cb.writeBytes(errDesc);

        if (llRsvpUserSpecSubObj != null) {

            ListIterator<PcepValueType> listIterator = llRsvpUserSpecSubObj.listIterator();

            while (listIterator.hasNext()) {
                PcepValueType tlv = listIterator.next();
                if (tlv == null) {
                    continue;
                }
                tlv.write(cb);
                // need to take care of padding
                int pad = tlv.getLength() % 4;
                if (0 != pad) {
                    pad = 4 - pad;
                    for (int i = 0; i < pad; ++i) {
                        cb.writeByte((byte) 0);
                    }
                }
            }
        }
        short objLen = (short) (cb.writerIndex() - objLenIndex);
        cb.setShort(objLenIndex, objLen);
        return objLen;
    }

    /**
     * Reads the channel buffer and returns object of PcepRsvpErrorSpec.
     *
     * @param cb of type channel buffer
     * @return object of PcepRsvpErrorSpec
     * @throws PcepParseException when expected object is not received
     */
    public static PcepRsvpErrorSpec read(ChannelBuffer cb) throws PcepParseException {
        PcepRsvpSpecObjHeader objHeader;
        int enterpriseNum;
        byte subOrg;
        byte errDescLen;
        short userErrorValue;
        byte[] errDesc;
        LinkedList<PcepValueType> llRsvpUserSpecSubObj = null;

        objHeader = PcepRsvpSpecObjHeader.read(cb);

        if (objHeader.getObjClassNum() != CLASS_NUM || objHeader.getObjClassType() != CLASS_TYPE) {
            throw new PcepParseException("Expected PcepRsvpUserErrorSpec object.");
        }
        enterpriseNum = cb.readInt();
        subOrg = cb.readByte();
        errDescLen = cb.readByte();
        userErrorValue = cb.readShort();
        errDesc = new byte[errDescLen];
        cb.readBytes(errDesc, 0, errDescLen);

        llRsvpUserSpecSubObj = parseErrSpecSubObj(cb);

        return new PcepRsvpUserErrorSpec(objHeader, enterpriseNum, subOrg, errDescLen, userErrorValue, errDesc,
                llRsvpUserSpecSubObj);
    }

    private static LinkedList<PcepValueType> parseErrSpecSubObj(ChannelBuffer cb) throws PcepParseException {
        LinkedList<PcepValueType> llRsvpUserSpecSubObj = new LinkedList<>();
        while (0 < cb.readableBytes()) {
            PcepValueType tlv = null;
            short hType = cb.readShort();
            int iValue = 0;
            //short hLength = cb.readShort();
            switch (hType) {
            case AutonomousSystemSubTlv.TYPE:
                iValue = cb.readInt();
                tlv = new AutonomousSystemSubTlv(iValue);
                break;
            default:
                throw new PcepParseException("Unsupported Sub TLV type :" + hType);
            }
            llRsvpUserSpecSubObj.add(tlv);
        }
        return llRsvpUserSpecSubObj;
    }

    @Override
    public PcepVersion getVersion() {
        return PcepVersion.PCEP_1;
    }

    @Override
    public short getType() {
        return StatefulRsvpErrorSpecTlv.TYPE;
    }

    @Override
    public short getLength() {
        return objHeader.getObjLen();
    }

    @Override
    public byte getClassNum() {
        return CLASS_NUM;
    }

    @Override
    public byte getClassType() {
        return CLASS_TYPE;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(getClass())
                .add("enterpriseNumber", enterpriseNum)
                .add("subOrganization", subOrg)
                .add("errDescLength", errDescLen)
                .add("userErrorValue", userErrorValue)
                .add("errDesc", errDesc)
                .add("RsvpUserSpecSubObject", llRsvpUserSpecSubObj)
                .toString();
    }
}


text:
package com.report.common.dal.admin.entity.vo;

public class RoleCriteriaModel
{
	private String roleCode;
	private String roleName;

	public String getRoleCode() {
		return roleCode;
	}

	public void setRoleCode(String roleCode) {
		if(roleCode != null)
		{
			roleCode = roleCode.trim();
			if(roleCode.length() > 0)
			{
				this.roleCode = roleCode + "%";
			}
		}
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		if(roleName != null)
		{
			roleName = roleName.trim();
			if(roleName.length() > 0)
			{
				this.roleName = roleName + "%";
			}
		}
	}
}


text:
using System;
using System.Linq;
using MilpManager.Abstraction;

namespace MilpManager.Implementation.Operations
{
    public class ExponentiationCalculator : IOperationCalculator
    {
        public bool SupportsOperation(OperationType type, params IVariable[] arguments)
        {
            return type == OperationType.Exponentiation && arguments.Length == 2 &&
                   ((arguments.All(a => (a.IsPositiveOrZero() || a.IsBinary()) && a.IsInteger())) || arguments.All(a => a.IsConstant()));
        }

        public IVariable Calculate(IMilpManager milpManager, OperationType type, params IVariable[] arguments)
        {
            if (!SupportsOperation(type, arguments)) throw new NotSupportedException(SolverUtilities.FormatUnsupportedMessage(type, arguments));
            if (arguments.All(a => a.IsConstant()))
            {
                var constantResult = Math.Pow(arguments[0].ConstantValue.Value, arguments[1].ConstantValue.Value);
                if (arguments.All(a => a.IsInteger()))
                {
                    return milpManager.FromConstant((int) constantResult);
                }
                else
                {
                    return milpManager.FromConstant(constantResult);
                }
            }
            var number = arguments[0];
            var power = arguments[1];

            var one = milpManager.FromConstant(1);
            var zero = milpManager.FromConstant(0);
            var isNumberLessOrEqualOne = number.Operation(OperationType.IsLessOrEqual, one);
            var isPowerZero = power.Operation(OperationType.IsLessOrEqual, zero);
            var isPowerOne = power.Operation(OperationType.IsEqual, one);
            var isEdgeCase = milpManager.Operation(OperationType.Disjunction, isNumberLessOrEqualOne, isPowerZero, isPowerOne);
            var result = milpManager.Operation(
                OperationType.Condition,
                isPowerZero,
                one,
                milpManager.Operation(
                    OperationType.Condition,
                    isNumberLessOrEqualOne,
                    number,
                    milpManager.Operation(
                        OperationType.Condition,
                        isPowerOne,
                        number,
                        CalculatePower(number, power, milpManager, isEdgeCase)
                    )
                )
            );

            result.ConstantValue = number.ConstantValue.HasValue && power.ConstantValue.HasValue
                ? number.ConstantValue == 0
                    ? 0.0
                    : power.ConstantValue == 0
                        ? number.ConstantValue
                        : Math.Pow(number.ConstantValue.Value, power.ConstantValue.Value)
                : (double?) null;
            result.Expression = $"{number.FullExpression()} ** {power.FullExpression()}";
            return result;
        }

        private static IVariable CalculatePower(IVariable number, IVariable power, IMilpManager milpManager, IVariable isEdgeCase)
        {
            var digits = (int)Math.Ceiling(Math.Log(milpManager.IntegerWidth, 2.0));

            var infinity = milpManager.FromConstant(milpManager.MaximumIntegerValue);
            var currentPower = milpManager.Operation(OperationType.Minimum, number, isEdgeCase.Operation(OperationType.BinaryNegation).Operation(OperationType.Multiplication, infinity));
            var decomposition = power.CompositeOperation(CompositeOperationType.UnsignedMagnitudeDecomposition).Take(digits).ToArray();
            var one = milpManager.FromConstant(1);
            var result = one;

            for (int i = 0; i < digits; ++i)
            {
                if (i > 0)
                {
                    var isAnyNonzeroDigitLater = milpManager.Operation(OperationType.Disjunction, decomposition.Skip(i).ToArray());
                    var numberToMultiply = milpManager.Operation(OperationType.Minimum, currentPower, isAnyNonzeroDigitLater.Operation(OperationType.Multiplication, infinity));
                    currentPower = numberToMultiply.Operation(OperationType.Multiplication, numberToMultiply);
                }

                result = result.Operation(OperationType.Multiplication, one.Operation(OperationType.Maximum, currentPower.Operation(OperationType.Multiplication, decomposition[i])));
            }

            return result;
        }
    }
}


text:
using System;
using Renci.SshNet.Messages.Transport;

namespace Renci.SshNet.Common
{
    /// <summary>
    /// The exception that is thrown when connection was terminated.
    /// </summary>
    public partial class SshConnectionException : SshException
    {
        /// <summary>
        /// Gets the disconnect reason if provided by the server or client. Otherwise None.
        /// </summary>
        public DisconnectReason DisconnectReason { get; private set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="SshConnectionException"/> class.
        /// </summary>
        public SshConnectionException()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SshConnectionException"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        public SshConnectionException(string message)
            : base(message)
        {
            DisconnectReason = DisconnectReason.None;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SshConnectionException"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="disconnectReasonCode">The disconnect reason code.</param>
        public SshConnectionException(string message, DisconnectReason disconnectReasonCode)
            : base(message)
        {
            DisconnectReason = disconnectReasonCode;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SshConnectionException"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="disconnectReasonCode">The disconnect reason code.</param>
        /// <param name="inner">The inner.</param>
        public SshConnectionException(string message, DisconnectReason disconnectReasonCode, Exception inner)
            : base(message, inner)
        {
            DisconnectReason = disconnectReasonCode;
        }
    }
}


text:
'''
Created on Jul 12, 2015

@author: hashtonmartyn
'''
from datetime import datetime
from dateutil import tz
NZ_TIME_ZONE = tz.gettz("Pacific/Auckland")

class Day(object):
    """
    This is a base class, you must override the is_today method in each class that inherits
    from this.
    """

    def __init__(self, URL, name):
        """
        :param URL: something to stick in the href for the user to click
        :param name: the name of the day eg "Mother's Day"
        """
        self._URL = URL
        self._name = name

    @property
    def name(self):
        """
        The name of the day eg 'Waitangi Day'
        """
        return self._name

    @property
    def URL(self):
        """
        The URL for the day eg "christmasday"
        """
        return self._URL

    def is_today(self, current_datetime):
        raise NotImplementedError("You must implement this in your child class")

    def _the_nth_day_in_the_month(self, n, iso_day, month, current_datetime):
        """
        For use when a day is the xth y in the month. Eg Labour Day is the 4th Monday of
        October.

        :param n: eg for Labour Day n would be 4
        :param iso_day: they day of the week from 1-7 where Monday is 1 and Sunday is 7
        :param month: month of the year from 1-12 where 1 is January and 12 is December
        :return: True if the current_datetime is the nth day in the month and False if not
        """
        if current_datetime.month == month:
            date_calc = datetime(current_datetime.year,
                                 current_datetime.month,
                                 1)

            first_occurence = (iso_day - date_calc.isoweekday())
            if iso_day < date_calc.isoweekday():
                first_occurence += 7
            date_calc_sunday_delta = first_occurence  + ((n - 1) * 7)
            if current_datetime.day == date_calc.day + date_calc_sunday_delta:
                return True
        return False

class MothersDay(Day):
    """
    Happens on the second Sunday of May
    """

    def __init__(self):
        super(MothersDay, self).__init__("/{0}".format(self.__class__.__name__.lower()),
                                         "Mother's Day")

    def is_today(self, current_datetime=datetime.now(tz=NZ_TIME_ZONE)):
        return self._the_nth_day_in_the_month(2, 7, 5, current_datetime)

class Christmas(Day):
    """
    25th of December
    """

    def __init__(self):
        super(Christmas, self).__init__("/{0}".format(self.__class__.__name__.lower()),
                                         "Christmas Day")

    def is_today(self, current_datetime=datetime.now(tz=NZ_TIME_ZONE)):
        return current_datetime.month == 12 and current_datetime.day == 25

class Today(Day):
    """
    It's always today
    """

    def __init__(self):
        super(Today, self).__init__("/{0}".format(self.__class__.__name__.lower()),
                                         "Today")

    def is_today(self, current_datetime=datetime.now(tz=NZ_TIME_ZONE)):
        return True

    @property
    def name(self):
        return datetime.now(tz=NZ_TIME_ZONE).strftime("%A %d %B %Y")

class WaitangiDay(Day):
    """
    Happens on the 6th of Feb
    """

    def __init__(self):
        super(WaitangiDay, self).__init__("/{0}".format(self.__class__.__name__.lower()),
                                          "Waitangi Day")

    def is_today(self, current_datetime=datetime.now(tz=NZ_TIME_ZONE)):
        return current_datetime.month == 2 and current_datetime.day == 6

class FathersDay(Day):
    """
    Happens on the first Sunday of September
    """

    def __init__(self):
        super(FathersDay, self).__init__("/{0}".format(self.__class__.__name__.lower()),
                                         "Father's Day")

    def is_today(self, current_datetime=datetime.now(tz=NZ_TIME_ZONE)):
        return self._the_nth_day_in_the_month(1, 7, 9, current_datetime)

class LabourDay(Day):
    """
    Happens on October 26th
    """

    def __init__(self):
        super(LabourDay, self).__init__("/{0}".format(self.__class__.__name__.lower()),
                                         "Labour Day")

    def is_today(self, current_datetime=datetime.now(tz=NZ_TIME_ZONE)):
        return self._the_nth_day_in_the_month(4, 1, 10, current_datetime)

class QueensBirthday(Day):
    """
    Happens on the first Monday of June
    """

    def __init__(self):
        super(QueensBirthday, self).__init__("/{0}".format(self.__class__.__name__.lower()),
                                         "Queen's Birthday")

    def is_today(self, current_datetime=datetime.now(tz=NZ_TIME_ZONE)):
        return self._the_nth_day_in_the_month(1, 1, 6, current_datetime)

class NewYearsDay(Day):
    """
    1st of the 1st
    """
    def __init__(self):
        super(NewYearsDay, self).__init__("/{0}".format(self.__class__.__name__.lower()),
                                         "New Year's Day")

    def is_today(self, current_datetime=datetime.now(tz=NZ_TIME_ZONE)):
        return current_datetime.month == 1 and current_datetime.day == 1

MOTHERS_DAY = MothersDay()
CHRISTMAS = Christmas()
TODAY = Today()
WAITANGI_DAY = WaitangiDay()
FATHERS_DAY = FathersDay()
LABOUR_DAY = LabourDay()
QUEENS_BIRTHDAY = QueensBirthday()
NEW_YEARS_DAY = NewYearsDay()

DAYS = (TODAY,
        MOTHERS_DAY,
        FATHERS_DAY,
        WAITANGI_DAY,
        CHRISTMAS,
        LABOUR_DAY,
        QUEENS_BIRTHDAY,
        NEW_YEARS_DAY)


text:
CZoneInfo::CZoneInfo()
{
}

CZoneInfo::~CZoneInfo(void)
{
}

//  Zone µ¥ÀÌÅÍ ÆÄÀÏ ·Îµå
bool CZoneInfo::LoadResource( ResourceId id )
{
	// TODO: Restore original code.

	// TODO: Original code.
	//HANDLE	hFile;
	//DWORD	dwBytesRead = 0;
	//DWORD	dwBytesWrite = 0;
	//std::wstring filePath = zoneId + L".zone";

	//hFile = CreateFile( filePath.c_str(),	// file to open
	//	GENERIC_READ,				// open for reading
	//	FILE_SHARE_READ,			// share for reading
	//	NULL,						// default security
	//	OPEN_EXISTING,				// existing file only
	//	FILE_ATTRIBUTE_NORMAL,		// normal file
	//	NULL);						// no attr. template

	//if ( hFile == INVALID_HANDLE_VALUE )
	//{
	//	wprintf( L"Error: unable to open file \"%s\" for read.\n", filePath.c_str() );
	//	return false;
	//}

	//if ( FALSE == ReadFile( hFile, &m_Header, sizeof(m_Header), &dwBytesRead, NULL ) ||
	//	dwBytesRead < sizeof(m_Header) )
	//{
	//	wprintf( L"Error: Unable to read from file.\n" );
	//	CloseHandle(hFile);
	//	return false;
	//}

	//for ( UINT count = 0; count < m_Header.numOfObject; ++count )
	//{
	//	ObjectData objectData;

	//	if ( FALSE == ReadFile( hFile, &objectData, sizeof(objectData), &dwBytesRead, NULL ) ||
	//		dwBytesRead < sizeof(objectData) )
	//	{
	//		wprintf( L"Error: Unable to read from file.\n" );
	//		CloseHandle(hFile);
	//		return false;
	//	}

	//	m_Objects.push_back( objectData );
	//}

	//CloseHandle( hFile );

	return true;
}

CZone * CZoneInfo::CreateZone()
{
	CZone * zone = new CZone();

	CMapInfo * mapInfo = CResourceManager::GetInstance().GetMapInfo( L"map_village" );
	zone->SetMap( mapInfo->CreateMap() );
	SafeRelease( mapInfo );

	CMonster * monster = new CMonster( L"skeleton_mage" );
	monster->LoadAnimation();
	monster->SetPosition( 1024, 768 );
	monster->SetDirection( RIGHT );
	monster->SetHp( 2.0f );
	monster->SetMaxHp( 2.0f );
	zone->AddObject( monster );

	return zone;
}

void CZoneInfo::Release()
{
}

bool CZoneInfo::LoadMap()
{
	return false;
}

bool CZoneInfo::LoadObjects()
{
	return false;
}


text:
class AddPrevRoundIdToRound < ActiveRecord::Migration[4.2]
  def change
    add_column :rounds, :prev_round_id, :integer
  end
end


text:
package csv;

import java.util.HashMap;

class HeaderMappingBuilder {
	public static HashMap<String, Integer> build(CsvParsedResult parsedHeader) {
		HashMap<String, Integer> result = new HashMap<String, Integer>();

		for(int i = 0; i < parsedHeader.size(); ++i) {
			result.put(parsedHeader.get(i), i);
		}

		return result;
	}
}


text:
import pytest
from pybelsberg import always

@pytest.mark.xfail
def test_typedefs():
    class Person:
        def __init__(self, age):
            self.birthyear = None  # too complicated :(
            self.age = age

        def age_correction(self):
            self.age += 1

    @always({(Person, 'birthyear'): int})
    def constraint_age_is_timedelta():
        Person.birthyear == 2014 - Person.age

    a = Person(44)

    assert isinstance(a.birthyear, int)
    assert a.birthyear == 1970

    a.age = 13
    assert a.birthyear == 2001

    a.age_correction()
    assert a.birthyear == 2000

    a.birthyear = 1914
    assert a.age == 100


text:
This is the code for the paper:

Dynamic heuristic acceleration of linearly approximated
SARSA($\lambda$): using ant colony optimization to learn heuristics dynamically

Link to paper
https://rdcu.be/bAasY

GYM based Reinforcement learning library that connects Ant colony optimization and Sarsa Lambda.
This library includes SARSA lambda agents programmed with tabular and tile coding approximations.

The main purpose of this library is to present a heuristically accelerated approximated SARSA lambda
model in which the heuristic is dynamically calculated using an ACO algoritm.

For the moment, the library has examples for the Mountain Car and Mountain Car 3D examples.

To install the Mountain car 3D environment and the Maze environment:

```bash
cd gym-maze
pip install -e .
```

and

```bash
cd gym_m3d
pip install -e .
```

This library is written in Python 2.72 and depends on:

```
Numpy
Scipy
Gym
Pygame
```

If you happen to use this library, please cite it as follows:

```
@misc{rlacosl,
    author = {{Stefano Bromuri}},
    title = {{RLACOSarsaLambda: A heuristic accelaration and potential based reward shaping library for reinfrocement learning written in Python}},
    howpublished = {\url{https://github.com/SB-BISS/RLACOSarsaLambda}},
    note = {Software {L}ibrary}
}
```


text:
[![Build Status](https://travis-ci.org/stefanbirkner/jfortschritt.svg?branch=master)](https://travis-ci.org/stefanbirkner/jfortschritt)

JFortschritt is a small library for writing progress bars to the command-line.

JFortschritt is published under the
[MIT license](http://opensource.org/licenses/MIT). It needs Java 7,
because this is the version that is supported by most applications that I
encounter. Please let me know if you need JFortschritt to support an older
version of Java.

## Installation

JFortschritt is available from [Maven Central](http://search.maven.org/).

    <dependency>
      <groupId>com.github.stefanbirkner</groupId>
      <artifactId>jfortschritt</artifactId>
      <version>0.2.0</version>
    </dependency>

## Usage

Currently the library provides a single class: the
`ProgressLine`. First create a new progress line.

    import com.github.stefanbirkner.jfortschritt.*;

    ...

    ProgressLine progressLine = new ProgressLine();

Start the progress line with the number of steps that are needed for
completion:

    progressLine.startWithNumberOfSteps(42);

It immediately prints an empty progress bar and a counter:

    [>                                                                     ]

The width of the line is always 72 chars. Now move the progress line forward.

    progressLine.moveForward();

and see the result

    [==>                                                                   ]

This is how a progress line looks at the end. (It renders a new line
character, too. Thus additional text starts at a new line.)

    [=====================================================================>]

You may add additional parts to the progress line. E.g. JFortschritt provides
a counter and a part with the estimated time, but you can build your own parts
by implementing the interface `ProgressLinePart`.

    ProgressLine progressLine = new ProgressLine(
        new Counter(), new EstimatedTime());

This is how a progress line looks with the additional parts.

    [==>                                                    ] (1/42) eta 10s

## Contributing

You have three options if you have a feature request, found a bug or
simply have a question about JFortschritt.

* [Write an issue.](https://github.com/stefanbirkner/jfortschritt/issues/new)
* Create a pull request. (See [Understanding the GitHub Flow](https://guides.github.com/introduction/flow/index.html))
* [Write an email to mail@stefan-birkner.de](mailto:mail@stefan-birkner.de)

## Development Guide

JFortschritt is build with [Maven](http://maven.apache.org/). If you want to
contribute code than

* Please write a test for your change.
* Ensure that you didn't break the build by running `mvn test`.
* Fork the repo and create a pull request. (See [Understanding the GitHub Flow](https://guides.github.com/introduction/flow/index.html))

The basic coding style is described in the
[EditorConfig](http://editorconfig.org/) file `.editorconfig`.

JFortschritt supports [Travis CI](https://travis-ci.org/) for continuous
integration. Your pull request will be automatically build by Travis
CI.

## Release Guide

* Select a new version according to the
  [Semantic Versioning 2.0.0 Standard](http://semver.org/).
* Set the new version in `pom.xml` and in the `Installation` section of
  this readme.
* Commit the modified `pom.xml` and `README.md`.
* Run `mvn clean deploy` with JDK 7.
* Add a tag for the release: `git tag jfortschritt-X.X.X`