text:
namespace content {

class FrameTreeNode;

class SitePerProcessBrowserTestBase : public ContentBrowserTest {
 public:
  SitePerProcessBrowserTestBase();

  SitePerProcessBrowserTestBase(const SitePerProcessBrowserTestBase&) = delete;
  SitePerProcessBrowserTestBase& operator=(
      const SitePerProcessBrowserTestBase&) = delete;

 protected:
  std::string DepictFrameTree(FrameTreeNode* node);

  void SetUpCommandLine(base::CommandLine* command_line) override;
  void SetUpOnMainThread() override;

  WebContentsImpl* web_contents() const {
    return static_cast<WebContentsImpl*>(shell()->web_contents());
  }

  static void ForceUpdateViewportIntersection(
      FrameTreeNode* frame_tree_node,
      const blink::mojom::ViewportIntersectionState& intersection_state);

  void RunPostedTasks();

 private:
  FrameTreeVisualizer visualizer_;
  base::test::ScopedFeatureList feature_list_;
};

class SitePerProcessBrowserTest
    : public SitePerProcessBrowserTestBase,
      public ::testing::WithParamInterface<std::string> {
 public:
  SitePerProcessBrowserTest();

  SitePerProcessBrowserTest(const SitePerProcessBrowserTest&) = delete;
  SitePerProcessBrowserTest& operator=(const SitePerProcessBrowserTest&) =
      delete;

  std::string GetExpectedOrigin(const std::string& host);

 private:
  base::test::ScopedFeatureList feature_list_;
};

class SitePerProcessIgnoreCertErrorsBrowserTest
    : public SitePerProcessBrowserTest {
 public:
  SitePerProcessIgnoreCertErrorsBrowserTest() = default;

 protected:
  void SetUpOnMainThread() override;
  void SetUpCommandLine(base::CommandLine* command_line) override;
  void SetUpInProcessBrowserTestFixture() override;
  void TearDownInProcessBrowserTestFixture() override;

 private:
  content::ContentMockCertVerifier mock_cert_verifier_;
};

}  // namespace content

#endif  // CONTENT_BROWSER_SITE_PER_PROCESS_BROWSERTEST_H_


text:
package suonos.lucene.fields;

import java.util.Date;
import java.util.Iterator;
import java.util.Objects;

import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.document.DoubleField;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.FieldType;
import org.apache.lucene.document.FieldType.NumericType;
import org.apache.lucene.document.FloatField;
import org.apache.lucene.document.IntField;
import org.apache.lucene.document.LongField;
import org.apache.lucene.document.SortedDocValuesField;
import org.apache.lucene.document.SortedNumericDocValuesField;
import org.apache.lucene.document.SortedSetDocValuesField;
import org.apache.lucene.index.IndexOptions;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.SortField.Type;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.util.BytesRef;

import com.github.am0e.commons.msgs.Msgs;
import com.github.am0e.commons.utils.Validate;

import suonos.lucene.SharedLuceneReader;

public class IndexedField {

    /**
     * The Lucene Field Type.
     */
    private IndexedFieldType fieldType;
    private boolean fieldTypeLocal;
    private Class<?> javaType;

    /**
     * The field name stored in the lucene document.
     */
    private String name;

    /**
     * Is the field a multivalue field. Ie a document can have a set of values.
     * Eg an album can have multiple genres and multiple artists.
     *
     */
    private boolean multiValue;

    private boolean prefixed;

    private boolean filterable;

    private boolean docValues;

    private boolean frozen;

    private boolean indexed;

    private IndexedFieldType copyFieldType() {
        if (!fieldTypeLocal) {
            this.fieldType = new IndexedFieldType(fieldType);
            this.fieldTypeLocal = true;
        }
        return fieldType;
    }

    public IndexedField() {
    }

    public IndexedField(IndexedField field) {
        this.fieldType = field.fieldType;
        this.javaType = field.javaType;
        this.name = field.name;
        this.multiValue = field.multiValue;
        this.prefixed = field.prefixed;
        this.filterable = field.filterable;
        this.docValues = field.docValues;
        this.indexed = field.indexed;
    }

    public void setName(String fieldName) {
        this.name = fieldName;
    }

    public void setType(IndexedFieldType type) {
        this.fieldType = type;
        this.javaType = type.javaType();
    }

    public String toString() {
        return Msgs.format("{}:{}", name, fieldType);
    }

    public Iterator<Term> getTerms(SharedLuceneReader is) {
        return null;
    }

    public String getName() {
        return name;
    }

    public IndexedField getDependentFacet() {
        return null;
    }

    public NumericType getNumericType() {
        return fieldType.numericType();
    }

    public float getTermBoost(Term term, int termPos) {
        return 0.0f;
    }

    public FieldType getLuceneFieldType() {
        return fieldType;
    }

    public Field createDocValueField(String fieldName, Object value) {
        if (javaType == String.class) {
            if (multiValue) {
                return new SortedSetDocValuesField(fieldName, new BytesRef(value.toString()));
            } else {
                return new SortedDocValuesField(fieldName, new BytesRef(value.toString()));
            }
        }
        if (javaType == Long.class) {
            if (multiValue == false) {
                return new SortedNumericDocValuesField(fieldName, (Long) value);
            }
        }
        if (javaType == Date.class) {
            if (multiValue == false) {
                return new SortedNumericDocValuesField(fieldName, ((Date) value).getTime());
            }
        }

        throw Validate.notAllowed("");
    }

    public Field createField(Object value) {

        if (docValues && !indexed) {
            return createDocValueField(name, value);

        } else {
            if (javaType == String.class)
                return new Field(name, (String) value, fieldType);

            if (javaType == Integer.class)
                return new IntField(name, (Integer) value, fieldType);

            if (javaType == Long.class)
                return new LongField(name, (Long) value, fieldType);

            if (javaType == Double.class)
                return new DoubleField(name, (Double) value, fieldType);

            if (javaType == Float.class)
                return new FloatField(name, (Float) value, fieldType);

            if (javaType == Boolean.class)
                return new Field(name, getBoolValue(value), fieldType);

            if (javaType == Date.class)
                return new LongField(name, ((Date) value).getTime(), fieldType);

            if (javaType == Byte[].class)
                return new Field(name, (byte[]) value, fieldType);
        }

        throw Validate.notAllowed("");
    }

    public void setValue(Field field, Object value) {
        if (javaType == String.class) {
            field.setStringValue((String) value);

        } else if (javaType == Double.class) {
            field.setDoubleValue((Double) value);

        } else if (javaType == Float.class) {
            field.setFloatValue((Float) value);

        } else if (javaType == Integer.class) {
            field.setIntValue((Integer) value);

        } else if (javaType == Long.class) {
            field.setLongValue((Long) value);

        } else if (javaType == Boolean.class) {
            field.setStringValue(getBoolValue(value));

        } else if (javaType == Date.class) {
            field.setLongValue(((Date) value).getTime());

        } else if (javaType == Byte[].class) {
            field.setBytesValue((byte[]) value);
        }

        throw Validate.notAllowed("");
    }

    private String getBoolValue(Object value) {
        if (((Boolean) value).booleanValue()) {
            return "1";
        } else {
            return "0";
        }
    }

    public Term createTerm(String termText) {
        return new Term(name, termText);
    }

    public Query createQuery(String termText) {
        return new TermQuery(createTerm(termText));
    }

    public Type getSortFieldType() {
        if (javaType == Integer.class)
            return Type.INT;
        if (javaType == Long.class || javaType == Date.class)
            return Type.LONG;
        if (javaType == Double.class)
            return Type.DOUBLE;
        if (javaType == Float.class)
            return Type.FLOAT;

        return Type.STRING;
    }

    public Class<?> getType() {
        return javaType;
    }

    /**
     * @return the multiValue
     */
    public boolean isMultiValue() {
        return multiValue;
    }

    /**
     * @param multiValue
     *            the multiValue to set
     */
    public void setMultiValue(boolean multiValue) {
        getWrite().multiValue = multiValue;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;

        if (obj instanceof IndexedField == false) {
            return false;
        }

        IndexedField other = (IndexedField) obj;

        return this.multiValue == other.multiValue && this.filterable == other.filterable
                && this.prefixed == other.prefixed && this.javaType == other.javaType
                && Objects.equals(this.name, other.name) && Objects.equals(this.fieldType, other.fieldType);
    }

    public void setPrefixed(boolean prefixed) {
        getWrite().prefixed = prefixed;
    }

    public boolean isPrefixed() {
        return prefixed;
    }

    public void setFilterable(boolean filterable) {
        getWrite().filterable = filterable;
    }

    public boolean isFilterable() {
        return filterable;
    }

    /**
     * @return the docValues
     */
    public boolean isDocValues() {
        return docValues;
    }

    /**
     * @param docValues
     *            the docValues to set
     */
    public void setDocValues(boolean docValues) {
        getWrite().docValues = docValues;
    }

    /**
     * @param frozen
     *            the frozen to set
     */
    public void freeze() {
        this.frozen = true;

        if (this.fieldTypeLocal)
            this.fieldType.freeze();

        this.indexed = (fieldType.indexOptions() == IndexOptions.NONE ? false : true);
    }

    private IndexedField getWrite() {
        if (frozen) {
            Validate.notAllowed("Object is frozen");
        }
        return this;
    }

    /**
     * @return the indexed
     */
    public boolean isIndexed() {
        return indexed;
    }

    public Object getDisplayValue(String term) {
        return term;
    }

    /**
     * @return the fieldType
     */
    public IndexedFieldType fieldType() {
        return fieldType;
    }

    /**
     * @return the stored
     */
    public boolean stored() {
        return fieldType.stored();
    }

    /**
     * @param stored
     *            the stored to set
     */
    public void setStored(boolean stored) {
        copyFieldType().setStored(stored);
    }

    public void setOmitNorms(boolean omitNorms) {
        copyFieldType().setOmitNorms(omitNorms);
    }

    public void setIndexOptions(IndexOptions opts) {
        copyFieldType().setIndexOptions(opts);
    }

    public void setAnalyzer(Analyzer analyzer) {
        copyFieldType().setAnalyzer(analyzer);
    }

}

redpajama_set_name: RedPajamaGithub


text:
namespace JugueteriaEntity
{
    using System;
    using System.Collections.Generic;

    public partial class Venta
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public Venta()
        {
            this.DetalleVentas = new HashSet<DetalleVenta>();
        }

        public long IdVenta { get; set; }
        public long IdEmpleado { get; set; }
        public long IdCliente { get; set; }
        public System.DateTime FechaVenta { get; set; }
        public string FormaPago { get; set; }
        public string Estatus { get; set; }

        public virtual Empleado Empleado { get; set; }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<DetalleVenta> DetalleVentas { get; set; }
        public virtual Cliente Cliente { get; set; }
    }
}


text:
/**上午10:56:26
 * @author zhangyh2
 * Proxy.java
 * TODO
 */
package design.patterns.structural.Proxy;

/**
 * @author zhangyh2 Proxy 上午10:56:26 TODO
 */
public class Proxy implements Sourceable {

	private Source source;

	public Proxy() {
		super();
		this.source = new Source();
	}

	private void before() {
		System.out.println("before");
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see design.patterns.structural.Proxy.Sourceable#aoth()
	 */
	@Override
	public void aoth() {
		// TODO Auto-generated method stub
		before();
		source.aoth();
		end();
	}

	private void end() {
		System.out.println("end");
	}

}


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class message_model extends CI_Model {

		public $datetime;

        public function __construct()
        {
            parent::__construct();
			$this->datetime = date("Y-m-d H:i:s");
        }

		public function getConnectionsModel($id){

			$connid = "";
			$connection = "";
			$inc = "";

			$this->db->select('tbl_messages.id as messageid, tbl_messages.created_on as message_logtime, tbl_messages.message, tbl_ceos.first_name, tbl_ceos.last_name, tbl_ceos.id as msg_ceos_id, tbl_ceos.ceo_profile_pic, tbl_businesses.id as business_id, tbl_businesses.business_name');
			$this->db->from('tbl_messages');
			$this->db->join('tbl_ceos', 'tbl_ceos.id = tbl_messages.ceo2_id AND tbl_messages.ceo2_id != "'.$id.'" OR tbl_ceos.id = tbl_messages.ceo1_id AND tbl_messages.ceo1_id != "'.$id.'" ', 'left');
			$this->db->join('tbl_ceo_business_details', 'tbl_ceo_business_details.ceo_id = tbl_ceos.id', 'left');
			$this->db->join('tbl_businesses', 'tbl_businesses.id = tbl_ceo_business_details.business_id', 'left');
			$this->db->where("(tbl_messages.ceo1_id = '".$id."' OR tbl_messages.ceo2_id = '".$id."' )");
			$this->db->order_by('tbl_messages.id','asc');
			$resultss = $this->db->get();
			if($resultss->num_rows() > 0)
			{
				foreach($resultss->result() as $key => $val){

					$connection[$val->msg_ceos_id] = $val;
				}

				$sortArray = array();

				foreach($connection as $person){
					foreach($person as $key=>$value){
						if(!isset($sortArray[$key])){
							$sortArray[$key] = array();
						}
						$sortArray[$key][] = $value;
					}
				}
				$orderby = "messageid"; //change this to whatever key you want from the array
				array_multisort($sortArray[$orderby],SORT_DESC,$connection);

			}

			return $connection;

		}

		public function getmessageslistModel($data){

			$this->db->select('tbl_messages.id as msgid, tbl_messages.message, tbl_messages.ceo1_id as writer,tbl_messages.ceo2_id as receiver, tbl_messages.created_on as msglogtime, tbl_ceos.first_name, tbl_ceos.last_name, tbl_ceos.ceo_profile_pic ');
			$this->db->from('tbl_messages');
			$this->db->join('tbl_ceos','tbl_ceos.id = tbl_messages.ceo1_id');
			$this->db->where("(tbl_messages.ceo1_id = '".$data['sender_ceo']."' AND tbl_messages.ceo2_id='".$data['currrent_ceo']."')");
			$this->db->or_where("(tbl_messages.ceo1_id = '".$data['currrent_ceo']."' AND tbl_messages.ceo2_id='".$data['sender_ceo']."')");
			$c = $this->db->get();
			return $c->result();
		}

		public function MessageSaveModel($data){

			$current_ceo_id 	= 	$data['current_ceo_id'];
			$receiver_ceo_id 	= 	$data['receiver_ceo_id'];
			$add_msg 			= 	$data['add_msg'];
			$msgs = "";

			$this->db->insert('tbl_messages', array(
													'ceo1_id' => $current_ceo_id,
													'ceo2_id' => $receiver_ceo_id,
													'message' => $add_msg,
													'created_on' => $this->datetime,
													'is_active' => true
												));
			$lastmsgid = $this->db->insert_id();

			$this->db->insert('tbl_logs', array(
												'log_parent_id' 	=> 	17,
												'performed_by_ceo' 	=> 	$current_ceo_id,
												'performed_to_ceo'	=> 	$receiver_ceo_id,
												'task_id' 			=> 	$lastmsgid,
												'created_on' 		=> 	$this->datetime,
												'is_viewed' 		=> 	true,
												'is_notified' 		=> 	true,
												'is_active' 		=> 	true
											));

			$this->db->select(
							'tbl_messages.id as message_id,
							tbl_messages.ceo1_id as writer_ceo_id,
							tbl_messages.ceo2_id as receiver_ceo_id,
							tbl_messages.message as message,
							tbl_messages.created_on as message_logtime,
							tbl_ceos.first_name as writer_ceo_fname,
							tbl_ceos.last_name as writer_ceo_lname,
							tbl_ceos.ceo_profile_pic as writer_ceo_pic'
						);
			$this->db->from('tbl_messages');
			$this->db->join('tbl_ceos','tbl_ceos.id = tbl_messages.ceo1_id' );
			$this->db->where('tbl_messages.id',$lastmsgid);
			$msg = $this->db->get();
			if($msg->num_rows() >0){
				$msgs['message'] =  $msg->result();
			}

			$msgs['ceos_info'] = $this->getConnectionsModel($current_ceo_id);

			return $msgs;

		}

		public function AutoCompleteNameModel($data){

			$resultss = "";

			$this->db->select('tbl_connections.*, tbl_ceos.first_name, tbl_ceos.last_name, tbl_ceos.id as ceo_id, tbl_ceos.ceo_profile_pic, tbl_ceo_business_details.business_id, tbl_businesses.business_name');
			$this->db->from('tbl_connections');
			$this->db->join('tbl_ceos', 'tbl_ceos.id = tbl_connections.ceo2_id AND tbl_connections.ceo2_id != "'.$data['cid'].'" OR tbl_ceos.id = tbl_connections.ceo1_id AND tbl_connections.ceo1_id != "'.$data['cid'].'" ', 'left');
			$this->db->join('tbl_ceo_business_details', 'tbl_ceo_business_details.ceo_id = tbl_ceos.id', 'left');
			$this->db->join('tbl_businesses', 'tbl_businesses.id = tbl_ceo_business_details.business_id', 'left');
			$this->db->where("(tbl_connections.ceo1_id = '".$data['cid']."' OR tbl_connections.ceo2_id = '".$data['cid']."')");
			$this->db->where('tbl_connections.accepted', 1);
			$this->db->where('tbl_connections.is_active', true);
			$this->db->like('tbl_ceos.first_name',$data['keyword']);
			//$this->db->or_like('tbl_ceos.last_name',$data['keyword']);
			$result = $this->db->get();
			if($result->num_rows() > 0)
			{
				$resultss = $result->result_array();
			}
			return $resultss;

		}

}
?>


text:
package org.neptunepowered.vanilla.world.blocks.properties;

import net.canarymod.api.world.blocks.properties.BlockEnumProperty;
import net.minecraft.block.properties.PropertyEnum;

public class NeptuneBlockEnumProperty extends NeptuneBlockProperty implements BlockEnumProperty {

    protected NeptuneBlockEnumProperty(PropertyEnum handle) {
        super(handle);
    }

    @Override
    public PropertyEnum getHandle() {
        return (PropertyEnum) super.getHandle();
    }

}


text:
This is a simple 8086 emulator that was the result of a [codegolf challenge from stackoverflow](http://codegolf.stackexchange.com/questions/4732/emulate-an-intel-8086-cpu).

`python 8086.py codegolf`


text:
/**
 * Populate DB with sample data on server start
 * to disable, edit config/environment/index.js, and set `todoDB: false`
 */

'use strict';

var User = require('../api/user/user.model');

User.find({}).remove(function () {
    User.create(
        {
            username: 'admin',
            password: 'admin@123',
            email: 'admin@todoapp.com',
            role: 1
        }
    );
    console.log('Admin Created!!');
});


text:
@interface FlutterSpellCheckPlugin : NSObject
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)initWithMethodChannel:(FlutterMethodChannel*)methodChannel
    NS_DESIGNATED_INITIALIZER;

@end

@interface FlutterSpellCheckResult : NSObject

@property(nonatomic, copy, readonly) NSArray<NSString*>* suggestions;
@property(nonatomic, assign, readonly) NSRange misspelledRange;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)initWithMisspelledRange:(NSRange)range
                            suggestions:(NSArray<NSString*>*)suggestions NS_DESIGNATED_INITIALIZER;
- (NSDictionary<NSString*, id>*)toDictionary;

@end

#endif  // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERSPELLCHECKPLUGIN_H_


text:
/* @flow */

import { combineReducers } from 'redux'
import { routerReducer } from 'react-router-redux'

import home from './home'
import post from './post'
import category from './category'
import config from './config'

const reducer = combineReducers({
  home: home,
  post: post,
  category: category,
  config: config,
  router: routerReducer
})

export default reducer


text:
module.exports = {
  'Demo test Google' : function (client) {
    client
      .url('http://nightwatchjs.org')
      .waitForElementVisible('body', 1000)
      .elements('css selector', '#index-container ul.features li', function (result) {

        for (var i = 0; i < result.value.length; i++) {
          var element = result.value[i];

          var selector = '#index-container ul.features li:nth-child(' + (element.ELEMENT ) +') em';
          client.verify.cssClassPresent(selector, 'glyphicon');
        }
      })
      .end();
  }
};


text:
See the [macchiato framework](https://github.com/macchiato-framework) for more details

[![Clojars Project](https://img.shields.io/clojars/v/macchiato/env.svg)](https://clojars.org/macchiato/env)

## Usage

The configuration is represented by a map. the map is constructed by aggregating variables from
multiple sources in the environment. The default sources include EDN configuration and shell variables.

### EDN Based Configuration

The library will first look for a `config.edn` file on the resource path. This will be used as the
base configuration for the application. An external configuration file can be specified using the
`conf` environment variable at runtime, e.g: `export CONF="prod-config.edn"`.

The configuration placed in the configuration file should consist of a map such as the following:

```clojure
{:port 4000
 :host "127.0.0.1"}
```

This configuration will be merged on top of the configuration found in the environment.
The library uses a deep merge strategy, so any nested structures will be merged intelligently.

### Managing Environment Variables

Environment variable names are converted into Clojure style keywords. These variables are parsed using the following strategy:

* `PORT=3000` -> `{:port 3000}`
* `NREPL_PORT=7000` - `{:nrepl-port 7000}`
* `DATABASE_URL="jdbc:h2:./guestbook_dev.db"` -> `{:database-url "jdbc:h2:./guestbook_dev.db"}`
* `IO__HTTP_MAX_CONNECTIONS="{:value 10}"` -> `{:io {:http-max-connections {:value 10}}}`

Note that the `_` is converted to `-`, while `__` is used to indicate nesting for shell variables. These
conventions can be mixed as seen with `IO__HTTP_MAX_CONNECTIONS`.

The library will attempt to parse variables in the following order:

* attempt to parse numeric value
* attempt to parse boolean
* variables that start with a letter are treated as strings
* any other variables are parsed as EDN

### Configuration Order

The environment configuration will be read as the default.

Next, the library will look for the `conf` environment variable. When present, it will attempt to read configuration from the file pointed to by this variable.

When the `conf` environment variable is not present, the library will look for a file called `config.edn` at the location where the app was run.

When a configuration file is found, it will be deep merged on top of the configuration read from the envrionment.


text:
<?php

/**
 * SmafejobDeletefile form base class.
 *
 * @method SmafejobDeletefile getObject() Returns the current form's model object
 *
 * @package    smint
 * @subpackage form
 * @author     Wolfgang Jochum, Spectralmind GmbH
 */
abstract class BaseSmafejobDeletefileForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'              => new sfWidgetFormInputHidden(),
      'priority'        => new sfWidgetFormInputText(),
      'collection_name' => new sfWidgetFormInputText(),
      'file_id'         => new sfWidgetFormInputText(),
      'created'         => new sfWidgetFormDateTime(),
      'started'         => new sfWidgetFormDateTime(),
      'finished1'       => new sfWidgetFormDateTime(),
      'started2'        => new sfWidgetFormDateTime(),
      'finished2'       => new sfWidgetFormDateTime(),
      'finished'        => new sfWidgetFormDateTime(),
      'status'          => new sfWidgetFormInputText(),
      'log'             => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id'              => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),
      'priority'        => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'collection_name' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'file_id'         => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'created'         => new sfValidatorDateTime(),
      'started'         => new sfValidatorDateTime(array('required' => false)),
      'finished1'       => new sfValidatorDateTime(array('required' => false)),
      'started2'        => new sfValidatorDateTime(array('required' => false)),
      'finished2'       => new sfValidatorDateTime(array('required' => false)),
      'finished'        => new sfValidatorDateTime(array('required' => false)),
      'status'          => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'log'             => new sfValidatorString(array('max_length' => 255, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('smafejob_deletefile[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'SmafejobDeletefile';
  }

}


text:
/* Includes ------------------------------------------------------------------*/
#include "main.h"

/** @addtogroup STM32F4xx_StdPeriph_Examples
  * @{
  */

/** @addtogroup FMC_SRAM
  * @{
  */

/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
#define BUFFER_SIZE         ((uint32_t)0x0100)
#define WRITE_READ_ADDR     ((uint32_t)0x0800)

/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Read/Write Buffers */
uint16_t aTxBuffer[BUFFER_SIZE];
uint16_t aRxBuffer[BUFFER_SIZE];

/* Status variables */
__IO uint32_t uwWriteReadStatus_SRAM = 0;

/* Counter index */
uint32_t uwIndex = 0;

/* Private function prototypes -----------------------------------------------*/
static void Fill_Buffer(uint16_t *pBuffer, uint32_t uwBufferLenght, uint16_t uhOffset);

/* Private functions ---------------------------------------------------------*/

/**
  * @brief  Main program
  * @param  None
  * @retval None
  */
int main(void)
{
  /*!< At this stage the microcontroller clock setting is already configured,
       this is done through SystemInit() function which is called from startup
       files (startup_stm32f40_41xxx.s/startup_stm32f427_437xx.s/
       startup_stm32f429_439xx.s/startup_stm32f401xx.s) before to branch to
       application main. To reconfigure the default setting of SystemInit()
       function, refer to system_stm32f4xx.c file
     */

  /* Initialize LEDs on EVAL board */
  STM_EVAL_LEDInit(LED1);
  STM_EVAL_LEDInit(LED2);

  /* Initialize the SRAM memory */
  SRAM_Init();

  /* Fill the buffer to send */
  Fill_Buffer(aTxBuffer, BUFFER_SIZE, 0x250F);

  /* Write data to the SRAM memory */
  SRAM_WriteBuffer(aTxBuffer, WRITE_READ_ADDR, BUFFER_SIZE);

  /* Read back data from the SRAM memory */
  SRAM_ReadBuffer(aRxBuffer, WRITE_READ_ADDR, BUFFER_SIZE);

  /* Check the SRAM memory content correctness */
  for (uwIndex = 0; (uwIndex < BUFFER_SIZE) && (uwWriteReadStatus_SRAM == 0); uwIndex++)
  {
    if (aRxBuffer[uwIndex] != aTxBuffer[uwIndex])
    {
      uwWriteReadStatus_SRAM++;
    }
  }

  if (uwWriteReadStatus_SRAM)
  {
    /* KO */
    /* Turn on LD2 */
    STM_EVAL_LEDOn(LED2);
  }
  else
  {
    /* OK */
    /* Turn on LD1 */
    STM_EVAL_LEDOn(LED1);
  }

  while (1)
  {
  }

}

/**
  * @brief  Fills buffer with user predefined 16 bit length data.
  * @param  pBuffer: pointer on the buffer to fill
  * @param  uwBufferLenght: size of the buffer to fill
  * @param  uhOffset: first value to fill on the buffer
  * @retval None
  */
static void Fill_Buffer(uint16_t *pBuffer, uint32_t uwBufferLenght, uint16_t uhOffset)
{
  uint32_t tmpIndex = 0;

  /* Put in global buffer different values */
  for (tmpIndex = 0; tmpIndex < uwBufferLenght; tmpIndex++ )
  {
    pBuffer[tmpIndex] = tmpIndex + uhOffset;
  }
}

#ifdef  USE_FULL_ASSERT

/**
  * @brief  Reports the name of the source file and the source line number
  *         where the assert_param error has occurred.
  * @param  file: pointer to the source file name
  * @param  line: assert_param error line source number
  * @retval None
  */
void assert_failed(uint8_t* file, uint32_t line)
{
  /* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  /* Infinite loop */
  while (1)
  {
  }
}
#endif

/**
  * @}
  */

/**
  * @}
  */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Cetraria islandica f. pusilla Cretz.

### Remarks
null


text:
// Generated by CoffeeScript 1.3.3

/*
  backbone-modelref.js 0.1.2
  (c) 2011, 2012 Kevin Malakoff.
  Backbone-ModelRef.js is freely distributable under the MIT license.
  See the following for full license details:
    https://github.com/kmalakoff/backbone-modelref/blob/master/LICENSE
  Dependencies: Backbone.js and Underscore.js.
*/

(function() {
  var Backbone, _,
    __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

  _ = !this._ && (typeof require !== 'undefined') ? require('underscore') : this._;

  if (_ && !_.VERSION) {
    _ = _._;
  }

  Backbone = !this.Backbone && (typeof require !== 'undefined') ? require('backbone') : this.Backbone;

  Backbone.ModelRef = (function() {

    function ModelRef(collection, model_id, cached_model) {
      var event, _i, _j, _len, _len1, _ref, _ref1;
      this.collection = collection;
      this.model_id = model_id;
      this.cached_model = cached_model != null ? cached_model : null;
      _.bindAll(this, '_checkForLoad', '_checkForUnload');
      if (!this.collection) {
        throw new Error("Backbone.ModelRef: collection is missing");
      }
      this.ref_count = 1;
      if (this.collection.retain) {
        this.collection.retain();
      }
      if (this.cached_model) {
        this.model_id = this.cached_model.id;
      }
      if (!this.cached_model && this.model_id) {
        this.cached_model = this.collection.get(this.model_id);
      }
      if (this.cached_model) {
        _ref = Backbone.ModelRef.MODEL_EVENTS_WHEN_LOADED;
        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
          event = _ref[_i];
          this.collection.bind(event, this._checkForUnload);
        }
      } else {
        _ref1 = Backbone.ModelRef.MODEL_EVENTS_WHEN_UNLOADED;
        for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
          event = _ref1[_j];
          this.collection.bind(event, this._checkForLoad);
        }
      }
    }

    ModelRef.prototype.retain = function() {
      this.ref_count++;
      return this;
    };

    ModelRef.prototype.release = function() {
      var event, _i, _j, _len, _len1, _ref, _ref1;
      if (this.ref_count <= 0) {
        throw new Error("Backbone.ModelRef.release(): ref count is corrupt");
      }
      this.ref_count--;
      if (this.ref_count > 0) {
        return;
      }
      if (this.cached_model) {
        _ref = Backbone.ModelRef.MODEL_EVENTS_WHEN_LOADED;
        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
          event = _ref[_i];
          this.collection.unbind(event, this._checkForUnload);
        }
      } else {
        _ref1 = Backbone.ModelRef.MODEL_EVENTS_WHEN_UNLOADED;
        for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
          event = _ref1[_j];
          this.collection.unbind(event, this._checkForLoad);
        }
      }
      if (this.collection.release) {
        this.collection.release();
      }
      this.collection = null;
      return this;
    };

    ModelRef.prototype.getModel = function() {
      if (this.cached_model && !this.cached_model.isNew()) {
        this.model_id = this.cached_model.id;
      }
      if (this.cached_model) {
        return this.cached_model;
      }
      if (this.model_id) {
        this.cached_model = this.collection.get(this.model_id);
      }
      return this.cached_model;
    };

    ModelRef.prototype._checkForLoad = function() {
      var event, model, _i, _j, _len, _len1, _ref, _ref1;
      if (this.cached_model || !this.model_id) {
        return;
      }
      model = this.collection.get(this.model_id);
      if (!model) {
        return;
      }
      _ref = Backbone.ModelRef.MODEL_EVENTS_WHEN_UNLOADED;
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        event = _ref[_i];
        this.collection.unbind(event, this._checkForLoad);
      }
      _ref1 = Backbone.ModelRef.MODEL_EVENTS_WHEN_LOADED;
      for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
        event = _ref1[_j];
        this.collection.bind(event, this._checkForUnload);
      }
      this.cached_model = model;
      return this.trigger('loaded', this.cached_model);
    };

    ModelRef.prototype._checkForUnload = function() {
      var event, model, _i, _j, _len, _len1, _ref, _ref1;
      if (!this.cached_model || !this.model_id) {
        return;
      }
      model = this.collection.get(this.model_id);
      if (model) {
        return;
      }
      _ref = Backbone.ModelRef.MODEL_EVENTS_WHEN_LOADED;
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        event = _ref[_i];
        this.collection.unbind(event, this._checkForUnload);
      }
      _ref1 = Backbone.ModelRef.MODEL_EVENTS_WHEN_UNLOADED;
      for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
        event = _ref1[_j];
        this.collection.bind(event, this._checkForLoad);
      }
      model = this.cached_model;
      this.cached_model = null;
      return this.trigger('unloaded', model);
    };

    return ModelRef;

  })();

  __extends(Backbone.ModelRef.prototype, Backbone.Events);

  Backbone.ModelRef.VERSION = '0.1.2';

  Backbone.ModelRef.MODEL_EVENTS_WHEN_LOADED = ['reset', 'remove'];

  Backbone.ModelRef.MODEL_EVENTS_WHEN_UNLOADED = ['reset', 'add'];

  Backbone.Model.prototype.model = function() {
    if (arguments.length === 0) {
      return this;
    }
    throw new Error('cannot set a Backbone.Model');
  };

  Backbone.Model.prototype.isLoaded = function() {
    return true;
  };

  Backbone.Model.prototype.bindLoadingStates = function(params) {
    if (_.isFunction(params)) {
      params(this);
    } else if (params.loaded) {
      params.loaded(this);
    }
    return this;
  };

  Backbone.Model.prototype.unbindLoadingStates = function(params) {
    return this;
  };

  Backbone.ModelRef.prototype.get = function(attribute_name) {
    if (attribute_name !== 'id') {
      throw new Error("Backbone.ModelRef.get(): only id is permitted");
    }
    if (this.cached_model && !this.cached_model.isNew()) {
      this.model_id = this.cached_model.id;
    }
    return this.model_id;
  };

  Backbone.ModelRef.prototype.model = function(model) {
    var changed, event, previous_model, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3;
    if (arguments.length === 0) {
      return this.getModel();
    }
    if (model && (model.collection !== this.collection)) {
      throw new Error("Backbone.ModelRef.model(): collections don't match");
    }
    changed = this.model_id ? !model || (this.model_id !== model.get('id')) : !!model;
    if (!changed) {
      return;
    }
    if (this.cached_model) {
      previous_model = this.cached_model;
      this.model_id = null;
      this.cached_model = null;
      _ref = Backbone.ModelRef.MODEL_EVENTS_WHEN_LOADED;
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        event = _ref[_i];
        this.collection.unbind(event, this._checkForUnload);
      }
      _ref1 = Backbone.ModelRef.MODEL_EVENTS_WHEN_UNLOADED;
      for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
        event = _ref1[_j];
        this.collection.bind(event, this._checkForLoad);
      }
      this.trigger('unloaded', previous_model);
    }
    if (!model) {
      return;
    }
    this.model_id = model.get('id');
    this.cached_model = model.model();
    _ref2 = Backbone.ModelRef.MODEL_EVENTS_WHEN_UNLOADED;
    for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
      event = _ref2[_k];
      this.collection.unbind(event, this._checkForLoad);
    }
    _ref3 = Backbone.ModelRef.MODEL_EVENTS_WHEN_LOADED;
    for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
      event = _ref3[_l];
      this.collection.bind(event, this._checkForUnload);
    }
    return this.trigger('loaded', this.cached_model);
  };

  Backbone.ModelRef.prototype.isLoaded = function() {
    var model;
    model = this.getModel();
    if (!model) {
      return false;
    }
    if (model.isLoaded) {
      return model.isLoaded();
    } else {
      return true;
    }
  };

  Backbone.ModelRef.prototype.bindLoadingStates = function(params) {
    var model;
    if (_.isFunction(params)) {
      this.bind('loaded', params);
    } else {
      if (params.loaded) {
        this.bind('loaded', params.loaded);
      }
      if (params.unloaded) {
        this.bind('unloaded', params.unloaded);
      }
    }
    model = this.model();
    if (!model) {
      return null;
    }
    return model.bindLoadingStates(params);
  };

  Backbone.ModelRef.prototype.unbindLoadingStates = function(params) {
    if (_.isFunction(params)) {
      this.unbind('loaded', params);
    } else {
      if (params.loaded) {
        this.unbind('loaded', params.loaded);
      }
      if (params.unloaded) {
        this.unbind('unloaded', params.unloaded);
      }
    }
    return this.model();
  };

  if (typeof exports !== 'undefined') {
    module.exports = Backbone.ModelRef;
  }

  if (this.Backbone) {
    this.Backbone.ModelRef = Backbone.ModelRef;
  }

  Backbone.ModelRef.VERSION = '0.1.2';

}).call(this);


text:
require("sys")
require("nn")

local SSWE = torch.class ("SSWE")

----------------------------------- constructor ---------------------------
function SSWE:__init()
    self.neg_samples = 5;
    self.criterion = nn.MarginCriterion()
    self.senti_criterion = nn.MarginCriterion()
    self.com_criterion = nn.ParallelCriterion();
    self.com_criterion : add (self.criterion, 0.6) : add (self.senti_criterion, 0.4);
    self.epochs = 5;
    self.dim = 50;
    self.window_size = 1;

    self.contexts = torch.IntTensor(4+self.neg_samples)
    self.labels = torch.zeros(4+self.neg_samples);
    self.labels[1] = 1; self.labels[2] = 1; self.labels[3] = 1; self.labels[4] = 1 -- first label is always pos sample           -- refers to both sides of the target word

    self.senti_contexts = torch.IntTensor (4);
    self.senti_labels = torch.Tensor (4);
    self.lr = .01;

    self.vocab = {}
    self.index2word = {}
    self.word = torch.IntTensor (1)
end

---------------------------------- building vocab --------------------------
function SSWE:build_vocab(corpus_file_name)
    local f = io.open (corpus_file_name, "r")
    local i = 1
    for line in f : lines () do
        for _, word in ipairs (self:split (line)) do
            if self.vocab[word] == nil then
                self.vocab[word] = i
                self.index2word[i] = word
                i = i + 1
            end
        end
    end
    f : close ();

    self.vocab_size = #self.index2word
end

------------------------------------ split on separator -------------------------
function SSWE:split(input, sep)
    if sep == nil then
        sep = "%s"
    end
    local t = {}; local i = 1
    for str in string.gmatch(input, "([^"..sep.."]+)") do
        t[i] = str; i = i + 1
    end
    return t
end

------------------------------------ training -----------------------------------
function SSWE:train_model (corpus_file_name, sentiment_file_name)

    -- Describing the model
    self.word_vecs = nn.LookupTable(self.vocab_size, self.dim) -- word embeddings
    self.context_vecs = nn.LookupTable(self.vocab_size, self.dim) -- context embeddings

    self.senti_word_vecs = self.word_vecs : clone ('weight', 'bias', 'gradWeight', 'gradBias')
    self.senti_context_vecs = self.context_vecs : clone ('weight', 'bias', 'gradWeight', 'gradBias')

    -- semantic model
    self.model = nn.Sequential()
    self.model:add(nn.ParallelTable())
    self.model.modules[1]:add(self.context_vecs)
    self.model.modules[1]:add(self.word_vecs)
    self.model:add (nn.MM(false, true)); -- dot prod and sigmoid to get probabilities
    self.model:add (nn.HardTanh ());

    -- self.trainer = nn.StochasticGradient(self.model,self.criterion)
    -- self.trainer.learningRate = self.lr
    -- self.trainer.maxIteration = self.epochs

    -- sentiment model
    self.senti_model = nn.Sequential();
    self.senti_model : add (nn.ParallelTable())
    self.senti_model.modules[1]:add(self.senti_context_vecs)
    self.senti_model.modules[1]:add(self.senti_word_vecs)
    self.senti_model : add (nn.MM(false, true));
    self.senti_model : add (nn.HardTanh ());

    -- self.senti_trainer = nn.StochasticGradient(self.senti_model,self.senti_criterion)
    -- self.senti_trainer.learningRate = self.lr
    -- self.senti_trainer.maxIteration = self.epochs

    -- complete model
    -- self.com_model = nn.Sequential ();
    self.com_model = nn.ParallelTable ();
    self.com_model : add (self.model);
    self.com_model : add (self.senti_model);

    -- complete trainer
    self.com_trainer = nn.StochasticGradient (self.com_model, self.com_criterion);
    self.com_trainer.verbose = false;
    self.com_trainer.learningRate = self.lr;
    self.com_trainer.maxIteration = self.epochs;

    -- Now beginning the training
    print ("training...")
    local c = 0;
    local start = sys.clock ()
    f = io.open (corpus_file_name, "r")
    f1 = io.open (sentiment_file_name, "r")
    local z = 1;
    for line in f : lines () do
        if z % 100 == 1 then
            print(string.format ("Training line %d...%.2f ?seconds gone", z, sys.clock () - start));
        end
        z = z + 1;

        self.sentiment = tonumber(f1:read ())
        sentence = self : split (line)
        for i, word in ipairs (sentence) do
            self.word[1] = self.vocab[word]

            -- find contexts and negative-contexts
            if sentence[i - 1] ~= nil and sentence[i + 1] ~= nil
                and sentence[i - 2] ~= nil and sentence[i + 2] ~= nil then
                self.contexts[1] = self.vocab[sentence[i - 1]];
                self.contexts[2] = self.vocab[sentence[i + 1]];
                self.contexts[3] = self.vocab[sentence[i - 2]];
                self.contexts[4] = self.vocab[sentence[i + 2]];

                self.senti_contexts[1] = self.vocab[sentence[i - 1]];
                self.senti_contexts[2] = self.vocab[sentence[i + 1]];
                self.senti_contexts[3] = self.vocab[sentence[i - 2]];
                self.senti_contexts[4] = self.vocab[sentence[i + 2]];
                self.senti_labels[1] = self.sentiment;
                self.senti_labels[2] = self.sentiment;
                self.senti_labels[3] = self.sentiment;
                self.senti_labels[4] = self.sentiment;

                -- now for the negative contexts
                local j = 0;
                while j < self.neg_samples do
                    neg_context = self.index2word[torch.random (self.vocab_size)]

                    if neg_context ~= sentence[i - 1]
                        and neg_context ~= sentence[i + 1]
                        and neg_context ~= sentence[i - 2]
                        and neg_context ~= sentence[i + 2]
                        and neg_context ~= word then
                        self.contexts[j + 5] = self.vocab[neg_context]
                        j = j + 1
                    end
                end

                -- training
                data = {}
                function data:size () return 1 end
                data[1] = {
                  {{self.contexts, self.word}, {self.senti_contexts, self.word}},
                  {self.labels, self.senti_labels}
                            };

                self.com_trainer:train(data);
            end
        end
    end
    f:close();
end

-------------------------------------------------------------------------------------------------------
---------------------------------Module for testing ---------------------------------------------------

---------------------------------- Row-normalize a matrix ---------------------------------------------
function SSWE:normalize(m)
    m_norm = torch.zeros(m:size())
    for i = 1, m:size(1) do
        m_norm[i] = m[i] / torch.norm(m[i])
    end
    return m_norm
end

-------------------------------- Get similar words -------------------------------------------------
-- Return the k-nearest words to a word or a vector based on cosine similarity
-- w can be a string such as "king" or a vector for ("king" - "queen" + "man")
function SSWE:get_sim_words(w, k)
    if self.word_vecs_norm == nil then
        self.word_vecs_norm = self:normalize(self.word_vecs.weight:double())
    end
    if type(w) == "string" then
        if self.vocab[w] == nil then
       print("'"..w.."' does not exist in vocabulary.")
       return nil
    else
            w = self.word_vecs_norm[self.vocab[w]]
    end
    end
    local sim = torch.mv(self.word_vecs_norm, w)
    sim, idx = torch.sort(-sim)
    local r = {}
    for i = 1, k do
        r[i] = {self.index2word[idx[i]], -sim[i]}
    end
    return r
end

-- print similar words
function SSWE:print_sim_words(words, k)
    for i = 1, #words do
        r = self:get_sim_words(words[i], k)
    if r ~= nil then
        print("-------"..words[i].."-------")
        for j = 1, k do
            print(string.format("%s, %.4f", r[j][1], r[j][2]))
        end
    end
    end
end


text:
package com.msopentech.odatajclient.proxy.api.context;

import com.msopentech.odatajclient.proxy.api.context.AttachedEntityStatus;
import com.msopentech.odatajclient.proxy.api.impl.EntityTypeInvocationHandler;

public class AttachedEntity {

    private final EntityTypeInvocationHandler entity;

    private final AttachedEntityStatus status;

    public AttachedEntity(final EntityTypeInvocationHandler entity, final AttachedEntityStatus status) {
        this.entity = entity;
        this.status = status;
    }

    public EntityTypeInvocationHandler getEntity() {
        return entity;
    }

    public AttachedEntityStatus getStatus() {
        return status;
    }
}


text:
import defaultOptions from './default-options';

import {
  generateSourceWithDecorators,
  generateStorySource,
  generateAddsMap,
} from './generate-helpers';

function extendOptions(source, comments, options) {
  return {
    ...defaultOptions,
    ...options,
    source,
    comments,
  };
}

function inject(source, decorator, options = {}) {
  const { changed, source: newSource, comments } = generateSourceWithDecorators(
    source,
    decorator,
    options.parser
  );

  if (!changed) {
    return {
      source: newSource,
      addsMap: {},
      changed,
    };
  }

  const storySource = generateStorySource(extendOptions(source, comments, options));
  const addsMap = generateAddsMap(storySource, options.parser);

  return {
    source: newSource,
    storySource,
    addsMap,
    changed,
  };
}

export default inject;


text:
package org.apache.ignite.internal;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCluster;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.events.Event;
import org.apache.ignite.lang.IgniteFuture;
import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.spi.discovery.DiscoverySpi;
import org.junit.Test;

import static org.apache.ignite.events.EventType.EVT_CLIENT_NODE_DISCONNECTED;
import static org.apache.ignite.events.EventType.EVT_CLIENT_NODE_RECONNECTED;

/**
 *
 */
public class IgniteClientReconnectDiscoveryStateTest extends IgniteClientReconnectAbstractTest {
    /** {@inheritDoc} */
    @Override protected int serverCount() {
        return 3;
    }

    /** {@inheritDoc} */
    @Override protected int clientCount() {
        return 1;
    }

    /**
     * @throws Exception If failed.
     */
    @Test
    public void testReconnect() throws Exception {
        final Ignite client = ignite(serverCount());

        assertTrue(client.cluster().localNode().isClient());

        long topVer = 4;

        IgniteCluster cluster = client.cluster();

        cluster.nodeLocalMap().put("locMapKey", 10);

        Map<Integer, Integer> nodeCnt = new HashMap<>();

        nodeCnt.put(1, 1);
        nodeCnt.put(2, 2);
        nodeCnt.put(3, 3);

        if (tcpDiscovery()) {
            nodeCnt.put(4, 4);

            for (Map.Entry<Integer, Integer> e : nodeCnt.entrySet()) {
                Collection<ClusterNode> nodes = cluster.topology(e.getKey());

                assertNotNull("No nodes for topology: " + e.getKey(), nodes);
                assertEquals((int)e.getValue(), nodes.size());
            }
        }

        ClusterNode locNode = cluster.localNode();

        assertEquals(topVer, locNode.order());

        DiscoverySpi srvSpi = ignite(0).configuration().getDiscoverySpi();

        final CountDownLatch reconnectLatch = new CountDownLatch(1);

        client.events().localListen(new IgnitePredicate<Event>() {
            @Override public boolean apply(Event evt) {
                if (evt.type() == EVT_CLIENT_NODE_DISCONNECTED) {
                    info("Disconnected: " + evt);

                    IgniteFuture<?> fut = client.cluster().clientReconnectFuture();

                    assertNotNull(fut);
                    assertFalse(fut.isDone());
                }
                else if (evt.type() == EVT_CLIENT_NODE_RECONNECTED) {
                    info("Reconnected: " + evt);

                    reconnectLatch.countDown();
                }

                return true;
            }
        }, EVT_CLIENT_NODE_DISCONNECTED, EVT_CLIENT_NODE_RECONNECTED);

        srvSpi.failNode(client.cluster().localNode().id(), null);

        waitReconnectEvent(reconnectLatch);

        topVer += 2; // Client failed and rejoined.

        locNode = cluster.localNode();

        assertEquals(topVer, locNode.order());
        assertEquals(topVer, cluster.topologyVersion());

        if (tcpDiscovery())
            nodeCnt.put(5, 3);
        else
            nodeCnt.clear();

        nodeCnt.put(6, 4);

        for (Map.Entry<Integer, Integer> e : nodeCnt.entrySet()) {
            Collection<ClusterNode> nodes = cluster.topology(e.getKey());

            assertNotNull("No nodes for topology: " + e.getKey(), nodes);
            assertEquals((int)e.getValue(), nodes.size());
        }

        assertEquals(10, cluster.nodeLocalMap().get("locMapKey"));
    }
}


text:
require 'fileutils'
module StellarCoreCommander

  #
  # A transactor plays transactions against a stellar-core test node.
  #
  #
  class Transactor
    include Contracts

    class FailedTransaction < StandardError ; end

    Contract Process => Any
    def initialize(process)
      @process    = process
      @named      = {}.with_indifferent_access
      @unverified = []
      @operation_builder = OperationBuilder.new(self)
      account :master, Stellar::KeyPair.from_raw_seed("allmylifemyhearthasbeensearching")
    end

    Contract String => Any
    #
    # Runs the provided recipe against the process identified by @process
    #
    # @param recipe_path [String] path to the recipe file
    #
    def run_recipe(recipe_path)
      raise "stellar-core not running" unless @process.running?

      recipe_content = IO.read(recipe_path)
      instance_eval recipe_content
    end

    Contract Symbol, Stellar::KeyPair => Any
    #
    # Registered an account for this scenario.  Future calls may refer to
    # the name provided.
    #
    # @param name [Symbol] the name to register the keypair at
    # @param keypair=Stellar::KeyPair.random [Stellar::KeyPair] the keypair to use for this account
    #
    def account(name, keypair=Stellar::KeyPair.random)
      unless keypair.is_a?(Stellar::KeyPair)
        raise ArgumentError, "`#{keypair.class.name}` is not `Stellar::KeyPair`"
      end

      add_named name, keypair
    end

    #
    # @see StellarCoreCommander::OperationBuilder#payment
    def payment(*args)
      envelope = @operation_builder.payment(*args)

      submit_transaction envelope do |result|
        payment_result = result.result.results!.first.tr!.payment_result!
        raise FailedTransaction unless payment_result.code.value >= 0
      end
    end

    #
    # @see StellarCoreCommander::OperationBuilder#create_account
    def create_account(*args)
      envelope = @operation_builder.create_account(*args)
      submit_transaction envelope
    end

    #
    # @see StellarCoreCommander::OperationBuilder#trust
    def trust(*args)
      envelope = @operation_builder.trust(*args)
      submit_transaction envelope
    end

    #
    # @see StellarCoreCommander::OperationBuilder#change_trust
    def change_trust(*args)
      envelope = @operation_builder.change_trust(*args)
      submit_transaction envelope
    end

    #
    # @see StellarCoreCommander::OperationBuilder#offer
    def offer(*args)
      envelope = @operation_builder.offer(*args)
      submit_transaction envelope
    end

    #
    # @see StellarCoreCommander::OperationBuilder#require_trust_auth
    def require_trust_auth(*args)
      envelope = @operation_builder.require_trust_auth(*args)
      submit_transaction envelope
    end

    #
    # @see StellarCoreCommander::OperationBuilder#set_flags
    def set_flags(*args)
      envelope = @operation_builder.set_flags(*args)
      submit_transaction envelope
    end

    #
    # @see StellarCoreCommander::OperationBuilder#allow_trust
    def allow_trust(*args)
      envelope = @operation_builder.allow_trust(*args)
      submit_transaction envelope
    end

    Contract None => Any
    #
    # Triggers a ledger close.  Any unvalidated transaction will
    # be validated, which will trigger an error if any fail to be validated
    #
    def close_ledger
      @process.close_ledger

      @unverified.each do |eb|
        begin
          envelope, after_confirmation = *eb
          result = validate_transaction envelope
          after_confirmation.call(result) if after_confirmation
        rescue FailedTransaction
          $stderr.puts "Failed to validate tx: #{Convert.to_hex envelope.tx.hash}"
          $stderr.puts "failed result: #{result.to_xdr(:hex)}"
          exit 1
        end
      end

      # TODO: validate in-flight transactions
      @unverified.clear
    end

    Contract Symbol => Stellar::KeyPair
    def get_account(name)
      @named[name].tap do |found|
        unless found.is_a?(Stellar::KeyPair)
          raise ArgumentError, "#{name.inspect} is not account"
        end
      end
    end

    Contract Stellar::KeyPair => Num
    def next_sequence(account)
      base_sequence  = @process.sequence_for(account)
      inflight_count = @unverified.select{|e| e.first.tx.source_account == account.public_key}.length

      base_sequence + inflight_count + 1
    end

    private
    Contract Symbol, Any => Any
    def add_named(name, object)
      if @named.has_key?(name)
        raise ArgumentError, "#{name} is already registered"
      end

      @named[name] = object
    end

    Contract Stellar::TransactionEnvelope, Or[nil, Proc] => Any
    def submit_transaction(envelope, &after_confirmation)
      hex    = envelope.to_xdr(:hex)
      @process.submit_transaction hex

      # submit to process
      @unverified << [envelope, after_confirmation]
    end

    Contract Stellar::TransactionEnvelope => Stellar::TransactionResult
    def validate_transaction(envelope)
      raw_hash = envelope.tx.hash
      hex_hash = Convert.to_hex(raw_hash)

      base64_result = @process.transaction_result(hex_hash)

      raise "couldn't find result for #{hex_hash}" if base64_result.blank?

      raw_result = Convert.from_base64(base64_result)

      pair = Stellar::TransactionResultPair.from_xdr(raw_result)
      result = pair.result

      # ensure success for every operation
      expected = Stellar::TransactionResultCode.tx_success
      actual = result.result.code
      raise "transaction failed: #{base64_result}" unless expected == actual

      result
    end

  end
end


text:
package io.grpc.internal;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.same;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;

import com.google.common.base.Supplier;

import io.grpc.IntegerMarshaller;
import io.grpc.Metadata;
import io.grpc.MethodDescriptor;
import io.grpc.Status;
import io.grpc.StringMarshaller;
import io.grpc.internal.ClientTransport;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;

import java.util.Arrays;
import java.util.Iterator;
import java.util.concurrent.Executor;

/**
 * Unit tests for {@link DelayedClientTransport}.
 */
@RunWith(JUnit4.class)
public class DelayedClientTransportTest {
  @Mock private ManagedClientTransport.Listener transportListener;
  @Mock private ClientTransport mockRealTransport;
  @Mock private ClientTransport mockRealTransport2;
  @Mock private ClientStream mockRealStream;
  @Mock private ClientStream mockRealStream2;
  @Mock private ClientStreamListener streamListener;
  @Mock private ClientTransport.PingCallback pingCallback;
  @Mock private Executor mockExecutor;
  @Captor private ArgumentCaptor<Status> statusCaptor;

  private final MethodDescriptor<String, Integer> method = MethodDescriptor.create(
      MethodDescriptor.MethodType.UNKNOWN, "/service/method",
      new StringMarshaller(), new IntegerMarshaller());

  private final MethodDescriptor<String, Integer> method2 = MethodDescriptor.create(
      MethodDescriptor.MethodType.UNKNOWN, "/service/method2",
      new StringMarshaller(), new IntegerMarshaller());

  private final Metadata headers = new Metadata();
  private final Metadata headers2 = new Metadata();

  private final FakeClock fakeExecutor = new FakeClock();
  private final DelayedClientTransport delayedTransport = new DelayedClientTransport(
      fakeExecutor.scheduledExecutorService);

  @Before public void setUp() {
    MockitoAnnotations.initMocks(this);
    when(mockRealTransport.newStream(same(method), same(headers))).thenReturn(mockRealStream);
    when(mockRealTransport2.newStream(same(method2), same(headers2))).thenReturn(mockRealStream2);
    delayedTransport.start(transportListener);
  }

  @After public void noMorePendingTasks() {
    assertEquals(0, fakeExecutor.numPendingTasks());
  }

  @Test public void transportsAreUsedInOrder() {
    delayedTransport.newStream(method, headers);
    delayedTransport.newStream(method2, headers2);
    assertEquals(0, fakeExecutor.numPendingTasks());
    delayedTransport.setTransportSupplier(new Supplier<ClientTransport>() {
        final Iterator<ClientTransport> it =
            Arrays.asList(mockRealTransport, mockRealTransport2).iterator();

        @Override public ClientTransport get() {
          return it.next();
        }
      });
    assertEquals(1, fakeExecutor.runDueTasks());
    verify(mockRealTransport).newStream(same(method), same(headers));
    verify(mockRealTransport2).newStream(same(method2), same(headers2));
  }

  @Test public void streamStartThenSetTransport() {
    ClientStream stream = delayedTransport.newStream(method, headers);
    stream.start(streamListener);
    assertEquals(1, delayedTransport.getPendingStreamsCount());
    assertTrue(stream instanceof DelayedStream);
    assertEquals(0, fakeExecutor.numPendingTasks());
    delayedTransport.setTransport(mockRealTransport);
    assertEquals(0, delayedTransport.getPendingStreamsCount());
    assertEquals(1, fakeExecutor.runDueTasks());
    verify(mockRealTransport).newStream(same(method), same(headers));
    verify(mockRealStream).start(same(streamListener));
  }

  @Test public void newStreamThenSetTransportThenShutdown() {
    ClientStream stream = delayedTransport.newStream(method, headers);
    assertEquals(1, delayedTransport.getPendingStreamsCount());
    assertTrue(stream instanceof DelayedStream);
    delayedTransport.setTransport(mockRealTransport);
    assertEquals(0, delayedTransport.getPendingStreamsCount());
    delayedTransport.shutdown();
    verify(transportListener).transportShutdown(any(Status.class));
    verify(transportListener).transportTerminated();
    assertEquals(1, fakeExecutor.runDueTasks());
    verify(mockRealTransport).newStream(same(method), same(headers));
    stream.start(streamListener);
    verify(mockRealStream).start(same(streamListener));
  }

  @Test public void transportTerminatedThenSetTransport() {
    delayedTransport.shutdown();
    verify(transportListener).transportShutdown(any(Status.class));
    verify(transportListener).transportTerminated();
    delayedTransport.setTransport(mockRealTransport);
    verifyNoMoreInteractions(transportListener);
  }

  @Test public void setTransportThenShutdownThenNewStream() {
    delayedTransport.setTransport(mockRealTransport);
    delayedTransport.shutdown();
    verify(transportListener).transportShutdown(any(Status.class));
    verify(transportListener).transportTerminated();
    ClientStream stream = delayedTransport.newStream(method, headers);
    assertEquals(0, delayedTransport.getPendingStreamsCount());
    stream.start(streamListener);
    assertFalse(stream instanceof DelayedStream);
    verify(mockRealTransport).newStream(same(method), same(headers));
    verify(mockRealStream).start(same(streamListener));
  }

  @Test public void setTransportThenShutdownNowThenNewStream() {
    delayedTransport.setTransport(mockRealTransport);
    delayedTransport.shutdownNow(Status.UNAVAILABLE);
    verify(transportListener).transportShutdown(any(Status.class));
    verify(transportListener).transportTerminated();
    ClientStream stream = delayedTransport.newStream(method, headers);
    assertEquals(0, delayedTransport.getPendingStreamsCount());
    stream.start(streamListener);
    assertFalse(stream instanceof DelayedStream);
    verify(mockRealTransport).newStream(same(method), same(headers));
    verify(mockRealStream).start(same(streamListener));
  }

  @Test public void cancelStreamWithoutSetTransport() {
    ClientStream stream = delayedTransport.newStream(method, new Metadata());
    assertEquals(1, delayedTransport.getPendingStreamsCount());
    stream.cancel(Status.CANCELLED);
    assertEquals(0, delayedTransport.getPendingStreamsCount());
    verifyNoMoreInteractions(mockRealTransport);
    verifyNoMoreInteractions(mockRealStream);
  }

  @Test public void startThenCancelStreamWithoutSetTransport() {
    ClientStream stream = delayedTransport.newStream(method, new Metadata());
    stream.start(streamListener);
    assertEquals(1, delayedTransport.getPendingStreamsCount());
    stream.cancel(Status.CANCELLED);
    assertEquals(0, delayedTransport.getPendingStreamsCount());
    verify(streamListener).closed(same(Status.CANCELLED), any(Metadata.class));
    verifyNoMoreInteractions(mockRealTransport);
    verifyNoMoreInteractions(mockRealStream);
  }

  @Test public void newStreamThenShutdownTransportThenCancelStream() {
    ClientStream stream = delayedTransport.newStream(method, new Metadata());
    delayedTransport.shutdown();
    verify(transportListener).transportShutdown(any(Status.class));
    verify(transportListener, times(0)).transportTerminated();
    assertEquals(1, delayedTransport.getPendingStreamsCount());
    stream.cancel(Status.CANCELLED);
    verify(transportListener).transportTerminated();
    assertEquals(0, delayedTransport.getPendingStreamsCount());
    verifyNoMoreInteractions(mockRealTransport);
    verifyNoMoreInteractions(mockRealStream);
  }

  @Test public void setTransportThenShutdownThenPing() {
    delayedTransport.setTransport(mockRealTransport);
    delayedTransport.shutdown();
    delayedTransport.ping(pingCallback, mockExecutor);
    verify(mockRealTransport).ping(same(pingCallback), same(mockExecutor));
  }

  @Test public void pingThenSetTransport() {
    delayedTransport.ping(pingCallback, mockExecutor);
    delayedTransport.setTransport(mockRealTransport);
    verify(mockRealTransport).ping(same(pingCallback), same(mockExecutor));
  }

  @Test public void shutdownThenPing() {
    delayedTransport.shutdown();
    verify(transportListener).transportShutdown(any(Status.class));
    verify(transportListener).transportTerminated();
    delayedTransport.ping(pingCallback, mockExecutor);
    verifyNoMoreInteractions(pingCallback);
    ArgumentCaptor<Runnable> runnableCaptor = ArgumentCaptor.forClass(Runnable.class);
    verify(mockExecutor).execute(runnableCaptor.capture());
    runnableCaptor.getValue().run();
    verify(pingCallback).onFailure(any(Throwable.class));
  }

  @Test public void shutdownThenNewStream() {
    delayedTransport.shutdown();
    verify(transportListener).transportShutdown(any(Status.class));
    verify(transportListener).transportTerminated();
    ClientStream stream = delayedTransport.newStream(method, new Metadata());
    stream.start(streamListener);
    verify(streamListener).closed(statusCaptor.capture(), any(Metadata.class));
    assertEquals(Status.Code.UNAVAILABLE, statusCaptor.getValue().getCode());
  }

  @Test public void startStreamThenShutdownNow() {
    ClientStream stream = delayedTransport.newStream(method, new Metadata());
    stream.start(streamListener);
    delayedTransport.shutdownNow(Status.UNAVAILABLE);
    verify(transportListener).transportShutdown(any(Status.class));
    verify(transportListener).transportTerminated();
    verify(streamListener).closed(statusCaptor.capture(), any(Metadata.class));
    assertEquals(Status.Code.UNAVAILABLE, statusCaptor.getValue().getCode());
  }

  @Test public void shutdownNowThenNewStream() {
    delayedTransport.shutdownNow(Status.UNAVAILABLE);
    verify(transportListener).transportShutdown(any(Status.class));
    verify(transportListener).transportTerminated();
    ClientStream stream = delayedTransport.newStream(method, new Metadata());
    stream.start(streamListener);
    verify(streamListener).closed(statusCaptor.capture(), any(Metadata.class));
    assertEquals(Status.Code.UNAVAILABLE, statusCaptor.getValue().getCode());
  }
}


text:
package au.com.dius.pact.provider.scalasupport

import au.com.dius.pact.core.model.Request

object ServiceInvokeRequest {
  def apply(url: String, request: Request): Request = {
    val r = request.copy
    r.setPath(s"$url${request.getPath}")
    r
  }
}


text:
<META http-equiv="content-type" content="text/html;charset=iso-8859-9"/><meta name="viewport" content="width=device-width, initial-scale=1"><title>ac</title> <link rel="stylesheet"  href="css/jquery.mobile-1.2.0.css" />

EBU HAMZA HORASANÝ

Geri

Horasan bölgesi velilerinden. Niþabur'un Mülkabad mahallesindendir. Doðum tarihi
bilinmemektedir. Cüneyd-i Baðdadi hazretleriyle ayný asýrda yaþamýþtýr. Ebu Türab-ý Nahþebi
ve Ebu Said-i Harraz ile yolculuk edip sohbet etmiþtir. Zamanýndaki alimlerin ve evliyanýn
ileri gelenlerinden idi. Dini meselelerin inceliklerine vakýftý. Vera sahibiydi. Haramlardan
çok sakýnýrdý. Ahmed bin Hanbel hazretleri ona hürmet duyar, tasavvufla ilgili meselelerde
ona sormadan cevap vermezdi. Kendisine sorulan bir meseleyi Ebu Hamza Horasani'ye arz
eder; "Bu hususta ne buyurursun ey sofi!" derdi. Uzun seneler insanlara Ýslam dininin emir ve
yasaklarýný anlatarak onlarýn dünya ve ahiret saadetine kavuþmalarý için gayret sarfeden Ebu
Hamza Horasani pekçok defa hacca gitmiþtir. Hac yolculuklarý ve hac ibadeti esnasýnda
pekçok alim ve evliyayla görüþüp sohbette bulundu. 902 (H.290) senesinde Niþabur'da vefat
etti. Ebu Hafs-ý Haddad'ýn kabri civarýna defnedildi.

Ebu Hamza Horasani hazretleri, derin alim ve büyük veli idi. Allahü tealanýn emirlerine ve
Peygamber efendimizin sünnetine tam uyardý. Haramlardan ve þüphelilerden þiddetle
kaçýnýrdý. Dünyaya meyletmezdi. "Bir kimse ölümü unutmaz devamlý düþünürse, baki

devamlý olan her þey ona sevdirilir ve fani, geçici olan her þeyden nefret ettirilir." buyururdu.

"Allahü teala hakkýnda marifet sahibi olan arif-i billah kimse, maiþetini günü gününe temin
eder. Yani sadece günlük maiþetini düþünür. Dünyevi maiþetini asgariye indirerek uhrevi
maiþetini azamiye çýkarýr." buyurmuþtur.

Bir kimse gelerek; "Bana nasihat et." dedi. Ebu Hamza Horasani ona; "Önündeki sefer için
azýk hazýrla." buyurdu.

"Garip kimdir?" diye sorulunca; "Ülfetten sýkýlandýr. Yani dost ve akrabasýndan sýkýlan ve
onlara yabancýlaþan kimsedir. Bir kimse her nevi ülfetten sýkýlýrsa o garib olur. Zira derviþin
dünyada vataný yoktur. Vatan olmayan yerde ülfet sýkýntýdýr. Derviþin ülfeti, yaratýlmýþlardan
ve Allahü tealadan baþkasýndan kesilince, o her þeyden sýkýlýr. O iþte o zaman garib olur. Bu
yüksek bir derecedir. En iyi bilen Allahü tealadýr."

Cüneyd-i Baðdadi hazretleri bir gün yolda giderken, çýplak bir þekilde halkýn arasýnda
dolaþan iblisi gördü ve; "Ey mel'un! Þu insanlardan utanmýyor musun?" buyurdu. Ýblis;
"Hangi insanlardan? Bunlar insan mýdýr? Þünuziye'dekiler insandýr. Çünkü onlar ciðerimi
yakmýþlardýr?" dedi. Cüneyd-i Baðdadi hazretleri kalkýp Þünuziye'deki camiye gitti. Ebu
HamzaHorasani'yi baþýný önüne eðmiþ, zikir ve tefekkür ile meþgul olduðunu gördü. Olanlarý
Ebu Hamza'ya anlattý. Ebu Hamza Horasani hazretleri; "O mel'un yalan söylemiþtir. Zira
Allahü tealanýn evliyasý, iblisin kendilerine muttali olamayacaðý kadar azizdirler." buyurdu.

Bir ara Rey þehrinde bulunuyordu. Rey mescidinde ayaðýna sarmak üzere bir bez istedi.
Birisi ona kýymetli olan Mýsýr ipeði getirdi. O bu ipeði ayaðýna dolak yaptý. Ona; "Niçin
böyle yaptýn. O pahalý
þey dolak olur mu?" dediler. Buyurdu ki: "Ben yoluma hýyanet etmem.
Yani dünyaya ve dünyadaki kýymetli þeylere deðer vermem. Dünyadan çekilmek lazýmdýr.
Yanýnda dünyanýn bir kýymeti olsa tereyaðýndan kýl çeker gibi o þey seni tasavvuftan çeker
dýþarý býrakýr. Sofiler dünyaya kýymet vermezler. Bundan dolayý da gam yemezler. Eðer
bütün dünyayý derleyip toplayýp bir derviþin aðzýna koysan, o israf olmaz. Ýsraf, Hak tealanýn
rýzasýnýn hilafýna, tersine sarfettiðin þeydir. Hak teala senin dünyanýn terkini deðil, gönlünden
dünya sevgisinin terkini ister. Yani gönlünden dünya muhabbetini gidermek Hak tealanýn
indinde muteberdir. Elinden dünyayý çýkarýp tekrar ona dönmek deðil. Dünyanýn hepsi bir
kerpiç parçasýdýr. Senin ondan nasibin ancak bir toz kadardýr."

Ýnsanlara dünya ve ahirette kurtuluþun yolunu göstermek için ettiði sohbetlerinde buyurdu ki:
"Nefsinden sýkýlan kimsenin gönlü, yüce Mevlasýna baðlanmakla ünsiyet, yakýnlýk ve huzur
bulur."

"Arif, ikram olunan þeyin yok olmasýndan, eldeki nimetin gitmesinden ve vad edilen azabýn
baþa gelmesinden korkar. Arif maiþetini günü gününe savar, gýdasýný günlük olarak alýr."

"Allahü teala bir kimseye þefkatle nazar ederse, hiç þüphe yok ki bu nazar o kimseyi mesud
kiþilerin menzillerine ulaþtýrýr. Onun içini ve dýþýný doðrulukla süsler."

"Sofi kimdir?" diye soran bir kimseye; "Sofi, her çeþit pislikten tasfiye edilen ve kendisinde
hiç bir þekilde muhalefet kiri kalmayan kimsedir." buyurdu.

PARAYI ÇIKARIP ATTI

Ebu Hamza Horasani hazretleri, bir keresinde hiç kimseden bir þey istemeden ve hiç kimseye iltifat etmeden
tevekkül ederek çölde sefere çýkmayý nezr etti. Bu nezir sebebiyle su tulumu ve ip almadan yola çýktý. Cebinde
kýz kardeþinin verdiði bir mikdar gümüþ para vardý. Yolda giderken nefsinden tevekkül esasý üzerine olmasýný
isteyerek; "Utanmýyor musun? Semayý direksiz olarak muhafaza eden Allahü teala, senin mideni gümüþ para
olmadan doyurmaya kadir deðil midir?" dedi. Hemen o parayý çýkarýp attý ve yoluna devam etti. Derken yol
üzerinde kazýlmýþ bir kuyuya düþtü. Nefsi; "Ýmdat." diye baðýrmasý için kendisiyle çekiþmeye baþladý. Nefsine
karþý; "Olmaz böyle þey, vallahi Allahü tealadan baþka kimseden yardým istemem." dedi. Kendi kendine

mücadele ederken kuyunun yanýndan geçen iki adamdan birinin diðerine; "Þu yol üzerindeki kuyunun aðzýný
kazara bir kimsenin düþmemesi için kapatalým." dediðini iþitti. Biraz sonra kuyunun yanýna gelen yolcular
kuyunun aðzýný aðaç ve odunlarla kapattýlar. Yerle bir oluncaya kadar toprakla örttüler. Bu sýrada Ebu Hamza
Horasani'nin feryad etmek aklýna geldi. "Ey þu adamlardan bana daha yakýn olan!" diye nida etti ve sustu.
Kuyunun aðzýný kapatan adamlar oradan ayrýlýp gittikten sonra bir hayvanýn kuyunun aðzýndan ayaklarýný; "Bana
sarýl." der gibi aþaðýya doðru sarkýttýðýný gördü. Ona sarýlan Ebu Hamza Horasani yapýþýp kuyudan çýktý. Bunun
bir arslan olduðunu gördü. O zaman ona gaibden bir ses dedi ki: "Ey Ebu Hamza! Seni kuyuda mahvolmaktan
arslanla bir tehlikeden baþka bir tehlike ile kurtarmamýz güzel bir þey deðil mi?" Ebu Hamza Horasani hazretleri
olanlar üzerine þu ilahiyi okuyarak yoluna devam etti: "Gizlediðim þeyi sana anlatmaktan korkuyorum.
Gözümün gönlüme anlattýklarýný sýrrým açýklýyor. Senden haya etmem aþkýmý gizlememe engel oluyor. Bana
bahþettiðin fehm (idrak) sayesinde keþfe muhtac olmaktan beni kurtardýn. Ýþlerim konusunda bana lütfettin ve
dýþ yüzümü iç yüzüme gösterdin. Zaten lütuf, lütf ile idrak edilir. Ýhsana ihsanla kavuþulur."

1) Tezkiret-ül-Evliya; c.2, s.91

2) Tabakatü's-Sufiyye (Sülemi); s.326

3) Nefehatü'l-Üns; s.72

4) Nesayimü'l-Mehabbe; s.44

5) Tabakatü'l-Kübra(Türkçe); c.1, s.418

6) Kuþeyri Risalesi (Tercüme); s.159, 312

7) Keþfü'l-Mahcub; s.248

8) Tabakat-ý Ensari; s.123

9) Sefinetü'l-Evliya; s.135

10) Hazinet-ül-Asfiya; c.2, s.166

11) Tearruf Tercümesi; s.210-211

12) Tabakatü'l-Evliya; s.155

13) Nevadirü'l-Alem; s.71

14) Ravdü'r-Reyyahin; s.98

15) Camiu Keramat (Horasani); c.1, s.270


text:
import argparse
import logging
import os

from awaazde import AwaazDeAPI
from awaazde.utils import CSVUtils
from python.awaazde.constants import APIConstants

def parse_arguments():
    parser = argparse.ArgumentParser()
    parser.add_argument("username", help="Username", type=str)
    parser.add_argument("password", help="Password", type=str)
    parser.add_argument("organization", help="Organization ", type=str)
    parser.add_argument("messages_file_path",
                        help="Path for the csv with messages against which we want to check created messages", type=str)
    parser.add_argument('--use_custom_format', action="store_true",
                        help="Include this flag if the messages are of a custom Xact Template")
    return parser.parse_args()

def create_messages(message_data, transform_using_template, **kwargs):
    """
    :param message_data: Message data eg: [{phone_number:8929292929,send_on:"",tag1:"tag_number1",template:23,language:"hi"}]
    :type: message_data: List of dict
    :param transform_using_template: True ;if It uses a predefined custom xact implementation like XFIN,
                     False;if it is normal XACT.
                     Note: We need to pop send "transform_using_template" as a separate parameter other than "data"because the ad2 api expects it to be a separate parameter,
    :type: transform_using_template:Boolean
    :param: kwargs: Contains a param named "limit" where you specify the size of each batch in which messages are created.
                    If not specified, APIConstants.DEFAULT_BULK_CREATE_LIMIT will be used
    :type: kwargs:Dictionary
    :return: Response from bulk create api(Create objects in chunks based on limit if present,
             takes DEFAULT_BULK_CREATE_LIMIT as default.)
    :rtype: List of dict [{phone_number:8929292929,send_on:"",tag1:"tag_number1",templatelanguage:23,language:"hi",status:"created"}}
    """
    try:
        """
            Schedule messages and create file for created messages and pending messages if any
        """
        awaazde_api = AwaazDeAPI(args.organization, args.username, args.password)
        created_messages = awaazde_api.messages.create_bulk_in_chunks(message_data, transform_using_template, **kwargs)
        return created_messages
    except Exception as e:
        print(e)
        logging.error("Error occurred trying to schedule calls:{} ".format(e))

if __name__ == '__main__':
    # Parse the arguments
    args = parse_arguments()
    """
    Step 1: Get Messages from CSV file
    """
    file_path = os.path.dirname(args.messages_file_path)
    headers, message_data = CSVUtils.read_csv(args.messages_file_path)
    """
    Step 2: Create bulk Messages
    """
    transform_using_template = args.use_custom_format
    kwargs = {'limit': APIConstants.DEFAULT_BULK_CREATE_LIMIT}
    created_messages = create_messages(message_data, transform_using_template, **kwargs)
    """
    Step 3: Write created messages to csv
    """
    CSVUtils.write_csv(created_messages, file_path, file_name="created")
    logging.info("Completed")


text:
\section{Managment Summary}
Für die Firma Nutz AG soll eine neue Applikation entwickelt werden, um die Vermietung und Wartung der Fahrzeuge zielgerichteter und effizienter anzubieten.\\
Zurzeit besitzt die Firma ungefähr 200 verschiedene Nutzfahrzeuge. Ihre Kundendatenbank umfasst über 3000 Privat- sowie auch Geschäftskunden.\\
Durch die verschiedenen Standorte, kommt es immer wieder zu unnötigen Fahrzeugverschiebungen. Auch die Wartung der Fahrzeuge wird momentan ineffizient mit einer Excel Tabelle rapportiert.\\[2ex]
%
Dies soll durch die neue Webapplikation verbessert und vereinfacht werden.\\
%
Im ersten Kapitel werden die Stakeholder nach ihrer Wichtigkeit aufgelistet und in Interessengruppen eingeteilt.\\
Danach wird auf Probleme sowie Widerstände eingegangen, die im Verlauf des Projektes auftreten könnten.\\
Um an die richtigen Informationen zu gelangen, zeigen wir für jede Interessengruppe unsere Idee für die \textit{Erhebung der Informationen} auf.\\
Durch das Kontextdiagramm veranschaulichen wir den ganzen Arbeitsprozess\\
Im Kapitel 5 definieren wir die Projektziele, die wir erreichen möchten.\\
Im letzte Kapitel wird auf die Vor- und Nachteile der vorher angewendeten Satzschablonen eingegangen.


text:
require 'benchmark'

def load_yaml
  YAML.load(File.new("example.yaml"))
end

def load_files
  data = {}
  data['name']     = File.read('example/name')
  data['version']  = File.read('example/version')
  data['loadpath'] = File.read('example/loadpath').strip.split(/\n/)
  data
end

count = 10000

puts
puts "YAML:"

Benchmark.bm(25) do |x|
  x.report("  Require YAML:          "){ require 'yaml' }
end

Benchmark.bm(25) do |x|
  x.report("  YAML:          "){ count.times{ load_yaml } }
end

puts
puts "Files:"

Benchmark.bm(25) do |x|
  x.report("  Files:          "){ count.times{ load_files } }
end


text:
package org.apache.spark.ml.feature

import org.apache.spark.SparkFunSuite
import org.apache.spark.ml.util.DefaultReadWriteTest
import org.apache.spark.mllib.util.MLlibTestSparkContext
import org.apache.spark.sql.{Dataset, Row}

object StopWordsRemoverSuite extends SparkFunSuite {
  def testStopWordsRemover(t: StopWordsRemover, dataset: Dataset[_]): Unit = {
    t.transform(dataset)
      .select("filtered", "expected")
      .collect()
      .foreach { case Row(tokens, wantedTokens) =>
        assert(tokens === wantedTokens)
    }
  }
}

class StopWordsRemoverSuite
  extends SparkFunSuite with MLlibTestSparkContext with DefaultReadWriteTest {

  import StopWordsRemoverSuite._
  import testImplicits._

  test("StopWordsRemover default") {
    val remover = new StopWordsRemover()
      .setInputCol("raw")
      .setOutputCol("filtered")
    val dataSet = Seq(
      (Seq("test", "test"), Seq("test", "test")),
      (Seq("a", "b", "c", "d"), Seq("b", "c", "d")),
      (Seq("a", "the", "an"), Seq()),
      (Seq("A", "The", "AN"), Seq()),
      (Seq(null), Seq(null)),
      (Seq(), Seq())
    ).toDF("raw", "expected")

    testStopWordsRemover(remover, dataSet)
  }

  test("StopWordsRemover with particular stop words list") {
    val stopWords = Array("test", "a", "an", "the")
    val remover = new StopWordsRemover()
      .setInputCol("raw")
      .setOutputCol("filtered")
      .setStopWords(stopWords)
    val dataSet = Seq(
      (Seq("test", "test"), Seq()),
      (Seq("a", "b", "c", "d"), Seq("b", "c", "d")),
      (Seq("a", "the", "an"), Seq()),
      (Seq("A", "The", "AN"), Seq()),
      (Seq(null), Seq(null)),
      (Seq(), Seq())
    ).toDF("raw", "expected")

    testStopWordsRemover(remover, dataSet)
  }

  test("StopWordsRemover case sensitive") {
    val remover = new StopWordsRemover()
      .setInputCol("raw")
      .setOutputCol("filtered")
      .setCaseSensitive(true)
    val dataSet = Seq(
      (Seq("A"), Seq("A")),
      (Seq("The", "the"), Seq("The"))
    ).toDF("raw", "expected")

    testStopWordsRemover(remover, dataSet)
  }

  test("default stop words of supported languages are not empty") {
    StopWordsRemover.supportedLanguages.foreach { lang =>
      assert(StopWordsRemover.loadDefaultStopWords(lang).nonEmpty,
        s"The default stop words of $lang cannot be empty.")
    }
  }

  test("StopWordsRemover with language selection") {
    val stopWords = StopWordsRemover.loadDefaultStopWords("turkish")
    val remover = new StopWordsRemover()
      .setInputCol("raw")
      .setOutputCol("filtered")
      .setStopWords(stopWords)
    val dataSet = Seq(
      (Seq("acaba", "ama", "biri"), Seq()),
      (Seq("hep", "her", "scala"), Seq("scala"))
    ).toDF("raw", "expected")

    testStopWordsRemover(remover, dataSet)
  }

  test("StopWordsRemover with ignored words") {
    val stopWords = StopWordsRemover.loadDefaultStopWords("english").toSet -- Set("a")
    val remover = new StopWordsRemover()
      .setInputCol("raw")
      .setOutputCol("filtered")
      .setStopWords(stopWords.toArray)
    val dataSet = Seq(
      (Seq("python", "scala", "a"), Seq("python", "scala", "a")),
      (Seq("Python", "Scala", "swift"), Seq("Python", "Scala", "swift"))
    ).toDF("raw", "expected")

    testStopWordsRemover(remover, dataSet)
  }

  test("StopWordsRemover with additional words") {
    val stopWords = StopWordsRemover.loadDefaultStopWords("english").toSet ++ Set("python", "scala")
    val remover = new StopWordsRemover()
      .setInputCol("raw")
      .setOutputCol("filtered")
      .setStopWords(stopWords.toArray)
    val dataSet = Seq(
      (Seq("python", "scala", "a"), Seq()),
      (Seq("Python", "Scala", "swift"), Seq("swift"))
    ).toDF("raw", "expected")

    testStopWordsRemover(remover, dataSet)
  }

  test("read/write") {
    val t = new StopWordsRemover()
      .setInputCol("myInputCol")
      .setOutputCol("myOutputCol")
      .setStopWords(Array("the", "a"))
      .setCaseSensitive(true)
    testDefaultReadWrite(t)
  }

  test("StopWordsRemover output column already exists") {
    val outputCol = "expected"
    val remover = new StopWordsRemover()
      .setInputCol("raw")
      .setOutputCol(outputCol)
    val dataSet = Seq((Seq("The", "the", "swift"), Seq("swift"))).toDF("raw", outputCol)

    val thrown = intercept[IllegalArgumentException] {
      testStopWordsRemover(remover, dataSet)
    }
    assert(thrown.getMessage == s"requirement failed: Column $outputCol already exists.")
  }
}


text:
<!doctype html>

    <meta charset="utf-8">
    <title>Extended Dialog : maximize and minimize Jquery UI dialog</title>
    <link rel="stylesheet" href="https://code.jquery.com/ui/1.9.0/themes/smoothness/jquery-ui.css">
    <link rel="stylesheet" href="src/fq-ui.extendeddialog.css">

        Extended Dialog : maximize and minimize Jquery UI Dialog
        <form>

                <fieldset>
                    <legend>Buttons</legend>

                            <input type="checkbox" id="minimize" checked/>
                            Minimize button

                            <input type="checkbox" id="maximize" checked />
                            Maximize button

                </fieldset>
                <fieldset>
                    <legend>Icons</legend>

                            Minimize icon
                            <input id="iconMin" type="text" value="ui-icon-minus" />

                            Maximize icon
                            <input id="iconMax" type="text" value="ui-icon-extlink" />

                            Restore icon
                            <input id="iconRes" type="text" value="ui-icon-newwin" />

                </fieldset>
                <fieldset>
                    <legend>Texts</legend>

                            Minimize text
                            <input id="txtMin" type="text" value="minimize" />

                            Maximize text
                            <input id="txtMax" type="text" value="maximize" />

                            Restore text
                            <input id="txtRes" type="text" value="restore" />

                </fieldset>

                <fieldset>
                    <legend>Resize on Double-click</legend>

                            <input type="checkbox" id="rdDblClick" checked />
                            Resize on double click

                </fieldset>
                <fieldset>
                    <legend>Minimize location</legend>

                            <input type="radio" id="rdLeft" name="location" checked value="left" />
                            Left

                            <input type="radio" id="rdRight" name="location" value="right" / >
                            Right

                </fieldset>

                <fieldset>
                    <legend>Events</legend>

                            <input type="checkbox" id="chkbMin" checked />
                            beforeMinimize

                            <input type="checkbox" id="chkMin" checked />
                            Minimize

                            <input type="checkbox" id="chkbMax" checked />
                            beforeMaximize

                            <input type="checkbox" id="chkMax" checked />
                            Maximize

                            <input type="checkbox" id="chkbRes" checked />
                            beforeRestore

                            <input type="checkbox" id="chkRes" checked />
                            Restore

                </fieldset>
                <fieldset>
                    <legend>Methods (last dialog)</legend>

                            <button id="btnMin">Minimize</button>

                            <button id="btnMax">Maximize</button>

                            <button id="btnRes">Restore</button>

                            <button id="btnOpe">Open</button>

                            <button id="btnClo">Close</button>

                            <button id="btnDes">Destroy</button>

                </fieldset>

        </form>

            <button id="Add">Add Dialog</button>
            <button id="Change">Change Options (last dialog)</button>


text:
alias modeform (number) {
	if (@number) {
		@format.setformat(mode $number mode);
	}{
		@format.printformats(mode i mode);
	};
};


text:
// Copyright(c) 2007 Andreas Gullberg Larsen
// https://github.com/anjdreas/UnitsNet
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

using System;

namespace UnitsNet
{
    public partial struct MassFlow
    {
        public static Mass operator *(MassFlow massFlow, TimeSpan time)
        {
            return Mass.FromKilograms(massFlow.KilogramsPerSecond*time.TotalSeconds);
        }

        public static Mass operator *(TimeSpan time, MassFlow massFlow)
        {
            return Mass.FromKilograms(massFlow.KilogramsPerSecond*time.TotalSeconds);
        }

        public static Mass operator *(MassFlow massFlow, Duration duration)
        {
            return Mass.FromKilograms(massFlow.KilogramsPerSecond*duration.Seconds);
        }

        public static Mass operator *(Duration duration, MassFlow massFlow)
        {
            return Mass.FromKilograms(massFlow.KilogramsPerSecond*duration.Seconds);
        }

        public static Power operator /(MassFlow massFlow, BrakeSpecificFuelConsumption bsfc)
        {
            return Power.FromWatts(massFlow.KilogramsPerSecond / bsfc.KilogramsPerJoule);
        }

        public static BrakeSpecificFuelConsumption operator /(MassFlow massFlow, Power power)
        {
            return BrakeSpecificFuelConsumption.FromKilogramsPerJoule(massFlow.KilogramsPerSecond / power.Watts);
        }
    }
}


text:
/**
* @returns {any}
*/
module.exports = (context, callback) => {

  return callback(null, context.http.body);

};


text:
import os, subprocess,fnmatch
from shutil import copy2
from shlex import quote
from datetime import datetime
from ehive.runnable.IGFBaseProcess import IGFBaseProcess
from igf_data.utils.fileutils import get_temp_dir,remove_dir,check_file_path
from jinja2 import Template,Environment, FileSystemLoader, select_autoescape

class RunMutiQC(IGFBaseProcess):
  def param_defaults(self):
    params_dict=super(RunMutiQC,self).param_defaults()
    params_dict.update({
      'force_overwrite':True,
      'multiqc_dir_label':'multiqc',
      'multiqc_exe':'multiqc',
      'multiqc_options':{'--zip-data-dir':''},
      'demultiplexing_stats_file':'Stats/Stats.json',
      'tool_order_list':['bcl2fastq','fastqc','fastq_screen'],
      'model_name':False,
      'use_ephemeral_space':0,
      })
    return params_dict

  def run(self):
    try:
      seqrun_igf_id = self.param_required('seqrun_igf_id')
      demultiplexing_stats_file = self.param_required('demultiplexing_stats_file')
      qc_files = self.param_required('qc_files')
      fastq_dir = self.param_required('fastq_dir')
      multiqc_exe = self.param('multiqc_exe')
      multiqc_options = self.param('multiqc_options')
      multiqc_dir_label = self.param('multiqc_dir_label')
      force_overwrite = self.param('force_overwrite')
      base_results_dir = self.param_required('base_results_dir')
      project_name = self.param_required('project_name')
      seqrun_date = self.param_required('seqrun_date')
      flowcell_id = self.param_required('flowcell_id')
      tag = self.param_required('tag')
      multiqc_template_file = self.param_required('multiqc_template_file')
      tool_order_list = self.param('tool_order_list')
      model_name = self.param('model_name')
      use_ephemeral_space = self.param('use_ephemeral_space')
      if tag not in ['known','undetermined']:
        raise ValueError('unknown status tag {0}'.format(tag))                  # check valid status tags

      lane_index_info = os.path.basename(fastq_dir)                             # get lane and index info
      fastqc_files = list()
      fastqscreen_files = list()
      fastqc_files.\
        extend([fqc_dir
                  for fqc_dir in qc_files['fastqc']])
      fastqscreen_files.\
        extend([fsr_dir
                  for fsr_dir in qc_files['fastqscreen']])
      multiqc_result_dir = \
        os.path.join(\
          base_results_dir,
          project_name,
          seqrun_date,
          flowcell_id,
          lane_index_info,
          tag,
          multiqc_dir_label)                                                    # get multiqc final output path
      if os.path.exists(multiqc_result_dir) and \
         force_overwrite:
        remove_dir(multiqc_result_dir)                                          # remove existing output dir if force_overwrite is true

      if not os.path.exists(multiqc_result_dir):
        os.makedirs(multiqc_result_dir,mode=0o775)                              # create output dir if its not present

      temp_work_dir = \
        get_temp_dir(use_ephemeral_space=use_ephemeral_space)                   # get a temp work dir
      multiqc_input_list = \
        os.path.join(\
          temp_work_dir,
          'multiqc_input_file.txt')                                             # get name of multiqc input file
      demultiplexing_stats_file = \
        os.path.join(\
          fastq_dir,
          demultiplexing_stats_file)
      with open(multiqc_input_list,'w') as multiqc_input_file:                  # writing multiqc input
        if not os.path.exists(demultiplexing_stats_file):
          raise IOError('demultiplexing stats file {0} not found'.\
                        format(demultiplexing_stats_file))                      # check demultiplexing stats file

        multiqc_input_file.write('{}\n'.format(demultiplexing_stats_file))      # add demultiplexing stat to list
        for fastqc_file in fastqc_files:
          fastqc_zip = fastqc_file['fastqc_zip']
          if not os.path.exists(fastqc_zip):
            raise IOError('fasqc file {0} not found'.\
                        format(fastqc_zip))                                     # check fastqc file
          multiqc_input_file.write('{}\n'.format(fastqc_zip))                   # add fastqc file to list

        for fastqscreen_file in fastqscreen_files:
          fastqscreen_stat = fastqscreen_file['fastqscreen_stat']
          if not os.path.exists(fastqscreen_stat):
            raise IOError('fastqscreen file {0} not found'.\
                        format(fastqscreen_stat))                               # check fastqscreen file
          multiqc_input_file.write('{}\n'.format(fastqscreen_stat))             # add fastqscreen file to list

      multiqc_report_title = \
        'Project:{0},Sequencing_date:{1},Flowcell_lane:{2},status:{3}'.\
        format(
          project_name,
          seqrun_date,
          lane_index_info,
          tag)                                                                  # get multiqc report title and filename
      multiqc_param = self.format_tool_options(multiqc_options)                 # format multiqc params
      date_stamp = datetime.now().strftime('%d-%b-%Y %H:%M:%S')
      check_file_path(multiqc_template_file)
      multiqc_conf_file = \
        os.path.join(
          temp_work_dir,
          os.path.basename(multiqc_template_file))
      template_env = \
        Environment(\
          loader=\
            FileSystemLoader(
              searchpath=os.path.dirname(multiqc_template_file)),
          autoescape=select_autoescape(['html', 'xml']))
      multiqc_conf = \
        template_env.\
          get_template(os.path.basename(multiqc_template_file))
      multiqc_conf.\
        stream(\
          project_igf_id=project_name,
          flowcell_id=flowcell_id,
          platform_name=model_name,
          tag_name='{0} {1}'.format(lane_index_info,tag),
          date_stamp=date_stamp,
          tool_order_list=tool_order_list).\
        dump(multiqc_conf_file)
      multiqc_cmd = \
        [multiqc_exe,
         '--file-list',quote(multiqc_input_list),
         '--outdir',temp_work_dir,
         '--title',quote(multiqc_report_title),
         '--config',quote(multiqc_conf_file)
        ]                                                                       # multiqc base parameters
      multiqc_cmd.extend(multiqc_param)                                         # add additional parameters
      subprocess.check_call(' '.join(multiqc_cmd),shell=True)                   # run multiqc
      multiqc_html = None
      multiqc_data = None
      for root, _,files in os.walk(top=temp_work_dir):
        for file in files:
          if fnmatch.fnmatch(file, '*.html'):
            copy2(os.path.join(root,file),multiqc_result_dir)
            multiqc_html = os.path.join(multiqc_result_dir,file)                # get multiqc html path
          elif fnmatch.fnmatch(file, '*.zip'):
            copy2(os.path.join(root,file),multiqc_result_dir)
            multiqc_data = os.path.join(multiqc_result_dir,file)                # get multiqc data path

      self.param('dataflow_params',
                 {'multiqc_html':multiqc_html,
                  'multiqc_data':multiqc_data,
                  'lane_index_info':lane_index_info})
    except Exception as e:
      message = \
        'seqrun: {2}, Error in {0}: {1}'.\
          format(
            self.__class__.__name__,
            e,
            seqrun_igf_id)
      self.warning(message)
      self.post_message_to_slack(message,reaction='fail')                       # post msg to slack for failed jobs
      self.post_message_to_ms_team(
          message=message,
          reaction='fail')
      raise


text:
package com.tenforwardconsulting.cordova.bgloc.data;

import android.content.Context;

import com.tenforwardconsulting.cordova.bgloc.data.sqlite.SQLiteLocationDAO;
import com.tenforwardconsulting.cordova.bgloc.data.sqlite.SQLiteCardDAO;

public abstract class DAOFactory {
	public static LocationDAO createLocationDAO(Context context) {
		//Very basic for now
		return new SQLiteLocationDAO(context);
	}

	public static CardDAO createCardDAO(Context context) {
		//Very basic for now
		return new SQLiteCardDAO(context);
	}
}