text:
namespace content {
class BrowserContext;
}

namespace ui {
class WebDialogDelegate;
}

namespace chrome {

// Views specific implementation allows extra InitParams.
gfx::NativeWindow ShowWebDialogWithParams(
    gfx::NativeView parent,
    content::BrowserContext* context,
    ui::WebDialogDelegate* delegate,
    absl::optional<views::Widget::InitParams> extra_params,
    bool show = true);

}  // namespace chrome

#endif  // CHROME_BROWSER_UI_VIEWS_CHROME_WEB_DIALOG_VIEW_H_

redpajama_set_name: RedPajamaGithub


text:
import Component from 'ember-component';
import layout from '../templates/components/koenig-card';
import run from 'ember-runloop';
import observer from 'ember-metal/observer';

export default Component.extend({
    layout,
    editing: observer('editedCard', function () {
        let editing = this.get('editedCard') === this.get('card');
        if (this.get('isEditing') && !editing) {
            this.send('stopEdit');
        }
        this.set('isEditing', editing);
    }),
    init() {
        this._super(...arguments);
    },
    didRender() {
        // add the classname to the wrapping card as generated by mobiledoc.
        // for some reason `this` on did render actually refers to the editor object and not the card object, after render it seems okay.
        run.schedule('afterRender', this,
            () => {
                let card = this.get('card');

                let {env: {name}} = card;

                // the mobiledoc generated container.
                let mobiledocCard = this.$().parents('.__mobiledoc-card');

                mobiledocCard.removeClass('__mobiledoc-card');
                mobiledocCard.addClass('kg-card');
                mobiledocCard.addClass(name ? `kg-${name}` : '');
                mobiledocCard.attr('tabindex', 3);
                mobiledocCard.click(() => {
                    if (!this.get('isEditing')) {
                        this.send('selectCardHard');
                    }
                });
            }
        );
    },
    actions: {
        save() {
            this.set('doSave', Date.now());
        },

        toggleState() {
            if (this.get('isEditing')) {
                this.send('stopEdit');
            } else {
                this.send('startEdit');
            }
        },
        selectCard() {
            this.sendAction('selectCard', this.card.id);
        },
        deselectCard() {
            this.sendAction('deselectCard', this.card.id);
            this.send('stopEdit');
        },
        selectCardHard() {
            this.sendAction('selectCardHard', this.card.id);
        },
        delete() {
            this.get('card').env.remove();
        },
        startEdit() {
            this.sendAction('edit', this.card.id);
        },
        stopEdit() {
            this.send('save');
            this.sendAction('stopEdit', this.card.id);
        }
    }
});


text:
"""
Created on Mon Dec 14 11:37:39 2014

@author: sm1fg

"""
##============================================================================
##option parameters
##============================================================================
def set_options(model, l_mpi, l_gdf=True):

    """This module assigns the logical options for the model. If adding
    new models with additional logical arguments add it to the default
    list as false, include an if statement for True update the
    dictionary option_pars

    """
    #default arguments
    option_pars = {
        'l_hdonly':      False,# set mag field zero to check background
        'l_ambB':        False,# include some ambient magnetic field b_z
        'l_spruit':      False,# thin flux tube model to check Spruit
        'l_const':       False,# axial Alfven speed const  Z-depend (Spruit)
        'l_sqrt':        False,# axial Alfven speed sqrt   Z-depend (Spruit)
        'l_linear':      False,# axial Alfven speed linear Z-depend (Spruit)
        'l_square':      False,# axial Alfven speed square Z-depend (Spruit)
        'l_B0_expz':     False,# Z-depend of Bz(r=0) exponentials
        'l_B0_quadz':    False,# Z-depend of Bz(r=0) polynomials + exponential
        'l_B0_rootz':    False,# Z-depend of Bz(r=0) sqrt polynomials
        'l_single':      False,# only one flux tube
        'l_hmi':         False,# construct photopheric map of Bz from HMI/SDI
        'l_tube_pair':   False,# pair of flux tubes
        'l_multi_netwk': False,# multiple flux tubes as described in GFE (2014)
        'l_multi_lanes': False,# multiple flux tubes as described in GFE (2014)
        'l_multi_twist': False,# multiple flux tubes as described in GFE (2014)
        'l_2D_loop':     False,# make a 2D loop with sinusoidal Bz(x,0,0)
        'l_mfe':         False,# model Viktor's model from MFE (2014)
        'l_atmos_val3c_mtw':False,# interpolate composite VAL3c+MTW atmosphere
        'suffix':        '.gdf'
    }
    #revise optional parameters depending on configuration required
    if model['model'] == 'hmi_model':
        option_pars['l_hmi']             = True
        option_pars['l_B0_expz']         = True
        option_pars['l_atmos_val3c_mtw'] = True
    if model['model'] == 'mfe_setup':
        option_pars['l_single']          = True
        option_pars['l_mfe']             = True
        option_pars['l_B0_expz']         = True
        option_pars['l_atmos_val3c_mtw'] = True
    if model['model'] == 'spruit':
        option_pars['l_single']          = True
        option_pars['l_spruit']          = True
    if model['model'] == 'paper1':
        option_pars['l_ambB']            = True
        option_pars['l_B0_expz']         = True
        option_pars['l_single']          = True
        option_pars['l_atmos_val3c_mtw'] = True
    if model['model'] == 'paper2a':
        option_pars['l_ambB']            = True
        option_pars['l_B0_expz']         = True
        option_pars['l_tube_pair']       = True
        option_pars['l_atmos_val3c_mtw'] = True
    if model['model'] == 'paper2b':
        option_pars['l_ambB']            = True
        option_pars['l_B0_expz']         = True
        option_pars['l_multi_twist'    ] = True
        option_pars['l_atmos_val3c_mtw'] = True
    if model['model'] == 'paper2c':
        option_pars['l_ambB']            = True
        option_pars['l_B0_expz']         = True
        option_pars['l_multi_netwk']     = True
        option_pars['l_atmos_val3c_mtw'] = True
    if model['model'] == 'paper2d':
        option_pars['l_ambB']            = True
        option_pars['l_B0_expz']         = True
        option_pars['l_multi_lanes'    ] = True
        option_pars['l_atmos_val3c_mtw'] = True
    if model['model'] == 'hmi_model':
        option_pars['l_B0_quadz']        = True
        option_pars['l_single']          = True
        option_pars['l_hmi']             = True
        option_pars['l_atmos_val3c_mtw'] = True
    if model['model'] == 'loop_model':
        option_pars['l_B0_quadz']        = True
        option_pars['l_single']          = True
        option_pars['l_2D_loop']         = True
        option_pars['l_atmos_val3c_mtw'] = True
    if l_mpi:
        option_pars['l_mpi'] = True
    else:
        option_pars['l_mpi'] = False
    return option_pars


text:
This is a myshows.me Python API.

# Quick Start
```
pip install myshows
```
# Usage APIv1 (incomplete support, but with auth)
```python
>>> import myshows
>>> api = myshows.session()
>>> api.shows(1)['title']
'House'
>>> api.shows(1)['ruTitle']
'Доктор Хаус'
>>> api.user_profile('farestz')['stats']
{'remainingEpisodes': 83, 'watchedDays': 60.4, 'remainingHours': 60.8, 'totalHours': 1509.3, 'watchedEpisodes': 2199, 'remainingDays': 2.5, 'totalEpisodes': 2282, 'watchedHours': 1448.5, 'totalDays': 62.9}
```

See https://api.myshows.me for detailed API guide.

# Usage APIv2 (complete support)
```python
>>> import myshows
>>> api = myshows.apiv2()
>>> response = api.shows.GetById(showId=1)
>>> response['titleOriginal']
'House'

>>> api.login('<CLIENT_ID>', '<CLIENT_SECRET>')
>>> api.manage.RateShow(id=35540, rating=4)
True
```

See https://api.myshows.me/shared/doc/ for detailed API guide.


text:
[![Build Status](https://travis-ci.org/simonz05/pkg.png?branch=master)](https://travis-ci.org/simonz05/pkg)

Pkg Template
============

Simple Python pkg template for my own pleasure.


text:
package com.fallenritemonk.numbers.game;

import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Color;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.fallenritemonk.numbers.R;
import com.fallenritemonk.numbers.db.DatabaseHelper;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

/**
 * Created by FallenRiteMonk on 9/19/15.
 */
class GameField extends BaseAdapter {
    private final GameActivity activity;
    private final FloatingActionButton addFieldsButton;
    private final TextView headerCombos;
    private final GameModeEnum gameMode;
    private final DatabaseHelper dbHelper;

    private ArrayList<NumberField> fieldArray;
    private ArrayList<CombinePos> possibilities = new ArrayList<>();
    private int selectedField;
    private int hint;
    private int stateOrder;

    public GameField(GameActivity activity, FloatingActionButton addFieldsButton, TextView headerCombos, GameModeEnum gameMode, Boolean resume) {
        this.activity = activity;
        this.addFieldsButton = addFieldsButton;
        this.headerCombos = headerCombos;
        this.gameMode = gameMode;

        dbHelper = DatabaseHelper.getInstance(activity);

        if (resume) {
            resumeGame();
        } else {
            newGame();
        }
    }

    public void newGame() {
        fieldArray = new ArrayList<>();
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        /*fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(2));
        fieldArray.add(new NumberField(3));
        fieldArray.add(new NumberField(4));
        fieldArray.add(new NumberField(5));
        fieldArray.add(new NumberField(6));
        fieldArray.add(new NumberField(7));
        fieldArray.add(new NumberField(8));
        fieldArray.add(new NumberField(9));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(2));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(3));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(4));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(5));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(6));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(7));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(8));
        fieldArray.add(new NumberField(1));
        fieldArray.add(new NumberField(9));*/

        if (gameMode == GameModeEnum.RANDOM) {
            Collections.shuffle(fieldArray, new Random(System.nanoTime()));
        }

        notifyDataSetChanged();

        selectedField = -1;
        hint = -1;
        stateOrder = -1;

        findPossibilities();

        dbHelper.clearDB();
        saveState();
    }

    private void resumeGame() {
        fieldsFromString(dbHelper.getLastState());
        selectedField = -1;
        hint = -1;
        stateOrder = dbHelper.getLastStateOrder();

        findPossibilities();
    }

    private void findPossibilities() {
        hint = -1;
        possibilities = new ArrayList<>();
        for (int i = 0; i < fieldArray.size() - 1; i++) {
            if (fieldArray.get(i).getState() == NumberField.STATE.USED) continue;

            for (int ii = i + 1; ii < fieldArray.size(); ii++) {
                if (fieldArray.get(ii).getState() == NumberField.STATE.USED) continue;
                if (canBeCombined(i, ii)) {
                    possibilities.add(new CombinePos(i, ii));
                }
                break;
            }

            for (int ii = i + 9; ii < fieldArray.size(); ii += 9) {
                if (fieldArray.get(ii).getState() == NumberField.STATE.USED) continue;
                if (canBeCombined(i, ii)) {
                    possibilities.add(new CombinePos(i, ii));
                }
                break;
            }
        }

        if (possibilities.size() == 0)
            addFieldsButton.setVisibility(View.VISIBLE);
        else addFieldsButton.setVisibility(View.GONE);
    }

    private boolean canBeCombined(int id1, int id2) {
        return id1 != id2 && !(fieldArray.get(id1).getNumber() + fieldArray.get(id2).getNumber() != 10 && fieldArray.get(id1).getNumber() != fieldArray.get(id2).getNumber());
    }

    public void hint() {
        if (possibilities.size() == 0) return;
        if (hint >= 0) {
            fieldArray.get(possibilities.get(hint).getId1()).setState(NumberField.STATE.UNUSED);
            fieldArray.get(possibilities.get(hint).getId2()).setState(NumberField.STATE.UNUSED);
        }
        hint = ++hint % possibilities.size();

        fieldArray.get(possibilities.get(hint).getId1()).setState(NumberField.STATE.HINT);
        fieldArray.get(possibilities.get(hint).getId2()).setState(NumberField.STATE.HINT);

        notifyDataSetChanged();
    }

    public void clicked(int id) {
        if (fieldArray.get(id).getState() == NumberField.STATE.USED) return;

        if (selectedField == -1) {
            selectedField = id;
            fieldArray.get(id).setState(NumberField.STATE.SELECTED);
        } else if (id == selectedField) {
            fieldArray.get(id).setState(NumberField.STATE.UNUSED);
            selectedField = -1;
        } else {
            combine(id);
        }

        notifyDataSetChanged();
    }

    private void combine(int id) {
        boolean combined = false;
        for (CombinePos pos : possibilities) {
            if (pos.equals(new CombinePos(id, selectedField))) {
                fieldArray.get(id).setState(NumberField.STATE.USED);
                fieldArray.get(selectedField).setState(NumberField.STATE.USED);
                boolean won = reduceFields();
                if (won) {
                    won();
                } else {
                    saveState();

                    findPossibilities();
                }
                selectedField = -1;
                combined = true;
                break;
            }
        }
        if (!combined) {
            fieldArray.get(selectedField).setState(NumberField.STATE.UNUSED);
            selectedField = -1;
        }
    }

    private boolean reduceFields() {
        int fieldSize = fieldArray.size();
        int preLeft = -1;
        for (int i = 0; i < fieldArray.size(); i += 9) {
            preLeft = reduceRow(i, preLeft);
            if (fieldSize > fieldArray.size()) {
                i -= 9;
                fieldSize = fieldArray.size();
            }
        }
        if (fieldArray.size() == 0) {
            return true;
        }
        return false;
    }

    private int reduceRow(int index, int preLeft) {
        boolean empty = true;
        int left = -1;
        int right = -1;
        for (int ii = 0; ii < 9 && index + ii < fieldArray.size(); ii++) {
            if (fieldArray.get(index + ii).getState() != NumberField.STATE.USED) {
                empty = false;
                left = ii;
                if (right == -1) right = ii;
            }
        }
        if (empty && index + 8 < fieldArray.size()) {
            deleteNine(index);
        } else if (preLeft != -1 && right > preLeft) {
            deleteNine(index - 8 + preLeft);
        } else if (empty && index == 0) {
            fieldArray.clear();
        }
        return left;
    }

    private void deleteNine(int index) {
        for (int i = 0; i < 9; i++) {
            fieldArray.remove(index);
        }
    }

    public void addFields() {
        int fieldLength = fieldArray.size();
        for (int i = 0; i < fieldLength; i++) {
            if (fieldArray.get(i).getState() != NumberField.STATE.USED) {
                fieldArray.add(new NumberField(fieldArray.get(i).getNumber()));
            }
        }
        notifyDataSetChanged();
        findPossibilities();
    }

    private String fieldsToString() {
        String stringified = "";
        for (NumberField field : fieldArray) {
            stringified += field.stringify() + ",";
        }
        stringified = stringified.substring(0, stringified.length() - 1);
        return stringified;
    }

    private void fieldsFromString(String string) {
        fieldArray = new ArrayList<>();
        String[] tempFieldArray = string.split(",");
        for (String tempField : tempFieldArray) {
            fieldArray.add(new NumberField(tempField));
        }
        notifyDataSetChanged();
    }

    private void saveState() {
        dbHelper.saveState(++stateOrder, fieldsToString());
        headerCombos.setText(String.valueOf(stateOrder));
    }

    private void won() {
        // increase order by one to save combinations as last state is not saved
        dbHelper.clearDB();

        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
        builder.setTitle(R.string.game_won);

        builder.setPositiveButton(R.string.confirm_restart_title, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {
                newGame();
            }
        });
        builder.setNegativeButton(R.string.menu, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {
                activity.finish();
            }
        });
        AlertDialog dialog = builder.create();
        dialog.show();
    }

    @Override
    public int getCount() {
        return fieldArray.size();
    }

    @Override
    public Object getItem(int i) {
        return null;
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        TextView textView;
        if (view == null) {
            textView = new TextView(activity);
            textView.setTextColor(Color.WHITE);
            textView.setTextSize(25);
            textView.setGravity(Gravity.CENTER_HORIZONTAL);
            RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
            textView.setLayoutParams(params);
        } else {
            textView = (TextView) view;
        }

        textView.setText("" + fieldArray.get(i).getNumber());

        switch (fieldArray.get(i).getState()) {
            case UNUSED: textView.setBackgroundColor(Color.BLACK); break;
            case USED: textView.setBackgroundColor(Color.LTGRAY); textView.setText(""); break;
            case SELECTED: textView.setBackgroundColor(Color.BLUE); break;
            case HINT: textView.setBackgroundColor(Color.GREEN); break;
        }

        return textView;
    }
}


text:
package google

import "reflect"

const PubsubSchemaAssetType string = "pubsub.googleapis.com/Schema"

func resourceConverterPubsubSchema() ResourceConverter {
	return ResourceConverter{
		AssetType: PubsubSchemaAssetType,
		Convert:   GetPubsubSchemaCaiObject,
	}
}

func GetPubsubSchemaCaiObject(d TerraformResourceData, config *Config) ([]Asset, error) {
	name, err := assetName(d, config, "//pubsub.googleapis.com/projects/{{project}}/schemas/{{name}}")
	if err != nil {
		return []Asset{}, err
	}
	if obj, err := GetPubsubSchemaApiObject(d, config); err == nil {
		return []Asset{{
			Name: name,
			Type: PubsubSchemaAssetType,
			Resource: &AssetResource{
				Version:              "v1",
				DiscoveryDocumentURI: "https://www.googleapis.com/discovery/v1/apis/pubsub/v1/rest",
				DiscoveryName:        "Schema",
				Data:                 obj,
			},
		}}, nil
	} else {
		return []Asset{}, err
	}
}

func GetPubsubSchemaApiObject(d TerraformResourceData, config *Config) (map[string]interface{}, error) {
	obj := make(map[string]interface{})
	typeProp, err := expandPubsubSchemaType(d.Get("type"), d, config)
	if err != nil {
		return nil, err
	} else if v, ok := d.GetOkExists("type"); !isEmptyValue(reflect.ValueOf(typeProp)) && (ok || !reflect.DeepEqual(v, typeProp)) {
		obj["type"] = typeProp
	}
	definitionProp, err := expandPubsubSchemaDefinition(d.Get("definition"), d, config)
	if err != nil {
		return nil, err
	} else if v, ok := d.GetOkExists("definition"); !isEmptyValue(reflect.ValueOf(definitionProp)) && (ok || !reflect.DeepEqual(v, definitionProp)) {
		obj["definition"] = definitionProp
	}
	nameProp, err := expandPubsubSchemaName(d.Get("name"), d, config)
	if err != nil {
		return nil, err
	} else if v, ok := d.GetOkExists("name"); !isEmptyValue(reflect.ValueOf(nameProp)) && (ok || !reflect.DeepEqual(v, nameProp)) {
		obj["name"] = nameProp
	}

	return obj, nil
}

func expandPubsubSchemaType(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
	return v, nil
}

func expandPubsubSchemaDefinition(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
	return v, nil
}

func expandPubsubSchemaName(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
	return GetResourceNameFromSelfLink(v.(string)), nil
}


text:
export type HigherOrderComponent<RequiredProps: {}, ProvidedProps: {}> = <OriginalProps: {}>(
  component: React.ComponentType<OriginalProps>
) => React.ComponentType<RequiredProps & $Diff<OriginalProps, ProvidedProps>>;


text:
Rails.application.routes.draw do
  mount Dune::Balanced::Creditcard::Engine => '/', as: :dune_balanced_creditcard

  resources :projects do
    resources :contributions
    resources :matches
  end
end


text:
<?php
// src/CSP/ApiBundle/Entity/AuthCode.php

namespace CSP\ApiBundle\Entity;

use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 */
class AuthCode extends BaseAuthCode
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\ManyToOne(targetEntity="Client")
     * @ORM\JoinColumn(nullable=false)
     */
    protected $client;

    /**
     * @ORM\ManyToOne(targetEntity="CSP\BaseBundle\Entity\Usuarios")
     */
    protected $user;
}


text:
package logicapi

// Copyright (c) Microsoft and contributors.  All rights reserved.
//
// 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.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic"
	"github.com/Azure/go-autorest/autorest"
)

// BaseClientAPI contains the set of methods on the BaseClient type.
type BaseClientAPI interface {
	ListOperations(ctx context.Context) (result logic.OperationListResultPage, err error)
}

var _ BaseClientAPI = (*logic.BaseClient)(nil)

// WorkflowsClientAPI contains the set of methods on the WorkflowsClient type.
type WorkflowsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, workflowName string, workflow logic.Workflow) (result logic.Workflow, err error)
	Delete(ctx context.Context, resourceGroupName string, workflowName string) (result autorest.Response, err error)
	Disable(ctx context.Context, resourceGroupName string, workflowName string) (result autorest.Response, err error)
	Enable(ctx context.Context, resourceGroupName string, workflowName string) (result autorest.Response, err error)
	GenerateUpgradedDefinition(ctx context.Context, resourceGroupName string, workflowName string, parameters logic.GenerateUpgradedDefinitionParameters) (result logic.SetObject, err error)
	Get(ctx context.Context, resourceGroupName string, workflowName string) (result logic.Workflow, err error)
	ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32, filter string) (result logic.WorkflowListResultPage, err error)
	ListBySubscription(ctx context.Context, top *int32, filter string) (result logic.WorkflowListResultPage, err error)
	ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, listCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error)
	ListSwagger(ctx context.Context, resourceGroupName string, workflowName string) (result logic.SetObject, err error)
	Move(ctx context.Context, resourceGroupName string, workflowName string, move logic.Workflow) (result autorest.Response, err error)
	RegenerateAccessKey(ctx context.Context, resourceGroupName string, workflowName string, keyType logic.RegenerateActionParameter) (result autorest.Response, err error)
	Update(ctx context.Context, resourceGroupName string, workflowName string, workflow logic.Workflow) (result logic.Workflow, err error)
	Validate(ctx context.Context, resourceGroupName string, location string, workflowName string, workflow logic.Workflow) (result autorest.Response, err error)
	ValidateWorkflow(ctx context.Context, resourceGroupName string, workflowName string, validate logic.Workflow) (result autorest.Response, err error)
}

var _ WorkflowsClientAPI = (*logic.WorkflowsClient)(nil)

// WorkflowVersionsClientAPI contains the set of methods on the WorkflowVersionsClient type.
type WorkflowVersionsClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, workflowName string, versionID string) (result logic.WorkflowVersion, err error)
	List(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result logic.WorkflowVersionListResultPage, err error)
	ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, versionID string, triggerName string, parameters *logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error)
}

var _ WorkflowVersionsClientAPI = (*logic.WorkflowVersionsClient)(nil)

// WorkflowTriggersClientAPI contains the set of methods on the WorkflowTriggersClient type.
type WorkflowTriggersClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.WorkflowTrigger, err error)
	GetSchemaJSON(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.JSONSchema, err error)
	List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowTriggerListResultPage, err error)
	ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.WorkflowTriggerCallbackURL, err error)
	Reset(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result autorest.Response, err error)
	Run(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.SetObject, err error)
	SetState(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, setState logic.SetTriggerStateActionDefinition) (result autorest.Response, err error)
}

var _ WorkflowTriggersClientAPI = (*logic.WorkflowTriggersClient)(nil)

// WorkflowTriggerHistoriesClientAPI contains the set of methods on the WorkflowTriggerHistoriesClient type.
type WorkflowTriggerHistoriesClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result logic.WorkflowTriggerHistory, err error)
	List(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result logic.WorkflowTriggerHistoryListResultPage, err error)
	Resubmit(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result autorest.Response, err error)
}

var _ WorkflowTriggerHistoriesClientAPI = (*logic.WorkflowTriggerHistoriesClient)(nil)

// WorkflowRunsClientAPI contains the set of methods on the WorkflowRunsClient type.
type WorkflowRunsClientAPI interface {
	Cancel(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result logic.WorkflowRun, err error)
	List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowRunListResultPage, err error)
}

var _ WorkflowRunsClientAPI = (*logic.WorkflowRunsClient)(nil)

// WorkflowRunActionsClientAPI contains the set of methods on the WorkflowRunActionsClient type.
type WorkflowRunActionsClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.WorkflowRunAction, err error)
	List(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result logic.WorkflowRunActionListResultPage, err error)
	ListExpressionTraces(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.ExpressionTraces, err error)
}

var _ WorkflowRunActionsClientAPI = (*logic.WorkflowRunActionsClient)(nil)

// WorkflowRunActionRepetitionsClientAPI contains the set of methods on the WorkflowRunActionRepetitionsClient type.
type WorkflowRunActionRepetitionsClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result logic.WorkflowRunActionRepetitionDefinition, err error)
	List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.WorkflowRunActionRepetitionDefinitionCollection, err error)
	ListExpressionTraces(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result logic.ExpressionTraces, err error)
}

var _ WorkflowRunActionRepetitionsClientAPI = (*logic.WorkflowRunActionRepetitionsClient)(nil)

// WorkflowRunActionRepetitionsRequestHistoriesClientAPI contains the set of methods on the WorkflowRunActionRepetitionsRequestHistoriesClient type.
type WorkflowRunActionRepetitionsRequestHistoriesClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string) (result logic.RequestHistory, err error)
	List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result logic.RequestHistoryListResultPage, err error)
}

var _ WorkflowRunActionRepetitionsRequestHistoriesClientAPI = (*logic.WorkflowRunActionRepetitionsRequestHistoriesClient)(nil)

// WorkflowRunActionRequestHistoriesClientAPI contains the set of methods on the WorkflowRunActionRequestHistoriesClient type.
type WorkflowRunActionRequestHistoriesClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, requestHistoryName string) (result logic.RequestHistory, err error)
	List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.RequestHistoryListResultPage, err error)
}

var _ WorkflowRunActionRequestHistoriesClientAPI = (*logic.WorkflowRunActionRequestHistoriesClient)(nil)

// WorkflowRunActionScopedRepetitionsClientAPI contains the set of methods on the WorkflowRunActionScopedRepetitionsClient type.
type WorkflowRunActionScopedRepetitionsClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result logic.WorkflowRunActionRepetitionDefinition, err error)
	List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.WorkflowRunActionRepetitionDefinitionCollection, err error)
}

var _ WorkflowRunActionScopedRepetitionsClientAPI = (*logic.WorkflowRunActionScopedRepetitionsClient)(nil)

// WorkflowRunOperationsClientAPI contains the set of methods on the WorkflowRunOperationsClient type.
type WorkflowRunOperationsClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, operationID string) (result logic.WorkflowRun, err error)
}

var _ WorkflowRunOperationsClientAPI = (*logic.WorkflowRunOperationsClient)(nil)

// IntegrationAccountsClientAPI contains the set of methods on the IntegrationAccountsClient type.
type IntegrationAccountsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, integrationAccount logic.IntegrationAccount) (result logic.IntegrationAccount, err error)
	Delete(ctx context.Context, resourceGroupName string, integrationAccountName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, integrationAccountName string) (result logic.IntegrationAccount, err error)
	GetCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, parameters logic.GetCallbackURLParameters) (result logic.CallbackURL, err error)
	ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result logic.IntegrationAccountListResultPage, err error)
	ListBySubscription(ctx context.Context, top *int32) (result logic.IntegrationAccountListResultPage, err error)
	ListKeyVaultKeys(ctx context.Context, resourceGroupName string, integrationAccountName string, listKeyVaultKeys logic.ListKeyVaultKeysDefinition) (result logic.KeyVaultKeyCollection, err error)
	LogTrackingEvents(ctx context.Context, resourceGroupName string, integrationAccountName string, logTrackingEvents logic.TrackingEventsDefinition) (result autorest.Response, err error)
	RegenerateAccessKey(ctx context.Context, resourceGroupName string, integrationAccountName string, regenerateAccessKey logic.RegenerateActionParameter) (result logic.IntegrationAccount, err error)
	Update(ctx context.Context, resourceGroupName string, integrationAccountName string, integrationAccount logic.IntegrationAccount) (result logic.IntegrationAccount, err error)
}

var _ IntegrationAccountsClientAPI = (*logic.IntegrationAccountsClient)(nil)

// IntegrationAccountAssembliesClientAPI contains the set of methods on the IntegrationAccountAssembliesClient type.
type IntegrationAccountAssembliesClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string, assemblyArtifact logic.AssemblyDefinition) (result logic.AssemblyDefinition, err error)
	Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (result logic.AssemblyDefinition, err error)
	List(ctx context.Context, resourceGroupName string, integrationAccountName string) (result logic.AssemblyCollection, err error)
	ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (result logic.WorkflowTriggerCallbackURL, err error)
}

var _ IntegrationAccountAssembliesClientAPI = (*logic.IntegrationAccountAssembliesClient)(nil)

// IntegrationAccountBatchConfigurationsClientAPI contains the set of methods on the IntegrationAccountBatchConfigurationsClient type.
type IntegrationAccountBatchConfigurationsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string, batchConfiguration logic.BatchConfiguration) (result logic.BatchConfiguration, err error)
	Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string) (result logic.BatchConfiguration, err error)
	List(ctx context.Context, resourceGroupName string, integrationAccountName string) (result logic.BatchConfigurationCollection, err error)
}

var _ IntegrationAccountBatchConfigurationsClientAPI = (*logic.IntegrationAccountBatchConfigurationsClient)(nil)

// SchemasClientAPI contains the set of methods on the SchemasClient type.
type SchemasClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, schema logic.IntegrationAccountSchema) (result logic.IntegrationAccountSchema, err error)
	Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result logic.IntegrationAccountSchema, err error)
	ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSchemaListResultPage, err error)
	ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error)
}

var _ SchemasClientAPI = (*logic.SchemasClient)(nil)

// MapsClientAPI contains the set of methods on the MapsClient type.
type MapsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, mapParameter logic.IntegrationAccountMap) (result logic.IntegrationAccountMap, err error)
	Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result logic.IntegrationAccountMap, err error)
	ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountMapListResultPage, err error)
	ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error)
}

var _ MapsClientAPI = (*logic.MapsClient)(nil)

// PartnersClientAPI contains the set of methods on the PartnersClient type.
type PartnersClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, partner logic.IntegrationAccountPartner) (result logic.IntegrationAccountPartner, err error)
	Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result logic.IntegrationAccountPartner, err error)
	ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountPartnerListResultPage, err error)
	ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error)
}

var _ PartnersClientAPI = (*logic.PartnersClient)(nil)

// AgreementsClientAPI contains the set of methods on the AgreementsClient type.
type AgreementsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, agreement logic.IntegrationAccountAgreement) (result logic.IntegrationAccountAgreement, err error)
	Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result logic.IntegrationAccountAgreement, err error)
	ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountAgreementListResultPage, err error)
	ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error)
}

var _ AgreementsClientAPI = (*logic.AgreementsClient)(nil)

// CertificatesClientAPI contains the set of methods on the CertificatesClient type.
type CertificatesClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string, certificate logic.IntegrationAccountCertificate) (result logic.IntegrationAccountCertificate, err error)
	Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result logic.IntegrationAccountCertificate, err error)
	ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result logic.IntegrationAccountCertificateListResultPage, err error)
}

var _ CertificatesClientAPI = (*logic.CertificatesClient)(nil)

// SessionsClientAPI contains the set of methods on the SessionsClient type.
type SessionsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string, session logic.IntegrationAccountSession) (result logic.IntegrationAccountSession, err error)
	Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (result logic.IntegrationAccountSession, err error)
	ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSessionListResultPage, err error)
}

var _ SessionsClientAPI = (*logic.SessionsClient)(nil)

// RosettaNetProcessConfigurationsClientAPI contains the set of methods on the RosettaNetProcessConfigurationsClient type.
type RosettaNetProcessConfigurationsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, rosettaNetProcessConfigurationName string, rosettaNetProcessConfiguration logic.IntegrationAccountRosettaNetProcessConfiguration) (result logic.IntegrationAccountRosettaNetProcessConfiguration, err error)
	Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, rosettaNetProcessConfigurationName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, integrationAccountName string, rosettaNetProcessConfigurationName string) (result logic.IntegrationAccountRosettaNetProcessConfiguration, err error)
	ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountRosettaNetProcessConfigurationListResultPage, err error)
}

var _ RosettaNetProcessConfigurationsClientAPI = (*logic.RosettaNetProcessConfigurationsClient)(nil)


text:
@echo
START https://google.com


text:
package org.apache.hadoop.fs.s3native;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;

import static org.junit.Assert.*;
import static org.junit.Assume.*;

import org.junit.Before;
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URI;
import java.security.DigestInputStream;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class TestJets3tNativeFileSystemStore {
  private Configuration conf;
  private Jets3tNativeFileSystemStore store;
  private NativeS3FileSystem fs;

  @Before
  public void setUp() throws Exception {
    conf = new Configuration();
    store = new Jets3tNativeFileSystemStore();
    fs = new NativeS3FileSystem(store);
    conf.setBoolean("fs.s3n.multipart.uploads.enabled", true);
    conf.setLong("fs.s3n.multipart.uploads.block.size", 64 * 1024 * 1024);
    fs.initialize(URI.create(conf.get("test.fs.s3n.name")), conf);
  }

  @After
  public void tearDown() throws Exception {
    try {
      store.purge("test");
    } catch (Exception e) {}
  }

  @BeforeClass
  public static void checkSettings() throws Exception {
    Configuration conf = new Configuration();
    assumeNotNull(conf.get("fs.s3n.awsAccessKeyId"));
    assumeNotNull(conf.get("fs.s3n.awsSecretAccessKey"));
    assumeNotNull(conf.get("test.fs.s3n.name"));
  }

  protected void writeRenameReadCompare(Path path, long len)
      throws IOException, NoSuchAlgorithmException {
    // If len > fs.s3n.multipart.uploads.block.size,
    // we'll use a multipart upload copy
    MessageDigest digest = MessageDigest.getInstance("MD5");
    OutputStream out = new BufferedOutputStream(
        new DigestOutputStream(fs.create(path, false), digest));
    for (long i = 0; i < len; i++) {
      out.write('Q');
    }
    out.flush();
    out.close();

    assertTrue("Exists", fs.exists(path));

    // Depending on if this file is over 5 GB or not,
    // rename will cause a multipart upload copy
    Path copyPath = path.suffix(".copy");
    fs.rename(path, copyPath);

    assertTrue("Copy exists", fs.exists(copyPath));

    // Download file from S3 and compare the digest against the original
    MessageDigest digest2 = MessageDigest.getInstance("MD5");
    InputStream in = new BufferedInputStream(
        new DigestInputStream(fs.open(copyPath), digest2));
    long copyLen = 0;
    while (in.read() != -1) {copyLen++;}
    in.close();

    assertEquals("Copy length matches original", len, copyLen);
    assertArrayEquals("Digests match", digest.digest(), digest2.digest());
  }

  @Test
  public void testSmallUpload() throws IOException, NoSuchAlgorithmException {
    // Regular upload, regular copy
    writeRenameReadCompare(new Path("/test/small"), 16384);
  }

  @Test
  public void testMediumUpload() throws IOException, NoSuchAlgorithmException {
    // Multipart upload, regular copy
    writeRenameReadCompare(new Path("/test/medium"), 33554432);    // 100 MB
  }

  @Test
  public void testExtraLargeUpload()
      throws IOException, NoSuchAlgorithmException {
    // Multipart upload, multipart copy
    writeRenameReadCompare(new Path("/test/xlarge"), 5368709121L); // 5GB+1byte
  }
}


text:
package org.apache.camel.builder;

import java.util.Map;
import java.util.function.BiPredicate;
import java.util.function.Predicate;

import org.apache.camel.Exchange;
import org.apache.camel.Message;

public class PredicateClause<T> implements org.apache.camel.Predicate {
    private final T parent;
    private Predicate<Exchange> predicate;

    public PredicateClause(T parent) {
        this.parent = parent;
        this.predicate = null;
    }

    @Override
    public boolean matches(Exchange exchange) {
        return (predicate != null) ? predicate.test(exchange) : false;
    }

    // *******************************
    // Exchange
    // *******************************

    /**
     * Define a {@link org.apache.camel.Predicate} which targets the Exchange.
     */
    public T exchange(final Predicate<Exchange> predicate) {
        this.predicate = predicate::test;
        return parent;
    }

    // *******************************
    // Message
    // *******************************

    /**
     * Define a {@link org.apache.camel.Predicate} which targets the Exchange In Message.

     *
     *

     * {@code
     * from("direct:aggregate")
     *     .choice()
     *         .when()
     *            .message(m -> m.getBody() != null)
     *            .log("Received ${body}")
     *     .endChoice()
     * }
     *

     *
     *

     */
    public T message(final Predicate<Message> predicate) {
        return exchange(e -> predicate.test(e.getIn()));
    }

    // *******************************
    // Body
    // *******************************

    /**
     * Define a {@link org.apache.camel.Predicate} which targets the Exchange In Body.

     *
     *

     * {@code
     * from("direct:aggregate")
     *     .choice()
     *         .when()
     *            .body(b -> b != null)
     *            .log("Received ${body}")
     *     .endChoice()
     * }
     *

     *
     *

     */
    public T body(final Predicate<Object> predicate) {
        return exchange(e -> predicate.test(e.getIn().getBody()));
    }

    /**
     * Define a {@link org.apache.camel.Predicate} which targets the typed Exchange In Body.

     *
     *

     * {@code
     * from("direct:aggregate")
     *     .choice()
     *         .when()
     *            .body(Long.class, b -> (b & 1) == 0)
     *            .log("Received even number ${body}")
     *     .endChoice()
     * }
     *

     *
     *

     */
    public  T body(final Class type, final Predicate predicate) {
        return exchange(e -> predicate.test(e.getIn().getBody(type)));
    }

    /**
     * Define a {@link org.apache.camel.Predicate} which targets the Exchange In Body and its Headers.

     *
     *

     * {@code
     * from("direct:aggregate")
     *     .choice()
     *         .when()
     *            .body((b, h) -> b != null || h.containsKy("ToProcess"))
     *            .log("Received ${body}")
     *     .endChoice()
     * }
     *

     *
     *

     */
    public T body(final BiPredicate<Object, Map<String, Object>> predicate) {
        return exchange(e -> predicate.test(e.getIn().getBody(), e.getIn().getHeaders()));
    }

    /**
     * Define a {@link org.apache.camel.Predicate} which targets the typed Exchange In Body and its Headers.
     *

     *
     *

     * {@code
     * from("direct:aggregate")
     *     .choice()
     *         .when()
     *            .body(String.class, (b, h) -> b != null && !b.isEmpty() || h.containsKy("ToProcess"))
     *            .log("Received ${body}")
     *     .endChoice()
     * }
     *

     *
     *

     */
    public  T body(final Class type, final BiPredicate<B, Map<String, Object>> predicate) {
        return exchange(e -> predicate.test(e.getIn().getBody(type), e.getIn().getHeaders()));
    }
}


text:
struct wl_resource;

namespace wl {

extern const struct wl_buffer_interface kMockWlBufferImpl;

// Manage wl_buffer object.
class MockBuffer : public ServerObject {
 public:
  MockBuffer(wl_resource* resource, std::vector<base::ScopedFD>&& fds);
  ~MockBuffer() override;

 private:
  std::vector<base::ScopedFD> fds_;

  DISALLOW_COPY_AND_ASSIGN(MockBuffer);
};

}  // namespace wl

#endif  // UI_OZONE_PLATFORM_WAYLAND_TEST_MOCK_BUFFER_H_


text:
namespace g{namespace Android{namespace android{namespace graphics{struct SurfaceTexture;}}}}
namespace g{namespace Android{namespace Fallbacks{struct Android_android_graphics_SurfaceTextureDLROnFrameAvailableListener;}}}

namespace g{
namespace Android{
namespace Fallbacks{

// public sealed extern class Android_android_graphics_SurfaceTextureDLROnFrameAvailableListener :22850
// {
struct Android_android_graphics_SurfaceTextureDLROnFrameAvailableListener_type : ::g::Android::java::lang::Object_type
{
    ::g::Android::android::graphics::SurfaceTextureDLROnFrameAvailableListener interface2;
};

Android_android_graphics_SurfaceTextureDLROnFrameAvailableListener_type* Android_android_graphics_SurfaceTextureDLROnFrameAvailableListener_typeof();
void Android_android_graphics_SurfaceTextureDLROnFrameAvailableListener__onFrameAvailable_fn(Android_android_graphics_SurfaceTextureDLROnFrameAvailableListener* __this, ::g::Android::android::graphics::SurfaceTexture* arg0);
void Android_android_graphics_SurfaceTextureDLROnFrameAvailableListener__onFrameAvailable_IMPL_7295_fn(bool* arg0_, jobject* arg1_, uObject* arg2_);

struct Android_android_graphics_SurfaceTextureDLROnFrameAvailableListener : ::g::Android::java::lang::Object
{
    static jmethodID onFrameAvailable_7295_ID_;
    static jmethodID& onFrameAvailable_7295_ID() { return onFrameAvailable_7295_ID_; }

    void onFrameAvailable(::g::Android::android::graphics::SurfaceTexture* arg0);
    static void onFrameAvailable_IMPL_7295(bool arg0_, jobject arg1_, uObject* arg2_);
};
// }

}}} // ::g::Android::Fallbacks


text:
<?php

declare(strict_types=1);

namespace AssetManager\Cache;

use Assetic\Contracts\Cache\CacheInterface;
use Psr\SimpleCache\CacheInterface as SimpleCache;

/**
 * PSR SimpleCache Adapter for Assetic
 */
class PsrSimpleCacheAdapter implements CacheInterface
{

    /** @var SimpleCache */
    protected $cache;

    /** @var int|null */
    protected $ttl;

    /**
     * Constructor
     *
     * @param SimpleCache $cache Laminas Configured Cache Storage
     * @param int|null $ttl
     */
    public function __construct(SimpleCache $cache, ?int $ttl = null)
    {
        $this->cache = $cache;
        $this->ttl = $ttl;
    }

    /**
     * {@inheritDoc}
     */
    public function has($key)
    {
        return $this->cache->has($key);
    }

    /**
     * {@inheritDoc}
     */
    public function get($key)
    {
        return $this->cache->get($key);
    }

    /**
     * {@inheritDoc}
     */
    public function set($key, $value)
    {
        return $this->cache->set($key, $value, $this->ttl);
    }

    /**
     * {@inheritDoc}
     */
    public function remove($key)
    {
        return $this->cache->delete($key);
    }
}


text:
module Guguk.Syllabification
(syllabify, Syllable) where

import           Data.Char  (isAlpha, toLower)
import           Data.Maybe (fromJust, isJust, isNothing)
import qualified Data.Text as T

import qualified Guguk.TurkishAlphabet as Alph

type Syllable = T.Text

-- | Java's substring.
substring :: Int -> Int -> T.Text -> T.Text
substring x y = T.drop x . T.take y

{-|
  Returns True is the char is in the text,
       or False otherwise
-}
elemT :: Char -> T.Text -> Bool
elemT c t = isJust $ T.find (==c) t

-- | List of Turkish syllables of the given text.
-- Syllables dont contain apostrophes, they are all in lower case.
-- Note that apostrophe is a definite syllable separator
-- for words of Arabic origin which contain the sound "ع".
syllabify :: T.Text -> [Syllable]
syllabify s
  -- Base case
  | T.null s = []
  -- Split on apostrophes
  | '\'' `elemT` T.tail s = concatMap syllabify (T.splitOn "'" s)
  -- Return the same if there is no vowel
  | isNothing firstVowelIndex = [xs]
  -- now it is safe to use fVI
  | hasVowelAt (fVI+1)         = handleSubstring 1
  | hasVowelAt (fVI+2)         = handleSubstring 1
  | hasVowelAt (fVI+3)         = handleSubstring 2
  | fVI + 3 >= len             = [xs]
  | lastPart `elem` exceptions = handleSubstring 2
  | otherwise = handleSubstring 3
  where xs = (T.filter isAlpha . T.map toLower) s
        firstVowelIndex = T.findIndex Alph.isVowel xs
        fVI = fromJust firstVowelIndex
        len = T.length xs
        lastPart = substring 2 5 xs
        exceptions = ["str", "ktr", "mtr", "nsp"]
        handleSubstring n =
          substring 0 (fVI + n) xs : syllabify(substring (fVI + n) len xs)
        hasVowelAt i = i < len && Alph.isVowel (T.index xs i)


text:
using namespace CryptoNote;
using namespace Logging;

extern Tests::Common::BaseFunctionalTestsConfig baseCfg;
// extern System::Dispatcher globalDispatcher;

struct TotalWalletBalance {

  TotalWalletBalance(uint64_t actual_ = 0, uint64_t pending_ = 0)
    : actual(actual_), pending(pending_) {}

  TotalWalletBalance(IWalletLegacy& wallet)
    : TotalWalletBalance(wallet.actualBalance(), wallet.pendingBalance()) {}

  uint64_t actual = 0;
  uint64_t pending = 0;

  uint64_t total() const {
    return actual + pending;
  }
};

class IntegrationTest : public Tests::Common::BaseFunctionalTests, public ::testing::Test {
public:

  IntegrationTest() :
    currency(CryptoNote::CurrencyBuilder(log).testnet(true).currency()),
    BaseFunctionalTests(currency, dispatcher, baseCfg),
    logger(log, "IntegrationTest") {
  }

  ~IntegrationTest() {
    wallets.clear();
    inodes.clear();

    stopTestnet();
  }

  void makeINodes() {
    for (auto& n : nodeDaemons) {
      std::unique_ptr<INode> node;
      n->makeINode(node);
      inodes.push_back(std::move(node));
    }
  }

  void makeWallets() {
    for (auto& n: inodes) {
      std::unique_ptr<CryptoNote::IWalletLegacy> wallet(new CryptoNote::WalletLegacy(m_currency, *n));
      std::unique_ptr<WalletLegacyObserver> observer(new WalletLegacyObserver());

      wallet->initAndGenerate(walletPassword);
      wallet->addObserver(observer.get());

      wallets.push_back(std::move(wallet));
      walletObservers.push_back(std::move(observer));
    }
  }

  void mineBlocksFor(size_t node, const std::string& address, size_t blockCount) {
    auto prevHeight = nodeDaemons[node]->getLocalHeight();
    nodeDaemons[node]->startMining(1, address);

    do {
      std::this_thread::sleep_for(std::chrono::seconds(1));
    } while (prevHeight + blockCount < nodeDaemons[node]->getLocalHeight());

    nodeDaemons[node]->stopMining();
  }

  void printWalletBalances() {
    for (auto& w: wallets) {
      logger(INFO) << "Wallet " << w->getAddress().substr(0, 6);
      logger(INFO) << "  " << currency.formatAmount(w->actualBalance()) << " actual / " << currency.formatAmount(w->pendingBalance()) << " pending";
    }
  }

  void mineEmptyBlocks(size_t nodeNum, size_t blocksCount) {
  }

  void mineMoneyForWallet(size_t nodeNum, size_t walletNum) {
    auto& wallet = *wallets[walletNum];
    auto& node = *nodeDaemons[nodeNum];

    node.startMining(1, wallet.getAddress());
    walletObservers[walletNum]->waitActualBalanceChange();
    node.stopMining();

    while (node.getLocalHeight() > walletObservers[walletNum]->getCurrentHeight()) {
      std::this_thread::sleep_for(std::chrono::seconds(1));
    }
  }

  std::error_code transferMoney(size_t srcWallet, size_t dstWallet, uint64_t amount, uint64_t fee) {
    logger(INFO)
      << "Transferring from " << wallets[srcWallet]->getAddress().substr(0, 6)
      << " to " << wallets[dstWallet]->getAddress().substr(0, 6) << " " << currency.formatAmount(amount);

    CryptoNote::WalletLegacyTransfer tr;
    tr.address = wallets[dstWallet]->getAddress();
    tr.amount = amount;
    std::error_code result;

    auto txId = wallets[srcWallet]->sendTransaction(tr, fee);

    logger(DEBUGGING) << "Transaction id = " << txId;

    return walletObservers[srcWallet]->waitSendResult(txId);
  }

  void checkIncomingTransfer(size_t dstWallet, uint64_t amount) {
    startMining(1);

    auto txId = walletObservers[dstWallet]->waitExternalTransaction();

    stopMining();

    WalletLegacyTransaction txInfo;

    ASSERT_TRUE(wallets[dstWallet]->getTransaction(txId, txInfo));
    ASSERT_EQ(txInfo.totalAmount, amount);
  }

  System::Dispatcher dispatcher;
  std::string walletPassword = "pass";
  CryptoNote::Currency currency;
  Logging::ConsoleLogger log;
  Logging::LoggerRef logger;

  std::vector<std::unique_ptr<INode>> inodes;
  std::vector<std::unique_ptr<IWalletLegacy>> wallets;
  std::vector<std::unique_ptr<WalletLegacyObserver>> walletObservers;
};

TEST_F(IntegrationTest, Wallet2Wallet) {
  const uint64_t FEE = 1000000;

  launchTestnet(2);

  logger(INFO) << "Testnet launched";

  makeINodes();
  makeWallets();

  logger(INFO) << "Created wallets";

  mineMoneyForWallet(0, 0);

  logger(INFO) << "Mined money";

  printWalletBalances();

  TotalWalletBalance w0pre(*wallets[0]);
  TotalWalletBalance w1pre(*wallets[1]);

  auto sendAmount = w0pre.actual / 2;

  ASSERT_TRUE(!transferMoney(0, 1, sendAmount, currency.minimumFee()));
  ASSERT_NO_FATAL_FAILURE(checkIncomingTransfer(1, sendAmount));

  printWalletBalances();

  TotalWalletBalance w0after(*wallets[0]);
  TotalWalletBalance w1after(*wallets[1]);

  // check total
  ASSERT_EQ(w0pre.total() + w1pre.total() - currency.minimumFee(), w0after.total() + w1after.total());

  // check diff
  ASSERT_EQ(sendAmount, w1after.total() - w1pre.total());
}

TEST_F(IntegrationTest, BlockPropagationSpeed) {

  launchTestnet(3, Line);
  makeINodes();

  {
    std::unique_ptr<CryptoNote::INode>& localNode = inodes.front();
    std::unique_ptr<CryptoNote::INode>& remoteNode = inodes.back();

    std::unique_ptr<CryptoNote::IWalletLegacy> wallet;
    makeWallet(wallet, localNode);

    NodeObserver localObserver(*localNode);
    NodeObserver remoteObserver(*remoteNode);

    const size_t BLOCKS_COUNT = 10;

    nodeDaemons.front()->startMining(1, wallet->getAddress());

    for (size_t blockNumber = 0; blockNumber < BLOCKS_COUNT; ++blockNumber) {
      uint32_t localHeight = localObserver.waitLastKnownBlockHeightUpdated();
      uint32_t remoteHeight = 0;

      while (remoteHeight != localHeight) {
        ASSERT_TRUE(remoteObserver.waitLastKnownBlockHeightUpdated(std::chrono::milliseconds(5000), remoteHeight));
      }

      logger(INFO) << "Iteration " << blockNumber + 1 << ": " << "height = " << localHeight;
    }

    nodeDaemons.front()->stopMining();
  }
}


text:
"""This is helper module that contains functions
to easeup communication with seaweed-fs
"""

import requests

from pyseaweed.version import __version__

class Connection(object):
    def __init__(self, use_session=False):
        if use_session:
            self._conn = requests.Session()
        else:
            self._conn = requests

    def _prepare_headers(self, additional_headers=None, **kwargs):
        """Prepare headers for http communication.

        Return dict of header to be used in requests.

        Args:
            .. versionadded:: 0.3.2
                **additional_headers**: (optional) Additional headers
                to be used with request

        Returns:
            Headers dict. Key and values are string

        """
        user_agent = "pyseaweed/{version}".format(version=__version__)
        headers = {"User-Agent": user_agent}
        if additional_headers is not None:
            headers.update(additional_headers)
        return headers

    def head(self, url, *args, **kwargs):
        """Returns response to http HEAD
        on provided url
        """
        res = self._conn.head(url, headers=self._prepare_headers(**kwargs))
        if res.status_code == 200:
            return res
        return None

    def get_data(self, url, *args, **kwargs):
        """Gets data from url as text

        Returns content under the provided url as text

        Args:
            **url**: address of the wanted data

            .. versionadded:: 0.3.2
                **additional_headers**: (optional) Additional headers
                to be used with request

        Returns:
            string

        """
        res = self._conn.get(url, headers=self._prepare_headers(**kwargs))
        if res.status_code == 200:
            return res.text
        else:
            return None

    def get_raw_data(self, url, *args, **kwargs):
        """Gets data from url as bytes

        Returns content under the provided url as bytes
        ie. for binary data

        Args:
            **url**: address of the wanted data

            .. versionadded:: 0.3.2
                **additional_headers**: (optional) Additional headers
                to be used with request

        Returns:
            bytes

        """
        res = self._conn.get(url, headers=self._prepare_headers(**kwargs))
        if res.status_code == 200:
            return res.content
        else:
            return None

    def post_file(self, url, filename, file_stream, *args, **kwargs):
        """Uploads file to provided url.

        Returns contents as text

        Args:
            **url**: address where to upload file

            **filename**: Name of the uploaded file

            **file_stream**: file like object to upload

            .. versionadded:: 0.3.2
                **additional_headers**: (optional) Additional headers
                to be used with request

        Returns:
            string
        """
        res = self._conn.post(
            url,
            files={filename: file_stream},
            headers=self._prepare_headers(**kwargs),
        )
        if res.status_code == 200 or res.status_code == 201:
            return res.text
        else:
            return None

    def delete_data(self, url, *args, **kwargs):
        """Deletes data under provided url

        Returns status as boolean.

        Args:
            **url**: address of file to be deleted

            .. versionadded:: 0.3.2
                **additional_headers**: (optional) Additional headers
                to be used with request

        Returns:
            Boolean. True if request was successful. False if not.
        """
        res = self._conn.delete(url, headers=self._prepare_headers(**kwargs))
        if res.status_code == 200 or res.status_code == 202:
            return True
        else:
            return False


text:
libfixmath
==========

### About

`libfixmath` is a cross platform fixed-point math library, with the addition of vector, matrix, and color operations. There is an emphasis optimizing for game development. This repository was originally forked from [sunsided/libfixmath](https://github.com/sunsided/libfixmath), which is a mirror of [libfixmath](https://code.google.com/p/libfixmath/).

### License
  To see the full text of the license, see the `LICENSE` file.

Contributing
============

Want to contribute? Great! I could always use some extra help!

### Found a bug or do you have a suggestion?

If so, I'd love to hear it. Create an issue [here](https://github.com/ijacquez/libyaul/issues).

### Rebranding/forking

If you're interested into further porting/adapting/whatever, please don't fork off. I hate it, and so does everyone else.

Let's try to keep everything under a single project.


text:
/*
    Document   : bootstrap3_vertical_offset
    Created on : 25 févr. 2015, 14:42:26
    Author     : fda
    Description:
        Purpose of the stylesheet follows.
*/

/*
Include this after bootstrap.css. Add class of
vert-offset-top-value or vert-offset-bottom-value
to your Bootstrap 3 default rows to prevent row content
from touching the row content above or below.
*/

/* Vertical Offset Bottom */
.vert-offset-top-12{
margin-top: 12em;
}
.vert-offset-top-11{
margin-top: 11em;
}
.vert-offset-top-10{
margin-top: 10em;
}
.vert-offset-top-9{
margin-top: 9em;
}
.vert-offset-top-8{
margin-top: 8em;
}
.vert-offset-top-7 {
margin-top: 7em;
}
.vert-offset-top-6{
margin-top: 6em;
}
.vert-offset-top-5{
margin-top: 5em;
}
.vert-offset-top-4{
margin-top: 4em;
}
.vert-offset-top-3{
margin-top: 3em;
}
.vert-offset-top-2{
margin-top: 2em;
}
.vert-offset-top-1{
margin-top: 1em;
}
.vert-offset-top-0{
margin-top: 0em;
}
/* Vertical Offset Bottom */
.vert-offset-bottom-12{
margin-bottom: 12em;
}
.vert-offset-bottom-11{
margin-bottom: 11em;
}
.vert-offset-bottom-10{
margin-bottom: 10em;
}
.vert-offset-bottom-9{
margin-bottom: 9em;
}
.vert-offset-bottom-8{
margin-bottom: 8em;
}
.vert-offset-bottom-7{
margin-bottom: 7em;
}
.vert-offset-bottom-6{
margin-bottom: 6em;
}
.vert-offset-bottom-5{
margin-bottom: 5em;
}
.vert-offset-bottom-4{
margin-bottom: 4em;
}
.vert-offset-bottom-3{
margin-bottom: 3em;
}
.vert-offset-bottom-2{
margin-bottom: 2em;
}
.vert-offset-bottom-1{
margin-bottom: 1em;
}
.vert-offset-bottom-0{
margin-bottom: 0em;
}


text:
package ru.malanyuk.test.model;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
import org.hibernate.annotations.Table;
import org.hibernate.annotations.Type;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@XStreamAlias("group")
@Entity
@javax.persistence.Table(name = "group_list")
public class GroupDate {

    @XStreamOmitField()
    @Id
    @Column(name = "group_id")
    private int id = Integer.MAX_VALUE;
    @Column(name = "group_name")
    private String groupName;
    @Column(name = "group_header")
    @Type(type = "text")
    private String header;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        GroupDate groupDate = (GroupDate) o;

        if (id != groupDate.id) return false;
        if (groupName != null ? !groupName.equals(groupDate.groupName) : groupDate.groupName != null) return false;
        if (header != null ? !header.equals(groupDate.header) : groupDate.header != null) return false;
        return footer != null ? footer.equals(groupDate.footer) : groupDate.footer == null;

    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (groupName != null ? groupName.hashCode() : 0);
        result = 31 * result + (header != null ? header.hashCode() : 0);
        result = 31 * result + (footer != null ? footer.hashCode() : 0);
        return result;
    }

    @Column(name = "group_footer")
    @Type(type = "text")
    private String footer;

    public GroupDate withId(int id) {
        this.id = id;
        return this;
    }

    public GroupDate withGroupName(String groupName) {
        this.groupName = groupName;
        return this;
    }

    public GroupDate withHeader(String header) {
        this.header = header;
        return this;
    }

    public GroupDate withFooter(String footer) {
        this.footer = footer;
        return this;
    }

    @Override
    public String toString() {
        return "GroupDate{" +
                "groupName='" + groupName + '\'' +
                ", id='" + id + '\'' +
                '}';
    }

    public int getId() {
        return id;
    }

    public String getGroupName() {
        return groupName;
    }

    public String getHeader() {
        return header;
    }

    public String getFooter() {
        return footer;
    }

}


text:
package lib

sealed trait Method extends Product with Serializable

object Method {

  case object Get extends Method { override def toString = "GET" }
  case object Post extends Method { override def toString = "POST" }
  case object Put extends Method { override def toString = "PUT" }
  case object Patch extends Method { override def toString = "PATCH" }
  case object Delete extends Method { override def toString = "DELETE" }
  case object Head extends Method { override def toString = "HEAD" }
  case object Connect extends Method { override def toString = "CONNECT" }
  case object Options extends Method { override def toString = "OPTIONS" }
  case object Trace extends Method { override def toString = "TRACE" }

  case class UNDEFINED(override val toString: String) extends Method

  val all: scala.List[Method] = scala.List(Get, Post, Put, Patch, Delete, Head, Connect, Options, Trace)

  private[this]
  val byName: Map[String, Method] = all.map(x => x.toString.toLowerCase -> x).toMap

  def apply(value: String): Method = fromString(value).getOrElse(UNDEFINED(value))

  def fromString(value: String): _root_.scala.Option[Method] = byName.get(value.toLowerCase)

}


text:
(function() {
  var UserCtrl;

  UserCtrl = (function() {
    function UserCtrl($log, UserService) {
      this.$log = $log;
      this.UserService = UserService;
      this.$log.debug("constructing UserController");
      this.users = [];
      this.getAllUsers();
    }

    UserCtrl.prototype.getAllUsers = function() {
      this.$log.debug("getAllUsers()");
      return this.UserService.listUsers().then((function(_this) {
        return function(data) {
          _this.$log.debug("Promise returned " + data.length + " Users");
          return _this.users = data;
        };
      })(this), (function(_this) {
        return function(error) {
          return _this.$log.error("Unable to get Users: " + error);
        };
      })(this));
    };

    return UserCtrl;

  })();

  controllersModule.controller('UserCtrl', UserCtrl);

}).call(this);


text:
/**
 * This package contains the interfaces and classes that are used to run JMeter tests.
 */

package org.apache.jmeter.engine;


text:
define(['jimu/shared/BaseVersionManager'],
function(BaseVersionManager) {
  function VersionManager(){
    this.versions = [{
      version: '1.0',
      upgrader: function(oldConfig){
        return oldConfig;
      }
    }, {
      version: '1.1',
      upgrader: function(oldConfig){
        return oldConfig;
      }
    }, {
      version: '1.2',
      upgrader: function(oldConfig){
        return oldConfig;
      }
    }, {
      version: '1.3',
      upgrader: function(oldConfig){
        return oldConfig;
      }
    }, {
      version: '1.4',
      upgrader: function(oldConfig){
        return oldConfig;
      }
    }, {
      version: '2.0Beta',
      upgrader: function(oldConfig) {
        return oldConfig;
      }
    }, {
      version: '2.0',
      upgrader: function(oldConfig) {
        return oldConfig;
      }
    }, {
      version: '2.0.1',
      upgrader: function(oldConfig) {
        return oldConfig;
      }
    }, {
      version: '2.1',
      upgrader: function(oldConfig) {
        return oldConfig;
      }
    }, {
      version: '2.2',
      upgrader: function(oldConfig){
        return oldConfig;
      }
    }, {
      version: '2.3',
      upgrader: function(oldConfig){
        var newConfig = oldConfig;
        if (newConfig) {
          if ("undefined" === typeof newConfig.displayOrderLonLat) {
            newConfig.displayOrderLonLat = false;
          }
        }
        return newConfig;
      }
    }];
  }

  VersionManager.prototype = new BaseVersionManager();
  VersionManager.prototype.constructor = VersionManager;
  return VersionManager;
});


text:
<?php
	//insert this view
	include('snippets/header.php');
?>

			<?php include('snippets/aside-nav.php'); ?>

Add new

							 Edit paper

						<?php if($alert['response'] !=''): ?>
						<div class="alert alert-<?php echo $alert['response']; ?>">
							<?php echo $alert['message']; ?>

						<?php endif; ?>

							<form action="<?php echo ROOT.'/'.$_GET['p'].'/'.$add_to_url.'/'; ?>" method="POST">

									DOI:
									<input type="text" class="form-control" id="doi" name="doi" value="http://dx.doi.org/10.1145/2531602.2531659" required>

Author: abc

Author: abc

Author: abc

									<input type="checkbox" id="recommend" class="" name="recommend">
									I reccomend this paper

									File input
									<input type="file" id="exampleInputFile">

Example block-level help text here.

									<?php
										if($formAction == 'insert'):
									?>

												Does:
												<select name="aida_option[]" id="something" class="form-control">
													<option value="Confirms">Claim</option>
													<option value="Refutes">Refutes</option>
													<option value="option 3">option 3</option>
												</select>

													Aida Sentence:
													<textarea name="aida[]" class="form-control"></textarea>
													<input type="hidden" class="aida_id" name="aida_id[]" value="<?php echo $last_aida_id; ?>">
													<input type="hidden" class="aida_action" name="aida_action[]" value="<?php echo $formAction; ?>">

												<button class="delete-aida btn btn-md btn-default"></button>

									<?php
										endif;

										if($formAction == 'update'):

											foreach($aidas as $aida_item):
											$selected[$aida_item['aida_option']] = 'selected="selected"';
									?>

														Does:
														<select name="aida_option[]" id="something" class="form-control">
															<option value="Confirms" <?php echo $selected['Confirms']; ?>>Claim</option>
															<option value="Refutes" <?php echo $selected['Refutes']; ?>>Refutes</option>
															<option value="option 3" <?php echo $selected['option 3']; ?>>option 3</option>
														</select>

															Aida Sentence:
															<textarea name="aida[]" class="form-control"><?php echo $aida_item['description'] ?></textarea>
															<input type="hidden" class="aida_id" name="aida_id[]" value="<?php echo $aida_item['id']; ?>">
															<input type="hidden" class="aida_action" name="aida_action[]" value="<?php echo $formAction; ?>">

														<button class="delete-aida btn btn-md btn-default"></button>

									<?php
											endforeach;
										endif;
									?>

									<button class="add-aida btn btn-md- btn-primary">+ Add Aida</button>

									About this paper (DOI)
									<input type="text" class="form-control" id="doi2" name="doi2" placeholder="http://" value="http://"  required>

									<input type="hidden" name="action" value="<?php echo $formAction; ?>">
									<input type="hidden" name="paper_id" value="<?php echo ($formAction == 'insert' ) ? $add_to_url:$_GET['var']?>">
									<button type="submit" class="btn btn-md btn-primary"> Save</button>

									<?php
										if($_GET['var']){
											//echo $paper['doi'];

											$trigdata = $trig->aida($paper['doi'],$date,$login->get_login_info('orcid'));

											echo(htmlspecialchars($trigdata));

											$filename = $paper['id'].'_'.$login->get_login_info('orcid').'_'.date('Y-d-m');
											$trig->writeFile($filename, $trigdata, 'trigfiles');
										}
									?>

							</form>

							 Block title

							<form>

									Email address
									<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email">

									Password
									<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">

									  <input type="checkbox"> Check me out

								<button type="submit" class="btn btn-default">Submit</button>

							</form>

<?php include('snippets/footer.php');  ?>