text:
<?php
/**
 * Rescores results from a prefix search/opensearch to make sure the
 * exact match is the first result.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 * @file
 */

/**
 * An utility class to rescore search results by looking for an exact match
 * in the db and add the page found to the first position.
 *
 * NOTE: extracted from TitlePrefixSearch
 * @ingroup Search
 */
class SearchExactMatchRescorer {
	/**
	 * Default search backend does proper prefix searching, but custom backends
	 * may sort based on other algorithms that may cause the exact title match
	 * to not be in the results or be lower down the list.
	 * @param string $search the query
	 * @param int[] $namespaces the namespaces
	 * @param int $limit the max number of results to return
	 * @param string[] $srchres results
	 * @return string[] munged results
	 */
	public function rescore( $search, $namespaces, $srchres, $limit ) {
		// Pick namespace (based on PrefixSearch::defaultSearchBackend)
		$ns = in_array( NS_MAIN, $namespaces ) ? NS_MAIN : reset( $namespaces );
		$t = Title::newFromText( $search, $ns );
		if ( !$t || !$t->exists() ) {
			// No exact match so just return the search results
			return $srchres;
		}
		$string = $t->getPrefixedText();
		$key = array_search( $string, $srchres );
		if ( $key !== false ) {
			// Exact match was in the results so just move it to the front
			return $this->pullFront( $key, $srchres );
		}
		// Exact match not in the search results so check for some redirect handling cases
		if ( $t->isRedirect() ) {
			$target = $this->getRedirectTarget( $t );
			$key = array_search( $target, $srchres );
			if ( $key !== false ) {
				// Exact match is a redirect to one of the returned matches so pull the
				// returned match to the front.  This might look odd but the alternative
				// is to put the redirect in front and drop the match.  The name of the
				// found match is often more descriptive/better formed than the name of
				// the redirect AND by definition they share a prefix.  Hopefully this
				// choice is less confusing and more helpful.  But it might not be.  But
				// it is the choice we're going with for now.
				return $this->pullFront( $key, $srchres );
			}
			$redirectTargetsToRedirect = $this->redirectTargetsToRedirect( $srchres );
			if ( isset( $redirectTargetsToRedirect[$target] ) ) {
				// The exact match and something in the results list are both redirects
				// to the same thing!  In this case we'll pull the returned match to the
				// top following the same logic above.  Again, it might not be a perfect
				// choice but it'll do.
				return $this->pullFront( $redirectTargetsToRedirect[$target], $srchres );
			}
		} else {
			$redirectTargetsToRedirect = $this->redirectTargetsToRedirect( $srchres );
			if ( isset( $redirectTargetsToRedirect[$string] ) ) {
				// The exact match is the target of a redirect already in the results list so remove
				// the redirect from the results list and push the exact match to the front
				array_splice( $srchres, $redirectTargetsToRedirect[$string], 1 );
				array_unshift( $srchres, $string );
				return $srchres;
			}
		}

		// Exact match is totally unique from the other results so just add it to the front
		array_unshift( $srchres, $string );
		// And roll one off the end if the results are too long
		if ( count( $srchres ) > $limit ) {
			array_pop( $srchres );
		}
		return $srchres;
	}

	/**
	 * @param string[] $titles as strings
	 * @return array redirect target prefixedText to index of title in titles
	 *   that is a redirect to it.
	 */
	private function redirectTargetsToRedirect( $titles ) {
		$result = [];
		foreach ( $titles as $key => $titleText ) {
			$title = Title::newFromText( $titleText );
			if ( !$title || !$title->isRedirect() ) {
				continue;
			}
			$target = $this->getRedirectTarget( $title );
			if ( !$target ) {
				continue;
			}
			$result[$target] = $key;
		}
		return $result;
	}

	/**
	 * Returns an array where the element of $array at index $key becomes
	 * the first element.
	 * @param int $key key to pull to the front
	 * @return array $array with the item at $key pulled to the front
	 */
	private function pullFront( $key, $array ) {
		$cut = array_splice( $array, $key, 1 );
		array_unshift( $array, $cut[0] );
		return $array;
	}

	/**
	 * Get a redirect's destination from a title
	 * @param Title $title A title to redirect. It may not redirect or even exist
	 * @return null|string If title exists and redirects, get the destination's prefixed name
	 */
	private function getRedirectTarget( $title ) {
		$page = WikiPage::factory( $title );
		if ( !$page->exists() ) {
			return null;
		}
		$redir = $page->getRedirectTarget();
		return $redir ? $redir->getPrefixedText() : null;
	}
}


text:
<?php
/**
 * @author @jenschude <jens.schulze@commercetools.de>
 */

namespace Commercetools\Core\Request\Zones;

use Commercetools\Core\Model\Common\Context;
use Commercetools\Core\Request\AbstractUpdateRequest;
use Commercetools\Core\Model\Zone\Zone;
use Commercetools\Core\Response\ApiResponseInterface;
use Commercetools\Core\Model\MapperInterface;

/**
 * @package Commercetools\Core\Request\Zones
 * @link https://docs.commercetools.com/http-api-projects-zones.html#update-zone
 * @method Zone mapResponse(ApiResponseInterface $response)
 * @method Zone mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
 */
class ZoneUpdateRequest extends AbstractUpdateRequest
{
    protected $resultClass = Zone::class;

    /**
     * @param string $id
     * @param int $version
     * @param array $actions
     * @param Context $context
     */
    public function __construct($id, $version, array $actions = [], Context $context = null)
    {
        parent::__construct(ZonesEndpoint::endpoint(), $id, $version, $actions, $context);
    }

    /**
     * @param string $id
     * @param int $version
     * @param Context $context
     * @return static
     */
    public static function ofIdAndVersion($id, $version, Context $context = null)
    {
        return new static($id, $version, [], $context);
    }
}

redpajama_set_name: RedPajamaGithub


text:
import NotebookEditorWithRedal from './with-redal';
export default NotebookEditorWithRedal;


text:
module.exports = () => ({
  plugins: [
    require('postcss-responsive-type')(),
    require('postcss-normalize')(),
  ],
});


text:
package org.ovirt.engine.ui.uicommonweb.models.networks;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

import org.ovirt.engine.core.common.businessentities.VDSGroup;
import org.ovirt.engine.core.common.businessentities.network.Network;
import org.ovirt.engine.core.common.businessentities.network.NetworkCluster;
import org.ovirt.engine.core.common.businessentities.network.NetworkView;
import org.ovirt.engine.core.common.queries.IdQueryParameters;
import org.ovirt.engine.core.common.queries.VdcQueryReturnValue;
import org.ovirt.engine.core.common.queries.VdcQueryType;
import org.ovirt.engine.core.common.utils.PairQueryable;
import org.ovirt.engine.ui.frontend.AsyncQuery;
import org.ovirt.engine.ui.frontend.Frontend;
import org.ovirt.engine.ui.frontend.INewAsyncCallback;
import org.ovirt.engine.ui.uicommonweb.Cloner;
import org.ovirt.engine.ui.uicommonweb.UICommand;
import org.ovirt.engine.ui.uicommonweb.help.HelpTag;
import org.ovirt.engine.ui.uicommonweb.models.SearchableListModel;
import org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel;
import org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel;
import org.ovirt.engine.ui.uicompat.ConstantsManager;
import org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs;

public class NetworkClusterListModel extends SearchableListModel<NetworkView, PairQueryable<VDSGroup, NetworkCluster>> {
    private UICommand manageCommand;

    private final Comparator<ClusterNetworkModel> manageModelComparator =
            new Comparator<ClusterNetworkModel>() {
                @Override
                public int compare(ClusterNetworkModel o1, ClusterNetworkModel o2) {
                    return o1.getCluster().getName().compareTo(o2.getCluster().getName());
                }
            };

    public NetworkClusterListModel() {
        setTitle(ConstantsManager.getInstance().getConstants().clustersTitle());
        setHelpTag(HelpTag.clusters);
        setHashName("clusters"); //$NON-NLS-1$

        setComparator(new Comparator<PairQueryable<VDSGroup, NetworkCluster>>() {

            @Override
            public int compare(PairQueryable<VDSGroup, NetworkCluster> arg0,
                               PairQueryable<VDSGroup, NetworkCluster> arg1) {
                return arg0.getFirst().getName().compareTo(arg1.getFirst().getName());
            }
        });

        setManageCommand(new UICommand("Manage", this)); //$NON-NLS-1$
    }

    public void manage() {
        if (getWindow() != null) {
            return;
        }

        ClusterNetworkManageModel manageModel = createManageList();
        setWindow(manageModel);
        manageModel.setTitle(ConstantsManager.getInstance().getConstants().assignDetachNetworkTitle());
        manageModel.setHelpTag(HelpTag.assign_network);
        manageModel.setHashName("assign_network"); //$NON-NLS-1$
    }

    private ClusterNetworkManageModel createManageList() {
        List<ClusterNetworkModel> networkManageModelList = new ArrayList<ClusterNetworkModel>();
        Iterable<PairQueryable<VDSGroup, NetworkCluster>> items = getItems();

        for (PairQueryable<VDSGroup, NetworkCluster> item : items) {
            Network network = (Network) Cloner.clone(getEntity());
            if (item.getSecond() != null) {
                network.setCluster((NetworkCluster) Cloner.clone(item.getSecond()));
            }
            ClusterNetworkModel networkManageModel = new ClusterNetworkModel(network) {
                @Override
                public String getDisplayedName() {
                    return getCluster().getName();
                }
            };
            networkManageModel.setCluster((VDSGroup) Cloner.clone(item.getFirst()));

            networkManageModelList.add(networkManageModel);
        }

        Collections.sort(networkManageModelList, manageModelComparator);

        ClusterNetworkManageModel listModel = new ClusterNetworkManageModel(this) {
            @Override
            public boolean isMultiCluster() {
                return true;
            }
        };
        listModel.setItems(networkManageModelList);

        return listModel;
    }

    @Override
    protected void onEntityChanged() {
        super.onEntityChanged();
        getSearchCommand().execute();
    }

    @Override
    public void search() {
        if (getEntity() != null) {
            super.search();
        }
    }

    @Override
    protected void syncSearch() {
        if (getEntity() == null) {
            return;
        }

        AsyncQuery asyncQuery = new AsyncQuery();
        asyncQuery.setModel(this);
        asyncQuery.asyncCallback = new INewAsyncCallback() {
            @Override
            public void onSuccess(Object model, Object ReturnValue) {
                setItems((Collection<PairQueryable<VDSGroup, NetworkCluster>>) ((VdcQueryReturnValue) ReturnValue).getReturnValue());
            }
        };

        IdQueryParameters params = new IdQueryParameters(getEntity().getId());
        params.setRefresh(getIsQueryFirstTime());
        Frontend.getInstance().runQuery(VdcQueryType.GetVdsGroupsAndNetworksByNetworkId, params, asyncQuery);
    }

    @Override
    protected void entityPropertyChanged(Object sender, PropertyChangedEventArgs e) {
        super.entityPropertyChanged(sender, e);

        if (e.propertyName.equals("name")) { //$NON-NLS-1$
            getSearchCommand().execute();
        }
    }

    @Override
    public void executeCommand(UICommand command) {
        super.executeCommand(command);

        if (command == getManageCommand()) {
            manage();
        }
    }

    public UICommand getManageCommand() {
        return manageCommand;
    }

    private void setManageCommand(UICommand value) {
        manageCommand = value;
    }

    @Override
    protected String getListName() {
        return "NetworkClusterListModel"; //$NON-NLS-1$
    }
}


text:
package com.bq.corbel.resources.rem.dao;

import java.util.Date;
import java.util.function.Function;

import com.bq.corbel.lib.queries.DateQueryLiteral;
import com.bq.corbel.lib.queries.LongQueryLiteral;
import com.bq.corbel.lib.queries.QueryNodeImpl;
import com.bq.corbel.lib.queries.request.QueryLiteral;
import com.bq.corbel.lib.queries.request.QueryNode;
import com.bq.corbel.lib.queries.request.QueryOperator;

/**
 * @author Rubén Carrasco
 *
 */
public class DateQueryNodeTransformer implements Function<QueryNode, QueryNode> {

    private enum VALID_OPERATORS { $EQ, $GT, $GTE, $LT, $LTE, $NE }

    @Override
    public QueryNode apply(QueryNode t) {
        return new QueryNodeImpl(t.getOperator(), t.getField(), transformDateValue(t.getField(), t.getOperator(), t.getValue()));
    }

    private QueryLiteral<?> transformDateValue(String field, QueryOperator operator, QueryLiteral<?> value) {
        if (field.equals(ReservedFields._UPDATED_AT) || field.equals(ReservedFields._CREATED_AT)) {
            if (VALID_OPERATORS.valueOf(operator.toString()) != null) {
                try {
                    return new DateQueryLiteral(new Date(((LongQueryLiteral) value).getLiteral()));
                } catch (ClassCastException ignored) {}
            }
        }
        return value;
    }
}


text:
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var plugin_1 = require('./plugin');
/**
 * @name FileChooser
 * @description
 *
 * Opens the file picker on Android for the user to select a file, returns a file URI.
 *
 * @usage
 * ```
 * import {FileChooser} from 'ionic-native';
 *
 * FileChooser.open()
 *   .then(uri => console.log(uri);
 *   .catch(e => console.log(e);
 *
 * ```
 */
var FileChooser = (function () {
    function FileChooser() {
    }
    /**
     * Open a file
     */
    FileChooser.open = function () { return; };
    __decorate([
        plugin_1.Cordova()
    ], FileChooser, "open", null);
    FileChooser = __decorate([
        plugin_1.Plugin({
            plugin: 'http://github.com/don/cordova-filechooser.git',
            pluginRef: 'fileChooser',
            repo: 'https://github.com/don/cordova-filechooser',
            platforms: ['Android']
        })
    ], FileChooser);
    return FileChooser;
}());
exports.FileChooser = FileChooser;
//# sourceMappingURL=file-chooser.js.map


text:
from google.protobuf import descriptor
from google.protobuf import message
from google.protobuf import reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)

DESCRIPTOR = descriptor.FileDescriptor(
  name='TranslationRequestMessage.proto',
  package='serverland',
  serialized_pb='\n\x1fTranslationRequestMessage.proto\x12\nserverland\"\x80\x02\n\x19TranslationRequestMessage\x12\x12\n\nrequest_id\x18\x01 \x02(\t\x12\x17\n\x0fsource_language\x18\x02 \x02(\t\x12\x17\n\x0ftarget_language\x18\x03 \x02(\t\x12\x13\n\x0bsource_text\x18\x04 \x02(\t\x12\x13\n\x0btarget_text\x18\x05 \x01(\t\x12G\n\x0bpacket_data\x18\x06 \x03(\x0b\x32\x32.serverland.TranslationRequestMessage.KeyValuePair\x1a*\n\x0cKeyValuePair\x12\x0b\n\x03key\x18\x01 \x02(\t\x12\r\n\x05value\x18\x02 \x02(\t\"\x94\x01\n\x18TranslationRequestObject\x12\x11\n\tshortname\x18\x01 \x02(\t\x12\x12\n\nrequest_id\x18\x02 \x02(\t\x12\x0e\n\x06worker\x18\x03 \x02(\t\x12\r\n\x05owner\x18\x04 \x02(\t\x12\x0f\n\x07\x63reated\x18\x05 \x02(\t\x12\r\n\x05ready\x18\x06 \x02(\x08\x12\x12\n\nserialized\x18\x07 \x02(\t\"P\n\x16TranslationRequestList\x12\x36\n\x08requests\x18\x01 \x03(\x0b\x32$.serverland.TranslationRequestObject')

_TRANSLATIONREQUESTMESSAGE_KEYVALUEPAIR = descriptor.Descriptor(
  name='KeyValuePair',
  full_name='serverland.TranslationRequestMessage.KeyValuePair',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    descriptor.FieldDescriptor(
      name='key', full_name='serverland.TranslationRequestMessage.KeyValuePair.key', index=0,
      number=1, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='value', full_name='serverland.TranslationRequestMessage.KeyValuePair.value', index=1,
      number=2, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  extension_ranges=[],
  serialized_start=262,
  serialized_end=304,
)

_TRANSLATIONREQUESTMESSAGE = descriptor.Descriptor(
  name='TranslationRequestMessage',
  full_name='serverland.TranslationRequestMessage',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    descriptor.FieldDescriptor(
      name='request_id', full_name='serverland.TranslationRequestMessage.request_id', index=0,
      number=1, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='source_language', full_name='serverland.TranslationRequestMessage.source_language', index=1,
      number=2, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='target_language', full_name='serverland.TranslationRequestMessage.target_language', index=2,
      number=3, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='source_text', full_name='serverland.TranslationRequestMessage.source_text', index=3,
      number=4, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='target_text', full_name='serverland.TranslationRequestMessage.target_text', index=4,
      number=5, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='packet_data', full_name='serverland.TranslationRequestMessage.packet_data', index=5,
      number=6, type=11, cpp_type=10, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[_TRANSLATIONREQUESTMESSAGE_KEYVALUEPAIR, ],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  extension_ranges=[],
  serialized_start=48,
  serialized_end=304,
)

_TRANSLATIONREQUESTOBJECT = descriptor.Descriptor(
  name='TranslationRequestObject',
  full_name='serverland.TranslationRequestObject',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    descriptor.FieldDescriptor(
      name='shortname', full_name='serverland.TranslationRequestObject.shortname', index=0,
      number=1, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='request_id', full_name='serverland.TranslationRequestObject.request_id', index=1,
      number=2, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='worker', full_name='serverland.TranslationRequestObject.worker', index=2,
      number=3, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='owner', full_name='serverland.TranslationRequestObject.owner', index=3,
      number=4, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='created', full_name='serverland.TranslationRequestObject.created', index=4,
      number=5, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='ready', full_name='serverland.TranslationRequestObject.ready', index=5,
      number=6, type=8, cpp_type=7, label=2,
      has_default_value=False, default_value=False,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='serialized', full_name='serverland.TranslationRequestObject.serialized', index=6,
      number=7, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  extension_ranges=[],
  serialized_start=307,
  serialized_end=455,
)

_TRANSLATIONREQUESTLIST = descriptor.Descriptor(
  name='TranslationRequestList',
  full_name='serverland.TranslationRequestList',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    descriptor.FieldDescriptor(
      name='requests', full_name='serverland.TranslationRequestList.requests', index=0,
      number=1, type=11, cpp_type=10, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  extension_ranges=[],
  serialized_start=457,
  serialized_end=537,
)

_TRANSLATIONREQUESTMESSAGE_KEYVALUEPAIR.containing_type = _TRANSLATIONREQUESTMESSAGE;
_TRANSLATIONREQUESTMESSAGE.fields_by_name['packet_data'].message_type = _TRANSLATIONREQUESTMESSAGE_KEYVALUEPAIR
_TRANSLATIONREQUESTLIST.fields_by_name['requests'].message_type = _TRANSLATIONREQUESTOBJECT

class TranslationRequestMessage(message.Message):
  __metaclass__ = reflection.GeneratedProtocolMessageType

  class KeyValuePair(message.Message):
    __metaclass__ = reflection.GeneratedProtocolMessageType
    DESCRIPTOR = _TRANSLATIONREQUESTMESSAGE_KEYVALUEPAIR

    # @@protoc_insertion_point(class_scope:serverland.TranslationRequestMessage.KeyValuePair)
  DESCRIPTOR = _TRANSLATIONREQUESTMESSAGE

  # @@protoc_insertion_point(class_scope:serverland.TranslationRequestMessage)

class TranslationRequestObject(message.Message):
  __metaclass__ = reflection.GeneratedProtocolMessageType
  DESCRIPTOR = _TRANSLATIONREQUESTOBJECT

  # @@protoc_insertion_point(class_scope:serverland.TranslationRequestObject)

class TranslationRequestList(message.Message):
  __metaclass__ = reflection.GeneratedProtocolMessageType
  DESCRIPTOR = _TRANSLATIONREQUESTLIST

  # @@protoc_insertion_point(class_scope:serverland.TranslationRequestList)

# @@protoc_insertion_point(module_scope)


text:
Nexmo Client Library for Python
===============================

|PyPI version| |Build Status|

This is the Python client library for Nexmo's API. To use it you'll need
a Nexmo account. Sign up `for free at
nexmo.com <https://dashboard.nexmo.com/sign-up?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__.

-  `Installation <#installation>`__
-  `Usage <#usage>`__
-  `SMS API <#sms-api>`__
-  `Voice API <#voice-api>`__
-  `Verify API <#verify-api>`__
-  `Application API <#application-api>`__
-  `Coverage <#api-coverage>`__
-  `License <#license>`__

Installation
------------

To install the Python client library using pip:

::

    pip install nexmo

Alternatively, you can clone the repository:

::

    git clone git@github.com:Nexmo/nexmo-python.git

Usage
-----

Begin by importing the nexmo module:

.. code:: python

    import nexmo

Then construct a client object with your key and secret:

.. code:: python

    client = nexmo.Client(key=api_key, secret=api_secret)

For production, you can specify the ``NEXMO_API_KEY`` and
``NEXMO_API_SECRET`` environment variables instead of specifying the key
and secret explicitly.

For newer endpoints that support JWT authentication such as the Voice
API, you can also specify the ``application_id`` and ``private_key``
arguments:

.. code:: python

    client = nexmo.Client(application_id=application_id, private_key=private_key)

In order to check signatures for incoming webhook requests, you'll also
need to specify the ``signature_secret`` argument (or the
``NEXMO_SIGNATURE_SECRET`` environment variable).

If the argument ``signature_method`` is omitted, it will default to the md5 hash
algorithm. Otherwise, it will use the selected method as in md5, sha1, sha256 or
sha512 with hmac.

SMS API
-------

Send a text message
~~~~~~~~~~~~~~~~~~~

.. code:: python

    response = client.send_message({'from': 'Python', 'to': 'YOUR-NUMBER', 'text': 'Hello world'})

    response = response['messages'][0]

    if response['status'] == '0':
      print('Sent message', response['message-id'])

      print('Remaining balance is', response['remaining-balance'])
    else:
      print('Error:', response['error-text'])

Docs:
`https://docs.nexmo.com/messaging/sms-api/api-reference#request <https://docs.nexmo.com/messaging/sms-api/api-reference#request?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

Voice API
---------

Make a call
~~~~~~~~~~~

.. code:: python

    response = client.create_call({
      'to': [{'type': 'phone', 'number': '14843331234'}],
      'from': {'type': 'phone', 'number': '14843335555'},
      'answer_url': ['https://example.com/answer']
    })

Docs:
`https://docs.nexmo.com/voice/voice-api/api-reference#call\_create <https://docs.nexmo.com/voice/voice-api/api-reference#call_create?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

Retrieve a list of calls
~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    response = client.get_calls()

Docs:
`https://docs.nexmo.com/voice/voice-api/api-reference#call\_retrieve <https://docs.nexmo.com/voice/voice-api/api-reference#call_retrieve?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

Retrieve a single call
~~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    response = client.get_call(uuid)

Docs:
`https://docs.nexmo.com/voice/voice-api/api-reference#call\_retrieve\_single <https://docs.nexmo.com/voice/voice-api/api-reference#call_retrieve_single?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

Update a call
~~~~~~~~~~~~~

.. code:: python

    response = client.update_call(uuid, action='hangup')

Docs:
`https://docs.nexmo.com/voice/voice-api/api-reference#call\_modify\_single <https://docs.nexmo.com/voice/voice-api/api-reference#call_modify_single?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

Verify API
----------

Start a verification
~~~~~~~~~~~~~~~~~~~~

.. code:: python

    response = client.start_verification(number='441632960960', brand='MyApp')

    if response['status'] == '0':
      print 'Started verification request_id={request_id}'.format(request_id=response['request_id'])
    else:
      print('Error:', response['error_text'])

Docs:
`https://docs.nexmo.com/verify/api-reference/api-reference#vrequest <https://docs.nexmo.com/verify/api-reference/api-reference#vrequest?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

The response contains a verification request id which you will need to
store temporarily (in the session, database, url etc).

Check a verification
~~~~~~~~~~~~~~~~~~~~

.. code:: python

    response = client.check_verification('00e6c3377e5348cdaf567e1417c707a5', code='1234')

    if response['status'] == '0':
      print 'Verification complete, event_id={event_id}'.format(event_id=response['event_id'])
    else:
      print('Error:', response['error_text'])

Docs:
`https://docs.nexmo.com/verify/api-reference/api-reference#check <https://docs.nexmo.com/verify/api-reference/api-reference#check?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

The verification request id comes from the call to the
start\_verification method. The PIN code is entered into your
application by the user.

Cancel a verification
~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    client.cancel_verification('00e6c3377e5348cdaf567e1417c707a5')

Docs:
`https://docs.nexmo.com/verify/api-reference/api-reference#control <https://docs.nexmo.com/verify/api-reference/api-reference#control?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

Trigger next verification step
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    client.trigger_next_verification_event('00e6c3377e5348cdaf567e1417c707a5')

Docs:
`https://docs.nexmo.com/verify/api-reference/api-reference#control <https://docs.nexmo.com/verify/api-reference/api-reference#control?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

Application API
---------------

Create an application
~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    response = client.create_application(name='Example App', type='voice', answer_url=answer_url)

Docs:
`https://docs.nexmo.com/tools/application-api/api-reference#create <https://docs.nexmo.com/tools/application-api/api-reference#create?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

Retrieve a list of applications
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    response = client.get_applications()

Docs:
`https://docs.nexmo.com/tools/application-api/api-reference#list <https://docs.nexmo.com/tools/application-api/api-reference#list?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

Retrieve a single application
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    response = client.get_application(uuid)

Docs:
`https://developer.nexmo.com/api/application#retrieve-an-application <https://developer.nexmo.com/api/application#retrieve-an-application>`__

Update an application
~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    response = client.update_application(uuid, answer_method='POST')

Docs:
`https://docs.nexmo.com/tools/application-api/api-reference#update <https://docs.nexmo.com/tools/application-api/api-reference#update?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

Delete an application
~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    response = client.delete_application(uuid)

Docs:
`https://docs.nexmo.com/tools/application-api/api-reference#delete <https://docs.nexmo.com/tools/application-api/api-reference#delete?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

Validate webhook signatures
---------------------------

.. code:: python

    client = nexmo.Client(signature_secret='secret')

    if client.check_signature(request.query):
      # valid signature
    else:
      # invalid signature

    or by using signature method via POST:

    client = nexmo.Client(signature_secret='secret', signature_method='sha256')

    if client.check_signature(request.body.decode()):
      # valid signature
    else:
      # invalid signature

Docs:
`https://docs.nexmo.com/messaging/signing-messages <https://docs.nexmo.com/messaging/signing-messages?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library>`__

Note: you'll need to contact support@nexmo.com to enable message signing
on your account before you can validate webhook signatures.

JWT parameters
--------------

By default, the library generates short-lived tokens for JWT
authentication.

Use the auth method to specify parameters for a longer life token or to
specify a different token identifier:

.. code:: python

    client.auth(nbf=nbf, exp=exp, jti=jti)

API Coverage
------------

-  Account

   -  [X] Balance
   -  [X] Pricing
   -  [X] Settings
   -  [X] Top Up
   -  [X] Numbers

      -  [X] Search
      -  [X] Buy
      -  [X] Cancel
      -  [X] Update

-  Number Insight

   -  [X] Basic
   -  [X] Standard
   -  [X] Advanced
   -  [ ] Webhook Notification

-  Verify

   -  [X] Verify
   -  [X] Check
   -  [X] Search
   -  [X] Control

-  Messaging

   -  [X] Send
   -  [ ] Delivery Receipt
   -  [ ] Inbound Messages
   -  [X] Search

      -  [X] Message
      -  [X] Messages
      -  [X] Rejections

   -  [X] US Short Codes

      -  [X] Two-Factor Authentication
      -  [X] Event Based Alerts

         -  [X] Sending Alerts
         -  [X] Campaign Subscription Management

-  Voice

   -  [X] Outbound Calls
   -  [ ] Inbound Call
   -  [X] Text-To-Speech Call
   -  [X] Text-To-Speech Prompt

License
-------

This library is released under the `MIT License <LICENSE.txt>`__

.. |PyPI version| image:: https://badge.fury.io/py/nexmo.svg
   :target: https://badge.fury.io/py/nexmo
.. |Build Status| image:: https://api.travis-ci.org/Nexmo/nexmo-python.svg?branch=master
   :target: https://travis-ci.org/Nexmo/nexmo-python


text:
<?php
namespace Pimenta\LaravelDomain\Events;

use Laracasts\Commander\Events\EventDispatcher as LaracastsEventDispatcher;

class EventDispatcher implements DispatcherInterface
{

    /**
     * @var LaracastsEventDispatcher
     */
    private $dispatcher;

    public function __construct(LaracastsEventDispatcher $dispatcher)
    {
        $this->dispatcher = $dispatcher;
    }

    public function dispatch($events)
    {
        $this->dispatcher->dispatch($events);
    }

}


text:
@implementation LoadDatabase : NSObject

NSString *databasePath;
NSString *masterFile;

- (void)load:(DatabaseConfig*) databaseConfig
{
    [self computePaths:databaseConfig];

    if([self alreadyExists:databaseConfig] && ![databaseConfig forceReload]){
        NSLog(@"Database already exists");
    } else {
        if([databaseConfig forceReload]) NSLog(@"Overriding existing database");
        [self copyDatabase:databaseConfig];
    }
}

- (void)computePaths:(DatabaseConfig*) databaseConfig
{
    NSArray *libraryPaths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
    NSString *libraryDir = [libraryPaths objectAtIndex:0];

    NSString *basePath = nil;
    float iOSVersion = [UIDevice currentDevice].systemVersion.floatValue;
    NSLog(@"iOS version: %.1f", iOSVersion);
    if(iOSVersion >= 6.0f) {
        basePath = [libraryDir stringByAppendingPathComponent:@"WebKit/LocalStorage/"];
    } else if(iOSVersion >= 5.1f) {
        //In iOS 5.1, databases are stored in "Caches" directory (so data can be lost if caches are cleared by the OS). But Cordova (since 1.6.0 version) does an automatic backup in the "Documents" directory. The backup is automatically restored if caches are cleared. The downside is that the database is in 3 versions (in the downloaded App, in the Caches directory and in the Documents directory).
        basePath = [libraryDir stringByAppendingPathComponent:@"Caches/"];
    } else {
        basePath = [libraryDir stringByAppendingPathComponent:@"WebKit/Databases/"];
    }
    NSLog(@"Path to database: %@", basePath);

    databasePath = [basePath stringByAppendingPathComponent:@"file__0/"];
    masterFile = [basePath stringByAppendingPathComponent:[databaseConfig databaseDBName]];
}

- (BOOL)alreadyExists:(DatabaseConfig*) databaseConfig
{
    return [[NSFileManager defaultManager] fileExistsAtPath:[databasePath stringByAppendingPathComponent:[databaseConfig databaseName]]];
}

- (void)copyDatabase:(DatabaseConfig*) databaseConfig
{
    NSLog(@"Copying database");
    NSFileManager *fileManager = [NSFileManager defaultManager];

    NSString *databasePathFromApp = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:[databaseConfig databaseZippedName]];
    NSString *masterPathFromApp = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:[databaseConfig databaseDBName]];

    [fileManager createDirectoryAtPath:databasePath withIntermediateDirectories:YES attributes:nil error:NULL];

    ZipArchive* za = [[ZipArchive alloc] init];
    if ([za UnzipOpenFile: databasePathFromApp]) {
        BOOL ret = [za UnzipFileTo: databasePath overWrite: YES];
        if (NO == ret){} [za UnzipCloseFile];
    }

    [fileManager copyItemAtPath:masterPathFromApp toPath:masterFile error:nil];
}

@end


text:
<?php
/**
 * Admin class
 *
 * @author Yithemes
 * @package YITH WooCommerce Social Login
 * @version 1.0.0
 */

if ( ! defined( 'YITH_YWSL_INIT' ) ) {
    exit;
} // Exit if accessed directly

if( ! class_exists( 'YITH_WC_Social_Login_Admin' ) ){
    /**
     * YITH WooCommerce Social Login Admin class
     *
     * @since 1.0.0
     */
    class YITH_WC_Social_Login_Admin {
        /**
         * Single instance of the class
         *
         * @var \YITH_WC_Social_Login_Admin
         * @since 1.0.0
         */
        protected static $instance;

        /**
         * @var $_panel Panel Object
         */
        protected $_panel;

        /**
         * @var $_premium string Premium tab template file name
         */
        protected $_premium = 'premium.php';

        /**
         * @var string Premium version landing link
         */
        protected $_premium_landing = 'http://yithemes.com/themes/plugins/yith-woocommerce-social-login/';

        /**
         * @var string Panel page
         */
        protected $_panel_page = 'yith_woocommerce_social_login';

        /**
         * @var string Doc Url
         */
        public $doc_url = 'http://yithemes.com/docs-plugins/yith-woocommerce-social-login/';

        /**
         * Returns single instance of the class
         *
         * @return \YITH_WC_Social_Login_Admin
         * @since 1.0.0
         */
        public static function get_instance() {
            if ( is_null( self::$instance ) ) {
                self::$instance = new self;
            }

            return self::$instance;
        }

        /**
         * Constructor.
         *
         * @return \YITH_WC_Social_Login_Admin
         * @since 1.0.0
         */
        public function __construct() {

            $this->create_menu_items();

            //Add action links
            add_filter( 'plugin_action_links_' . plugin_basename( YITH_YWSL_DIR . '/' . basename( YITH_YWSL_FILE ) ), array( $this, 'action_links' ) );
            add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 4 );

            //custom styles and javascripts
            add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );

        }

        /**
         * Enqueue styles and scripts
         *
         * @access public
         * @return void
         * @since 1.0.0
         */
        public function enqueue_styles_scripts() {

            $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
            wp_enqueue_script( 'yith_ywsl_admin', YITH_YWSL_ASSETS_URL . '/js/backend' . $suffix . '.js', array( 'jquery' ), YITH_YWSL_VERSION, true );
            wp_enqueue_style( 'yith_ywsl_backend', YITH_YWSL_ASSETS_URL . '/css/backend.css' );

        }

        /**
         * Create Menu Items
         *
         * Print admin menu items
         *
         * @since  1.0
         * @author Emanuela Castorina
         */

        private function create_menu_items() {
            // Add a panel under YITH Plugins tab
            add_action( 'admin_menu', array( $this, 'register_panel' ), 5 );
            add_action( 'ywsl_premium_tab', array( $this, 'premium_tab' ) );
        }

        /**
         * Add a panel under YITH Plugins tab
         *
         * @return   void
         * @since    1.0
         * @author   Andrea Grillo <andrea.grillo@yithemes.com>
         * @use      /Yit_Plugin_Panel class
         * @see      plugin-fw/lib/yit-plugin-panel.php
         */

        public function register_panel() {

            if ( !empty( $this->_panel ) ) {
                return;
            }

            $admin_tabs = array(
                'settings' => __( 'Settings', 'yith-woocommerce-social-login' )
            );

            if ( defined( 'YITH_YWSL_FREE_INIT' ) ) {
                $admin_tabs['premium'] = __( 'Premium Version', 'yith-woocommerce-social-login' );
            }

            $args = array(
                'create_menu_page' => true,
                'parent_slug'      => '',
                'page_title'       => __( 'Social Login', 'yith-woocommerce-social-login' ),
                'menu_title'       => __( 'Social Login', 'yith-woocommerce-social-login' ),
                'capability'       => 'manage_options',
                'parent'           => '',
                'parent_page'      => 'yit_plugin_panel',
                'page'             => $this->_panel_page,
                'admin-tabs'       => $admin_tabs,
                'options-path'     => YITH_YWSL_DIR . '/plugin-options'
            );

            /* === Fixed: not updated theme  === */
            if ( !class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
                require_once( YITH_YWSL_DIR.'/plugin-fw/lib/yit-plugin-panel-wc.php' );
            }

            $this->_panel = new YIT_Plugin_Panel_WooCommerce( $args );
        }

        /**
         * Premium Tab Template
         *
         * Load the premium tab template on admin page
         *
         * @return   void
         * @since    1.0
         * @author   Andrea Grillo <andrea.grillo@yithemes.com>
         */

        public function premium_tab() {
            $premium_tab_template = YITH_YWSL_TEMPLATE_PATH . '/admin/' . $this->_premium;
            if ( file_exists( $premium_tab_template ) ) {
                include_once( $premium_tab_template );
            }
        }

        /**
         * Action Links
         *
         * add the action links to plugin admin page
         *
         * @param $links | links plugin array
         *
         * @return   mixed Array
         * @since    1.0
         * @author   Andrea Grillo <andrea.grillo@yithemes.com>
         * @return mixed
         * @use      plugin_action_links_{$plugin_file_name}
         */

        public function action_links( $links ) {

            $links[] = '_panel_page}" ) . '">' . __( 'Settings', 'yith-woocommerce-social-login' ) . '';
            if ( defined( 'YITH_YWSL_FREE_INIT' ) ) {
                $links[] = 'get_premium_landing_uri() . '" target="_blank">' . __( 'Premium Version', 'yith-woocommerce-social-login' ) . '';
            }

            return $links;
        }

        /**
         * plugin_row_meta
         *
         * add the action links to plugin admin page
         *
         * @param $plugin_meta
         * @param $plugin_file
         * @param $plugin_data
         * @param $status
         *
         * @return   Array
         * @since    1.0
         * @author   Andrea Grillo <andrea.grillo@yithemes.com>
         * @use      plugin_row_meta
         */

        public function plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) {

            if ( defined( 'YITH_YWSL_INIT' ) && YITH_YWSL_INIT == $plugin_file ) {
                $plugin_meta[] = 'doc_url . '" target="_blank">' . __( 'Plugin Documentation', 'yith-woocommerce-social-login' ) . '';
            }
            return $plugin_meta;
        }

        /**
         * Get the premium landing uri
         *
         * @since   1.0.0
         * @author  Andrea Grillo <andrea.grillo@yithemes.com>
         * @return  string The premium landing link
         */
        public function get_premium_landing_uri(){
            return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing;
        }

    }

    /**
     * Unique access to instance of YITH_WC_Social_Login_Admin class
     *
     * @return \YITH_WC_Social_Login_Admin
     */
    function YITH_WC_Social_Login_Admin() {
        return YITH_WC_Social_Login_Admin::get_instance();
    }

}


text:
package org.mifos.domain.builders;

import java.util.Date;

import org.joda.time.DateTime;
import org.mifos.accounts.financial.business.GLCodeEntity;
import org.mifos.accounts.productdefinition.business.PrdOfferingMeetingEntity;
import org.mifos.accounts.productdefinition.business.PrdStatusEntity;
import org.mifos.accounts.productdefinition.business.ProductCategoryBO;
import org.mifos.accounts.productdefinition.business.SavingsOfferingBO;
import org.mifos.accounts.productdefinition.util.helpers.ApplicableTo;
import org.mifos.accounts.productdefinition.util.helpers.InterestCalcType;
import org.mifos.accounts.productdefinition.util.helpers.PrdStatus;
import org.mifos.accounts.productdefinition.util.helpers.RecommendedAmountUnit;
import org.mifos.accounts.productdefinition.util.helpers.SavingsType;
import org.mifos.application.meeting.business.MeetingBO;
import org.mifos.application.meeting.util.helpers.MeetingType;
import org.mifos.framework.TestUtils;
import org.mifos.framework.hibernate.helper.StaticHibernateUtil;
import org.mifos.framework.util.helpers.Money;

/**
 *
 */
public class SavingsProductBuilder {

    private MeetingBO scheduleForInterestCalculationMeeting = new MeetingBuilder()
            .savingsInterestCalulationSchedule()
            .monthly().every(1).build();
    private MeetingBO scheduleForInterestPostingMeeting = new MeetingBuilder().savingsInterestPostingSchedule()
            .monthly().every(1).build();
    private Money maxAmountOfWithdrawal = new Money(Money.getDefaultCurrency(), "50.0");
    private Double interestRate = Double.valueOf("2.0");
    private Money minAmntForInt = new Money(Money.getDefaultCurrency(), "500.0");
    private SavingsType savingsType = SavingsType.VOLUNTARY;
    private InterestCalcType interestCalcType = InterestCalcType.MINIMUM_BALANCE;

    // PRD_OFFERING FIELDS
    private String globalProductNumber = "XXXXX-1111";
    private final Date startDate = new DateTime().minusDays(14).toDate();
    private String name = "testProduct";
    private String shortName = "VS2";
    private final Date createdDate = new DateTime().minusDays(14).toDate();
    private final Short createdByUserId = TestUtils.makeUserWithLocales().getId();
    private final GLCodeEntity depositGLCode = new GLCodeEntity(Short.valueOf("1"), "10000");
    private final GLCodeEntity interesetGLCode = new GLCodeEntity(Short.valueOf("2"), "11000");
    private ApplicableTo applicableToCustomer = ApplicableTo.CENTERS;
    private ProductCategoryBO category = new ProductCategoryBO(Short.valueOf("1"), "savtest");
    private final PrdStatus productStatus = PrdStatus.SAVINGS_ACTIVE;
    private PrdStatusEntity productStatusEntity;
    private RecommendedAmountUnit mandatoryGroupTrackingType = null;
    private Money mandatoryOrRecommendedAmount = TestUtils.createMoney("25.0");
    private Money minAmountForInterestCalculation = TestUtils.createMoney("1000");

    public SavingsOfferingBO buildForUnitTests() {
        return build();
    }

    public SavingsOfferingBO buildForIntegrationTests() {
        category = (ProductCategoryBO) StaticHibernateUtil.getSessionTL().get(ProductCategoryBO.class,
                Short.valueOf("2"));

        productStatusEntity = (PrdStatusEntity) StaticHibernateUtil.getSessionTL().get(PrdStatusEntity.class,
                this.productStatus.getValue());

        return build();
    }

    private SavingsOfferingBO build() {
        final SavingsOfferingBO savingsProduct = new SavingsOfferingBO(savingsType, name, shortName,
                globalProductNumber, startDate, applicableToCustomer, category, productStatusEntity, interestCalcType,
                interestRate, maxAmountOfWithdrawal, depositGLCode, interesetGLCode, createdDate, createdByUserId);
        savingsProduct.setMinAmntForInt(minAmountForInterestCalculation);

        final PrdOfferingMeetingEntity scheduleForInstcalc = new PrdOfferingMeetingEntity(
                scheduleForInterestCalculationMeeting, savingsProduct,
                MeetingType.SAVINGS_INTEREST_CALCULATION_TIME_PERIOD);

        final PrdOfferingMeetingEntity scheduleForInterestPosting = new PrdOfferingMeetingEntity(
                scheduleForInterestPostingMeeting, savingsProduct, MeetingType.SAVINGS_INTEREST_POSTING);

        savingsProduct.setTimePerForInstcalc(scheduleForInstcalc);
        savingsProduct.setTimePerForInstcalc(scheduleForInterestPosting);
        savingsProduct.setMinAmntForInt(minAmntForInt);

        if (this.mandatoryGroupTrackingType != null) {
            savingsProduct.setRecommendedAmntUnit(this.mandatoryGroupTrackingType);
        }
        savingsProduct.setRecommendedAmount(mandatoryOrRecommendedAmount);
        return savingsProduct;
    }

    public SavingsProductBuilder withName(final String withName) {
        this.name = withName;
        this.globalProductNumber = "XXX-" + withName;
        return this;
    }

    public SavingsProductBuilder withShortName(final String withShortName) {
        this.shortName = withShortName;
        return this;
    }

    public SavingsProductBuilder appliesToCentersOnly() {
        this.applicableToCustomer = ApplicableTo.CENTERS;
        return this;
    }

    public SavingsProductBuilder appliesToGroupsOnly() {
        this.applicableToCustomer = ApplicableTo.GROUPS;
        return this;
    }

    public SavingsProductBuilder appliesToClientsOnly() {
        this.applicableToCustomer = ApplicableTo.CLIENTS;
        return this;
    }

    public SavingsProductBuilder mandatory() {
        this.savingsType = SavingsType.MANDATORY;
        return this;
    }

    public SavingsProductBuilder voluntary() {
        this.savingsType = SavingsType.VOLUNTARY;
        return this;
    }

    public SavingsProductBuilder withMaxWithdrawalAmount(final Money withMaxWithdrawal) {
        this.maxAmountOfWithdrawal = withMaxWithdrawal;
        return this;
    }

    public SavingsProductBuilder trackedOnCompleteGroup() {
        this.mandatoryGroupTrackingType = RecommendedAmountUnit.COMPLETE_GROUP;
        return this;
    }

    public SavingsProductBuilder trackedPerIndividual() {
        this.mandatoryGroupTrackingType = RecommendedAmountUnit.PER_INDIVIDUAL;
        return this;
    }

    public SavingsProductBuilder withMandatoryAmount(String mandatoryAmount) {
        this.mandatoryOrRecommendedAmount = TestUtils.createMoney(mandatoryAmount);
        return this;
    }

    public SavingsProductBuilder withMinAmountRequiredForInterestCalculation(String minAmountRequired) {
        this.minAmountForInterestCalculation = TestUtils.createMoney(minAmountRequired);
        return this;
    }

    public SavingsProductBuilder withInterestCalculationSchedule(MeetingBO interestCalculationFrequency) {
        this.scheduleForInterestCalculationMeeting = interestCalculationFrequency;
        return this;
    }

    public SavingsProductBuilder withInterestPostingSchedule(MeetingBO interestPostingMeeting) {
        this.scheduleForInterestPostingMeeting = interestPostingMeeting;
        return this;
    }

    public SavingsProductBuilder withInterestRate(Double withInterestRate) {
        this.interestRate = withInterestRate;
        return this;
    }

    public SavingsProductBuilder averageBalance() {
        this.interestCalcType = InterestCalcType.AVERAGE_BALANCE;
        return this;
    }

    public SavingsProductBuilder minimumBalance() {
        this.interestCalcType = InterestCalcType.MINIMUM_BALANCE;
        return this;
    }
}


text:
namespace luabind
{

    namespace
    {
        pcall_callback_fun pcall_callback = 0;
#ifdef LUABIND_NO_EXCEPTIONS
        error_callback_fun error_callback = 0;
        cast_failed_callback_fun cast_failed_callback = 0;
#endif
    }

#ifdef LUABIND_NO_EXCEPTIONS

    void set_error_callback(error_callback_fun e)
    {
        error_callback = e;
    }

    void set_cast_failed_callback(cast_failed_callback_fun c)
    {
        cast_failed_callback = c;
    }

    error_callback_fun get_error_callback()
    {
        return error_callback;
    }

    cast_failed_callback_fun get_cast_failed_callback()
    {
        return cast_failed_callback;
    }

#endif

    void set_pcall_callback(pcall_callback_fun e)
    {
        pcall_callback = e;
    }

    pcall_callback_fun get_pcall_callback()
    {
        return pcall_callback;
    }

}


text:
namespace project.Entities
{
    public class OrderProduct
    {
        public int orderCode { set; get; }
        public int productId { set; get; }
        public string productCode { set; get; }
        public double netPrice { set; get; }
        public double price { set; get; }
        public int number { set; get; }
    }
}


text:
import {NavController, ToastController} from "ionic-angular";
import {Component} from "@angular/core";
import {IUser} from "../../../model/user";
import {UserService} from "../../../services/user.service";
import {LogService} from "../../../services/log.service";
import {GroupsService} from "../../../services/groups.service";
import {BasePage} from "../../base.page";
import {Group} from "../../../model/group";

@Component({
  templateUrl: 'invites.page.html',
  selector: 'invites-page'
})
export class InvitesPage extends BasePage {
  sourceUsers: IUser[];
  users: IUser[];
  searchQuery: string;

  constructor(private nav: NavController, private us: UserService, private gs: GroupsService, toastCtrl: ToastController) {
    super(toastCtrl);
    this.searchQuery = '';
    us.getInvites().subscribe(data => {
      LogService.logMessage("InvitesPage getInvites", data);
      this.sourceUsers = this.users = data;
      this.getItems();
    });

  }

  getItems() {
    let q = this.searchQuery;
    this.users = this.sourceUsers.filter((v) => {
      return (v.displayName.split(' ').join('').toLowerCase().indexOf(q.split(' ').join('').toLowerCase()) > -1);

    })
  }

  acceptInvite(user: any) {
    LogService.logMessage("acceptInvite user: ", user);
    this.us.updateUserGroup(user, UserService.getCurrentUser().memberOf, (error: any) => {
      if (error) {
        this.presentToast(error);
      } else {
        let gr = new Group(null);
        gr.$key = UserService.getCurrentUser().memberOf;
        LogService.logMessage("acceptInvite [removeInvite} ");
        this.gs.removeInvite(gr, user, () => {
          //success
          LogService.logMessage("acceptInvite success");
        });
      }
    })
  }

}


text:
from scout.utils.convert import (
    amino_acid_residue_change_3_to_1,
    convert_number,
    isfloat,
    isint,
    make_bool,
)

def test_is_float_float():
    ## GIVEN a string with a float
    a = "1.2"
    ## WHEN checking if float
    res = isfloat(a)
    ## THEN assert it is a float
    assert res is True

def test_is_float_int():
    ## GIVEN a string with a integer
    a = "4"
    ## WHEN checking if float
    res = isfloat(a)
    ## THEN assert it is a float
    assert res is True

def test_is_float_char():
    ## GIVEN a string with a non number
    a = "b"
    ## WHEN checking if float
    res = isfloat(a)
    ## THEN assert it is not a float
    assert res is False

def test_is_float_empty():
    ## GIVEN a empty string
    a = ""
    ## WHEN checking if float
    res = isfloat(a)
    ## THEN assert it is not a float
    assert res is False

def test_is_int_float():
    ## GIVEN a string with a float
    a = "1.2"
    ## WHEN checking if integer
    res = isint(a)
    ## THEN assert it is not a integer
    assert res is False

def test_is_int_int():
    ## GIVEN a string with a int
    a = "4"
    ## WHEN checking if int
    res = isint(a)
    ## THEN assert it is a int
    assert res is True

def test_is_int_char():
    ## GIVEN a string with a character
    a = "b"
    ## WHEN checking if integer
    res = isfloat(a)
    ## THEN assert it is not a integer
    assert res is False

def test_is_int_empty():
    ## GIVEN a string with a empty string
    a = ""
    ## WHEN checking if integer
    res = isint(a)
    ## THEN assert it is not a integer
    assert res is False

def test_is_int_tricky():
    ## GIVEN a string with a empty string
    a = "1.0"
    ## WHEN checking if integer
    res = isint(a)
    ## THEN assert it is not a integer
    assert res is True

def test_convert_number_float():
    ## GIVEN a string with a float
    a = "1.2"
    ## WHEN converting to number
    res = convert_number(a)
    ## THEN assert it is the float
    assert res == 1.2

def test_convert_number_int():
    ## GIVEN a string with a integer
    a = "4"
    ## WHEN converting to number
    res = convert_number(a)
    ## THEN assert it is the float
    assert res == 4

def test_convert_number_empty():
    ## GIVEN a empty string
    a = ""
    ## WHEN converting to number
    res = convert_number(a)
    ## THEN assert it is None
    assert res is None

def test_convert_number_tricky():
    ## GIVEN a empty string
    a = "1.0"
    ## WHEN converting to number
    res = convert_number(a)
    ## THEN assert it is None
    assert res is 1

def test_make_bool_one():
    ## GIVEN a string representing a boolean
    a = "1"
    ## WHEN making a boolean
    res = make_bool(a)
    ## THEN assert it is True
    assert res is True

def test_make_bool_zero():
    ## GIVEN a string representing a boolean
    a = "0"
    ## WHEN converting to a boolean
    res = make_bool(a)
    ## THEN assert it is False
    assert res is False

def test_make_bool_empty():
    ## GIVEN a empty string
    a = ""
    ## WHEN converting to a boolean
    res = make_bool(a)
    ## THEN assert it is False
    assert res is False

def test_make_bool_nonsense():
    ## GIVEN a nonsense string
    a = "nonsense asdlkfjalk"
    ## WHEN converting to a boolean
    res = make_bool(a)
    ## THEN assert it is False
    assert res is False

def test_make_bool_yes():
    ## GIVEN a empty string
    a = "yes"
    ## WHEN converting to a boolean
    res = make_bool(a)
    ## THEN assert it is True
    assert res is True

def test_make_bool_YES():
    ## GIVEN a empty string
    a = "YES"
    ## WHEN converting to a boolean
    res = make_bool(a)
    ## THEN assert it is True
    assert res is True

def test_amino_acid_residue_change_3_to_1():
    ## GIVEN a protein change on HGVS 3-letter format
    a = "p.Ser241Phe"
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is correct
    assert r == "S241F"

def test_amino_acid_residue_change_3_to_1_none():
    ## GIVEN a protein change on HGVS 3-letter format
    a = None
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is correct
    assert r is None

def test_amino_acid_residue_change_3_to_1_stop():
    ## GIVEN a protein change on HGVS 3-letter format
    a = "p.Ser241Ter"
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is correct
    assert r == "S241*"

def test_amino_acid_residue_change_3_to_1_synonymous():
    ## GIVEN a protein change on HGVS 3-letter format
    a = "p.="
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is correct
    assert r is None

def test_amino_acid_residue_change_3_to_1_fs():
    ## GIVEN a protein change on HGVS 3-letter format
    a = "p.Arg544GlufsTer3"
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is undefined
    assert r is None

def test_amino_acid_residue_change_3_to_1_fs_ext():
    ## GIVEN a protein change on HGVS 3-letter format
    a = "p.Arg544Glnext*17"
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is undefined
    assert r is None

def test_amino_acid_residue_change_3_to_1_multiple():
    ## GIVEN a protein change on HGVS 3-letter format
    a = "p.MetLys997ArgGlu"
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is undefined
    assert r is None

def test_amino_acid_residue_change_3_to_1_del():
    ## GIVEN a protein change on HGVS 3-letter format
    a = "p.Phe2_Met46del"
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is undefined
    assert r is None


text:
import hazelcast

# Create a client using the configuration below
client = hazelcast.HazelcastClient(
    # Add member's host:port to the configuration.
    # For each member on your Hazelcast cluster, you should add its host:port pair to the configuration.
    # If the port is not specified, by default 5701, 5702 and 5703 will be tried.
    cluster_members=[
        "127.0.0.1:5701",
        "127.0.0.1:5702",
    ]
)

# Disconnect the client and shutdown
client.shutdown()


text:
//=====================================================================
// 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.
//=====================================================================

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.xtuml.bp.debug.engine.ExternalEntityTest;
import org.xtuml.bp.debug.engine.VerifierMessageTestGlobals;
import org.xtuml.bp.debug.test.DateLoggingTests;
import org.xtuml.bp.debug.test.GlobalTestSetupClass;
import org.xtuml.bp.debug.test.InstanceVariableViewTests;
import org.xtuml.bp.debug.test.RealizedClassRelaunchTest;
import org.xtuml.bp.debug.test.UdtConstantTest;
import org.xtuml.bp.debug.test.VariableViewTests;
import org.xtuml.bp.debug.ui.launch.DLLRelaunchTest;
import org.xtuml.bp.debug.ui.test.execute.BlockedComponentExecutionTest;
import org.xtuml.bp.debug.ui.test.execute.RecursionExecutionTest;
import org.xtuml.bp.debug.ui.test.realizedClasses.VerifierStaticVariablesInRealizedClassesTest;
import org.xtuml.bp.debug.ui.test.sets.SetOperationsCompareTestsTestSuite;
import org.xtuml.bp.debug.ui.test.sets.SetOperationsPrecedenceTestsTestSuite;
import org.xtuml.bp.debug.ui.test.sets.SetOperationsSimpleTestsTestSuite;

import junit.framework.TestSuite;

/**
* Test all areas of the core
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
	GlobalTestSetupClass.class,
	DateLoggingTests.class,
	VerifierStaticVariablesInRealizedClassesTest.class,
	// These are disabled until 8609 is resolved
//	VerifierMessageTestGlobals.class,
//	RealizedClassRelaunchTest.class,
//	DLLRelaunchTest.class,
	BlockedComponentExecutionTest.class,
	VariableViewTests.class,
	InstanceVariableViewTests.class,
	SetOperationsCompareTestsTestSuite.class,
	SetOperationsSimpleTestsTestSuite.class,
	SetOperationsPrecedenceTestsTestSuite.class,
	UdtConstantTest.class
})
public class VerifierTestSuite2 extends TestSuite {

}


text:
import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import BuyButton from '../BuyButton';

describe('<BuyButton />', () => {
    it('should be able to be rendered with no Parameters', () => {
        expect(() => <BuyButton />).to.not.throw();
    });

    it('should not show price of contract', () => {
        const wrapper = shallow(<BuyButton />);
        expect(wrapper.find('NumberPlain')).to.have.lengthOf(0);
    });

    it('should disable the button if no ask price is provided', () => {
        const wrapper = shallow(<BuyButton />).children();
        expect(wrapper.props().disabled).to.be.true;
    });

    it('should disable the button if disabled property is set', () => {
        const wrapper = shallow(<BuyButton disabled askPrice={123} />).children();
        expect(wrapper.props().disabled).to.be.true;
    });
});


text:
{%= title %}

			{%= section_name %}

			{% for (var i=0, l= data.data.length; i < l; i++) {
				var item = data.data[i];
				if (item.label !== section_name) { %}

						{%= item.label %}

				{% }
			} %}


text:
TBD: is this page correct? Web API: Create a bookmark
=====================================================

https://<viewer>/query/**createBookmark**

POST with content-type: application/json

data-type: json

This API creates a bookmark on a view server with the given client state data.

Content Example
---------------

This creates a bookmark with overlay nodes

TBD

::

 {
    "map": "CKCC/v1",
    "layout": "mRNA",
    "email": [
        "mok66@gmail.com",
        ...
    ],
    "viewServer": 'https://tumormap.ucsc.edu',
    "neighborCount": 8,
    "nodes": {
        "mySample1": {
            "ALK": "0.897645",
            "TP53": "0.904140",
            "POGZ": "0.792754",
            ...
        },
        ...
    },
 }

    Where:

    * **email** : optional, one or more email addresses to receive the response
    * **viewServer** : optional, the URL of the server where a bookmark will be created to view the results, defaults to the primary view server of https://tumormap.ucsc.edu
    * **neighborCount** : optional, number of nearest neighbors to consider in the placement for each node, defaults to 6

    Response success
    ----------------

    This is returned as HTTP 200 with the content as a JSON string in the form::

     {
        "url": "https://tumormap.ucsc.edu/?bookmark=5563fdf09484a241d066022bf91a9e96d6ae1976c4d7502d384cc2a87001067a",
        "neighbors": {
            "mySample1": {
                "node1": 0.352,
                "node2": 0.742,
                ...
            },
            "mySample2": {
                "node1": 0.275,
                "node2": 0.965,
                ...
            },
            ...
         }
     }

    Where:

    * **url**: view the new nodes overlaying the map with:
        * the requested nodes in red with google markers
        * a newly-generated attribute of '<requested-node>: neighbors' for each requested node
    * **neighbors** : contains the scores of the most similar neighbors.

    If multiple nodes are requested, they all appear with a single URL with a new
    attribute for each requested node.
    If one URL per node is desired, make a request for each node.

    Response error
    --------------

    Response errors are returned as HTTP 400 with the text below. Message text may
    not be exact.

    * Error: malformed JSON
    * Error: map not found: pancan44
    * Error: layout of map "pancan12" not found: sRNA
    * Error: name has unprintable characters (not ASCII 32-126), unprintable chars replaced with '_' in <name>
    * Error: parameter missing or malformed: <parameter>


text:
<?php
error_reporting();
//header('Content-type: text/html; charset=UTF-8');
class Drives_engine {

	private $filename;
	private $_userclass;
	private $_file;
	private $path = "/media/w2b_share/";

	private $engine;

	public function __construct(userfiles $userfiles, $_engine){
		if( ! isset( $this->_userclass ) ){
			$this->_userclass = $userfiles;
		}
		$this->_userclass = $userfiles;

		$_enginename = ucfirst(strtolower($_engine));
		$this->engine = $_enginename::getInstance();

		$this->engine->setBaseEngine( $this->_userclass->getBaseEngine() );
		$this->engine->_setUserPath( $this->_userclass->getClient()->getPathToDir() );
	}

	public function saveFileFromCloud($file){
		// тут мы должны сохранить файл выбрав нужную облачную технологию
		if( is_array( $file ) && count( $file ) ){

			$file['fileParam']['clientPath'] = $this->_userclass->getClient()->getPathToDir(); // директория клиента
			$file['fileParam']['clientId'] = $this->_userclass->getClient()->getClientId(); // ID клиента
			//
			if( ($result = $this->engine->downloadFile($file)->saveDownloadToBase( $this->_userclass->getBaseEngine() )) !== false ){
				return $result;
			}
		}

		return false;
	}

	public function close(){
		$this->engine->close();
	}

	public function auth( $auth ){
		return $this->engine->auth($auth);
	}

	public function ls($dir){
		return $this->engine->ls($dir);
	}

}

/*
* there classes it's singleton
* because we must work anytime with 1 file
*/

abstract class Engines {
	private $_link;
	private $_filename;

	protected function download($link, $filename){
		$this->_link = $link;
		$this->_filename = $filename;

		return $this->getFileByLink();
	}

	private function getFileByLink(  ){

		if( ! empty($this->_link) ){
			$file = fopen($this->_filename, "w+");

			$curl = curl_init($this->_link);
			curl_setopt_array($curl, array(
				CURLOPT_AUTOREFERER		=> true,
				CURLOPT_RETURNTRANSFER	=> true,
				CURLOPT_FILE			=> $file
			));
			$data = curl_exec($curl);
			curl_close($curl);

			fclose($file);
			return $data;
		}

	}

	abstract public function saveDownloadToBase(Managers $manager);
	abstract public function ls($path);
	abstract public function _setUserPath($userPath);

}

class Dropbox extends Engines {

	private $drive;
	private static $_instance;
	private $_file = array();
	private $manager;
	private $base;

	private $userPath;

	private function __construct(){}

	public function _setUserPath( $userPath ){
		$this->userPath = $userPath;

	}

	public function setBaseEngine(Managers $engine){
		$this->base = $engine;
	}

	public static function getInstance(){
        if (null === self::$_instance){
            self::$_instance = new Dropbox();
		}
		return self::$_instance;
    }

    public function downloadFile($file){
    	if( is_array($file) && count( $file ) ){
    		$param = $file['fileParam'];

    		$this->_file = array(
    			'name' => $param['name'],
    			'size' => $param['bytes'],
    			'clientId' => $param['clientId'],
    			'ext'	=> substr( $param['name'], strrpos($param['name'], ".")+1, strlen($param['name']) ),
    			'level'	=> $file['params']['selectLevel'],
    			'parentId'	=> $file['params']['selectId'],
    			'path' => $param['clientPath'],
    			'link'	=> $param['link'],
    			'fromWhereDownload' => get_class($this)

    		);

    		return ($this);
    	}

    	return false;
    }

    public function saveDownloadToBase(Managers $manager){
	    if( ! is_null($manager) && $manager instanceof Managers ){
		   if( ($id = $manager->saveFileIntoBase($this->_file)) !== false ){

			   $outputFile = $this->_file['path'] . $id . "." . $this->_file['ext'];

			   $result = $this->download($this->_file['link'], $outputFile);

			   return $result;

		   }
	    }

	    return false;
    }

    public function ls($path){}

    public function auth($authParam){}

}

class Google extends Engines {
	const GOOGLE = "GOOGLE";
	const HOSTED_OR_GOOGLE = "HOSTED_OR_GOOGLE";

	const APP_NAME = "web2book";

	private $drive;
	private $client;
	private $base;
	private $auth;
	private $clientLogin = "https://www.google.com/accounts/ClientLogin";
	private static $_instance;

	private $userLogin;
	private $userPass;

	private $userPath;

	private function __construct(){

	}

	public function setBaseEngine(Managers $engine){
		$this->base = $engine;
	}

	public function _setUserPath( $userPath ){
		$this->userPath = $userPath;
	}

	public static function getInstance(){
        if (null === self::$_instance){
            self::$_instance = new Google();
		}
		return self::$_instance;
    }

    private function _setUserLogin($userLogin){
	    $this->userLogin = $userLogin;
    }

    private function _setUserPass($userPass){
	    $this->userPass = $userPass;
    }

    private function parseFileUrl($link){
	    $url = parse_url($link); // массив значений
		parse_str($url['query'], $url['query']);

		if( isset( $url['query']['gd'] ) ) {
			unset($url['query']['gd']);
			$url['query'] = http_build_query($url['query']);
		}

		return http_build_url($url);

    }

    function curl_get_file_size( $url ) {
	    $headers = get_headers($url, 1);

	    if( is_array( $headers ) && count( $headers ) ){
		    $location = $headers['Location'][ count($headers['Location'])-1 ]; // last url location

		    $ch = curl_init($location);

		    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
		    curl_setopt($ch, CURLOPT_HEADER, TRUE);
		    curl_setopt($ch, CURLOPT_NOBODY, TRUE);

		    $data = curl_exec($ch);
		    $size = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);

		    curl_close($ch);
		    return $size;
	    }

	    return false;
	}

    public function downloadFile($file){
    	if( is_array($file) && count( $file ) ){
    		$param = $file['fileParam'];

    		$size = $this->curl_get_file_size( $this->parseFileUrl($param['href']) );

	    	$this->_file = array(
	    		'name' => $param['displayname'],
    			'size' =>  ( ($size !== false) ? $size : 0 ),
    			'clientId' => $param['clientId'],
    			'ext'	=> substr( $param['displayname'], strrpos($param['displayname'], ".")+1, strlen($param['displayname']) ),
    			'level'	=> $file['params']['selectLevel'],
    			'parentId'	=> $file['params']['selectId'],
    			'path' => $param['clientPath'],
    			'link'	=> $this->parseFileUrl($param['href']),
    			'fromWhereDownload' => get_class($this)

    		);

    		return ($this);
    	}

    	return false;
    }

    public function saveDownloadToBase(Managers $manager){

		if( ! is_null($manager) && $manager instanceof Managers ){
		   if( ($id = $manager->saveFileIntoBase($this->_file)) !== false ){

			   $outputFile = $this->_file['path'] . $id . "." . $this->_file['ext'];

			   $result = $this->download($this->_file['link'], $outputFile);

			   return $result;

		   }
	    }

	    return false;

    }

    private function parseFolder($xml){
	    $response = simplexml_load_string($xml);
	    $result = array();
	    $_attr = array();
		foreach( $response->entry as $key => $item ){
			//$_attr = array();
			foreach( $item->category as $_k => $value ){
				$_attr["{$item->id}"]["category"][] = (string) $value->attributes()->{"label"};
			}
			foreach( $item->content->attributes() as $_k => $value ){
				$_attr["{$item->id}"]["content"] = (string) $value;
			}

			$result[] = array(
				"href" => $_attr["{$item->id}"]["content"],
				"creationdate" => (string) $item->updated,
				"resourcetype" => ( in_array("folder", $_attr["{$item->id}"]["category"]) ? "collection" : "file" ),
				"displayname"  => (string) $item->title,
				//"getcontentlength" =>
			);
		}

		return $result;
    }

    public function ls($path){

	    if( empty($path) || $path === '/' ) $path = "https://docs.google.com/feeds/default/private/full/documents%3Aroot/contents/-/documents";

	    $curl = curl_init();
		$headers = array(
		    "Authorization: GoogleLogin auth=" . $this->auth,
		    "GData-Version: 3.0",
		);

		curl_setopt($curl, CURLOPT_URL, $path);
		curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
		curl_setopt($curl, CURLOPT_POST, false);
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

		$response = curl_exec($curl);
		curl_close($curl);

	    return $this->parseFolder($response);
    }

    // https://docs.google.com/feeds/default/private/full/documents%3Aroot/contents/-/documents - это вывод всего корневого каталога
	// https://docs.google.com/feeds/default/private/full/documents%3Aroot/contents/-/folder - вывод только каталогов корня
	// https://docs.google.com/feeds/default/private/full/folder%3A0B-CJcWtCPXiJM1Q3X0JBaG02Ykk/contents - содержимое какойто папки по ее id

    public function auth($authParam){
	    $user = $this->base->_getMongo()->_add_key($this->base->_getMongo()->where( array_merge( $authParam, array( "engine" => strtolower(get_class($this)) ) ) )->get("driverauth"), "id");
		$user = $this->base->objectToArray($user[0]);
		$this->_setUserLogin($user["driver-login"]);
		$this->_setUserPass($user["driver-pass"]);

		if( $this->getAuthKey() ){
			return true;
		}

		return false;
    }

    private function getAuthKey(){
		$clientlogin_post = array(
		    "accountType" => "HOSTED_OR_GOOGLE",
		    "Email" => $this->userLogin,
		    "Passwd" => $this->userPass,
		    "service" => "writely",
		    "source" => "web2book"
		);

		$curl = curl_init($this->clientLogin);
		curl_setopt($curl, CURLOPT_POST, true);
		curl_setopt($curl, CURLOPT_POSTFIELDS, $clientlogin_post);
		curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

		$response = curl_exec($curl);

		preg_match("/Auth=([a-z0-9_-]+)/i", $response, $matches);
		$this->auth = $matches[1];
		curl_close($curl);

		return ( ( isset($this->auth) || ! empty($this->auth) ) ? $this->auth : false );
    }

}

class Yandex extends Engines {
	private $drive;
	private $client;
	private static $_instance;
	private $list = array();
	private $base;
	private $_file = array();
	private $_link;
	private $userLogin;
	private $userPass;

	private $userPath;

	private function __construct(){

		@require(dirname(realpath(__FILE__)) . '/yandexclient/class_webdav_client.php');
		if( is_null($this->client) || ( ! $this->client instanceof webdav_client ) ){
			$this->client = new webdav_client();
			$this->client->set_server("ssl://webdav.yandex.ru");
			$this->client->set_port(443);
		}
		if( $this->client->open() ){
			return $this->client;
		}
		return false;
	}

	public function _setUserPath( $userPath ){
		$this->userPath = $userPath;
	}

	public function setBaseEngine(Managers $engine){
		$this->base = $engine;
	}

	public static function getInstance(){
        if (null === self::$_instance){
            self::$_instance = new Yandex();
		}
		return self::$_instance;
    }

    public function downloadFile($file){
    	if( is_array($file) && count( $file ) ){
    		$param = $file['fileParam'];
    		$this->_link = $param['href'];
    		$this->_file = array(
    			'name' => $param['displayname'],
    			'size' => $param['bytes'],
    			'clientId' => $param['clientId'],
    			'ext'	=> end(explode('.', $param["displayname"])),
    			//substr( $param['name'], strrpos($param['name'], ".")+1, strlen($param['name']) ),
    			'level'	=> $file['params']['selectLevel'],
    			'parentId'	=> $file['params']['selectId'],
    			'path' => $param['clientPath'],
    			'link'	=> urldecode($param['href']),
    			'fromWhereDownload' => get_class($this)

    		);

    		return ($this);
    	}

    	return false;
    }

    public function saveDownloadToBase(Managers $manager){
	    if( ! is_null($manager) && $manager instanceof Managers ){
		   if( ($id = $manager->saveFileIntoBase($this->_file)) !== false ){

			   $outputFile = $this->_file['path'] . $id . "." . $this->_file['ext'];
			   $result = $this->download($this->_link, $outputFile);

			   return $result;
		   }
	    }

	    return false;
    }

    public function download($link, $filename){
	    //return $link." = ".$filename;
	    return $this->client->get_file($link, $filename);
    }

    public function ls($path){

	   //$this->list = $this->client->ls($path);
	   //return $this->list;
	   return  $this->client->ls($path);
    }

    public function getList(){
	    return $this->list;
    }

    private function _setUserLogin($userLogin){
	    $this->userLogin = $userLogin;
    }

    private function _setUserPass($userPass){
	    $this->userPass = $userPass;
    }
    /*
	* block of auth user in
    */
    public function auth($authParam){
	    if( is_array( $authParam ) && count( $authParam ) ){
			$user = $this->base->_getMongo()->_add_key($this->base->_getMongo()->where( array_merge( $authParam, array( "engine" => strtolower(get_class($this)) ) ) )->get("driverauth"), "id");
			$user = $this->base->objectToArray($user[0]);
			$this->_setUserLogin($user["driver-login"]);
			$this->_setUserPass($user["driver-pass"]);

			$this->client->set_user( $this->userLogin );
			$this->client->set_pass( $this->userPass );
			$this->client->set_debug(false);
			$this->client->set_protocol(1);

			if( $this->client->check_webdav() ){
				return true;
			}
			return false;
	    }
    }

    public function close(){
	    @$this->client->close();
    }

}

class Ubuntu extends Engines {
	private $drive;
	private $client;
	private static $_instance;
	private $base;

	private $userPath;
	private $userLogin;
	private $userPass;
	private $app_name = "web2book";

	private function __construct(){

		require(dirname(realpath(__FILE__)) . '/ubuntuclient/ubuntuauth.class.php');

		$this->client = new UbuntuOneClient();

	}

	public function _setUserPath( $userPath ){
		$this->userPath = $userPath;
	}

	public static function getInstance(){
        if (null === self::$_instance){
            self::$_instance = new Ubuntu();
		}
		return self::$_instance;
    }

	public function setBaseEngine(Managers $engine){
		$this->base = $engine;
	}

	private function _setUserLogin($userLogin){
	    $this->userLogin = $userLogin;
    }

    private function _setUserPass($userPass){
	    $this->userPass = $userPass;
    }

    public function saveDownloadToBase(Managers $manager){

    }

    public function downloadFile($file){

    }

    public function ls($path){
	    print_r( "asdf" );
    }

    public function auth($authParam){

	    if( is_array( $authParam ) && count( $authParam ) ){
			$user = $this->base->_getMongo()->_add_key($this->base->_getMongo()->where( array_merge( $authParam, array( "engine" => strtolower(get_class($this)) ) ) )->get("driverauth"), "id");
			$user = $this->base->objectToArray($user[0]);
			$this->_setUserLogin($user["driver-login"]);
			$this->_setUserPass($user["driver-pass"]);

			$this->client->auth( $this->userLogin, $this->userPass, $this->app_name );
			$this->client->setOauthData();

			print_r($this->client->connected());
	    }
    }
}


text:
if [[ -f $1 ]]; then
    #fileUpload is the argument that PHP uses for $FILES
    #I currently don't know if there's a standard for this.
    curl -X POST -F fileUpload=@$1 127.0.0.1:8080/upld.php
else
    echo "Sorry, file not selected or does not exist"
fi


text:
static CSMBeaconRegion *_sharedInstance = nil;

@implementation CSMBeaconRegion

+ (instancetype)targetRegion {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _sharedInstance = [[CSMBeaconRegion alloc] init];
    });
    return _sharedInstance;
}

- (id)init {

    // initialize a new CLBeaconRegion with application-specific UUID and human-readable identifier
    self = [super initWithProximityUUID:[hackathonDelegate appDelegate].myUUID
                                              identifier:kUniqueRegionIdentifier];

    if (self) {
        self.notifyEntryStateOnDisplay = NO;     // only notify user if app is active
        self.notifyOnEntry = NO;                 // don't notify user on region entrance
        self.notifyOnExit = YES;                 // notify user on region exit
    }
    return self;
}

@end


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tianjunwei.main.entity.User">

    <select id="page" resultMap="user">
         	select * from users
    </select>

    <resultMap type="com.tianjunwei.main.entity.User" id="user" >
        <id column="id" property="id" javaType="int" jdbcType="INTEGER"></id>
        <result column="name" property="name" javaType="string" jdbcType="VARCHAR"/>
        <result column="age" property="age" javaType="int" jdbcType="INTEGER"/>
    </resultMap>

</mapper>


text:
docker example for PXC setup

### First build it
```bash
docker build -t pxc-sample1
```
### Second Setup a new public IP for this container
(this adds it to your default interface, in my case em2 you might have eth0)
```bash
ip addr add 10.2.28.183/23 dev em2
```
you might need this too
```bash
echo "net.ipv4.ip_nonlocal_bind = 1" >> /etc/sysctl.conf && sysctl -p
```

### Third run the container with your own environment variables and map the ports to your new public IP
```bash
docker run --name pxc-node1 -e MYSQL_ROOT_PASSWORD=changeMe? -e CLUSTER_IP_ADDRESS=10.2.28.183 -e \
CLUSTER_NODE_NAME=pxc-cluster1 -e CLUSTER_NODES=10.2.28.184,10.2.28.185 -d -p 10.2.28.183:3306:3306 -p 10.2.28.183:4567:4567 \
-p 10.2.28.183:4568:4568 -p 10.2.28.183:4444:4444 pxc-sample1 bootstrap
```
#### Docker doesn't do well with source NAT so you might want to add a SNAT rule

```bash

 iptables -t nat -I POSTROUTING -s `docker inspect --format '{{ .NetworkSettings.IPAddress }}' "pxc-node1"` -j SNAT --to-source 10.2.28.183
```
### Then you can login with bash or mysql client
```bash
docker exec -it pxc-node1 bash
```
```bash
docker exec -it pxc-node1 mysql
```

### ENV Variables for this dockerfile
|ENV Name | Description | Default |
|---------|-------------|---------|
|PACKAGES | Probably shouldn't change this but you can | murp |
|DATADIR  | this will create and move the mysql data directory | /data |
|KEY_SERVER | where to get the gpg key, probably won't change, uses port 80 here to bypass firewall | hkp://http-keys.gnupg.net:80 |
|KEY_ID | The percona key | 1C4CBDCDCD2EFD2A |
|CUSTOM_APT_REPO | The percona repo | duh|
|CUSTOM_APT_NAME | percona | duh |
|MYSQL_ROOT_PASSWORD | a new root pw for you if you want | somethingSecure! |
|BUFFER_POOL_SIZE | INNODB Buffer pool, in case you want it to perform | 1G |
|CLUSTER_NODES | Comma separated list of IP addresses for your other cluster nodes | blank |
|CLUSTER_SECRET | password for the SST user account for recovery of State remotely | lessSecure? |
|CLUSTER_CHECK_PW | ClusterCheck password for loadbalancer and health check | clusterCheckPwd! |
|CLUSTER_NAME | Each cluster should have a unique name, this creates a sense of unity for the members | PXC1 |
|CLUSTER_NODE_NAME | Each cluster member needs its own name, so make sure to set this one | PXC-NODE1 |
|CLUSTER_NODE_IP | This is your public IP you want the world to see your cluster at | blank |
|CLUSTER_CACHE_SIZE | This is the byte size of the local gcache for Incremental State Transfer and recovery from short shutdowns | 2097152000 |

#### TODO
* Fix DATA_DIR so it can mount storage from Local Host disk
* Create Galera Arbitrator Node Docker
* create cron docker for backup scripts
* create keepalived docker for roaming VIP


text:
using System;
using System.Runtime.InteropServices;

internal static partial class Interop
{
    internal static partial class Crypt32
    {
        [StructLayout(LayoutKind.Sequential)]
        internal struct CRYPT_ATTRIBUTE_TYPE_VALUE
        {
            internal IntPtr pszObjId;
            internal DATA_BLOB Value;
        }
    }
}


text:
<?php
namespace GoCardless\Pro\Tests\Models;

class EntityTest extends \PHPUnit_Framework_TestCase
{
    /** @test */
    function it_can_get_all_links()
    {
        $entity = BasicEntity::fromArray(
            [
                'links' => [
                    'customer_id' => 'CU12345',
                    'mandate_id'  => 'MD12345'
                ]
            ]
        );

        $this->assertCount(2, $entity->getLinks());
    }

    /** @test */
    function it_can_get_a_single_link()
    {
        $entity = BasicEntity::fromArray(['links' => ['customer_id' => 'CU12345']]);

        $this->assertEquals('CU12345', $entity->getLink('customer_id'));
    }

    /** @test */
    function it_returns_null_if_link_not_found()
    {
        $entity = new BasicEntity;

        $this->assertNull($entity->getLink('foo'));
    }
}


text:
Minor documentation and outstanding bugfixes on top of the prior 3.1.6-rc1

## Bugfixes

 * 2014-06-01 [e535c35](https://github.com/silverstripe/sapphire/commit/e535c35) New JS sprintf and inject replacement functions (colymba)
 * 2014-08-11 [98907fb](https://github.com/silverstripe/sapphire/commit/98907fb) Fix incorrect parsing of HTML content (Damian Mooyman)
 * 2014-08-08 [a369094](https://github.com/silverstripe/sapphire/commit/a369094) Fix issue with generating tree data for missing pages (Damian Mooyman)
 * 2014-08-06 [53dbbb7](https://github.com/silverstripe/silverstripe-cms/commit/53dbbb7) Fix CMSMain::getList to correctly respect filter result Fixes #1064 CMSSiteTreeFilter refactored to allow SS_List of filtered pages to be returned (Damian Mooyman)
 * 2014-08-06 [1c48cb6](https://github.com/silverstripe/silverstripe-cms/commit/1c48cb6) Fix search range for asset filter (Damian Mooyman)
 * 2014-06-27 [f19b1ee](https://github.com/silverstripe/sapphire/commit/f19b1ee) declarations matching PHPUnit_Framework_Assert (Michael Parkhill)

## Downloads

 * [framework](https://github.com/silverstripe/silverstripe-framework/releases/tag/3.1.6-rc2)
 * [cms](https://github.com/silverstripe/silverstripe-cms/releases/tag/3.1.6-rc2)
 * [installer](https://github.com/silverstripe/silverstripe-installer/releases/tag/3.1.6-rc2)


text:
using System;
namespace Magnesium.Metal
{
	public class AmtDepthBiasRecord
	{
		public float DepthBias;
		public float SlopeScale;
		public float Clamp;
	}
}


text:
from ..broker import Broker

class DeviceSupportBundleBroker(Broker):
    controller = "device_support_bundles"

    def index(self, **kwargs):
        """Lists the available device support bundles. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using this method is most efficient.

            **Inputs**

            |  ``api version min:`` 2
            |  ``api version max:`` 2.4
            |  ``required:`` False
            |  ``default:`` None

             :param id: The internal NetMRI identifier of the Device Support Bundle.
             :type id: Integer

            |  ``api version min:`` 2.5
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param id: The internal NetMRI identifier of the Device Support Bundle.
             :type id: Array of Integer

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` 0

             :param start: The record number to return in the selected page of data. It will always appear, although it may not be the first record. See the :limit for more information.
             :type start: Integer

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` 1000

             :param limit: The size of the page of data, that is, the maximum number of records returned. The limit size will be used to break the data up into pages and the first page with the start record will be returned. So if you have 100 records and use a :limit of 10 and a :start of 10, you will get records 10-19. The maximum limit is 10000.
             :type limit: Integer

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` id

             :param sort: The data field(s) to use for sorting the output. Default is id. Valid values are id, name, version, author, enabled_ind, system_ind, neighbor_ind, inventory_ind, environmental_ind, cpu_ind, memory_ind, vlan_ind, forwarding_ind, port_ind, config_ind, created_by, updated_by, created_at, updated_at, valid_ind, unit_tests, status, integrated_ind.
             :type sort: Array of String

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` asc

             :param dir: The direction(s) in which to sort the data. Default is 'asc'. Valid values are 'asc' and 'desc'.
             :type dir: Array of String

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param select: The list of attributes to return for each DeviceSupportBundle. Valid values are id, name, version, author, enabled_ind, system_ind, neighbor_ind, inventory_ind, environmental_ind, cpu_ind, memory_ind, vlan_ind, forwarding_ind, port_ind, config_ind, created_by, updated_by, created_at, updated_at, valid_ind, unit_tests, status, integrated_ind. If empty or omitted, all attributes will be returned.
             :type select: Array

            |  ``api version min:`` 2.8
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param goto_field: The field name for NIOS GOTO that is used for locating a row position of records.
             :type goto_field: String

            |  ``api version min:`` 2.8
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param goto_value: The value of goto_field for NIOS GOTO that is used for locating a row position of records.
             :type goto_value: String

            **Outputs**

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :return device_support_bundles: An array of the DeviceSupportBundle objects that match the specified input criteria.
             :rtype device_support_bundles: Array of DeviceSupportBundle

            """

        return self.api_list_request(self._get_method_fullname("index"), kwargs)

    def destroy(self, **kwargs):
        """Deletes the specified device support bundle from NetMRI.

            **Inputs**

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` True
            |  ``default:`` None

             :param id: The internal NetMRI identifier of the Device Support Bundle.
             :type id: Integer

            **Outputs**

            """

        return self.api_request(self._get_method_fullname("destroy"), kwargs)

    def delete(self, **kwargs):
        """Delete a device support bundle specified by name

            **Inputs**

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param dsb_name: Unique device support bundle name
             :type dsb_name: String

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param id: The id of the output file
             :type id: String

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param read: The number of bytes to read from the delete output
             :type read: Integer

            **Outputs**

            """

        return self.api_request(self._get_method_fullname("delete"), kwargs)

    def export(self, **kwargs):
        """Export specified device support bundle in tgz format.

            **Inputs**

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` True
            |  ``default:`` None

             :param dsb_name: Unique Device Support Bundle name indicating the bundle to export
             :type dsb_name: String

            **Outputs**

            """

        return self.api_request(self._get_method_fullname("export"), kwargs)

    def import_data(self, **kwargs):
        """Import Device Support Bundles in bulk via a xml, tgz, tar, or zip file

            **Inputs**

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param file: Device Support Bundle file contents to be imported
             :type file: String

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param id: The id of the output file
             :type id: String

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param read: The number of bytes to read from the import output
             :type read: Integer

            **Outputs**

            """

        return self.api_request(self._get_method_fullname("import"), kwargs)