text:
<?php

namespace PolderKnowledge\EntityServiceTest\Repository\Doctrine;

use Doctrine\Common\Collections\Criteria;
use Doctrine\Common\Collections\ExpressionBuilder;
use Doctrine\ORM\AbstractQuery;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
use PHPUnit_Framework_TestCase;
use PolderKnowledge\EntityService\Repository\Doctrine\ORMRepository;
use PolderKnowledge\EntityServiceTestAsset\MyEntity;

class ORMRepositoryTest extends PHPUnit_Framework_TestCase
{
    /**
     * @var ORMRepository
     */
    private $repository;

    /**
     * @var EntityManagerInterface
     */
    private $entityManager;

    /**
     * @var EntityRepository
     */
    private $entityRepository;

    /**
     * @var AbstractQuery
     */
    private $query;

    /**
     * @var QueryBuilder
     */
    private $queryBuilder;

    public function setUp()
    {
        $queryMockBuilder = $this->getMockBuilder(AbstractQuery::class);
        $queryMockBuilder->disableOriginalConstructor();
        $queryMockBuilder->setMethods([
            'execute',
            'getOneOrNullResult',
            'getResult',
            'getSingleScalarResult',
        ]);
        $this->query = $queryMockBuilder->getMockForAbstractClass();

        $queryBuilderMockBuilder = $this->getMockBuilder(QueryBuilder::class);
        $queryBuilderMockBuilder->disableOriginalConstructor();
        $this->queryBuilder = $queryBuilderMockBuilder->getMock();
        $this->queryBuilder->expects($this->any())->method('getQuery')->willReturn($this->query);

        $entityRepository = $this->getMockBuilder(EntityRepository::class);
        $entityRepository->disableOriginalConstructor();
        $this->entityRepository = $entityRepository->getMock();
        $this->entityRepository->expects($this->any())->method('createQueryBuilder')->willReturn($this->queryBuilder);

        $entityManagerMock = $this->getMockBuilder(EntityManagerInterface::class);
        $entityManagerMock = $entityManagerMock->disableOriginalConstructor()->getMockForAbstractClass();
        $entityManagerMock->expects($this->any())->method('getRepository')->willReturn($this->entityRepository);
        $this->entityManager = $entityManagerMock;

        $this->repository = new ORMRepository($entityManagerMock, MyEntity::class);
    }

    public function testCountByWithCriteria()
    {
        // Arrange
        $this->query->expects($this->once())->method('getSingleScalarResult')->willReturn(123);

        $criteria = Criteria::create();

        // Act
        $result = $this->repository->countBy($criteria);

        // Assert
        $this->assertEquals(123, $result);
    }

    public function testCountByWithArray()
    {
        // Arrange
        $expr = new ExpressionBuilder();

        $this->query->expects($this->once())->method('getSingleScalarResult')->willReturn(123);
        $this->queryBuilder->expects($this->once())->method('expr')->willReturn($expr);

        $criteria = [
            'test' => 'test',
        ];

        // Act
        $result = $this->repository->countBy($criteria);

        // Assert
        $this->assertEquals(123, $result);
    }

    public function testDelete()
    {
        // Arrange
        $this->entityManager->expects($this->once())->method('remove');

        $entity = new \stdClass();

        // Act
        $this->repository->delete($entity);

        // Assert
        // ...
    }

    public function testDeleteBy()
    {
        // Arrange
        $this->query->expects($this->once())->method('execute');

        $criteria = Criteria::create();

        // Act
        $this->repository->deleteBy($criteria);

        // Assert
        // ...
    }

    public function testFind()
    {
        // Arrange
        $this->entityManager->expects($this->once())->method('find');

        // Act
        $this->repository->find(1);

        // Assert
        // ...
    }

    public function testFindAll()
    {
        // Arrange
        $this->entityRepository->expects($this->once())->method('findAll')->willReturn([]);

        // Act
        $result = $this->repository->findAll();

        // Assert
        $this->assertEquals([], $result);
    }

    public function testFindByWithCriteria()
    {
        // Arrange
        $this->query->expects($this->once())->method('getResult')->willReturn([]);

        $criteria = Criteria::create();

        // Act
        $result = $this->repository->findBy($criteria);

        // Assert
        $this->assertEquals([], $result);
    }

    public function testFindByWithArray()
    {
        // Arrange
        $this->query->expects($this->once())->method('getResult')->willReturn([]);

        $criteria = [
            'test' => 'test',
        ];

        // Act
        $result = $this->repository->findBy($criteria);

        // Assert
        $this->assertEquals([], $result);
    }

    public function testFindOneByWithCriteria()
    {
        // Arrange
        $object = new \stdClass();

        $this->query->expects($this->once())->method('getOneOrNullResult')->willReturn($object);

        $criteria = Criteria::create();

        // Act
        $result = $this->repository->findOneBy($criteria);

        // Assert
        $this->assertEquals($object, $result);
    }

    public function testFindOneByWithArray()
    {
        // Arrange
        $object = new \stdClass();

        $this->query->expects($this->once())->method('getOneOrNullResult')->willReturn($object);

        $criteria = [
            'test' => 'test',
        ];

        // Act
        $result = $this->repository->findOneBy($criteria);

        // Assert
        $this->assertEquals($object, $result);
    }

    public function testFlush()
    {
        // Arrange
        $this->entityManager->expects($this->once())->method('flush');

        // Act
        $this->repository->flush();

        // Assert
        // ...
    }

    public function testPersist()
    {
        // Arrange
        $this->entityManager->expects($this->once())->method('persist');

        $entity = new \stdClass();

        // Act
        $this->repository->persist($entity);

        // Assert
        // ...
    }

    public function testGetEntityManager()
    {
        // Arrange
        // ...

        // Act
        $result = $this->repository->getEntityManager();

        // Assert
        $this->assertEquals($this->entityManager, $result);
    }

    public function testBeginTransaction()
    {
        // Arrange
        $this->entityManager->expects($this->once())->method('beginTransaction');

        // Act
        $this->repository->beginTransaction();

        // Assert
        // ...
    }

    public function testCommitTransaction()
    {
        // Arrange
        $this->entityManager->expects($this->once())->method('commit');

        // Act
        $this->repository->commitTransaction();

        // Assert
        // ...
    }

    public function testRollbackTransaction()
    {
        // Arrange
        $this->entityManager->expects($this->once())->method('rollback');

        // Act
        $this->repository->rollBackTransaction();

        // Assert
        // ...
    }
}


text:
package com.ychstudio.actors;

import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.utils.Disposable;

public abstract class AbstractActor implements Disposable {

    protected Sprite sprite;
    protected float x, y;

    protected boolean removed = false;

    public AbstractActor(TextureRegion textureRegion, float x, float y, float width, float height) {
        sprite = new Sprite(textureRegion);
        sprite.setBounds(x, y, width, height);
        this.x = x;
        this.y = y;
    }

    public abstract void update(float delta);

    public void draw(SpriteBatch batch) {
        sprite.draw(batch);
    };

    public void queue_remove() {
        removed = true;
    }

    public boolean isToBeRemoved() {
        return removed;
    }
}

redpajama_set_name: RedPajamaGithub


text:
#include "ecma-alloc.h"
#include "ecma-builtins.h"
#include "ecma-conversion.h"
#include "ecma-exceptions.h"
#include "ecma-gc.h"
#include "ecma-globals.h"
#include "ecma-helpers.h"
#include "ecma-objects.h"
#include "ecma-array-object.h"
#include "ecma-try-catch-macro.h"
#include "jrt.h"

#ifndef CONFIG_DISABLE_ARRAY_BUILTIN

#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"

#define BUILTIN_INC_HEADER_NAME "ecma-builtin-array.inc.h"
#define BUILTIN_UNDERSCORED_ID array
#include "ecma-builtin-internal-routines-template.inc.h"

/** \addtogroup ecma ECMA
 * @{
 *
 * \addtogroup ecmabuiltins
 * @{
 *
 * \addtogroup array ECMA Array object built-in
 * @{
 */

/**
 * The Array object's 'isArray' routine
 *
 * See also:
 *          ECMA-262 v5, 15.4.3.2
 *
 * @return ecma value
 *         Returned value must be freed with ecma_free_value.
 */
static ecma_value_t
ecma_builtin_array_object_is_array (ecma_value_t this_arg, /**< 'this' argument */
                                    ecma_value_t arg) /**< first argument */
{
  JERRY_UNUSED (this_arg);
  ecma_simple_value_t is_array = ECMA_SIMPLE_VALUE_FALSE;

  if (ecma_is_value_object (arg))
  {
    ecma_object_t *obj_p = ecma_get_object_from_value (arg);

    if (ecma_object_get_class_name (obj_p) == LIT_MAGIC_STRING_ARRAY_UL)
    {
      is_array = ECMA_SIMPLE_VALUE_TRUE;
    }
  }

  return ecma_make_simple_value (is_array);
} /* ecma_builtin_array_object_is_array */

/**
 * Handle calling [[Call]] of built-in Array object
 *
 * @return ecma value
 */
ecma_value_t
ecma_builtin_array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
                                  ecma_length_t arguments_list_len) /**< number of arguments */
{
  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);

  return ecma_builtin_array_dispatch_construct (arguments_list_p, arguments_list_len);
} /* ecma_builtin_array_dispatch_call */

/**
 * Handle calling [[Construct]] of built-in Array object
 *
 * @return ecma value
 */
ecma_value_t
ecma_builtin_array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
                                       ecma_length_t arguments_list_len) /**< number of arguments */
{
  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);

  return ecma_op_create_array_object (arguments_list_p, arguments_list_len, true);
} /* ecma_builtin_array_dispatch_construct */

/**
 * @}
 * @}
 * @}
 */

#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN */


text:
Amoeba "Basenode" Cookbook
====================

For usage of this cookbook, see Amoeba Deploy Tools (ADT)'s readme at:

http://github.com/AmoebaConsulting/amoeba-deploy-tools

## Note:

If you use this cookbook, you must be sure to include monit, locale, and rvm from Githubg by adding
the following to your `Cheffile`:

```
cookbook 'locale',  github: 'fnordfish/chef-locale'
cookbook 'monit',   github: 'phlipper/chef-monit'
```

## Detailed Information

This is a special "basenode" Cookbook for use with amoeba-deploy-tools. It configures minimalist
information about a server, and most importantly creates the deployment user, and disables root
login. It also dumps node information to a JSON file in the deployment user's home, which is used
to cache node information in the data_bags folder of the local machine running deployments (ADT is
based around server-less deployments). Every node in your ADT kitchen should include the
`basenode::default` cookbook to provide this functionality.

The only thing that should need to be configured is the swapfile and provider. Swap files are easy:

1. Set the `swapfile_size` attribute on the node

2. Include `basenode::swap` in the runlist (or a role)

Providers are specified in your node's `deployment/provider` attribute, which is a string name of
the provider. Available providers should be located in your kitchen's provider's databag, which is
built from the `data_bags/providers/<name.json>` files.


text:
package com.sabina.examples.springboot.partialresponse.service;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Component;

import com.fasterxml.jackson.databind.JsonNode;
import com.sabina.examples.springboot.partialresponse.entity.Author;
import com.sabina.examples.springboot.partialresponse.entity.Book;

@Component
public class BookService {

	public Book getBook(String isbn) {
		Book book = new Book();
		book.setIsbn(isbn);
		book.setTitle("My book");
		Author bookAuthor = new Author();
		bookAuthor.setFirstName("Bob");
		bookAuthor.setLastName("Smith");
		book.setAuthor(bookAuthor);

		return book;
	}

	public List<Book> getAll() {
		List<Book> booksList = new ArrayList<Book>();
		Book book1 = new Book();
		book1.setIsbn("12345");
		book1.setTitle("My book 1");
		Book book2 = new Book();
		book2.setIsbn("67890");
		book2.setTitle("My book 2");
		booksList.add(book1);
		booksList.add(book2);
		return booksList;

	}

}


text:
import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class BaseServlet extends HttpServlet {
	private static final long serialVersionUID = 1846833903206709985L;

	public BaseServlet() {}

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		response.setContentType("text/json");
		response.setStatus(HttpServletResponse.SC_OK);

		DatabaseAccess dba = new DatabaseAccess();
		try {
			String action = request.getParameter("action");
			if (action != null && action.equals("add")) {
				dba.addRecord(request.getParameter("text"));
			} else {
				response.getWriter().println(dba.getLatestRecord());
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}


text:
package com.twosigma.beakerx;

import com.twosigma.beakerx.evaluator.MessagePreconditions;
import com.twosigma.beakerx.kernel.CloseKernelAction;
import com.twosigma.beakerx.kernel.Kernel;
import com.twosigma.beakerx.kernel.KernelSocketsFactory;
import com.twosigma.beakerx.message.Message;
import com.twosigma.beakerx.widget.PreviewTableDisplay;
import org.jetbrains.annotations.NotNull;
import org.junit.Test;

import java.util.Optional;

import static com.twosigma.beakerx.KernelFactoryFixtureSetup.enableSparkSupport;
import static com.twosigma.beakerx.KernelFactoryFixtureSetup.runCode;
import static com.twosigma.beakerx.KernelFactoryFixtureSetup.runSparkDataset;
import static com.twosigma.beakerx.KernelFactoryFixtureSetup.stopSpark;
import static com.twosigma.beakerx.evaluator.EvaluatorResultTestWatcher.waitForUpdateMessage;
import static com.twosigma.beakerx.scala.magic.command.EnableSparkSupportMagicCommand.ENABLE_SPARK_SUPPORT;
import static com.twosigma.beakerx.widget.TestWidgetUtils.getValueForProperty;
import static com.twosigma.beakerx.widget.Widget.DESCRIPTION;
import static org.assertj.core.api.Assertions.assertThat;

public class SparkPreviewTest extends KernelSetUpFixtureTest {

  @Override
  protected Kernel createKernel(String sessionId, KernelSocketsFactory kernelSocketsFactory, CloseKernelAction closeKernelAction) {
    return KernelFactoryFixtureSetup.createKernel(sessionId, kernelSocketsFactory, closeKernelAction);
  }

  @Test
  public void sparkPreviewDisplayer() throws Exception {
    try {
      //given
      enableSparkSupport(ENABLE_SPARK_SUPPORT, getKernelSocketsService());
      runSparkDataset(getKernelSocketsService());
      //when
      runCode("ds", getKernelSocketsService());
      //then
      Optional<Message> preview = waitForUpdateMessage(getKernelSocketsService().getKernelSockets(), previewMatcher());
      assertThat(preview).isPresent();
    } finally {
      stopSpark(getKernelSocketsService());
    }
  }

  @NotNull
  private MessagePreconditions previewMatcher() {
    return message -> message.filter(x -> {
      String desc = getValueForProperty(x, DESCRIPTION, String.class);
      return desc != null && desc.contains(PreviewTableDisplay.PREVIEW);
    }).isPresent();
  }
}


text:
require 'spec_helper'

class ArticleAuthorizer

	def creatable_by?(user, resource)
		true
	end

end

class Article
	include SafetyPatrol::Abilities
	authorizer 'ArticleAuthorizer'
end

describe SafetyPatrol::Abilities do

	it "should define methods on a class based upon the abilities hash" do
		article = Article.new
		lambda {
			article.creatable_by?
		}.should_not raise_exception(NoMethodError)
	end

	it "should have an associated Authorizer" do
		Article.authorizer.should be_instance_of(ArticleAuthorizer)
	end

	it "should receive a creatable_by? call and return true or false" do
		article = Article.new
		user = double("User")
		article.creatable_by?(user).should eq(true)
	end

	describe ArticleAuthorizer do

		it "should receive a creatable_by?" do
			article = Article.new
			article.authorizer.should_receive(:creatable_by?)
			user = double("User")
			article.creatable_by?(user)
		end
	end

end


text:
def unimap(fname, species, ptm=None, mutation=None):

	""" The UniMap is a first attempt to make a universal PTMS reprository to help users to
	map PTMs to protein list and/or mutations to PTMs sites."""

	with open ('pyntheon-data.txt', 'a') as ac:
		if species in ('arbacia', 'ap'):
			fname2 = 'Arbacia+punctulata-PTMs.txt'
		elif species in ('branchiostoma', 'bf'):
			fname2 = 'Branchiostoma+floridae-PTMs.txt'
		elif species in ('celegans', 'ce'):
			fname2 = 'Caenorhabditis+elegans-functional_data.txt'
		elif species in ('ciona', 'ci'):
			fname2 = 'Ciona+intestinalis-PTMs.txt'
		elif species in ('daphnia', 'dm'):
			fname2 = 'Daphnia+magna-PTMs.txt'
		elif species in ('euprymna', 'es'):
			fname2 = 'Euprymna+scolopes-PTMs.txt'
		elif species in ('galleria', 'gm'):
			fname2 = 'Galleria+mellonella-PTMs.txt'
		elif species in ('gryllus', 'gb'):
			fname2 = 'Gryllus+bimaculatus-PTMs.txt'
		elif species in ('hydra', 'hy'):
			fname2 = 'Hydra-PTMs.txt'
		elif species in ('loligo', 'lp'):
			fname2 = 'Loligo+pealei-PTMs.txt'
		elif species in ('nematostella', 'nv'):
			fname2 = "Nematostella+vectensis-PTMs.txt"
		elif species in ('oikopleura', 'od'):
			fname2 = "Oikopleura+dioica-PTMs.txtx"
		elif species in ('platynereis', 'pd'):
			fname2 = 'Platynereis+dumerilii-PTMs.txt'
		elif species in ('pristionchus', 'pp'):
			fname2 = "Pristionchus+pacificus-PTMs.txt"
		elif species in ('schmidtea', 'sm'):
			fname2 = "Schmidtea+mediterranea-PTMs.txt"
		elif species in ('symsagittifera', 'sr'):
			fname2 = "Symsagittifera+roscoffensis-PTMs.txt"
		elif species in ('tribolium', 'tc'):
			fname2 = "Tribolium+castaneum-PTMs.txt"
		elif species in ('amphimedon', 'aq'):
			fname2 = "Amphimedon+queenslandica-PTMs.txt"
		elif species in ('aplysia', 'acc'):
			fname2 = "Aplysia-PTMs.txt"
		elif species in ('ecoli', 'ec'):
			fname2 = "Escherichia+coli-functional_data.txt"
		elif species in ('mycobacterium', 'mb'):
			fname2 = "Mycobacterium+tuberculosis-functional_data.txt"
		elif species in ('ashbya', 'ag'):
			fname2 = "Ashbya+gossypii.gff-PTMs.txt"
		elif species in ('Aspergillus+nidulans.gff-PTMs.txt', 'an'):
			fname2 = "Aspergillus+nidulans.gff-PTMs.txt"
		elif species in ('coprinus', 'cc'):
			fname2 = "Coprinus+cinereus-functional_data.txt"
		elif species in ("cryptococcus", 'cn'):
			fname2 = "Cryptococcus+neoformans.gff-PTMs.txt"
		elif species in ('neurospora', 'nc'):
			fname2 = "Neurospora+crassa-PTMs.txt"
		elif species in ('schizophyllum', 'sc'):
			fname2 = "Schizophyllum+commune.gff-PTMs.txt"
		elif species in ('schizosaccharomyces','sp'):
			fname2 = "Schizosaccharomyces+pombe.gff-PTMs.txt"
		elif species in ('ustilago', 'um'):
			fname2 = "Ustilago+maydis-PTMs.txt"
		elif species in ('scerevisiae', 'sce'):
			fname2 = "yeast-functional_data.txt"
		elif species in ('herpes', 'hsv'):
			fname2 = "Herpes+simplex+virus-PTMs.txt"
		elif species in ('plambda', 'pl'):
			fname2 = "Phage+lambda-PTMs.txt"
		elif species in ('Phi_X_174', 'px'):
			fname2 = "Phi+X+174-PTMs.txt"
		elif species in ('sv40', 'sv'):
			fname2 = "SV40-PTMs.txt"
		elif species in ('T4phage', 't4'):
			fname2 = "T4+phage-PTMs.txt"
		elif species in ('tmvirus', 'tmv'):
			fname2 = 'Tobacco+mosaic+virus-PTMs.txt'
		elif species in ('chlamydomonas', 'cr'):
			fname2 = "Chlamydomonas+reinhardtii.gff-PTMs.txt"
		elif species in ('dictyostelium', 'dd'):
			fname2 = "Dictyostelium+discoideum.gff-PTMs.txt"
		elif species in ('emiliania', 'eh'):
			fname2 = "Emiliania+huxleyi.gff-PTMs.txt"
		elif species in ('tetrahymena', 'tt'):
			fname2 = "Tetrahymena+thermophila.gff-PTMs.txt"
		elif species in ('thalassiosira', 'tp'):
			fname2 = "Thalassiosira+pseudonana.gff-PTMs.txt"
		elif species in ('aliivibrio', 'af'):
			fname2 = "uniprot-Aliivibrio+fischeri.gff-PTMs.txt"
		elif species in ('bacillus', 'bs'):
			fname2 = "uniprot-Bacillus+subtilis.gff-PTMs.txt"
		elif species in ('caulobacter', 'cac'):
			fname2 = "uniprot-Caulobacter+crescentus.gff-PTMs.txt"
		elif species in ('pseudomonas', 'pf'):
			fname2 = "uniprot-Pseudomonas+fluorescens.gff-PTMs.txt"
		elif species in ('synechocystis', 'sy'):
			fname2 = "uniprot-Synechocystis.gff-PTMs.txt"
		elif species in ('mycoplasma', 'mg'):
			fname2 = "uniprot-Mycoplasma+genitalium.gff-PTMs.txt"
		elif species in ('arabidopsis', 'at'):
			fname2 = "arabidopsis+thaliana-functional_data.txt"
		elif species in ('brachypodium', 'bd'):
			fname2 = "Brachypodium+distachyon.gff-PTMs.txt"
		elif species in ('lemna', 'lg'):
			fname2 = "Lemna+gibba.gff-PTMs.txt"
		elif species in ('lotus', 'lj'):
			fname2 = "Lotus+japonicus.gff-PTMs.txt"
		elif species in ('medicago', 'mt'):
			fname2 = "Medicago+truncatula.gff-PTMs.txt"
		elif species in ('mimulus', 'mig'):
			fname2 = "Mimulus+guttatus.gff-PTMs.txt"
		elif species in ('nicotiana', 'nb'):
			fname2 = "Nicotiana+benthamiana.gff-PTMs.txt"
		elif species in ('oryza', 'os'):
			fname2 = "Oryza+sativa.gffPTMs.txt"
		elif species in ('physcomitrella', 'php'):
			fname2 = "Physcomitrella+patens.gff-PTMs.txt"
		elif species in ('populus', 'pt'):
			fname2 = "Populus+trichocarpa.gff-PTMs.txt"
		elif species in ('selaginella', 'sem'):
			fname2 = "Selaginella+moellendorffii.gff-PTMs.txt"
		elif species in ('setaria', 'sev'):
			fname2 = "Setaria+viridis.gff-PTMs.txt"
		elif species in ('tobacco', 'tb'):
			fname2 = "Tobacco+BY-2+cells.gff-PTMs.txt"
		elif species in ('zea', 'zm'):
			fname2 = "Zea+mays.gff-PTMs.txt"
		elif species in ('anolis', 'ac'):
			fname2 = "Anolis+carolinensis.gffPTMs.txt"
		elif species in ('bombina', 'bm'):
			fname2 = "Bombina+maxima.gff-PTMs.txt"
		elif species in ('bombina', 'bo'):
			fname2 = "Bombina+orientalis.gff-PTMs.txt"
		elif species in ('canis', 'cl'):
			fname2 = "Canis+lupus.gff-PTMs.txt"
		elif species in ('cavia', 'cp'):
			fname2 = "Cavia+porcellus.gff-PTMs.txt"
		elif species in ('columba', 'cld'):
			fname2 = "Columba+livia+domestica.gff-PTMs.txt"
		elif species in ("drosophila", 'do'):
			fname2 = "drosophila-functional_data.txt"
		elif species in ('felis', 'fc'):
			fname2 = "Felis+catus.gff-PTMs.txt"
		elif species in ('gallus', 'gg'):
			fname2 = "Gallus+gallus.gff-PTMs.txt"
		elif species in ('gasterosteus', 'ga'):
			fname2 = "Gasterosteus+aculeatus.gff-PTMs.txt"
		elif species in ('heterocephalus', 'hg'):
			fname2 = "Heterocephalus+glaber.gff-PTMs.txt"
		elif species in ('hsapiens', 'hs'):
			fname2 = "human-functional_data.txt"
		elif species in ('mesocricetus', 'ma'):
			fname2 = "Mesocricetus+auratus.gff-PTMs.txt"
		elif species in ('mus', 'mus'):
			fname2 = "Mus+musculus.gff-PTMs.txt"
		elif species in ('myotis', 'ml'):
			fname2 = "Myotis+lucifugus.gff-PTMs.txt"
		elif species in ('oryzias', 'ol'):
			fname2 = "Oryzias+latipes.gff-PTMs.txt"
		elif species in ('petromyzon', 'pem'):
			fname2 = "Petromyzon+marinus.gff-PTMs.txt"
		elif species in ("poecilia", "pr"):
			fname2 = "Poecilia+reticulata-PTMs.txt"
		elif species in ('rattus', 'rn'):
			fname2 = "Rattus+norvegicus.gff-PTMs.txt"
		elif species in ('rhesus', 'rm'):
			fname2 = "Rhesus+macaque.gff-PTMs.txt"
		elif species in ('sigmodon', 'sh'):
			fname2 = "Sigmodon+hispidus.gff-PTMs.txt"
		elif species in ('takifugu', 'tr'):
			fname2 = "Takifugu+rubripes.gff-PTMs.txt"
		elif species in ('xenopus', 'xl'):
			fname2 = "Xenopus+laevis.gff-PTMs.txt"
		elif species in ('xenopust', 'xt'):
			fname2 = "Xenopus+tropicalis.gff-PTMs.txt"
		elif species in ('zebra', 'zf'):
			fname2 = "Zebra+finch.gff-PTMs.txt"
		else:
			raise ValueError("species name does not exits")
		with  open(fname2,'rU') as pm:
			for line in pm:
				line = line.split()
				with open(fname, 'rU') as user:
					nam = user.name
					n = nam.split('/')
					n1 = n[-1].split('.')
					for e in user:
						e = e.split()
						if ptm:
							if e[0] == line[0]:
								with open (n1[0]+'-pyntheon-data.txt', 'a') as ac:
									ac.write("\t".join(line)+'\n')
						elif mutation:
							if e[0] == line[0] and e[1] == line[1]:
								with open (n1[0]+'-pyntheon-mutation-data.txt', 'a') as ac:
									ac.write("\t".join(line)+'\n')
									pass
							elif e[0] == line[0] and e[1] == line[2]:
								with open (n1[0]+'-pyntheon-mutation-data.txt', 'a') as ac:
									ac.write("\t".join(line)+'\n')
						else:
							return "data not found"

def pyn():
	unimap(input("fname"), input("species"), input("ptm"), input ("mutation"))

if __name__ == "__main__":

	import argparse

	parser = argparse.ArgumentParser()

	parser.add_argument("-f", "--fname", help= 'A text file needed for proper mapping of protein PTMS')
	parser.add_argument("-s", "--species", help= 'A proper species name needed, mapping of protein PTMS; see README')
	parser.add_argument("-m", "--mutation", help= 'mutation=True if PTMs sites also desired to be mapped on mutation sites; see README')
	parser.add_argument("-p", "--ptm", help='ptm=True if proteins PTMs sites present in functional regions desired to be mapped on mutation sites')

	args = parser.parse_args()

	try:
		unimap(args.fname, args.species, args.ptm, args.mutation)
	except IOError:
		print(parser.usage)
		exit(0)


text:
FROM python:2.7
ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get install -y \
    build-essential \
    python-dev \
    libatlas-base-dev \
    libatlas-dev \
    gfortran
RUN pip install numpy==1.9.2
RUN pip install scipy==0.15.1
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD requirements-dev.txt /code/
RUN pip install -r requirements-dev.txt
ADD . /code/
EXPOSE 8888
CMD ["python", "manage.py", "runserver", "0.0.0.0:8888"]


text:
"""
   Copyright 2010 Sami Dalouche

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
"""

from pymager.imgengine._imageprocessingexception import ImageProcessingException
from pymager.imgengine._imageformatnotsupportedexception import ImageFormatNotSupportedException
from pymager.imgengine._imagestreamnotrecognizedexception import ImageStreamNotRecognizedException
from pymager.imgengine._imageidalreadyexistsexception import ImageIDAlreadyExistsException
from pymager.imgengine._imagemetadatanotfoundexception import ImageMetadataNotFoundException
from pymager.imgengine.image_transformation_security_decorator import SecurityCheckException
from pymager.imgengine._imagerequestprocessor import ImageRequestProcessor
from pymager.imgengine._transformationrequest import TransformationRequest


text:
<?php

namespace DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement;

use DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement;
use DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRSchedule\FHIRScheduleRepeat;
use DCarbone\PHPFHIRGenerated\DSTU1\PHPFHIRConstants;
use DCarbone\PHPFHIRGenerated\DSTU1\PHPFHIRTypeInterface;

/**
 * Specifies an event that may occur multiple times. Schedules are used for to
 * reord when things are expected or requested to occur.
 * If the element is present, it must have a value for at least one of the defined
 * elements, an \@id referenced from the Narrative, or extensions
 *
 * Class FHIRSchedule
 * @package \DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement
 */
class FHIRSchedule extends FHIRElement
{
    // name of FHIR type this class describes
    const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_SCHEDULE;
    const FIELD_EVENT = 'event';
    const FIELD_REPEAT = 'repeat';

    /** @var string */
    private $_xmlns = 'http://hl7.org/fhir';

    /**
     * A time period defined by a start and end date and optionally time.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * Identifies specific time periods when the event should occur.
     *
     * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRPeriod[]
     */
    protected $event = [];

    /**
     * Specifies an event that may occur multiple times. Schedules are used for to
     * reord when things are expected or requested to occur.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * Identifies a repeating pattern to the intended time periods.
     *
     * @var null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRSchedule\FHIRScheduleRepeat
     */
    protected $repeat = null;

    /**
     * Validation map for fields in type Schedule
     * @var array
     */
    private static $_validationRules = [    ];

    /**
     * FHIRSchedule Constructor
     * @param null|array $data
     */
    public function __construct($data = null)
    {
        if (null === $data || [] === $data) {
            return;
        }
        if (!is_array($data)) {
            throw new \InvalidArgumentException(sprintf(
                'FHIRSchedule::_construct - $data expected to be null or array, %s seen',
                gettype($data)
            ));
        }
        parent::__construct($data);
        if (isset($data[self::FIELD_EVENT])) {
            if (is_array($data[self::FIELD_EVENT])) {
                foreach($data[self::FIELD_EVENT] as $v) {
                    if (null === $v) {
                        continue;
                    }
                    if ($v instanceof FHIRPeriod) {
                        $this->addEvent($v);
                    } else {
                        $this->addEvent(new FHIRPeriod($v));
                    }
                }
            } else if ($data[self::FIELD_EVENT] instanceof FHIRPeriod) {
                $this->addEvent($data[self::FIELD_EVENT]);
            } else {
                $this->addEvent(new FHIRPeriod($data[self::FIELD_EVENT]));
            }
        }
        if (isset($data[self::FIELD_REPEAT])) {
            if ($data[self::FIELD_REPEAT] instanceof FHIRScheduleRepeat) {
                $this->setRepeat($data[self::FIELD_REPEAT]);
            } else {
                $this->setRepeat(new FHIRScheduleRepeat($data[self::FIELD_REPEAT]));
            }
        }
    }

    /**
     * @return string
     */
    public function _getFHIRTypeName()
    {
        return self::FHIR_TYPE_NAME;
    }

    /**
     * @return string
     */
    public function _getFHIRXMLElementDefinition()
    {
        $xmlns = $this->_getFHIRXMLNamespace();
        if (null !== $xmlns) {
            $xmlns = " xmlns=\"{$xmlns}\"";
        }
        return "<Schedule{$xmlns}></Schedule>";
    }

    /**
     * A time period defined by a start and end date and optionally time.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * Identifies specific time periods when the event should occur.
     *
     * @return null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRPeriod[]
     */
    public function getEvent()
    {
        return $this->event;
    }

    /**
     * A time period defined by a start and end date and optionally time.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * Identifies specific time periods when the event should occur.
     *
     * @param null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRPeriod $event
     * @return static
     */
    public function addEvent(FHIRPeriod $event = null)
    {
        $this->event[] = $event;
        return $this;
    }

    /**
     * A time period defined by a start and end date and optionally time.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * Identifies specific time periods when the event should occur.
     *
     * @param \DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRPeriod[] $event
     * @return static
     */
    public function setEvent(array $event = [])
    {
        $this->event = [];
        if ([] === $event) {
            return $this;
        }
        foreach($event as $v) {
            if ($v instanceof FHIRPeriod) {
                $this->addEvent($v);
            } else {
                $this->addEvent(new FHIRPeriod($v));
            }
        }
        return $this;
    }

    /**
     * Specifies an event that may occur multiple times. Schedules are used for to
     * reord when things are expected or requested to occur.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * Identifies a repeating pattern to the intended time periods.
     *
     * @return null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRSchedule\FHIRScheduleRepeat
     */
    public function getRepeat()
    {
        return $this->repeat;
    }

    /**
     * Specifies an event that may occur multiple times. Schedules are used for to
     * reord when things are expected or requested to occur.
     * If the element is present, it must have a value for at least one of the defined
     * elements, an \@id referenced from the Narrative, or extensions
     *
     * Identifies a repeating pattern to the intended time periods.
     *
     * @param null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRSchedule\FHIRScheduleRepeat $repeat
     * @return static
     */
    public function setRepeat(FHIRScheduleRepeat $repeat = null)
    {
        $this->repeat = $repeat;
        return $this;
    }

    /**
     * Returns the validation rules that this type's fields must comply with to be considered "valid"
     * The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]]
     *
     * @return array
     */
    public function _getValidationRules()
    {
        return self::$_validationRules;
    }

    /**
     * Validates that this type conforms to the specifications set forth for it by FHIR.  An empty array must be seen as
     * passing.
     *
     * @return array
     */
    public function _getValidationErrors()
    {
        $errs = parent::_getValidationErrors();
        $validationRules = $this->_getValidationRules();
        if ([] !== ($vs = $this->getEvent())) {
            foreach($vs as $i => $v) {
                if ([] !== ($fieldErrs = $v->_getValidationErrors())) {
                    $errs[sprintf('%s.%d', self::FIELD_EVENT, $i)] = $fieldErrs;
                }
            }
        }
        if (null !== ($v = $this->getRepeat())) {
            if ([] !== ($fieldErrs = $v->_getValidationErrors())) {
                $errs[self::FIELD_REPEAT] = $fieldErrs;
            }
        }
        if (isset($validationRules[self::FIELD_EVENT])) {
            $v = $this->getEvent();
            foreach($validationRules[self::FIELD_EVENT] as $rule => $constraint) {
                $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_EVENT, $rule, $constraint, $v);
                if (null !== $err) {
                    if (!isset($errs[self::FIELD_EVENT])) {
                        $errs[self::FIELD_EVENT] = [];
                    }
                    $errs[self::FIELD_EVENT][$rule] = $err;
                }
            }
        }
        if (isset($validationRules[self::FIELD_REPEAT])) {
            $v = $this->getRepeat();
            foreach($validationRules[self::FIELD_REPEAT] as $rule => $constraint) {
                $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_SCHEDULE, self::FIELD_REPEAT, $rule, $constraint, $v);
                if (null !== $err) {
                    if (!isset($errs[self::FIELD_REPEAT])) {
                        $errs[self::FIELD_REPEAT] = [];
                    }
                    $errs[self::FIELD_REPEAT][$rule] = $err;
                }
            }
        }
        if (isset($validationRules[self::FIELD_EXTENSION])) {
            $v = $this->getExtension();
            foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {
                $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v);
                if (null !== $err) {
                    if (!isset($errs[self::FIELD_EXTENSION])) {
                        $errs[self::FIELD_EXTENSION] = [];
                    }
                    $errs[self::FIELD_EXTENSION][$rule] = $err;
                }
            }
        }
        if (isset($validationRules[self::FIELD_ID])) {
            $v = $this->getId();
            foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {
                $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v);
                if (null !== $err) {
                    if (!isset($errs[self::FIELD_ID])) {
                        $errs[self::FIELD_ID] = [];
                    }
                    $errs[self::FIELD_ID][$rule] = $err;
                }
            }
        }
        return $errs;
    }

    /**
     * @param \SimpleXMLElement|string|null $sxe
     * @param null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRSchedule $type
     * @param null|int $libxmlOpts
     * @return null|\DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRSchedule
     */
    public static function xmlUnserialize($sxe = null, PHPFHIRTypeInterface $type = null, $libxmlOpts = 591872)
    {
        if (null === $sxe) {
            return null;
        }
        if (is_string($sxe)) {
            libxml_use_internal_errors(true);
            $sxe = new \SimpleXMLElement($sxe, $libxmlOpts, false);
            if ($sxe === false) {
                throw new \DomainException(sprintf('FHIRSchedule::xmlUnserialize - String provided is not parseable as XML: %s', implode(', ', array_map(function(\libXMLError $err) { return $err->message; }, libxml_get_errors()))));
            }
            libxml_use_internal_errors(false);
        }
        if (!($sxe instanceof \SimpleXMLElement)) {
            throw new \InvalidArgumentException(sprintf('FHIRSchedule::xmlUnserialize - $sxe value must be null, \\SimpleXMLElement, or valid XML string, %s seen', gettype($sxe)));
        }
        if (null === $type) {
            $type = new FHIRSchedule;
        } elseif (!is_object($type) || !($type instanceof FHIRSchedule)) {
            throw new \RuntimeException(sprintf(
                'FHIRSchedule::xmlUnserialize - $type must be instance of \DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRSchedule or null, %s seen.',
                is_object($type) ? get_class($type) : gettype($type)
            ));
        }
        FHIRElement::xmlUnserialize($sxe, $type);
        $xmlNamespaces = $sxe->getDocNamespaces(false, false);
        if ([] !== $xmlNamespaces) {
            $ns = reset($xmlNamespaces);
            if (false !== $ns && '' !== $ns) {
                $type->_xmlns = $ns;
            }
        }
        $attributes = $sxe->attributes();
        $children = $sxe->children();
        if (isset($children->event)) {
            foreach($children->event as $child) {
                $type->addEvent(FHIRPeriod::xmlUnserialize($child));
            }
        }
        if (isset($children->repeat)) {
            $type->setRepeat(FHIRScheduleRepeat::xmlUnserialize($children->repeat));
        }
        return $type;
    }

    /**
     * @param null|\SimpleXMLElement $sxe
     * @param null|int $libxmlOpts
     * @return \SimpleXMLElement
     */
    public function xmlSerialize(\SimpleXMLElement $sxe = null, $libxmlOpts = 591872)
    {
        if (null === $sxe) {
            $sxe = new \SimpleXMLElement($this->_getFHIRXMLElementDefinition(), $libxmlOpts, false);
        }
        parent::xmlSerialize($sxe);
        if ([] !== ($vs = $this->getEvent())) {
            foreach($vs as $v) {
                if (null === $v) {
                    continue;
                }
                $v->xmlSerialize($sxe->addChild(self::FIELD_EVENT, null, $v->_getFHIRXMLNamespace()));
            }
        }
        if (null !== ($v = $this->getRepeat())) {
            $v->xmlSerialize($sxe->addChild(self::FIELD_REPEAT, null, $v->_getFHIRXMLNamespace()));
        }
        return $sxe;
    }

    /**
     * @return array
     */
    public function jsonSerialize()
    {
        $a = parent::jsonSerialize();
        if ([] !== ($vs = $this->getEvent())) {
            $a[self::FIELD_EVENT] = [];
            foreach($vs as $v) {
                if (null === $v) {
                    continue;
                }
                $a[self::FIELD_EVENT][] = $v;
            }
        }
        if (null !== ($v = $this->getRepeat())) {
            $a[self::FIELD_REPEAT] = $v;
        }
        if ([] !== ($vs = $this->_getFHIRComments())) {
            $a[PHPFHIRConstants::JSON_FIELD_FHIR_COMMENTS] = $vs;
        }
        return $a;
    }

    /**
     * @return string
     */
    public function __toString()
    {
        return self::FHIR_TYPE_NAME;
    }
}


text:
package org.bedoing.facade;

import com.alibaba.fastjson.JSON;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.bedoing.constant.Constant;
import org.bedoing.constant.UriConstant;
import org.bedoing.entity.LoginAccount;
import org.bedoing.repository.UserRepository;
import org.bedoing.security.EndecryptUtil;
import org.bedoing.service.IUserService;
import org.bedoing.vo.UserRegVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;

import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;

/**
 *
 * @author Ken
 *
 */
@RestController
@RequestMapping(value = "/user")
public class UserController extends BaseController {
	private static final Logger log = Logger.getLogger(UserController.class);

	@Resource
	private IUserService userService;
	@Autowired
	private UserRepository userRepository;

	@RequestMapping(value = "/login", method = POST)
	public ModelAndView userLogin(@ModelAttribute LoginAccount loginAccount, HttpServletRequest request) {
		String msg = "";
		if(StringUtils.isBlank(loginAccount.getAccountName())) {
			msg = "登陆账号不能为空      ";
		}
		if(StringUtils.isBlank(loginAccount.getPassword())) {
			msg += "密码不能为空";
		}

		if(StringUtils.isNotBlank(msg)) {
			return new ModelAndView(UriConstant.ADMIN_LOGIN)
					.addObject(Constant.MSG, msg)
					.addObject("loginAccount", loginAccount)
					.addObject("password", loginAccount.getPassword());
		}

		LoginAccount user = userRepository.findByAccountName(loginAccount.getAccountName());
		if(null == user || !user.getPassword().equals(EndecryptUtil.encrypt(loginAccount.getPassword()))) {
			return new ModelAndView(UriConstant.ADMIN_LOGIN)
					.addObject(Constant.MSG, "不存在账号或密码错误")
					.addObject("loginAccount", loginAccount)
					.addObject("password", loginAccount.getPassword());
		}else {
			setSessionAttribute(Constant.SESSION_USER, user, request);
		}

		return new ModelAndView(UriConstant.ADMIN_INDEX);
	}

	@RequestMapping(value = "/logout", method = {GET, POST}, produces = MediaType.APPLICATION_JSON_VALUE)
	public void logout(HttpServletRequest request, HttpServletResponse response) {
		Object obj = getSessionValue(Constant.SESSION_USER, request);
		if(null != obj) {
			setSessionAttribute(Constant.SESSION_USER, null, request);
			request.setAttribute(Constant.MSG, "登出成功!");
		}
		try {
			request.getRequestDispatcher("/app/place/login").forward(request, response);
		} catch (Exception e) {
			log.error(e);
		}
	}

	@RequestMapping(value = "/join", method = POST, produces = MediaType.APPLICATION_JSON_VALUE)
	public ModelAndView registe(@Valid UserRegVO user, BindingResult br, HttpServletRequest request){
		log.info(JSON.toJSONString(user));
		String msg = "";
		if(br.hasErrors()){
			for (int i = br.getFieldErrors().size() - 1; i >= 0; i--) {
				FieldError fe = br.getFieldErrors().get(i);
				msg += fe.getDefaultMessage() + ", ";
			}
		}else{
			int sum = userService.countByLoginAccount(user.getLoginAccount());
			if(sum > 0) {
				msg = "已存在账号";
			}
		}

		if(StringUtils.isNotBlank(msg)) {
			return new ModelAndView(UriConstant.DEFAULT_REGISTE).addObject(Constant.MSG, msg).addObject(Constant.PAGE_USER, user);
		}

		userService.saveLoginAccount(user);

		return new ModelAndView(UriConstant.DEFAULT_DEFAULT);
	}
}


text:
<?php

namespace phpDocumentor\Plugin\Core\Transformer\Behaviour\Tag;

/**
 * Behaviour that adds support for the @method tag
 */
class MethodTag
{
    /**
     * Find all return tags that contain 'self' or '$this' and replace those
     * terms for the name of the current class' type.
     *
     * @param \DOMDocument $xml Structure source to apply behaviour onto.
     *
     * @return \DOMDocument
     */
    public function process(\DOMDocument $xml)
    {
        $xpath = new \DOMXPath($xml);
        $nodes = $xpath->query(
            '/project/file/class/docblock/tag[@name="method"]'
        );

        /** @var \DOMElement $node */
        foreach ($nodes as $node) {
            $class = $node->parentNode->parentNode;

            $method = new \DOMElement('method');
            $class->appendChild($method);

            // set basic information
            $method->setAttribute('final', 'false');
            $method->setAttribute('static', 'false');
            $method->setAttribute('visibility', 'public');
            $method->setAttribute('line', $node->getAttribute('line'));
            $method->appendChild(
                new \DOMElement('name', $node->getAttribute('method_name'))
            );

            // fill docblock
            $docblock = new \DOMElement('docblock');
            $method->appendChild($docblock);
            $docblock->appendChild(
                new \DOMElement('description', $node->getAttribute('description'))
            );
            $docblock->appendChild(new \DOMElement('long-description'));

            // for each argument; create an @param tag and an argument element
            /** @var \DOMElement $argument */
            foreach ($node->getElementsByTagName('argument') as $argument) {
                $param_tag = new \DOMElement('tag');
                $docblock->appendChild($param_tag);
                $param_tag->setAttribute('name', 'param');
                $param_tag->setAttribute(
                    'type',
                    $argument->getElementsByTagName('type')->item(0)->nodeValue
                );
                $param_tag->setAttribute(
                    'variable',
                    $argument->getElementsByTagName('name')->item(0)->nodeValue
                );
                $param_tag->setAttribute('line', $node->getAttribute('line'));

                $types = explode(
                    '|',
                    $argument->getElementsByTagName('type')->item(0)->nodeValue
                );

                foreach ($types as $type) {
                    $type_element = new \DOMElement('type', $type);
                    $param_tag->appendChild($type_element);
                }

                $argument_element = $argument->cloneNode(true);
                $method->appendChild($argument_element);
            }

            // add a tag 'magic'
            $magic_tag = new \DOMElement('tag');
            $docblock->appendChild($magic_tag);
            $magic_tag->setAttribute('name', 'magic');
            $magic_tag->setAttribute('line', $node->getAttribute('line'));

            // add a @return tag
            $return_tag = new \DOMElement('tag');
            $docblock->appendChild($return_tag);
            $return_tag->setAttribute('name', 'return');
            $return_tag->setAttribute('line', $node->getAttribute('line'));
            $return_tag->setAttribute('type', $node->getAttribute('type'));

            // add type sub elements to the param
            foreach (explode('|', $node->getAttribute('type')) as $type) {
                $type_element = new \DOMElement('type', $type);
                $return_tag->appendChild($type_element);
            }

            // remove the tag, it is unneeded
            $node->parentNode->removeChild($node);
            $docblock->appendChild($node);
        }

        return $xml;
    }
}


text:
#region License

#endregion
using System.Patterns.Form;
namespace System.Web.UI.WebControls
{
    /// <summary>
    /// CheckBoxEx
    /// </summary>
    public class CheckBoxEx : CheckBox, IFormControl
    {
        public CheckBoxEx()
            : base() { }

        public FormFieldViewMode ViewMode { get; set; }

        protected override void Render(HtmlTextWriter w)
        {
            switch (ViewMode)
            {
                case FormFieldViewMode.Static:
                    RenderStaticText(w);
                    break;
                case FormFieldViewMode.StaticWithHidden:
                    RenderStaticText(w);
                    RenderHidden(w);
                    break;
                case FormFieldViewMode.Hidden:
                    RenderHidden(w);
                    break;
                default:
                    base.Render(w);
                    break;
            }
        }

        protected void RenderHidden(HtmlTextWriter w)
        {
            w.AddAttribute(HtmlTextWriterAttribute.Type, "hidden");
            w.AddAttribute(HtmlTextWriterAttribute.Id, ClientID);
            w.AddAttribute(HtmlTextWriterAttribute.Name, UniqueID);
            w.AddAttribute(HtmlTextWriterAttribute.Value, Text);
            w.RenderBeginTag(HtmlTextWriterTag.Input);
            w.RenderEndTag();
        }

        protected virtual void RenderStaticText(HtmlTextWriter w)
        {
            string text = Text;
            string formatAB;
            if (TextAlign == TextAlign.Right)
            {
                text = (!string.IsNullOrEmpty(text) ? CoreEx.EmptyHtml + Text : string.Empty);
                formatAB = "[{0}]{1}";
            }
            else
            {
                text = (!string.IsNullOrEmpty(text) ? Text + CoreEx.EmptyHtml : string.Empty);
                formatAB = "{1}[{0}]";
            }
            w.RenderBeginTag(HtmlTextWriterTag.Span);
            w.WriteEncodedText(string.Format(formatAB, (Checked ? "X" : "-"), text));
            w.RenderEndTag();
        }
    }
}


text:
package com.amazonaws.services.apigateway.model;

import java.io.Serializable;

/**
 *

 * Represents a domain name that is contained in a simpler, more intuitive URL
 * that can be called.
 *

 */
public class UpdateDomainNameResult implements Serializable, Cloneable {

    /**
     *

     * The name of the DomainName resource.
     *

     */
    private String domainName;
    /**
     *

     * The name of the certificate.
     *

     */
    private String certificateName;
    /**
     *

     * The date when the certificate was uploaded, in ISO 8601 format.
     *

     */
    private java.util.Date certificateUploadDate;
    /**
     *

     * The domain name of the Amazon CloudFront distribution. For more
     * information, see the Amazon CloudFront documentation.
     *

     */
    private String distributionDomainName;

    /**
     *

     * The name of the DomainName resource.
     *

     *
     * @param domainName
     *        The name of the DomainName resource.
     */

    public void setDomainName(String domainName) {
        this.domainName = domainName;
    }

    /**
     *

     * The name of the DomainName resource.
     *

     *
     * @return The name of the DomainName resource.
     */

    public String getDomainName() {
        return this.domainName;
    }

    /**
     *

     * The name of the DomainName resource.
     *

     *
     * @param domainName
     *        The name of the DomainName resource.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */

    public UpdateDomainNameResult withDomainName(String domainName) {
        setDomainName(domainName);
        return this;
    }

    /**
     *

     * The name of the certificate.
     *

     *
     * @param certificateName
     *        The name of the certificate.
     */

    public void setCertificateName(String certificateName) {
        this.certificateName = certificateName;
    }

    /**
     *

     * The name of the certificate.
     *

     *
     * @return The name of the certificate.
     */

    public String getCertificateName() {
        return this.certificateName;
    }

    /**
     *

     * The name of the certificate.
     *

     *
     * @param certificateName
     *        The name of the certificate.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */

    public UpdateDomainNameResult withCertificateName(String certificateName) {
        setCertificateName(certificateName);
        return this;
    }

    /**
     *

     * The date when the certificate was uploaded, in ISO 8601 format.
     *

     *
     * @param certificateUploadDate
     *        The date when the certificate was uploaded, in ISO 8601 format.
     */

    public void setCertificateUploadDate(java.util.Date certificateUploadDate) {
        this.certificateUploadDate = certificateUploadDate;
    }

    /**
     *

     * The date when the certificate was uploaded, in ISO 8601 format.
     *

     *
     * @return The date when the certificate was uploaded, in ISO 8601 format.
     */

    public java.util.Date getCertificateUploadDate() {
        return this.certificateUploadDate;
    }

    /**
     *

     * The date when the certificate was uploaded, in ISO 8601 format.
     *

     *
     * @param certificateUploadDate
     *        The date when the certificate was uploaded, in ISO 8601 format.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */

    public UpdateDomainNameResult withCertificateUploadDate(
            java.util.Date certificateUploadDate) {
        setCertificateUploadDate(certificateUploadDate);
        return this;
    }

    /**
     *

     * The domain name of the Amazon CloudFront distribution. For more
     * information, see the Amazon CloudFront documentation.
     *

     *
     * @param distributionDomainName
     *        The domain name of the Amazon CloudFront distribution. For more
     *        information, see the Amazon CloudFront documentation.
     */

    public void setDistributionDomainName(String distributionDomainName) {
        this.distributionDomainName = distributionDomainName;
    }

    /**
     *

     * The domain name of the Amazon CloudFront distribution. For more
     * information, see the Amazon CloudFront documentation.
     *

     *
     * @return The domain name of the Amazon CloudFront distribution. For more
     *         information, see the Amazon CloudFront documentation.
     */

    public String getDistributionDomainName() {
        return this.distributionDomainName;
    }

    /**
     *

     * The domain name of the Amazon CloudFront distribution. For more
     * information, see the Amazon CloudFront documentation.
     *

     *
     * @param distributionDomainName
     *        The domain name of the Amazon CloudFront distribution. For more
     *        information, see the Amazon CloudFront documentation.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */

    public UpdateDomainNameResult withDistributionDomainName(
            String distributionDomainName) {
        setDistributionDomainName(distributionDomainName);
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getDomainName() != null)
            sb.append("DomainName: " + getDomainName() + ",");
        if (getCertificateName() != null)
            sb.append("CertificateName: " + getCertificateName() + ",");
        if (getCertificateUploadDate() != null)
            sb.append("CertificateUploadDate: " + getCertificateUploadDate()
                    + ",");
        if (getDistributionDomainName() != null)
            sb.append("DistributionDomainName: " + getDistributionDomainName());
        sb.append("}");
        return sb.toString();
    }

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

        if (obj instanceof UpdateDomainNameResult == false)
            return false;
        UpdateDomainNameResult other = (UpdateDomainNameResult) obj;
        if (other.getDomainName() == null ^ this.getDomainName() == null)
            return false;
        if (other.getDomainName() != null
                && other.getDomainName().equals(this.getDomainName()) == false)
            return false;
        if (other.getCertificateName() == null
                ^ this.getCertificateName() == null)
            return false;
        if (other.getCertificateName() != null
                && other.getCertificateName().equals(this.getCertificateName()) == false)
            return false;
        if (other.getCertificateUploadDate() == null
                ^ this.getCertificateUploadDate() == null)
            return false;
        if (other.getCertificateUploadDate() != null
                && other.getCertificateUploadDate().equals(
                        this.getCertificateUploadDate()) == false)
            return false;
        if (other.getDistributionDomainName() == null
                ^ this.getDistributionDomainName() == null)
            return false;
        if (other.getDistributionDomainName() != null
                && other.getDistributionDomainName().equals(
                        this.getDistributionDomainName()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode
                + ((getDomainName() == null) ? 0 : getDomainName().hashCode());
        hashCode = prime
                * hashCode
                + ((getCertificateName() == null) ? 0 : getCertificateName()
                        .hashCode());
        hashCode = prime
                * hashCode
                + ((getCertificateUploadDate() == null) ? 0
                        : getCertificateUploadDate().hashCode());
        hashCode = prime
                * hashCode
                + ((getDistributionDomainName() == null) ? 0
                        : getDistributionDomainName().hashCode());
        return hashCode;
    }

    @Override
    public UpdateDomainNameResult clone() {
        try {
            return (UpdateDomainNameResult) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                            + "even though we're Cloneable!", e);
        }
    }
}


text:
<!DOCTYPE html>

    <title>submergence:Agent#export)state#isLoggedIn documentation</title>
    <link rel="stylesheet" type="text/css" href="../../../../../../../../../../index.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../../../../../../highlight.css" />

            member

                Boolean

                |

                :submergence:Agent#export)state#isLoggedIn

        This document was generated with
        doczar
        at 3:55pm on 8/14/2015


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.owasp.appsensor</groupId>
	<artifactId>appsensor-ws-rest-server-with-websocket-boot</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>jar</packaging>

	<name>appsensor-ws-rest-server-with-websocket-boot</name>
	<description>Spring Boot executable jar of appsensor rest server</description>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.2.6.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>1.8</java.version>
		<appsensor.version>2.2.0</appsensor.version>
		<docker.image.prefix>appsensor</docker.image.prefix>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.owasp.appsensor</groupId>
			<artifactId>appsensor-ws-rest-server</artifactId>
			<version>${appsensor.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.glassfish.jersey.containers</groupId>
					<artifactId>jersey-container-grizzly2-http</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.glassfish.jersey.core</groupId>
					<artifactId>jersey-client</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.glassfish.jersey.media</groupId>
            		<artifactId>jersey-media-moxy</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.glassfish.jersey.media</groupId>
            		<artifactId>jersey-media-json-jackson</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.glassfish.jersey.test-framework.providers</groupId>
		    		<artifactId>jersey-test-framework-provider-inmemory</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.glassfish.jersey.ext</groupId>
		    		<artifactId>jersey-spring3</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.glassfish.jersey.bundles.repackaged</groupId>
		  			<artifactId>jersey-guava</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.owasp.appsensor</groupId>
			<artifactId>appsensor-storage-in-memory</artifactId>
			<version>${appsensor.version}</version>
		</dependency>

		<dependency>
			<groupId>org.owasp.appsensor</groupId>
			<artifactId>appsensor-analysis-reference</artifactId>
			<version>${appsensor.version}</version>
		</dependency>

		<dependency>
			<groupId>org.owasp.appsensor</groupId>
			<artifactId>appsensor-reporting-simple-logging</artifactId>
			<version>${appsensor.version}</version>
		</dependency>

		<dependency>
			<groupId>org.owasp.appsensor</groupId>
			<artifactId>appsensor-access-control-reference</artifactId>
			<version>${appsensor.version}</version>
		</dependency>

		<dependency>
			<groupId>org.owasp.appsensor</groupId>
			<artifactId>appsensor-integration-cef-syslog</artifactId>
			<version>${appsensor.version}</version>
		</dependency>

		<dependency>
			<groupId>org.owasp.appsensor</groupId>
			<artifactId>appsensor-reporting-websocket</artifactId>
			<version>${appsensor.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.owasp.appsensor</groupId>
					<artifactId>appsensor-local</artifactId>
				</exclusion>
				<!-- <exclusion>
					<groupId>com.google.code.gson</groupId>
					<artifactId>gson</artifactId>
				</exclusion>-->
				<exclusion>
					<groupId>javax</groupId>
					<artifactId>javaee-web-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>javax.websocket</groupId>
					<artifactId>javax.websocket-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.glassfish.tyrus</groupId>
					<artifactId>tyrus-server</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.glassfish.tyrus</groupId>
					<artifactId>tyrus-client</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.owasp.appsensor</groupId>
			<artifactId>appsensor-configuration-stax</artifactId>
			<version>${appsensor.version}</version>
		</dependency>

		<dependency>
			<groupId>org.owasp.appsensor</groupId>
			<artifactId>appsensor-geolocation-geoip2</artifactId>
			<version>${appsensor.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-jersey</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-websocket</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
                			<requiresUnpack>
                    				<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-storage-in-memory</artifactId>
						</dependency>
						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-ws-rest-server</artifactId>
						</dependency>
						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-core</artifactId>
						</dependency>
						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-storage-in-memory</artifactId>
						</dependency>
						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-analysis-reference</artifactId>
						</dependency>
						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-reporting-simple-logging</artifactId>
						</dependency>
						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-access-control-reference</artifactId>
						</dependency>
						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-integration-cef-syslog</artifactId>
						</dependency>

						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-reporting-websocket</artifactId>
							<exclusions>
								<exclusion>
									<groupId>org.owasp.appsensor</groupId>
									<artifactId>appsensor-local</artifactId>
								</exclusion>
								<!-- <exclusion>
									<groupId>com.google.code.gson</groupId>
									<artifactId>gson</artifactId>
								</exclusion>-->
								<exclusion>
									<groupId>javax</groupId>
									<artifactId>javaee-web-api</artifactId>
								</exclusion>
								<exclusion>
									<groupId>javax.websocket</groupId>
									<artifactId>javax.websocket-api</artifactId>
								</exclusion>
								<exclusion>
									<groupId>org.glassfish.tyrus</groupId>
									<artifactId>tyrus-server</artifactId>
								</exclusion>
								<exclusion>
									<groupId>org.glassfish.tyrus</groupId>
									<artifactId>tyrus-client</artifactId>
								</exclusion>
							</exclusions>
						</dependency>

						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-configuration-stax</artifactId>
						</dependency>
						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-configuration-stax</artifactId>
						</dependency>
						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-integration-cef-syslog</artifactId>
						</dependency>
						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-reporting-websocket</artifactId>
						</dependency>
						<dependency>
							<groupId>org.owasp.appsensor</groupId>
							<artifactId>appsensor-geolocation-geoip2</artifactId>
						</dependency>
						<dependency>
							<groupId>org.springframework.boot</groupId>
							<artifactId>spring-boot-starter-jersey</artifactId>
						</dependency>
						<dependency>
							<groupId>org.springframework.boot</groupId>
							<artifactId>spring-boot-starter-websocket</artifactId>
						</dependency>

						<dependency>
							<groupId>org.springframework.boot</groupId>
							<artifactId>spring-boot-starter-test</artifactId>
							<scope>test</scope>
						</dependency>
					</requiresUnpack>
				</configuration>
			</plugin>
			<plugin>
            			<groupId>com.spotify</groupId>
            			<artifactId>docker-maven-plugin</artifactId>
            			<version>0.2.3</version>
            			<configuration>
                			<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
                			<dockerDirectory>.</dockerDirectory>
                			<resources>
                    				<resource>
                        				<targetPath>/</targetPath>
                        				<directory>${project.build.directory}</directory>
                        				<include>${project.build.finalName}.jar</include>
                    				</resource>
                			</resources>
            			</configuration>
        		</plugin>
		</plugins>
	</build>

</project>


text:
<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>mne.io.read_raw_edf — MNE 0.11.0 documentation</title>

    <link rel="stylesheet" href="../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/gallery.css" type="text/css" />
    <link rel="stylesheet" href="../_static/bootswatch-3.3.4/flatly/bootstrap.min.css" type="text/css" />
    <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
    <link rel="stylesheet" href="../_static/style.css" type="text/css" />

    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="top" title="MNE 0.11.0 documentation" href="../index.html" />
    <link rel="up" title="API Reference" href="../python_reference.html" />
    <link rel="next" title="mne.io.read_raw_kit" href="mne.io.read_raw_kit.html" />
    <link rel="prev" title="mne.io.read_raw_ctf" href="mne.io.read_raw_ctf.html" />

<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' rel='stylesheet' type='text/css'>

  <link rel="canonical" href="https://mne.tools/stable/index.html" />

        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">

        </button>

        0.11.0

Tutorials

Gallery

Manual

API

FAQ

Cite

  Site

Getting Started

What’s new

Cite MNE

Related publications

Tutorials

Examples Gallery

Manual

API Reference

Frequently Asked Questions

Advanced installation and setup

MNE with CPP

  Page

mne.io.read_raw_edf

<form class="navbar-form navbar-right" action="../search.html" method="get">

  <input type="text" name="q" class="form-control" placeholder="Search" />

  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>

mne.io.read_raw_edf

    « mne.io.read_r...

    mne.io.read_r... »

<form action="../search.html" method="get">

  <input type="text" name="q" class="form-control" placeholder="Search" />

  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>

mne.io.read_raw_edf¶

mne.io.read_raw_edf(input_fname, montage=None, eog=None, misc=None, stim_channel=-1, annot=None, annotmap=None, preload=False, verbose=None)¶

Reader function for EDF+, BDF conversion to FIF

<col class="field-name" />
<col class="field-body" />

Parameters:
input_fname : str

Path to the EDF+,BDF file.

montage : str | None | instance of Montage

Path or instance of montage containing electrode positions.
If None, sensor locations are (0,0,0). See the documentation of
mne.channels.read_montage() for more information.

eog : list or tuple

Names of channels or list of indices that should be designated
EOG channels. Values should correspond to the electrodes in the
edf file. Default is None.

misc : list or tuple

Names of channels or list of indices that should be designated
MISC channels. Values should correspond to the electrodes in the
edf file. Default is None.

stim_channel : str | int | None

The channel name or channel index (starting at 0).
-1 corresponds to the last channel (default).
If None, there will be no stim channel added.

annot : str | None

Path to annotation file.
If None, no derived stim channel will be added (for files requiring
annotation file to interpret stim channel).

annotmap : str | None

Path to annotation map file containing mapping from label to trigger.
Must be specified if annot is not None.

preload : bool or str (default False)

Preload data into memory for data manipulation and faster indexing.
If True, the data will be preloaded into memory (fast, requires
large amount of memory). If preload is a string, preload is the
file name of a memory-mapped file which is used to store the data
on the hard drive (slower, requires less memory).

verbose : bool, str, int, or None

If not None, override default verbose level (see mne.verbose).

Returns:
raw : Instance of RawEDF

A Raw object containing EDF data.

See also

mne.io.Raw

Documentation of attribute and methods.

      Back to top

        © Copyright 2012-2015, MNE Developers.


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <ImageView
        android:id="@+id/imageView"
        android:layout_width="500dp"
        android:layout_height="500dp"
        android:layout_gravity="center_horizontal"
        android:background="@android:color/holo_blue_dark" />
</LinearLayout>


text:
.. role:: ref(emphasis)

.. _varnishd(1):

========
varnishd
========

-----------------------
HTTP accelerator daemon
-----------------------

:Manual section: 1

SYNOPSIS
========

varnishd [-a address[:port][,PROTO]] [-b host[:port]] [-C] [-d] [-F] [-f config] [-h type[,options]] [-i identity] [-j jail[,jailoptions]] [-l vsl[,vsm]] [-M address:port] [-n name] [-P file] [-p param=value] [-r param[,param...]] [-S secret-file] [-s [name=]kind[,options]] [-T address[:port]] [-t TTL] [-V] [-W waiter]

DESCRIPTION
===========

The `varnishd` daemon accepts HTTP requests from clients, passes them on
to a backend server and caches the returned documents to better
satisfy future requests for the same document.

.. _ref-varnishd-options:

OPTIONS
=======

-a <address[:port][,PROTO]>

  Listen for client requests on the specified address and port. The
  address can be a host name ("localhost"), an IPv4 dotted-quad
  ("127.0.0.1"), or an IPv6 address enclosed in square brackets
  ("[::1]"). If address is not specified, `varnishd` will listen on all
  available IPv4 and IPv6 interfaces. If port is not specified, port
  80 (http) is used.
  An additional protocol type can be set for the listening socket with PROTO.
  Valid protocol types are: HTTP/1 (default), and PROXY.
  Multiple listening addresses can be specified by using multiple -a arguments.

-b <host[:port]>

  Use the specified host as backend server. If port is not specified,
  the default is 8080.

-C

  Print VCL code compiled to C language and exit. Specify the VCL file
  to compile with the -f option.

-d

  Enables debugging mode: The parent process runs in the foreground
  with a CLI connection on stdin/stdout, and the child process must be
  started explicitly with a CLI command. Terminating the parent
  process will also terminate the child.

-F

  Do not fork, run in the foreground.

-f config

  Use the specified VCL configuration file instead of the builtin
  default.  See :ref:`vcl(7)` for details on VCL syntax.

  When neither a -f nor a -b argument are given, `varnishd` will not
  start the worker process but process cli commands.

-h <type[,options]>

  Specifies the hash algorithm. See `Hash Algorithm Options`_ for a
  list of supported algorithms.

-i identity

  Specify the identity of the Varnish server. This can be accessed
  using ``server.identity`` from VCL.

-j <jail[,jailoptions]>

  Specify the jailing technology to use.

-l <vsl[,vsm]>

  Specifies size of shmlog file. vsl is the space for the VSL records
  [80M] and vsm is the space for stats counters [1M]. Scaling suffixes
  like 'K' and 'M' can be used up to (G)igabytes.
  Default is 81 Megabytes.

-M <address:port>

  Connect to this port and offer the command line interface.  Think of
  it as a reverse shell. When running with -M and there is no backend
  defined the child process (the cache) will not start initially.

-n name

  Specify the name for this instance.  Amongst other things, this name
  is used to construct the name of the directory in which `varnishd`
  keeps temporary files and persistent state. If the specified name
  begins with a forward slash, it is interpreted as the absolute path
  to the directory which should be used for this purpose.

-P file

  Write the PID of the process to the specified file.

-p <param=value>

  Set the parameter specified by param to the specified value, see
  `List of Parameters`_ for details. This option can be used multiple
  times to specify multiple parameters.

-r <param[,param...]>

  Make the listed parameters read only. This gives the system
  administrator a way to limit what the Varnish CLI can do.  Consider
  making parameters such as *cc_command*, *vcc_allow_inline_c* and
  *vmod_path* read only as these can potentially be used to escalate
  privileges from the CLI.

-S file

  Path to a file containing a secret used for authorizing access to
  the management port. If not provided a new secret will be drawn
  from the system PRNG.

-s <[name=]type[,options]>

  Use the specified storage backend, see `Storage Backend Options`_.

  This option can be used multiple times to specify multiple storage
  files. Names are referenced in logs, VCL, statistics, etc.

-T <address[:port]>

  Offer a management interface on the specified address and port. See
  `Management Interface`_ for a list of management commands.

-t TTL

  Specifies the default time to live (TTL) for cached objects. This is
  a shortcut for specifying the *default_ttl* run-time parameter.

-V

  Display the version number and exit.

-W waiter

  Specifies the waiter type to use.

.. _opt_h:

Hash Algorithm Options
----------------------

The following hash algorithms are available:

-h critbit

  self-scaling tree structure. The default hash algorithm in Varnish
  Cache 2.1 and onwards. In comparison to a more traditional B tree
  the critbit tree is almost completely lockless. Do not change this
  unless you are certain what you're doing.

-h simple_list

  A simple doubly-linked list.  Not recommended for production use.

-h <classic[,buckets]>

  A standard hash table. The hash key is the CRC32 of the object's URL
  modulo the size of the hash table.  Each table entry points to a
  list of elements which share the same hash key. The buckets
  parameter specifies the number of entries in the hash table.  The
  default is 16383.

.. _ref-varnishd-opt_s:

Storage Backend Options
-----------------------

The following storage types are available:

-s <malloc[,size]>

  malloc is a memory based backend.

-s <file,path[,size[,granularity]]>

  The file backend stores data in a file on disk. The file will be
  accessed using mmap.

  The path is mandatory. If path points to a directory, a temporary
  file will be created in that directory and immediately unlinked. If
  path points to a non-existing file, the file will be created.

  If size is omitted, and path points to an existing file with a size
  greater than zero, the size of that file will be used. If not, an
  error is reported.

  Granularity sets the allocation block size. Defaults to the system
  page size or the filesystem block size, whichever is larger.

-s <persistent,path,size>

  Persistent storage. Varnish will store objects in a file in a manner
  that will secure the survival of *most* of the objects in the event
  of a planned or unplanned shutdown of Varnish. The persistent
  storage backend has multiple issues with it and will likely be
  removed from a future version of Varnish.

.. _ref-varnishd-opt_j:

Jail Options
------------

Varnish jails are a generalization over various platform specific
methods to reduce the privileges of varnish processes. They may have
specific options. Available jails are:

-j solaris

  Reduce privileges(5) for `varnishd` and sub-process to the minimally
  required set. Only available on platforms which have the setppriv(2)
  call.

-j <unix[,user=`user`][,ccgroup=`group`]>

  Default on all other platforms if `varnishd` is either started with
  an effective uid of 0 ("as root") or as user ``varnish``.

  With the ``unix`` jail technology activated, varnish will switch to
  an alternative user for subprocesses and change the effective uid of
  the master process whenever possible.

  The optional `user` argument specifies which alternative user to
  use. It defaults to ``varnish``

  The optional `ccgroup` argument specifies a group to add to varnish
  subprocesses requiring access to a c-compiler. There is no default.

-j none

  last resort jail choice: With jail technology ``none``, varnish will
  run all processes with the privileges it was started with.

.. _ref-varnishd-opt_T:

Management Interface
--------------------

If the -T option was specified, `varnishd` will offer a command-line
management interface on the specified address and port.  The
recommended way of connecting to the command-line management interface
is through varnishadm(1).

The commands available are documented in varnish(7).

.. _ref-varnishd-params:

RUN TIME PARAMETERS
===================

Run Time Parameter Flags
------------------------

Runtime parameters are marked with shorthand flags to avoid repeating
the same text over and over in the table below. The meaning of the
flags are:

* `experimental`

  We have no solid information about good/bad/optimal values for this
  parameter. Feedback with experience and observations are most
  welcome.

* `delayed`

  This parameter can be changed on the fly, but will not take effect
  immediately.

* `restart`

  The worker process must be stopped and restarted, before this
  parameter takes effect.

* `reload`

  The VCL programs must be reloaded for this parameter to take effect.

* `experimental`

  We're not really sure about this parameter, tell us what you find.

* `wizard`

  Do not touch unless you *really* know what you're doing.

* `only_root`

  Only works if `varnishd` is running as root.

Default Value Exceptions on 32 bit Systems
------------------------------------------

Be aware that on 32 bit systems, certain default values are reduced
relative to the values listed below, in order to conserve VM space:

* workspace_client: 16k
* thread_pool_workspace: 16k
* http_resp_size: 8k
* http_req_size: 12k
* gzip_stack_buffer: 4k
* thread_pool_stack: 64k

List of Parameters
------------------

This text is produced from the same text you will find in the CLI if
you use the param.show command:

.. include:: ../include/params.rst

EXIT CODES
==========

Varnish and bundled tools will, in most cases, exit with one of the
following codes

* `0` OK
* `1` Some error which could be system-dependent and/or transient
* `2` Serious configuration / parameter error - retrying with the same
  configuration / parameters is most likely useless

The `varnishd` master process may also OR its exit code

* with `0x20` when the `varnishd` child process died,
* with `0x40` when the `varnishd` child process was terminated by a
  signal and
* with `0x80` when a core was dumped.

SEE ALSO
========

* :ref:`varnishlog(1)`
* :ref:`varnishhist(1)`
* :ref:`varnishncsa(1)`
* :ref:`varnishstat(1)`
* :ref:`varnishtop(1)`
* :ref:`varnish-cli(7)`
* :ref:`vcl(7)`

HISTORY
=======

The `varnishd` daemon was developed by Poul-Henning Kamp in cooperation
with Verdens Gang AS and Varnish Software.

This manual page was written by Dag-Erling Smørgrav with updates by
Stig Sandbeck Mathisen <ssm@debian.org>, Nils Goroll and others.

COPYRIGHT
=========

This document is licensed under the same licence as Varnish
itself. See LICENCE for details.

* Copyright (c) 2007-2015 Varnish Software AS