text:
package eu.cloudopting.events.api.service;

import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.tuple.ImmutableTriple;
import org.apache.commons.lang3.tuple.Triple;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.domain.Specifications;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.transaction.annotation.Transactional;
import eu.cloudopting.events.api.SearchCommonUtil;
import eu.cloudopting.events.api.constants.ClientOperation;
import eu.cloudopting.events.api.entity.BaseEntity;
import eu.cloudopting.events.api.events.*;
import eu.cloudopting.events.api.exceptions.BadRequestException;
import eu.cloudopting.events.api.exceptions.ConflictException;
import eu.cloudopting.events.api.preconditions.ServicePreconditions;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import java.util.List;

/**
 * @param <T> base entity, modelul pe care lucram
 * @author Daniel P.
 *         Date: 8/8/13
 */
public abstract class AbstractDefaultService<T extends BaseEntity> implements BaseService<T> {

    /**
     * logger.
     */
    private final Logger logger = LoggerFactory.getLogger(getClass());
    /**
     * Class<BaseEntity>.
     */
    private Class<T> clazz;
    /**
     * Event Publisherul injectat. Acesta este folosit pentru a ridica evenimente si a notifica finalizarea operatiilor,
     * astfel evenimentele putand fi prinse de listeneri si putandu-se realiza diferite operatii precum introducerea
     * butoanelor de next,prev la paginare.
     */
    @Autowired
    protected ApplicationEventPublisher eventPublisher;

    /**
     * Constructor.
     *
     * @param clazzToSet clasa care trebuie setata
     */
    public AbstractDefaultService(final Class<T> clazzToSet) {
        super();
        clazz = clazzToSet;
    }

    // API

    // search

    @SuppressWarnings("all")
    @Override
    public final List<T> searchAll(final String queryString) {
        Triple<String, ClientOperation, String>[] constraints = createConstraints(queryString);
        return searchAll(constraints);
    }

    @SuppressWarnings({"all"})
    @Override
    public final List<T> searchPaginated(final String queryString, final int page, final int size) {
        List<Triple<String, ClientOperation, String>> parsedQuery;
        try {
            parsedQuery = SearchCommonUtil.parseQueryString(queryString);
        } catch (final IllegalStateException illState) {
            logger.error("IllegalStateException on find operation");
            logger.warn("IllegalStateException on find operation", illState);
            throw new ConflictException(illState);
        }

        final Page<T> resultPage = searchPaginated(page, size, parsedQuery
                .toArray(new ImmutableTriple[parsedQuery.size()]));
        return Lists.newArrayList(resultPage.getContent());
    }

    @SuppressWarnings("all")
    @Override
    public final List<T> searchAll(final Triple<String, ClientOperation, String>... constraints) {
        Preconditions.checkState(constraints != null);
        Preconditions.checkState(constraints.length > 0);
        final Specification<T> firstSpec = resolveConstraint(constraints[0]);
        Specifications<T> specifications = Specifications.where(firstSpec);
        for (int i = 1; i < constraints.length; i++) {
            specifications = specifications.and(resolveConstraint(constraints[i]));
        }
        if (firstSpec == null) {
            return Lists.newArrayList();
        }

        return getSpecificationExecutor().findAll(specifications);
    }

    @SuppressWarnings(value = {"all"})
    @Override
    public final T searchOne(final Triple<String, ClientOperation, String>... constraints) {
        Preconditions.checkState(constraints != null);
        Preconditions.checkState(constraints.length > 0);
        final Specification<T> firstSpec = resolveConstraint(constraints[0]);
        Specifications<T> specifications = Specifications.where(firstSpec);
        for (int i = 1; i < constraints.length; i++) {
            specifications = specifications.and(resolveConstraint(constraints[i]));
        }
        if (firstSpec == null) {
            return null;
        }

        return getSpecificationExecutor().findOne(specifications);
    }

    @Override
    @SuppressWarnings("unchecked")
    public final Page<T> searchPaginated(final int page, final int size,
                                         final Triple<String, ClientOperation, String>... constraints) {
        final Specification<T> firstSpec = resolveConstraint(constraints[0]);
        Preconditions.checkState(firstSpec != null);
        Specifications<T> specifications = Specifications.where(firstSpec);
        for (int i = 1; i < constraints.length; i++) {
            specifications = specifications.and(resolveConstraint(constraints[i]));
        }

        return getSpecificationExecutor().findAll(specifications, new PageRequest(page, size, null));
    }

    // find - one
    @Override
    @Transactional(readOnly = true)
    public T findOne(final long id) {
        return getDao().findOne(id);
    }

    // find - all

    @Override
    @Transactional(readOnly = true)
    public final List<T> findAll() {
        return Lists.newArrayList(getDao().findAll());
    }

    @Override
    @Transactional(readOnly = true)
    public Page<T> findAll(Pageable pageable) {
        return  getDao().findAll(pageable);
    }

    @Override
    @Transactional(readOnly = true)
    public final Page<T> findAllPaginatedAndSortedRaw(final int page, final int size, final String sortBy,
                                                      final String sortOrder) {
        final Sort sortInfo = constructSort(sortBy, sortOrder);
        return getDao().findAll(new PageRequest(page, size, sortInfo));
    }

    @Override
    @Transactional(readOnly = true)
    public final List<T> findAllPaginatedAndSorted(final int page, final int size, final String sortBy,
                                                   final String sortOrder) {
        final Sort sortInfo = constructSort(sortBy, sortOrder);
        final List<T> content = getDao().findAll(new PageRequest(page, size, sortInfo)).getContent();
        if (content == null) {
            return Lists.newArrayList();
        }
        return content;
    }

    @Override
    @Transactional(readOnly = true)
    public final List<T> findAllPaginated(final int page, final int size) {
        final List<T> content = getDao().findAll(new PageRequest(page, size, null)).getContent();
        if (content == null) {
            return Lists.newArrayList();
        }
        return content;
    }

    @Override
    @Transactional(readOnly = true)
    public final List<T> findAllSorted(final String sortBy, final String sortOrder) {
        final Sort sortInfo = constructSort(sortBy, sortOrder);
        return Lists.newArrayList(getDao().findAll(sortInfo));
    }

    // save/create/persist
    @Override
    public T create(final T entity) {
        Preconditions.checkNotNull(entity);

        eventPublisher.publishEvent(new BeforeEntityCreateEvent<>(this, clazz, entity));
        final T persistedEntity = getDao().save(entity);
        eventPublisher.publishEvent(new AfterEntityCreateEvent<>(this, clazz, persistedEntity));

        return persistedEntity;
    }

    // update/merge
    @Override
    public void update(final T entity) {
        ServicePreconditions.checkEntityExists(entity);

        eventPublisher.publishEvent(new BeforeEntityUpdateEvent<>(this, clazz, entity));
        getDao().save(entity);
        eventPublisher.publishEvent(new AfterEntityUpdateEvent<>(this, clazz, entity));
    }

    // delete

    @Override
    public final void deleteAll() {
        getDao().deleteAll();
        eventPublisher.publishEvent(new AfterEntitiesDeletedEvent<>(this, clazz));
    }

    @Override
    public void delete(final long id) {
        final T entity = getDao().findOne(id);
        ServicePreconditions.checkEntityExists(entity);

        eventPublisher.publishEvent(new BeforeEntityDeleteEvent<>(this, clazz, entity));
        getDao().delete(entity);
        eventPublisher.publishEvent(new AfterEntityDeleteEvent<>(this, clazz, entity));
    }

    @Override
    public void delete(Iterable<T> entities) {
        for (T entity : entities) {
            ServicePreconditions.checkEntityExists(entity);

            eventPublisher.publishEvent(new BeforeEntityDeleteEvent<>(this, clazz, entity));
            getDao().delete(entity);
            eventPublisher.publishEvent(new AfterEntityDeleteEvent<>(this, clazz, entity));
        }
    }

    // count
    @Override
    public final long count() {
        return getDao().count();
    }

    /**
     * Metoda returneaza instanta de repository setata in interiorul unui service.
     *
     * @return o instanta de PagingAndSortingRepository
     */
    protected abstract PagingAndSortingRepository<T, Long> getDao();

    /**
     * Metoda returneaza un SpecificationExecutor. Specification este folosit pentru crearea de queryuri avansate.
     *
     * @return JpaSpecificationExecutor
     */
    protected abstract JpaSpecificationExecutor<T> getSpecificationExecutor();

    /**
     * Metoda rezolva constrangerile de pe obiectul nostru.
     *
     * @param constraint constrangerile
     * @return un Specification
     */
    public final Specification<T> resolveConstraint(final Triple<String, ClientOperation, String> constraint) {
        return new Specification<T>() {
            public Predicate toPredicate(Root<T> root, CriteriaQuery<?> query,
                                         CriteriaBuilder builder) {

                return builder.equal(root.get(constraint.getLeft()), constraint.getRight());
            }
        };
    }

    /**
     * Metoda builduieste operatiile de sort.
     *
     * @param sortBy    parametrul in functie de care se face sortarea.
     * @param sortOrder ordinea sortarii, ASC-DESC
     * @return - informatiile despre sortare
     */
    protected final Sort constructSort(final String sortBy, final String sortOrder) {
        Sort sortInfo = null;
        if (sortBy != null) {
            sortInfo = new Sort(Sort.Direction.fromString(sortOrder), sortBy);
        }
        return sortInfo;
    }

    @Override
    @Transactional(readOnly = true)
    public Page<T> findAllPaginatedAndSortedRawWithFilter(final int page, final int size, final String sortBy,
                                                                final String sortOrder, final String filterObject){
        final Sort sortInfo = constructSort(sortBy, sortOrder);
        return getDao().findAll(new PageRequest(page, size, sortInfo));
    }

    @SuppressWarnings("all")
    private Triple<String, ClientOperation, String>[] createConstraints(final String queryString){
    	Preconditions.checkNotNull(queryString);
        List<Triple<String, ClientOperation, String>> parsedQuery;
        try {
            parsedQuery = SearchCommonUtil.parseQueryString(queryString);
        } catch (final IllegalStateException illState) {
            logger.error("IllegalStateException on find operation");
            logger.warn("IllegalStateException on find operation", illState);
            throw new BadRequestException(illState);
        }

        return parsedQuery.toArray(new ImmutableTriple[parsedQuery.size()]);
    }

    protected Specification<T> createFilterSpecifications(final String queryString){
    	Triple<String, ClientOperation, String>[] constraints = createConstraints(queryString);
    	Preconditions.checkState(constraints != null);
    	Preconditions.checkState(constraints.length > 0);
    	final Specification<T> firstSpec = resolveConstraint(constraints[0]);
    	Specifications<T> specifications = Specifications.where(firstSpec);
    	for (int i = 1; i < constraints.length; i++) {
    		specifications = specifications.and(resolveConstraint(constraints[i]));
    	}
    	return specifications;
    }
}


text:
<?php

namespace OC\PlatformBundle\Email;

use OC\PlatformBundle\Entity\Application;

class ApplicationMailer
{
    /**
     * @var \Swift_Mailer
     */
    private $mailer;

    public function __construct(\Swift_Mailer $mailer)
    {
        $this->mailer = $mailer;
    }

    public function sendNewNotification(Application $application)
    {
        $message = new \Swift_Message(
            'Nouvelle candidature',
            'Vous avez reçu une nouvelle candidature.'
        );

        $message
            ->addTo('doremiska@gmail.com')
            ->addFrom('admin@votresite.com')
        ;

        $this->mailer->send($message);
    }
}

redpajama_set_name: RedPajamaGithub


text:
var env = require('node-env-file');

// set env if not already set externally
// .env must exist if setting env vars externally
try {
  env(__dirname + '/../.env', { overwrite: false });
  // set the port to test
  process.env.NODE_ENV = 'development'
  process.env.PORT = 9090
  console.log("Test is using PORT:", process.env.PORT)
} catch (e) {
  console.log(e)
  if (process.env.TRAVIS) {
    console.log("Using env vars from Travis if exist.")
  } else {
    console.log("No .env and not in Travis, please provide your .env file.")
    process.exit(1)
  }
}

// unit test global dependencies
require('../scripts/_init.js')
global.DEFAULT_ROOM = "bot-test" // set for test
global.Promise.config({ warnings: false });
// chai assertation library
global.chai = require('chai')
global.chaiAsPromised = require("chai-as-promised")
chai.use(chaiAsPromised)
global.should = chai.should();
// sinon spy/stub library
global.sinon = require('sinon');
global.Helper = require('hubot-test-helper');
// set the hubot say handlers for unit tests: send reply to room
global.say = function(room, name, key) {
  key = key || 'output'
  return _.flow(_.partial(_.get, _, key), _.bind(room.user.say, room, name))
}
// Promise.delay, with adjusted time factors. for use with yield
global.delayer = function(factor) {
  factor = factor || 1
  var timeout = 100 * factor
  if (process.env.TRAVIS) { timeout = 10 * timeout }
  // timeout is capped at 16s
  timeout = _.min([timeout, 16000])
  return Promise.delay(timeout)
}

// declare global assets
global.A = require('./asset')


text:
package gw.internal.xml.xsd.typeprovider.schema;

import gw.internal.xml.xsd.typeprovider.XmlSchemaIndex;
import gw.lang.reflect.LocationInfo;

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

import javax.xml.namespace.QName;

public final class XmlSchema extends XmlSchemaObject<XmlSchema> {

  private final List<XmlSchemaImport> _imports;
  private final Map<QName, XmlSchemaElement> _topLevelElements;
  private final String _targetNamespace;
  private final Map<QName, XmlSchemaType> _topLevelTypes;
  private final Map<QName, XmlSchemaAttribute> _topLevelAttributes;
  private final Map<QName, XmlSchemaGroup> _topLevelGroups;
  private final Map<QName, XmlSchemaAttributeGroup> _topLevelAttributeGroups;
  private final String _declaredTargetNamespace;

  public XmlSchema( XmlSchemaIndex schemaIndex, LocationInfo locationInfo, List<XmlSchemaImport> imports, Map<QName, XmlSchemaElement> topLevelElements, String targetNamespace, Map<QName, XmlSchemaType> topLevelTypes, Map<QName, XmlSchemaAttribute> topLevelAttributes, Map<QName, XmlSchemaGroup> topLevelGroups, Map<QName, XmlSchemaAttributeGroup> topLevelAttributeGroups, String declaredTNS ) {
    super( schemaIndex, locationInfo );
    _imports = imports;
    _topLevelElements = topLevelElements;
    _targetNamespace = targetNamespace;
    _topLevelTypes = topLevelTypes;
    _topLevelAttributes = topLevelAttributes;
    _topLevelGroups = topLevelGroups;
    _topLevelAttributeGroups = topLevelAttributeGroups;
    _declaredTargetNamespace = declaredTNS;
  }

  public boolean isEmpty() {
    return _topLevelElements.isEmpty() && _topLevelTypes.isEmpty() && _topLevelGroups.isEmpty() && _topLevelAttributeGroups.isEmpty() && _topLevelAttributes.isEmpty();
  }

  public String getTargetNamespace() {
    return _targetNamespace;
  }

  public String getDeclaredTargetNamespace() {
    return _declaredTargetNamespace;
  }

  public Map<QName, XmlSchemaType> getTypes() {
    return _topLevelTypes;
  }

  public Map<QName, XmlSchemaElement> getElements() {
    return _topLevelElements;
  }

  public Map<QName, XmlSchemaAttribute> getAttributes() {
    return _topLevelAttributes;
  }

  public Map<QName, XmlSchemaGroup> getGroups() {
    return _topLevelGroups;
  }

  public Map<QName, XmlSchemaAttributeGroup> getAttributeGroups() {
    return _topLevelAttributeGroups;
  }

  public List<XmlSchemaImport> getImports() {
    return _imports;
  }

  public XmlSchema copy( XmlSchemaIndex schemaIndex ) {
    return new XmlSchema( schemaIndex, getLocationInfo(), copyList( schemaIndex, _imports ), copyMap( schemaIndex, _topLevelElements ), _targetNamespace, copyMap( schemaIndex, _topLevelTypes ), copyMap( schemaIndex, _topLevelAttributes ), copyMap( schemaIndex, _topLevelGroups ), copyMap( schemaIndex, _topLevelAttributeGroups ), _declaredTargetNamespace );
  }

}


text:
package ru.job4j.start;

import ru.job4j.models.Item;
import java.util.ArrayList;
import java.util.List;

/**
 * class MenuTracker.
 * @author Evgeniy Ulanov (komrad1812@yandex.ru)
 * @version $Id$
 * @since 0.1
 */

public class MenuTracker {

	/** input. */
	private TrackerIO trackerIO;
	/** tracker. */
	private Tracker tracker;
	/** userActions. */
	private ArrayList<UserAction> actions = new ArrayList<>();

	/**
	 * constructor.
	 * @param tracker - tracker.
	 */
	public MenuTracker(Tracker tracker) {
		trackerIO = TrackerIO.getInstance();
		this.tracker = tracker;
	}

	/**
	 * method fill Actions.
	 * @return actions size.
	 */
	public Integer fillActions() {
		this.actions.add(this.new AddItem("Add new Item.", 1));
		this.actions.add(new MenuTracker.ShowAll("Show All Items", 2));
		this.actions.add(this.new EditItem("Edit Item.", 3));
		this.actions.add(this.new RemoveItem("Remove Item.", 4));
		this.actions.add(this.new FindItemById("Find Item by Id.", 5));
		this.actions.add(new FindItemByName("Find Item by Name.", 6));
		return actions.size();
	}

	/**
	 * metod show - shows menu.
	 */
	public void show() {
		for (UserAction action : this.actions) {
			trackerIO.out(action.info());
		}
		trackerIO.out(String.format("7. %s ", "Exit."));
	}

	/**
	 * method select user choice.
	 * @param key - user select.
	 */
	public void select(int key) {
		if (key - 1 < this.actions.size()) {
			this.actions.get(key - 1).execute(this.tracker);
		}
	}

	/**
	 * class AddItem.
	 */
	private class AddItem extends BaseAction {
		/**
		 * constructor.
		 * @param name - name.
		 * @param key - key.
		 */
		AddItem(String name, int key) {
			super(name, key);
		}

		/**
		 * method execute.
		 * @param tracker - tracker.
		 */
		public void execute(Tracker tracker) {
			Item item = new Item(trackerIO.in("enter name: "), trackerIO.in("enter discription: "), 0L);
			tracker.add(item);
		}
	}

	/**
	 * class ShowAll.
	 */
	private static class ShowAll extends BaseAction {
		/**
		 * constructor.
		 * @param name - name.
		 * @param key - key..
		 */
		ShowAll(String name, int key) {
			super(name, key);
		}

		/**
		 * method execute.
		 * @param tracker - tracker.
		 */
		public void execute(Tracker tracker) {
			ArrayList<Item> allItems = tracker.findAll();
			if (!allItems.isEmpty()) {
				TrackerIO.getInstance().out("");
				for (Item item : allItems) {
					TrackerIO.getInstance().out(item.getId() + " " + item.getName() + " - " + item.getDescription());
				}
			} else {
				TrackerIO.getInstance().out("The list is empty.");
			}
		}
	}

	/**
	 * class EditItem.
	 */
	private class EditItem extends BaseAction {
		/**
		 * constructor.
		 * @param name - name.
		 * @param key - key..
		 */
		EditItem(String name, int key) {
			super(name, key);
		}

		/**
		 * method execute.
		 * @param tracker - tracker.
		 */
		public void execute(Tracker tracker) {
			if (tracker.isNotEmpty()) {
				trackerIO.out("");
				String answer = trackerIO.in("enter id: ");
				Item item = tracker.findById(answer);
				if (item.getId() != null) {
					item.setName(trackerIO.in("enter new name: "));
					item.setDescription(trackerIO.in("enter new description: "));
					boolean invalid = true;
					do {
						try {
							item.setCreate(trackerIO.in("enter new create (must be number): "));
							invalid = false;
						} catch (NumberFormatException nfe) {
							trackerIO.out("It must be natural value.");
						}
					} while (invalid);
				} else {
					trackerIO.out("Item with this Id is not exist");
				}
			} else {
				trackerIO.out("The list is empty.");
			}
		}
	}

	/**
	 * class RemoveItem.
	 */
	private class RemoveItem extends BaseAction {
		/**
		 * constructor.
		 * @param name - name.
		 * @param key - key..
		 */
		RemoveItem(String name, int key) {
			super(name, key);
		}

		/**
		 * metod execute.
		 * @param tracker - tracker.
		 */
		public void execute(Tracker tracker) {
			if (tracker.isNotEmpty()) {
				trackerIO.out("");
				String answer = trackerIO.in("enter id: ");
				Item item = tracker.findById(answer);
				if (item.getId() != null) {
					tracker.delete(item);
				} else {
					trackerIO.out("Item with this Id is not exist");
				}
			} else {
				trackerIO.out("The list is empty.");
			}
		}
	}

	/**
	 * class FindItemById.
	 */
	private class FindItemById extends BaseAction {
		/**
		 * constructor.
		 * @param name - name.
		 * @param key - key..
		 */
		FindItemById(String name, int key) {
			super(name, key);
		}

		/**
		 * method execute.
		 * @param tracker - tracker.
		 */
		public void execute(Tracker tracker) {
			if (tracker.isNotEmpty()) {
				Item item = tracker.findById(trackerIO.in("enter Id: "));
				trackerIO.out("");
				trackerIO.out(item.getId() + " " + item.getName() + " - " + item.getDescription());
			} else {
				trackerIO.out("The list is empty.");
			}
		}
	}
}

/**
 * class FindItemByName.
 */
class FindItemByName extends BaseAction {

	private TrackerIO trackerIO;

	/**
	 * constructor.
	 * @param name - name.
	 * @param key - key..
	 */
	FindItemByName(String name, int key) {
		super(name, key);
		trackerIO = TrackerIO.getInstance();
	}

	/**
	 * metod execute.
	 * @param tracker - tracker.
	 */
	public void execute(Tracker tracker) {
		List<Item> items = tracker.findByName(trackerIO.in("enter name: "));
		if (items.size() == 0) {
			trackerIO.in("No items found with this name.");
		} else {
			for (Item item : items) {
				trackerIO.out(String.format("%s %s - %s", item.getId(), item.getName(),
						item.getDescription()));
			}
		}
	}
}


text:
/*
 * This file was automatically generated by sel-utils and
 * released under the MIT License.
 *
 * License: https://github.com/sel-project/sel-utils/blob/master/LICENSE
 * Repository: https://github.com/sel-project/sel-utils
 * Generated from https://github.com/sel-project/sel-utils/blob/master/xml/protocol/java210.xml
 */
package sul.protocol.java210.clientbound;

import java.util.Arrays;

import sul.utils.*;

public class UpdateBlockEntity extends Packet {

	public static final int ID = (int)9;

	public static final boolean CLIENTBOUND = true;
	public static final boolean SERVERBOUND = false;

	@Override
	public int getId() {
		return ID;
	}

	// action
	public static final byte MOB_SPAWNER_DATA = (byte)1;
	public static final byte COMMAND_BLOCK_TEXT = (byte)2;
	public static final byte BEACON_POWERS = (byte)3;
	public static final byte MOB_HEAD_DATA = (byte)4;
	public static final byte FLOWER_POT_FLOWER = (byte)5;
	public static final byte BANNER_DATA = (byte)6;
	public static final byte STRUCTURE_DATA = (byte)7;
	public static final byte END_GATEWAY_DESTINATION = (byte)8;
	public static final byte SIGN_TEXT = (byte)9;

	public long position;
	public byte action;
	public byte[] nbt = new byte[0];

	public UpdateBlockEntity() {}

	public UpdateBlockEntity(long position, byte action, byte[] nbt) {
		this.position = position;
		this.action = action;
		this.nbt = nbt;
	}

	@Override
	public int length() {
		return nbt.length + 10;
	}

	@Override
	public byte[] encode() {
		this._buffer = new byte[this.length()];
		this.writeVaruint(ID);
		this.writeBigEndianLong(position);
		this.writeBigEndianByte(action);
		this.writeBytes(nbt);
		return this.getBuffer();
	}

	@Override
	public void decode(byte[] buffer) {
		this._buffer = buffer;
		this.readVaruint();
		position=readBigEndianLong();
		action=readBigEndianByte();
		nbt=this.readBytes(this._buffer.length-this._index);
	}

	public static UpdateBlockEntity fromBuffer(byte[] buffer) {
		UpdateBlockEntity ret = new UpdateBlockEntity();
		ret.decode(buffer);
		return ret;
	}

	@Override
	public String toString() {
		return "UpdateBlockEntity(position: " + this.position + ", action: " + this.action + ", nbt: " + Arrays.toString(this.nbt) + ")";
	}

}


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

namespace RMUD.SinglePlayer
{
    public class Driver
    {
        private DummyClient Client;
        public RMUD.Player Player { get; private set; }
        public bool BlockOnInput { get; set; }
        private System.Threading.AutoResetEvent CommandQueueReady = new System.Threading.AutoResetEvent(false);
        public bool IsRunning
        {
            get
            {
                return !RMUD.Core.ShuttingDown;
            }
        }

        public Driver()
        {
            BlockOnInput = true;
        }

        public void SwitchPlayerCharacter(RMUD.Player NewCharacter)
        {
            NewCharacter.Rank = 500;
            NewCharacter.CommandHandler = RMUD.Core.ParserCommandHandler;
            var client = Player.ConnectedClient;
            RMUD.Core.TiePlayerToClient(client, NewCharacter);
            Player = NewCharacter;
        }

        private void DetectAndAssignDriver(System.Reflection.Assembly Assembly)
        {
            foreach (var type in Assembly.GetTypes().Where(t => t.Name == "Game"))
            {
                try
                {
                    var property = type.GetProperty("Driver");
                    if (property != null && property.PropertyType == typeof(Driver) && property.CanWrite)
                        property.SetValue(null, this);
                }
                catch (Exception e) { }
            }
        }

        public bool Start(
            System.Reflection.Assembly DatabaseAssembly,
            Action<String> Output)
        {
            GameInfo gameInfo = null;
            foreach (var type in DatabaseAssembly.GetTypes())
                if (type.IsSubclassOf(typeof(GameInfo)))
                    gameInfo = Activator.CreateInstance(type) as GameInfo;

            if (gameInfo == null) throw new InvalidOperationException("No GameInfo defined in game assembly.");

            var assemblies = new List<ModuleAssembly>();
            assemblies.Add(new ModuleAssembly(DatabaseAssembly, new ModuleInfo { BaseNameSpace = gameInfo.DatabaseNameSpace }));
            foreach (var module in gameInfo.Modules)
                assemblies.Add(new ModuleAssembly(module));

            if (RMUD.Core.Start(StartupFlags.Silent,
                new RMUD.SinglePlayer.CompiledDatabase(DatabaseAssembly, gameInfo.DatabaseNameSpace),
                assemblies.ToArray()))
            {
                Player = RMUD.MudObject.GetObject<RMUD.Player>(RMUD.Core.SettingsObject.PlayerBaseObject);
                Player.CommandHandler = RMUD.Core.ParserCommandHandler;
                Client = new DummyClient(Output);
                RMUD.Core.TiePlayerToClient(Client, Player);
                Player.Rank = 500;

                DetectAndAssignDriver(DatabaseAssembly);
                Core.GlobalRules.ConsiderPerformRule("singleplayer game started", Player);

                return true;
            }

            return false;
        }

        public bool Start(
            String AssemblyFile,
            Action<String> Output)
        {
            var assembly = System.Reflection.Assembly.LoadFile(System.IO.Path.GetFullPath(AssemblyFile));
            if (assembly == null) throw new InvalidOperationException("Game assembly could not be loaded.");

            GameInfo gameInfo = null;
            foreach (var type in assembly.GetTypes())
                if (type.IsSubclassOf(typeof(GameInfo)))
                    gameInfo = Activator.CreateInstance(type) as GameInfo;

            if (gameInfo == null) throw new InvalidOperationException("No GameInfo defined in game assembly.");

            var assemblies = new List<ModuleAssembly>();
            assemblies.Add(new ModuleAssembly(assembly, new ModuleInfo { BaseNameSpace = gameInfo.DatabaseNameSpace }, AssemblyFile));
            foreach (var module in gameInfo.Modules)
                assemblies.Add(new ModuleAssembly(module));

            if (RMUD.Core.Start(StartupFlags.Silent,
                new RMUD.SinglePlayer.CompiledDatabase(assembly, gameInfo.DatabaseNameSpace),
                assemblies.ToArray()))
            {
                Player = RMUD.MudObject.GetObject<RMUD.Player>(RMUD.Core.SettingsObject.PlayerBaseObject);
                Player.CommandHandler = RMUD.Core.ParserCommandHandler;
                Client = new DummyClient(Output);
                RMUD.Core.TiePlayerToClient(Client, Player);
                Player.Rank = 500;

                DetectAndAssignDriver(assembly);
                Core.GlobalRules.ConsiderPerformRule("singleplayer game started", Player);

                return true;
            }

            return false;
        }

        public void Input(String Command)
        {
            if (BlockOnInput)
            {
                RMUD.Core.EnqueuActorCommand(Player, Command, () =>
                    CommandQueueReady.Set());
                CommandQueueReady.WaitOne();
            }
            else
                RMUD.Core.EnqueuActorCommand(Player, Command);
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8" ?>
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
</style>

<style name="button_text" >
    <item name="android:layout_width" >fill_parent</item>
    <item name="android:layout_height" >wrap_content</item>
    <item name="android:textColor" >#ffffff</item>
    <item name="android:gravity" >center</item>
    <item name="android:layout_margin" >3dp</item>
    <item name="android:textSize" >20dp</item>
    <item name="android:textStyle" >bold</item>
    <item name="android:shadowColor" >#000000</item>
    <item name="android:shadowDx" >1</item>
    <item name="android:shadowDy" >1</item>
    <item name="android:shadowRadius" >2</item>
</style>
</resources>


text:
using DragonSpark.Application.Security.Identity.Model;
using DragonSpark.Compose;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Components.Authorization;
using System.Threading.Tasks;

namespace DragonSpark.Application.Security.Identity.Authentication;

sealed class Adapters<T> : IAdapters where T : IdentityUser
{
	readonly IStateViews<T>      _views;
	readonly INavigateToSignOut  _exit;
	readonly AuthenticationState _default;

	[UsedImplicitly]
	public Adapters(IStateViews<T> views, INavigateToSignOut exit)
		: this(views, exit, AuthenticationState<T>.Default) {}

	public Adapters(IStateViews<T> views, INavigateToSignOut exit, AuthenticationState @default)
	{
		_views   = views;
		_exit    = exit;
		_default = @default;
	}

	public async Task<AuthenticationState> Get(Task<AuthenticationState> parameter)
	{
		var previous = await parameter.ConfigureAwait(false);
		var (result, _) = await _views.Await(previous.User);

		if ((previous.User.Identity?.IsAuthenticated ?? false) && result.Profile == null)
		{
			_exit.Execute(previous.User);
			return _default;
		}
		return result;
	}
}


text:
package com.happydroids.droidtowers.scenes;

import com.happydroids.droidtowers.entities.GameObject;
import com.happydroids.droidtowers.gamestate.GameState;
import com.happydroids.droidtowers.gamestate.server.CloudGameSave;
import com.happydroids.droidtowers.gamestate.server.FriendCloudGameSave;
import com.happydroids.droidtowers.gamestate.server.FriendCloudGameSaveCollection;
import com.happydroids.droidtowers.gamestate.server.TowerGameService;
import com.happydroids.droidtowers.gui.Dialog;
import com.happydroids.droidtowers.gui.OnClickCallback;
import com.happydroids.droidtowers.scenes.components.ProgressPanel;
import com.happydroids.droidtowers.scenes.components.SceneManager;
import com.happydroids.utils.BackgroundTask;

public class ViewNeighborSplashScene extends SplashScene {
  private GameObject droid;
  private ViewNeighborSplashScene.FetchNeighborsList fetchNeighborsList;
  private GameState playerGameState;

  @Override
  public void create(Object... args) {
    super.create(args);

    progressPanel.remove();
    progressPanel = null;

    progressPanel = new ProgressPanel();
    progressPanel.setProgress(0);
    center(progressPanel);
    addActor(progressPanel);

    playerGameState = (GameState) args[0];

    fetchNeighborsList = new FetchNeighborsList();
    fetchNeighborsList.run();
  }

  private class FetchNeighborsList extends BackgroundTask {
    public boolean fetchWasSuccessful;

    @Override
    protected void execute() throws Exception {
      progressPanel.setProgress(10);
      if (TowerGameService.instance().isAuthenticated()) {
        CloudGameSave cloudGameSave = playerGameState.getCloudGameSave();
        if (!cloudGameSave.isSaved()) {
          playerGameState.saveGame(true);
        } else {
          cloudGameSave.fetch();
        }

        progressPanel.setProgress(33);

        FriendCloudGameSaveCollection neighborGameSaves = cloudGameSave.getNeighborGameSaves();
        if (!neighborGameSaves.isEmpty()) {
          int progressPerFetch = 66 / neighborGameSaves.size();
          int progressSoFar = 33;
          for (FriendCloudGameSave friendGameSave : neighborGameSaves.getObjects()) {
            friendGameSave.fetch();
            progressSoFar += progressPerFetch;
            progressPanel.setProgress(progressSoFar);
          }
        }

        fetchWasSuccessful = true;
        progressPanel.setProgress(100);
      }
    }

    @Override
    public synchronized void afterExecute() {
      progressPanel.setProgress(100);
      if (fetchWasSuccessful) {
        SceneManager.popScene();
        SceneManager.pushScene(ViewNeighborScene.class, playerGameState);
      } else {
        displayConnectionErrorDialog();
      }
    }
  }

  private void displayConnectionErrorDialog() {
    new Dialog()
            .setTitle("Connection Failed")
            .setMessage("Sorry, but we were not able to fetch your neighborhood.\n\nPlease check your internet connection and try again.")
            .addButton("Okay", new OnClickCallback() {
              @Override
              public void onClick(Dialog dialog) {
                dialog.dismiss();
              }
            })
            .setDismissCallback(new Runnable() {
              @Override
              public void run() {
                SceneManager.popScene();
              }
            })
            .show();
  }
}


text:
'use strict';

exports.__esModule = true;

var _menuItem = require('../../menu/menu-item.js');

var _menuItem2 = _interopRequireDefault(_menuItem);

var _component = require('../../component.js');

var _component2 = _interopRequireDefault(_component);

var _fn = require('../../utils/fn.js');

var Fn = _interopRequireWildcard(_fn);

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

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

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
                                                                                * @file audio-track-menu-item.js
                                                                                */

/**
 * The audio track menu item
 *
 * @param {Player|Object} player
 * @param {Object=} options
 * @extends MenuItem
 * @class AudioTrackMenuItem
 */
var AudioTrackMenuItem = function (_MenuItem) {
  _inherits(AudioTrackMenuItem, _MenuItem);

  function AudioTrackMenuItem(player, options) {
    _classCallCheck(this, AudioTrackMenuItem);

    var track = options.track;
    var tracks = player.audioTracks();

    // Modify options for parent MenuItem class's init.
    options.label = track.label || track.language || 'Unknown';
    options.selected = track.enabled;

    var _this = _possibleConstructorReturn(this, _MenuItem.call(this, player, options));

    _this.track = track;

    if (tracks) {
      (function () {
        var changeHandler = Fn.bind(_this, _this.handleTracksChange);

        tracks.addEventListener('change', changeHandler);
        _this.on('dispose', function () {
          tracks.removeEventListener('change', changeHandler);
        });
      })();
    }
    return _this;
  }

  /**
   * Handle click on audio track
   *
   * @method handleClick
   */

  AudioTrackMenuItem.prototype.handleClick = function handleClick(event) {
    var tracks = this.player_.audioTracks();

    _MenuItem.prototype.handleClick.call(this, event);

    if (!tracks) {
      return;
    }

    for (var i = 0; i < tracks.length; i++) {
      var track = tracks[i];

      track.enabled = track === this.track;
    }
  };

  /**
   * Handle audio track change
   *
   * @method handleTracksChange
   */

  AudioTrackMenuItem.prototype.handleTracksChange = function handleTracksChange(event) {
    this.selected(this.track.enabled);
  };

  return AudioTrackMenuItem;
}(_menuItem2['default']);

_component2['default'].registerComponent('AudioTrackMenuItem', AudioTrackMenuItem);
exports['default'] = AudioTrackMenuItem;


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

namespace Yourdbxrescue {
    public class UtExplodeDbx {
        // 多大な参考・感謝
        // http://www.geocities.co.jp/SiliconValley-Oakland/3664/

        public static void ExplodeDbx(String fpdbx, String dirTo) {
            using (FileStream fs = File.OpenRead(fpdbx)) {
                BinaryReader br = new BinaryReader(fs);

                fs.Position = 0;
                if (br.ReadUInt64() != 0x6F74FDC5FE12ADCF) throw new InvalidDataException();

                fs.Position = 0x1C;

                uint infoSize = br.ReadUInt32();
                fs.Position = 0x24BC + infoSize;

                fs.Position = (fs.Position + 3) & (~3);

                SortedDictionary<uint, uint> dictRead = new SortedDictionary<uint, uint>(); // cur -> next

                byte[] bin = new byte[4];
                byte[] body = new byte[512];
                int t = 1;
                Int64 nextpos = fs.Position;
                while (fs.Position + 16 < fs.Length) {
                    Int64 pos = fs.Position;
                    fs.Position = nextpos;
                    nextpos += 4;
                    uint marker = br.ReadUInt32();
                    if (pos != marker) continue;
                    uint bodySize = br.ReadUInt32();
                    uint usedSize = br.ReadUInt32();
                    uint nextAddr = br.ReadUInt32();
                    if (bodySize != 0x200) continue;
                    if (usedSize > bodySize) continue;

                    if (dictRead.ContainsKey(marker)) continue;
                    dictRead[marker] = nextAddr;

                    using (FileStream os = File.Create(Path.Combine(dirTo, String.Format("{0:000000}.eml", t)))) {
                        while (true) {
                            if (pos != marker) break;
                            if (bodySize != 0x200) break;
                            if (usedSize > bodySize) break;

                            dictRead[marker] = nextAddr;

                            fs.Read(body, 0, (int)bodySize);
                            os.Write(body, 0, (int)usedSize);

                            fs.Position = nextAddr;

                            pos = fs.Position;
                            marker = br.ReadUInt32();
                            bodySize = br.ReadUInt32();
                            usedSize = br.ReadUInt32();
                            nextAddr = br.ReadUInt32();
                        }

                        if (os.Length == 0) continue;
                    }
                    t++;
                }
            }
        }

        public static void ExplodeDbx2(String fpdbx, String dirTo) {
            using (FileStream fs = File.OpenRead(fpdbx)) {
                BinaryReader br = new BinaryReader(fs);

                fs.Position = 0;
                if (br.ReadUInt64() != 0x6F74FDC5FE12ADCF) throw new InvalidDataException();

                fs.Position = 0x1C;

                uint infoSize = br.ReadUInt32();
                fs.Position = 0x24BC + infoSize;

                fs.Position = (fs.Position + 3) & (~3);

                SortedDictionary<uint, uint> dictWalk = new SortedDictionary<uint, uint>(); // cur -> next
                SortedDictionary<uint, uint> dictRev = new SortedDictionary<uint, uint>(); // next -> prev

                byte[] bin = new byte[4];
                byte[] body = new byte[512];
                Int64 nextpos = fs.Position;
                Int64 maxpos = fs.Length;
                while (nextpos + 16 < maxpos) {
                    Int64 pos = nextpos;
                    fs.Position = nextpos;
                    nextpos += 4;
                    uint marker = br.ReadUInt32();
                    if (pos != marker) continue;
                    uint bodySize = br.ReadUInt32();
                    uint usedSize = br.ReadUInt32();
                    uint nextAddr = br.ReadUInt32();
                    if (bodySize != 0x200) continue;
                    if (usedSize > bodySize) continue;

                    //if (dictWalk.ContainsKey(marker)) continue;
                    dictWalk[marker] = nextAddr;
                    if (nextAddr != 0) {
                        //Debug.Assert(!dictRev.ContainsKey(nextAddr));
                        dictRev[nextAddr] = marker;
                    }

                    nextpos += 0x200 + 16 - 4;
                }

                int t = 1;
                foreach (KeyValuePair<uint, uint> kv1 in dictWalk) {
                    if (dictRev.ContainsKey(kv1.Key)) continue;

                    using (FileStream os = File.Create(Path.Combine(dirTo, String.Format("{0:000000}.eml", t)))) {
                        uint pos = kv1.Key;
                        while (true) {
                            fs.Position = pos;
                            uint marker = br.ReadUInt32();
                            //Debug.Assert(marker == pos);
                            br.ReadUInt32();
                            int usedSize = br.ReadInt32();
                            br.ReadUInt32();

                            if (fs.Read(body, 0, usedSize) != usedSize) break;
                            os.Write(body, 0, usedSize);

                            uint npos;
                            if (!dictWalk.TryGetValue(pos, out npos) || npos == 0) break;
                            pos = npos;
                        }
                        t++;
                    }
                }
            }
        }

        public class Stat3 {
            public int x;
            public int z, emailcnt;
        }

        public delegate Stream GetOutputStream();

        public static void ExplodeDbx3(String fpdbx, Action<Stat3> reporter, GetOutputStream accepter) {
            using (FileStream fs = File.OpenRead(fpdbx)) {
                BinaryReader br = new BinaryReader(fs);

                fs.Position = 0;
                if (br.ReadUInt64() != 0x6F74FDC5FE12ADCF) throw new InvalidDataException();

                fs.Position = 0x1C;

                uint infoSize = br.ReadUInt32();
                fs.Position = 0x24BC + infoSize;

                fs.Position = (fs.Position + 3) & (~3);

                SortedDictionary<uint, uint> dictWalk = new SortedDictionary<uint, uint>(); // cur -> next
                SortedDictionary<uint, uint> dictRev = new SortedDictionary<uint, uint>(); // next -> prev

                byte[] bin = new byte[4];
                byte[] body = new byte[512];
                Int64 nextpos = fs.Position;
                Int64 maxpos = fs.Length;
                Stat3 s3 = new Stat3();
                byte[] chk = new byte[2048];
                while (nextpos + 16 < maxpos) {
                    fs.Position = nextpos;
                    int cx = fs.Read(chk, 0, chk.Length) & (~3);
                    if (cx == 0)
                        break;
                    int x = 0;
                    uint marker;
                    do {
                        if ((marker = BitConverter.ToUInt32(chk, x)) == (uint)(nextpos + x))
                            break;
                        x += 4;
                    } while (x < cx);
                    nextpos += x;
                    if (x == cx) {
                        continue;
                    }
                    nextpos += 4;
                    fs.Position = nextpos;
                    uint bodySize = br.ReadUInt32();
                    uint usedSize = br.ReadUInt32();
                    uint nextAddr = br.ReadUInt32();
                    if (bodySize != 0x200) continue;
                    if (usedSize > bodySize) continue;

                    dictWalk[marker] = nextAddr;
                    if (nextAddr != 0) {
                        dictRev[nextAddr] = marker;
                    }

                    nextpos += 0x200 + 16 - 4;

                    if (reporter != null) {
                        int newx = (int)(100 * nextpos / maxpos);
                        if (newx != s3.x) {
                            s3.x = newx;
                            reporter(s3);
                        }
                    }
                }

                s3.x = 100;

                int t = 0, ct = dictWalk.Count;
                foreach (KeyValuePair<uint, uint> kv1 in dictWalk) {
                    t++;
                    if (dictRev.ContainsKey(kv1.Key)) continue;

                    if (reporter != null) {
                        int newz = (int)(100 * t / ct);
                        if (newz != s3.z) {
                            s3.z = newz;
                            reporter(s3);
                        }
                    }

                    using (Stream os = accepter()) {
                        uint pos = kv1.Key;
                        while (true) {
                            fs.Position = pos;
                            uint marker = br.ReadUInt32();
                            //Debug.Assert(marker == pos);
                            br.ReadUInt32();
                            int usedSize = br.ReadInt32();
                            br.ReadUInt32();

                            if (fs.Read(body, 0, usedSize) != usedSize) break;
                            os.Write(body, 0, usedSize);

                            uint npos;
                            if (!dictWalk.TryGetValue(pos, out npos) || npos == 0) break;
                            pos = npos;
                        }
                        s3.emailcnt++;
                    }
                }

                s3.z = 100;

                if (reporter != null) {
                    reporter(s3);
                }
            }
        }
    }

}


text:
class AddTagToCommits < ActiveRecord::Migration
  def change
    add_column :commits, :tag, :boolean, default: false
  end
end


text:
<?php

namespace CtiDigital\Configurator\Api;

interface ConfiguratorAdapterInterface
{
    const ENABLED = 'enabled';
    const DISABLED = 'disabled';
}


text:
require "spec_helper"

describe "Fog#timeout" do
  before do
    @old_timeout = Fog.timeout
  end

  after do
    Fog.timeout = @old_timeout
  end

  it "defaults to 600" do
    assert_equal 600, Fog.timeout
  end

  it "can be reassigned through Fog#timeout=" do
    Fog.timeout = 300
    assert_equal 300, Fog.timeout
  end
end


text:
from a10sdk.common.A10BaseClass import A10BaseClass

class HttpKerberosKdc(A10BaseClass):

    """This class does not support CRUD Operations please use parent.

    :param http_kerberos_hostipv6: {"not": "http-kerberos-hostip", "type": "string", "description": "Server's IPV6 address", "format": "ipv6-address"}
    :param http_kerberos_port: {"description": "Specify the kdc port", "minimum": 1, "type": "number", "maximum": 65535, "format": "number"}
    :param http_kerberos_portv6: {"description": "Specify the kdc port", "minimum": 1, "type": "number", "maximum": 65535, "format": "number"}
    :param http_kerberos_hostip: {"description": "Kdc's hostname or IP address", "format": "host", "minLength": 1, "maxLength": 31, "not": "http-kerberos-hostipv6", "type": "string"}
    :param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`

    """
    def __init__(self, **kwargs):
        self.ERROR_MSG = ""

        self.b_key = "http-kerberos-kdc"
        self.DeviceProxy = ""
        self.http_kerberos_hostipv6 = ""
        self.http_kerberos_port = ""
        self.http_kerberos_portv6 = ""
        self.http_kerberos_hostip = ""

        for keys, value in kwargs.items():
            setattr(self,keys, value)

class Http(A10BaseClass):

    """Class Description::
    HTTP type.

    Class http supports CRUD Operations and inherits from `common/A10BaseClass`.
    This class is the `"PARENT"` class for this module.`

    :param http_url: {"default": 0, "optional": true, "type": "number", "description": "Specify URL string, default is GET /", "format": "flag"}
    :param http_maintenance_code: {"description": "Specify response code for maintenance (Format is xx,xx-xx (xx between [100, 899]))", "format": "string-rlx", "minLength": 1, "optional": true, "maxLength": 31, "type": "string"}
    :param http_kerberos_auth: {"default": 0, "optional": true, "type": "number", "description": "Http Kerberos Auth", "format": "flag"}
    :param http_postfile: {"description": "Specify the HTTP post data (Input post data file name here)", "format": "string-rlx", "minLength": 1, "optional": true, "maxLength": 31, "type": "string"}
    :param uuid: {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLength": 64, "type": "string"}
    :param post_type: {"optional": true, "enum": ["postdata", "postfile"], "type": "string", "description": "'postdata': Specify the HTTP post data; 'postfile': Specify the HTTP post data; ", "format": "enum"}
    :param http_password_string: {"description": "Specify password, '' means empty passworddd", "format": "password", "minLength": 1, "optional": true, "maxLength": 31, "type": "string"}
    :param url_path: {"description": "Specify URL path, default is \"/\"", "format": "string-rlx", "minLength": 1, "optional": true, "maxLength": 500, "type": "string"}
    :param http_response_code: {"description": "Specify response code range (e.g. 200,400-430) (Format is xx,xx-xx (xx between [100, 899]))", "format": "string-rlx", "minLength": 1, "optional": true, "maxLength": 31, "not": "http-text", "type": "string"}
    :param http_host: {"description": "Specify \"Host:\" header used in request (enclose IPv6 address in [])", "format": "string-rlx", "minLength": 1, "optional": true, "maxLength": 63, "type": "string"}
    :param http: {"default": 0, "optional": true, "type": "number", "description": "HTTP type", "format": "flag"}
    :param url_type: {"optional": true, "enum": ["GET", "POST", "HEAD"], "type": "string", "description": "'GET': HTTP GET method; 'POST': HTTP POST method; 'HEAD': HTTP HEAD method; ", "format": "enum"}
    :param http_postdata: {"description": "Specify the HTTP post data (Input post data here)", "format": "string-rlx", "minLength": 1, "optional": true, "maxLength": 255, "type": "string"}
    :param http_text: {"description": "Specify text expected", "format": "string-rlx", "minLength": 1, "optional": true, "maxLength": 127, "not": "http-response-code", "type": "string"}
    :param http_encrypted: {"optional": true, "type": "encrypted", "description": "Do NOT use this option manually. (This is an A10 reserved keyword.) (The ENCRYPTED password string)", "format": "encrypted"}
    :param http_kerberos_realm: {"description": "Specify realm of Kerberos server", "format": "string-rlx", "minLength": 1, "optional": true, "maxLength": 63, "type": "string"}
    :param http_password: {"default": 0, "optional": true, "type": "number", "description": "Specify the user password", "format": "flag"}
    :param http_expect: {"default": 0, "optional": true, "type": "number", "description": "Specify what you expect from the response message", "format": "flag"}
    :param post_path: {"description": "Specify URL path, default is \"/\"", "format": "string-rlx", "minLength": 1, "optional": true, "maxLength": 500, "type": "string"}
    :param http_username: {"description": "Specify the username", "format": "string-rlx", "minLength": 1, "optional": true, "maxLength": 31, "type": "string"}
    :param http_port: {"description": "Specify HTTP Port (Specify port number (default 80))", "format": "number", "default": 80, "optional": true, "maximum": 65534, "minimum": 1, "type": "number"}
    :param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`

    URL for this object::
    `https://<Hostname|Ip address>//axapi/v3/health/monitor/{name}/method/http`.

    """
    def __init__(self, **kwargs):
        self.ERROR_MSG = ""
        self.required=[]
        self.b_key = "http"
        self.a10_url="/axapi/v3/health/monitor/{name}/method/http"
        self.DeviceProxy = ""
        self.http_url = ""
        self.http_maintenance_code = ""
        self.http_kerberos_auth = ""
        self.http_postfile = ""
        self.uuid = ""
        self.post_type = ""
        self.http_password_string = ""
        self.url_path = ""
        self.http_response_code = ""
        self.http_host = ""
        self.http = ""
        self.url_type = ""
        self.http_postdata = ""
        self.http_text = ""
        self.http_encrypted = ""
        self.http_kerberos_realm = ""
        self.http_password = ""
        self.http_kerberos_kdc = {}
        self.http_expect = ""
        self.post_path = ""
        self.http_username = ""
        self.http_port = ""

        for keys, value in kwargs.items():
            setattr(self,keys, value)


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="Suite">
    <test name="CITests">
        <parameter name="baseFolder" value="../../../main/efaps"></parameter>
        <parameter name="application" value="eFapsApp-Mail"/>
        <parameter name="regex4MenuLabelExclude" value=".*_Menu.Label$"/>
        <packages>
            <package name="org.efaps.tests.*"></package>
        </packages>
    </test>
</suite>


text:
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
   <solid android:color="#ffffff" />
   <stroke android:width="1dip" android:color="#cdcdcd"/>
   <corners android:topLeftRadius="2dp" android:topRightRadius="2dp"
         android:bottomLeftRadius="2dp" android:bottomRightRadius="2dp"/>
</shape>


text:
nohup sh Client.sh&

python2.7 send.py


text:
<?php

class OTGS_Installer_WP_Components_Sender {

	/**
	 * @var WP_Installer
	 */
	private $installer;

	/**
	 * @var OTGS_Installer_WP_Share_Local_Components_Setting
	 */
	private $settings;

	public function __construct( WP_Installer $installer, OTGS_Installer_WP_Share_Local_Components_Setting $settings ) {
		$this->installer = $installer;
		$this->settings = $settings;
	}

	public function send( array $components ) {

		if ( ! $this->installer->get_repositories() ) {
			$this->installer->load_repositories_list();
		}

		if ( ! $this->installer->get_settings() ) {
			$this->installer->save_settings();
		}

		foreach ( $this->installer->get_repositories() as $key => $repository ) {
			if ( $this->settings->is_repo_allowed( $key ) ) {
				wp_remote_post(
					$repository['api-url'] . '?action=update_site_components',
					apply_filters( 'installer_fetch_components_data_request', array(
						'body' => array(
							'action'     => 'update_site_components',
							'site_key'   => $this->installer->get_site_key( $key ),
							'site_url'   => get_site_url(),
							'components' => $components,
							'phpversion' => phpversion(),
						),
					) )
				);
			}
		}
	}
}


text:
<?php

namespace AMQPAL\Adapter\Exception;

/**
 * Class OutOfBoundsException
 *
 * @package AMQPAL\Adapter\Exception
 */
class OutOfBoundsException extends \AMQPAL\Exception\OutOfBoundsException implements ExceptionInterface
{
}