text:
define([
    'underscore',
    'contrail-view',
    'core-basedir/js/models/LineBarWithFocusChartModel',
    'contrail-list-model'
], function (_, ContrailView, LineBarWithFocusChartModel, ContrailListModel) {
    var LineBarWithFocusChartView = ContrailView.extend({
        render: function () {
            var viewConfig = this.attributes.viewConfig,
                ajaxConfig = viewConfig['ajaxConfig'],
                self = this, deferredObj = $.Deferred(),
                selector = $(self.$el);

            if (self.model === null && viewConfig['modelConfig'] != null) {
                self.model = new ContrailListModel(viewConfig['modelConfig']);
            }

            self.renderChart(selector, viewConfig, self.model);

            if (self.model !== null) {
                if (self.model.loadedFromCache || !(self.model.isRequestInProgress())) {
                    self.renderChart(selector, viewConfig, self.model);
                }

                self.model.onAllRequestsComplete.subscribe(function () {
                    self.renderChart(selector, viewConfig, self.model);
                });

                if (viewConfig.loadChartInChunks) {
                    self.model.onDataUpdate.subscribe(function () {
                        self.renderChart(selector, viewConfig, self.model);
                    });
                }
            }
        },

        renderChart: function (selector, viewConfig, chartViewModel) {
            var data = chartViewModel.getItems(),
                chartTemplate = contrail.getTemplate4Id(cowc.TMPL_CHART),
                widgetConfig = contrail.checkIfExist(viewConfig.widgetConfig) ? viewConfig.widgetConfig : null,
                chartViewConfig, chartOptions, chartModel;

            if (contrail.checkIfFunction(viewConfig['parseFn'])) {
                data = viewConfig['parseFn'](data);
            }

            chartViewConfig = getChartViewConfig(data, viewConfig.chartOptions);
            chartOptions = chartViewConfig['chartOptions'];
            //viewConfig.chartOptions = chartOptions;
            chartModel = new LineBarWithFocusChartModel(chartOptions);
            this.chartModel = chartModel;

            if ($(selector).find("svg") != null) {
                $(selector).empty();
            }

            $(selector).append(chartTemplate(chartOptions));

            //Store the chart object as a data attribute so that the chart can be updated dynamically
            $(selector).data('chart', chartModel);

            nvd3v181.addGraph(function () {
                if (!($(selector).is(':visible'))) {
                    $(selector).find('svg').bind("refresh", function () {
                        setData2Chart(selector, chartViewConfig, chartViewModel, chartModel);
                    });
                } else {
                    setData2Chart(selector, chartViewConfig, chartViewModel, chartModel);
                }

                nvd3v181.utils.windowResize(chartModel.update);

                chartModel.dispatch.on('stateChange', function (e) {
                    nvd3v181.log('New State:', JSON.stringify(e));
                });
                return chartModel;
            });

            if (widgetConfig !== null) {
                this.renderView4Config(selector.find('.chart-container'), chartViewModel, widgetConfig, null, null, null);
            }
        }
    });

    function setData2Chart(selector, chartViewConfig, chartViewModel, chartModel) {

        var chartData = chartViewConfig.chartData,
            checkEmptyDataCB = function (data) {
                return (!data || data.length === 0 || !data.filter(function (d) { return d.values.length; }).length);
            },
            chartDataRequestState = cowu.getRequestState4Model(chartViewModel, chartData, checkEmptyDataCB),
            chartDataObj = {
                data: chartData,
                requestState: chartDataRequestState
            },
            chartOptions = chartViewConfig['chartOptions'];

        d3.select($(selector)[0]).select('svg').datum(chartDataObj).call(chartModel);

        if (chartDataRequestState !== cowc.DATA_REQUEST_STATE_SUCCESS_NOT_EMPTY) {

            var container = d3.select($(selector).find("svg")[0]),
                requestStateText = container.selectAll('.nv-requestState').data([cowm.getRequestMessage(chartDataRequestState)]),
                textPositionX = $(selector).width() / 2,
                textPositionY = chartOptions.margin.top + $(selector).find('.nv-focus').heightSVG() / 2 + 10;

            requestStateText
                .enter().append('text')
                .attr('class', 'nvd3 nv-requestState')
                .attr('dy', '-.7em')
                .style('text-anchor', 'middle');

            requestStateText
                .attr('x', textPositionX)
                .attr('y', textPositionY)
                .text(function(t){ return t; });

        } else {
            $(selector).find('.nv-requestState').remove();
        }
    }

    function getChartViewConfig(chartData, chartOptions) {
        var chartViewConfig = {};

        var chartOptions = $.extend(true, {}, covdc.lineBarWithFocusChartConfig, chartOptions);

        chartOptions['forceY1'] = getForceY1Axis(chartData, chartOptions['forceY1']);
        chartOptions['forceY2'] = getForceY2Axis(chartData, chartOptions['forceY2']);

        if (chartData.length > 0) {
            var values = chartData[0].values,
                brushExtent = null,
                start, end;

            if (values.length >= 25) {
                start = values[values.length - 25];
                end = values[values.length - 1];
                chartOptions['brushExtent'] = [getViewFinderPoint(start.x), getViewFinderPoint(end.x)];
            }
        }

        chartViewConfig['chartData'] = chartData;
        chartViewConfig['chartOptions'] = chartOptions;

        return chartViewConfig;
    };

    function getForceY1Axis(chartData, defaultForceY1) {
        var dataBars = chartData.filter(function (d) {
                return !d.disabled && d.bar
            }),
            dataAllBars = [], forceY1;

        for (var j = 0; j < dataBars.length; j++) {
            dataAllBars = dataAllBars.concat(dataBars[j]['values']);
        }

        forceY1 = cowu.getForceAxis4Chart(dataAllBars, "y", defaultForceY1);
        return forceY1;
    };

    function getForceY2Axis(chartData, defaultForceY2) {
        var dataLines = chartData.filter(function (d) {
                return !d.bar
            }),
            dataAllLines = [], forceY2;

        for (var i = 0; i < dataLines.length; i++) {
            dataAllLines = dataAllLines.concat(dataLines[i]['values']);
        }

        forceY2 = cowu.getForceAxis4Chart(dataAllLines, "y", defaultForceY2);
        return forceY2;
    };

    return LineBarWithFocusChartView;
});


text:
package drds

import (
	. "aliyun-openapi-go-sdk/core"
)

type DeleteDrdsDBRequest struct {
	RpcRequest
	DrdsInstanceId string
	DbName         string
}

func (r *DeleteDrdsDBRequest) SetDrdsInstanceId(value string) {
	r.DrdsInstanceId = value
	r.QueryParams.Set("DrdsInstanceId", value)
}
func (r *DeleteDrdsDBRequest) GetDrdsInstanceId() string {
	return r.DrdsInstanceId
}
func (r *DeleteDrdsDBRequest) SetDbName(value string) {
	r.DbName = value
	r.QueryParams.Set("DbName", value)
}
func (r *DeleteDrdsDBRequest) GetDbName() string {
	return r.DbName
}

func (r *DeleteDrdsDBRequest) Init() {
	r.RpcRequest.Init()
	r.SetVersion(Version)
	r.SetAction("DeleteDrdsDB")
	r.SetProduct(Product)
}

type DeleteDrdsDBResponse struct {
	Success bool `xml:"Success" json:"Success"`
}

func DeleteDrdsDB(req *DeleteDrdsDBRequest, accessId, accessSecret string) (*DeleteDrdsDBResponse, error) {
	var pResponse DeleteDrdsDBResponse
	body, err := ApiHttpRequest(accessId, accessSecret, req)
	if err != nil {
		return nil, err
	}
	ApiUnmarshalResponse(req.GetFormat(), body, &pResponse)
	return &pResponse, err
}

redpajama_set_name: RedPajamaGithub


text:
package com.andela.currencycalculator;

import android.app.ProgressDialog;
import android.content.Context;

import android.graphics.Color;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;

import com.andela.currencycalculator.adapter.SpinnerAdapter;
import com.andela.currencycalculator.manager.CalculatorManager;
import com.andela.currencycalculator.calculatorbrain.CurrencyConstant;
import com.andela.currencycalculator.manager.ParserDbManager;
import com.andela.currencycalculator.model.currency.Currency;
import com.andela.currencycalculator.model.currency.TopTen;
import com.andela.currencycalculator.model.helper.SpinnerCurrency;
import com.andela.currencycalculator.model.helper.StringManipulator;
import com.andela.currencycalculator.model.jsonparser.JsonParserListener;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;

/**
 * @author Akinsanmi Waleola
 * @version 1
 * @since 2/02/2016.
 */

public class MainActivity extends AppCompatActivity implements JsonParserListener,
        AdapterView.OnItemSelectedListener {

    private ParserDbManager parserDbManager;
    private Spinner spinnerFrom, spinnerTo;
    private String spinnerFromSelectedText;
    private String spinnerToSelectedText;
    private CalculatorManager calculatorManager;
    /**
     * inputNumber used to save keypressed by user and answer
     *

     * inputNumber used in :
     *
     * @{@link MainActivity#keyPressed(View)}
     *

     *

     */
    private String inputNumber = "";
    private boolean currencyMode = true;
    private ArrayList<String> allCurrencyInput;
    private boolean sameCurrencySelected = false;
    private ProgressDialog progress;
    private Button functionButtonPressed;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        parserDbManager = ParserDbManager.getInstance(this);
        parserDbManager.setJsonParserListener(this);
        spinnerTo = (Spinner) findViewById(R.id.spinner_To);
        spinnerFrom = (Spinner) findViewById(R.id.spinner_from);
        allCurrencyInput = new ArrayList<>();
        progress = new ProgressDialog(this);
        progress.setCancelable(false);
        progress.setIndeterminate(false);
        functionButtonPressed = new Button(this);

        initialSetUp();
        setListenerOnButton();
    }

    private void initialSetUp() {
        if (isConnectionAvailable()) {
            progress.setMessage("Fetching exchange rate");
            progress.show();
            parserDbManager.getDataFromJson();

        } else if (parserDbManager.hasDatabase()) {
            progress.setMessage("reading from database");
            progress.show();
            notifyActivity(parserDbManager.readAllCurrencyDataFromDb());
        } else {
            Toast.makeText(this, "You need to be connected to internet", Toast.LENGTH_LONG).show();
            progress.setMessage("You need to be connected to internet");
            progress.show();
        }
    }

    private void setListenerOnButton() {
        Button clearButton = (Button) findViewById(R.id.buttonCancel);
        clearButton.setOnLongClickListener(new View.OnLongClickListener() {
            @Override
            public boolean onLongClick(View v) {
                TextView inputTextView = (TextView) findViewById(R.id.inputTextView);
                inputTextView.setText("");
                inputNumber = "";
                updateOutputView();
                return true;
            }
        });

    }

    /**
     * KeyPressed is called when a user presses a keypad (0-9) in the view
     *

     * When the button is pressed
     * Check if inputNumber doesn't contain ans and it's not null
     * save the value in the variable {@link MainActivity#inputNumber}.
     * This method has helper methods
     * {@link MainActivity#checkIfInputIsOperator()}
     * {@link MainActivity#updateOutputView()}
     * {@link MainActivity#checkIfInputIsZero(TextView, View)}
     *

     *
     * @param view which is a button
     */

    public void keyPressed(View view) {
        clearRedButton(view);
        if ((inputNumber != null) &&
                (inputNumber.length() < 10 || inputNumber.contains("ans"))) {

            checkIfInputIsOperator();
            TextView inputTextView = (TextView) findViewById(R.id.inputTextView);
            inputNumber = inputTextView.getText().toString();
            checkIfInputIsZero(inputTextView, view);

        } else {
            Toast.makeText(this, "maximum amount reached", Toast.LENGTH_SHORT).show();
        }
        updateOutputView();

    }

    /**
     * helper method for {@link MainActivity#keyPressed(View)}
     */

    private void checkIfInputIsOperator() {
        if (StringManipulator.isOperator(inputNumber)) {
            TextView inputTextView = (TextView) findViewById(R.id.inputTextView);
            inputTextView.setText("");
            inputNumber = "";
        } else if (inputNumber != null && inputNumber.contains("ans")) {
            inputNumber = "";
        }
    }

    /**
     * helper method for {@link MainActivity#keyPressed(View)}
     */

    private void checkIfInputIsZero(TextView inputTextView, View view) {
        String buttonPressed = view.getTag().toString();

        if (inputNumber.equals("0") || inputNumber.equals("")) {
            inputTextView.setText(buttonPressed);
            inputNumber = buttonPressed;
        } else {
            inputNumber = inputNumber + buttonPressed;
            inputTextView.setText(inputNumber);
        }
        updateOutputView();
    }

    /**
     * Updates the outputview based on the inputText
     * helper method for {@link MainActivity#keyPressed(View)}
     */
    private void updateOutputView() {
        TextView outputView = (TextView) findViewById(R.id.outputText);
        boolean flag = currencyMode && (!StringManipulator.isOperator(inputNumber)) &&
                (inputNumber != null && !inputNumber.equals("")) && !inputNumber.contains("ans");

        if (flag) {
            String result = calculatorManager.exchangeFromCurrencyTo(spinnerFromSelectedText,
                    spinnerToSelectedText, inputNumber);

            outputView.setText(result);
        } else {
            outputView.setText("");
        }

    }

    /**
     * Method call when operation button is pressed in view
     *

     * Function key pressed takes the inputNumber,
     * Adds it into the Brain ArrayList
     * It also calls the onPressedFunctionKey to register the function in the ArrayList
     *  Helper Menthods
     *

     *
 {@link MainActivity#switchFunctionKeyColor(Button)}

     *
{@link CalculatorManager#addValueToArray(String)}

     *
{@link CalculatorManager#onPressedOfFunctionKey(String)}

     *

     *

     * The operator button is passed into {@link MainActivity#inputNumber}
     *

     *
     * @param view is the button pressed in the view
     */
    public void functionKeyPressed(View view) {

        switchFunctionKeyColor((Button) view);
        if (inputNumber.contains("ans")) {
            inputNumber = inputNumber.split(CurrencyConstant.CURR_DELIMITER.getValue())[1].trim();
        }

        if (inputNumber != null && !inputNumber.equals("")) {
            if (currencyMode) {
                String currCodeAndValue = spinnerFromSelectedText +
                        CurrencyConstant.CURR_DELIMITER.getValue() + inputNumber;

                updateFunctionKey(view, currCodeAndValue);
                calculatorManager.addValueToArray(currCodeAndValue);
            } else {
                updateFunctionKey(view, inputNumber);
                calculatorManager.addValueToArray(inputNumber);
            }
            inputNumber = view.getTag().toString();
            calculatorManager.onPressedOfFunctionKey(inputNumber);
        }
        updateHistoryTextView();
    }

    /**
     * helper method for {@link MainActivity#functionKeyPressed(View)}
     */

    private void switchFunctionKeyColor(Button button) {
        if (button != functionButtonPressed) {
            functionButtonPressed.setTextColor(Color.parseColor("#FFFFFF"));
            button.setTextColor(Color.parseColor("#FF0000"));
            functionButtonPressed = button;
        }
    }

    private void updateHistoryTextView() {
        TextView historyTextView = (TextView) findViewById(R.id.historyTextView);
        String valuesInArray = allCurrencyInput.toString();
        valuesInArray = valuesInArray.replace("[", "");
        valuesInArray = valuesInArray.replace("]", "");
        valuesInArray = valuesInArray.replace(",", "");
        historyTextView.setText(valuesInArray);
    }

    private void updateFunctionKey(View view, String currCodeAndValue) {
        if (!StringManipulator.isOperator(inputNumber)) {
            allCurrencyInput.add(currCodeAndValue);
            allCurrencyInput.add(view.getTag().toString());
        } else {
            allCurrencyInput.remove(allCurrencyInput.size() - 1);
            allCurrencyInput.add(view.getTag().toString());
        }
    }

    /**
     *

     * adds the last input value {@link MainActivity#inputNumber} into the calculator Brain
     * calculatorManager.addValueToCalculate(spinnerFromSelectedText + ":" + inputNumber);
     * It calls the performCalculation {@link CalculatorManager#performOperation(String)}
     * which returns the solution(String) from the arraylist in CalculatorManager
     * Saves the answer in inputText {@link MainActivity#inputNumber}  as "ans: " + the answer returned
     * clear the brain arrayList.
     * It adds the new answer, if operator key is selected afterwards..
     *

     *
     * @param view is a Button
     */
    public void answerKeyPressed(View view) {
        TextView outputView = (TextView) findViewById(R.id.outputText);
        TextView inputView = (TextView) findViewById(R.id.inputTextView);

        if (inputNumber != null && !inputNumber.contains("ans")) {
            performNewCalculation(inputView, outputView);
        } else {
            calculatorManager.reInitializeArray();
        }

        updateHistoryTextView();
        sameCurrencySelected = false;
        allCurrencyInput.clear();
        clearRedButton(view);
    }

    private void performNewCalculation(TextView inputView, TextView outputView) {
        if (currencyMode) {
            performCurrencyModeOperation();
            performOperationBasedOnMode();
        } else {
            performCalculatorModeOperation();
        }
        outputView.setText(inputNumber);
        inputNumber = "ans " + CurrencyConstant.CURR_DELIMITER.getValue() + inputNumber;
        calculatorManager.reInitializeArray();
        inputView.setText("");
    }

    /**
     * This runs through the arrayList {@link MainActivity#allCurrencyInput }
     * Checks if the currency value in the arrayList is same thing
     * Then the program switch to calculator mode
     */

    private void performCurrencyModeOperation() {
        if (!inputNumber.equals("")) {
            String newValue = spinnerFromSelectedText + CurrencyConstant.CURR_DELIMITER.getValue()
                    + inputNumber;
            calculatorManager.addValueToArray(newValue);
            allCurrencyInput.add(newValue);
        }

        for (String currencyValue : allCurrencyInput) {
            if (currencyValue.contains(spinnerToSelectedText) ||
                    StringManipulator.isOperator(currencyValue)) {

                sameCurrencySelected = true;
            } else {
                sameCurrencySelected = false;
                break;
            }
        }
    }

    private void performOperationBasedOnMode() {
        if (sameCurrencySelected) {
            switchCurrencyModeToCalculatorMode();
        } else {
            convertAllCurrenciesToBaseAndCalculate();
            updateOutputView();
        }
    }

    private void switchCurrencyModeToCalculatorMode() {
        calculatorManager.reInitializeArray();
        calculatorManager.switchMode(false);
        String value;
        for (String currencyValue : allCurrencyInput) {
            if (currencyValue.contains(CurrencyConstant.CURR_DELIMITER.getValue())) {
                value = currencyValue.split(CurrencyConstant.CURR_DELIMITER.getValue())[1];
                performOperationOn(value, currencyValue);
            } else if (StringManipulator.isOperator(currencyValue)) {
                calculatorManager.onPressedOfFunctionKey(currencyValue);
            }
        }
        sameCurrencySelected = false;
        inputNumber = calculatorManager.performOperation("");
        calculatorManager.reInitializeArray();
        calculatorManager.switchMode(true);
    }

    private void performOperationOn(String value, String currencyValue) {

        if (currencyValue.contains(spinnerToSelectedText)) {
            calculatorManager.addValueToArray(value);
        } else if (StringManipulator.isOperator(value)) {
            calculatorManager.onPressedOfFunctionKey(value);
        }
    }

    private void convertAllCurrenciesToBaseAndCalculate() {
        calculatorManager.switchMode(false);
        for (String currencyValue : allCurrencyInput) {

            if (!StringManipulator.isOperator(currencyValue) && !currencyValue.equals("")) {
                String currFrom = currencyValue.split(CurrencyConstant.CURR_DELIMITER.getValue())[0];
                String value = currencyValue.split(CurrencyConstant.CURR_DELIMITER.getValue())[1];
                if (!StringManipulator.isOperator(value)) {
                    calculatorManager.addValueToArray(calculatorManager.exchangeFromCurrencyTo(
                            currFrom, spinnerToSelectedText, value));
                }

            } else {
                calculatorManager.onPressedOfFunctionKey(currencyValue);
            }

        }
        inputNumber = calculatorManager.performOperation("");
        calculatorManager.reInitializeArray();
        calculatorManager.switchMode(true);

    }

    private void performCalculatorModeOperation() {
        if (!inputNumber.equals("")) {
            allCurrencyInput.add(inputNumber);
        }
        calculatorManager.reInitializeArray();
        for (String values : allCurrencyInput) {
            if (!StringManipulator.isOperator(values) && !values.equals("")) {
                calculatorManager.addValueToArray(values);
            } else {
                calculatorManager.onPressedOfFunctionKey(values);
            }
        }
        inputNumber = calculatorManager.performOperation("");
        currencyMode = false;
    }

    public void dotKeyPressed(View view) {

        TextView inputTextView = (TextView) findViewById(R.id.inputTextView);
        if (inputNumber.contains("ans")) {
            inputNumber = "0.";
        } else if (inputNumber != null && !inputNumber.contains(".") &&
                !StringManipulator.isOperator(inputNumber) && !inputNumber.equals("")) {
            inputNumber = inputNumber + ".";
        } else if (StringManipulator.isOperator(inputNumber) || inputNumber.equals("")) {
            inputNumber = "0.";

        }
        inputTextView.setText(inputNumber);
    }

    /**
     * currencyFrom and CurrencyTo is onclick method on the Button
     * that represents the Spinner in the UI
     * but when the button is clicked. It calls the actual spinner object
     * to wake up..
     */
    public void currencyFrom(View view) {
        spinnerFrom.performClick();
    }

    public void currencyTo(View view) {
        spinnerTo.performClick();
    }

    /**
     * AdapterView.OnItemSelectedListener call back method
     *

     * When an item on the Spinner is selected
     * The value is updated by calling the
     * {@link MainActivity#updateSpinnerButtonTo(SpinnerCurrency)}
     *

     *
     * @param parent
     * @param view
     * @param pos
     * @param id
     */
    public void onItemSelected(AdapterView<?> parent, View view,
                               int pos, long id) {
        SpinnerCurrency valueSelected = (SpinnerCurrency) parent.getItemAtPosition(pos);
        if (parent.getId() == R.id.spinner_from) {
            updateSpinnerButtonFrom(valueSelected);
        } else {
            updateSpinnerButtonTo(valueSelected);
        }

    }

    /**
     * The method assigns the code selected from the Spinner
     * and assigns it to the variable {@link MainActivity#spinnerFromSelectedText}
     * or {@link MainActivity#spinnerToSelectedText} based the spinner clicked
     *

     * This update the outputview based on the selected value
     * in the spinner
     *
     * @param valueSelected
     */

    private void updateSpinnerButtonFrom(SpinnerCurrency valueSelected) {
        Button buttonFrom = (Button) findViewById(R.id.currency_converting_From);
        spinnerFromSelectedText = valueSelected.getSpinnerCodeText();
        buttonFrom.setText(spinnerFromSelectedText);
        TextView currencyTextInput = (TextView) findViewById(R.id.currencyTextInput);
        currencyTextInput.setText(parserDbManager.getCurrencyIcon(spinnerFromSelectedText));
        if (inputNumber != null && !inputNumber.equals("")) {
            updateOutputView();
        }
    }

    private void updateSpinnerButtonTo(SpinnerCurrency valueSelected) {
        Button buttonTo = (Button) findViewById(R.id.currency_converting_To);
        spinnerToSelectedText = valueSelected.getSpinnerCodeText();
        buttonTo.setText(spinnerToSelectedText);
        TextView currencyTextAnswer = (TextView) findViewById(R.id.currencyTextAnswer);
        currencyTextAnswer.setText(parserDbManager.getCurrencyIcon(spinnerToSelectedText));
        if (inputNumber != null && !inputNumber.equals("")) {
            updateOutputView();
        }
    }

    public void onNothingSelected(AdapterView<?> parent) {
    }

    /**
     * This is a call back method
     * This method is called from the ParserDbManager to notify the activity
     * when the ParserDbManager gets the Json file fro CurrencyJsonParser
     *
     * @param currencies
     */

    @Override
    public void notifyActivity(ArrayList<Currency> currencies) {
        calculatorManager = new CalculatorManager(currencies, currencyMode);
        calculatorManager.switchMode(currencyMode);
        setSpinnerDisplay();
        progress.dismiss();

    }

    /**
     * This method sets the Spinner Display
     *

     * Method Loops through allCurrenciesInFile, Sort the Map in Alphabetical order
     * Adds, the Top ten Currencies and populate the ArrayList<SpinnerCurrency>
     *

     * The ArrayList currencyKeys is of type {@link SpinnerCurrency}
     * The arrayList (currencyKeys) will be parsed in the SpinnerAdapter
     * {@link SpinnerAdapter}
     * The ArrayList allCurrenciesInFile maps String(currencyCode) to
     * value(ArrayList of string => index[0] country and index[1] is the symbol)
     *

     * This method calls {@link MainActivity#addItemInSpinnerArrayList(TreeMap,
     * ArrayList, ArrayList)}
     * which runs through the currencies from file and populates the currencyKeys
     * arrayList.
     *

     *

     *

     */
    private void setSpinnerDisplay() {
        HashMap<String, ArrayList<String>> allCurrenciesInFile = parserDbManager.readAllCurrencyInFile();

        ArrayList<SpinnerCurrency> currencyKeys = new ArrayList<>();
        TreeMap<String, ArrayList<String>> sortedCurrencies = new TreeMap<>(allCurrenciesInFile);

        TopTen topTen = new TopTen();
        ArrayList<String> allTopTen = topTen.getTopTen();

        addItemInSpinnerArrayList(sortedCurrencies, currencyKeys, allTopTen);

        spinnerFrom.setOnItemSelectedListener(this);
        spinnerTo.setOnItemSelectedListener(this);

        SpinnerAdapter adapter = new SpinnerAdapter(this,
                R.layout.spinner_layout, R.id.spinnerCodeView, currencyKeys);

        spinnerFrom.setAdapter(adapter);
        spinnerTo.setAdapter(adapter);

    }

    private void addItemInSpinnerArrayList(TreeMap<String, ArrayList<String>> sortedCurrencies,
                                           ArrayList<SpinnerCurrency> currencyKeys,
                                           ArrayList<String> allTopTen) {

        for (Map.Entry<String, ArrayList<String>> entry : sortedCurrencies.entrySet()) {
            //the symbol code
            String code = entry.getKey();
            if (entry.getValue().size() > 0) {
                String imageName = StringManipulator.replaceSpaceToLower(entry.getValue().get(0));
                int resID = getResources().getIdentifier(imageName, "drawable", getPackageName());
                String countryName = parserDbManager.getCurrencyCountry(code);
                if (allTopTen.contains(code)) {
                    currencyKeys.add(0, new SpinnerCurrency(resID, code, countryName));
                } else {
                    currencyKeys.add(new SpinnerCurrency(resID, code, countryName));
                }
            }

        }
    }

    private boolean isConnectionAvailable() {
        ConnectivityManager cm =
                (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);

        NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
        return activeNetwork != null && activeNetwork.isConnectedOrConnecting();
    }

    /**
     * set the Mode in Model.... and erase the screen and input text
     * In the model, reset the ArrayList
     * Switch the mode...
     */
    public void switchMode(View view) {
        currencyMode = !currencyMode;
        clearScreen();
        Button fromButton = (Button) findViewById(R.id.currency_converting_From);
        Button toButton = (Button) findViewById(R.id.currency_converting_To);
        Button modeButton = (Button) findViewById(R.id.currency_switch);

        if (!currencyMode) {
            switchMode(toButton, fromButton, modeButton, false);
        } else {
            switchMode(toButton, fromButton, modeButton, true);
        }
        clearRedButton(view);
        allCurrencyInput.clear();
        updateHistoryTextView();
    }

    private void switchMode(Button toButton, Button fromButton, Button modeButton, boolean flag) {
        TextView outputView = (TextView) findViewById(R.id.currencyTextAnswer);
        TextView inputView = (TextView) findViewById(R.id.currencyTextInput);
        fromButton.setEnabled(flag);
        toButton.setEnabled(flag);

        if (flag) {
            modeButton.setText(R.string.CurrencyCode);
            outputView.setText(parserDbManager.getCurrencyIcon(spinnerToSelectedText));
            inputView.setText(parserDbManager.getCurrencyIcon(spinnerFromSelectedText));
            calculatorManager.switchMode(currencyMode);

        } else {
            modeButton.setText(R.string.CalculatorCode);
            inputView.setText("");
            outputView.setText("");
            calculatorManager.switchMode(currencyMode);
        }

        clearScreen();
    }

    private void clearScreen() {
        TextView inputTextView = (TextView) findViewById(R.id.inputTextView);
        TextView outputTextView = (TextView) findViewById(R.id.outputText);
        inputTextView.setText("");
        outputTextView.setText("");

        inputNumber = "";
    }

    public void deleteButtonClicked(View view) {
        TextView inputTextView = (TextView) findViewById(R.id.inputTextView);
        TextView outPutTextView = (TextView) findViewById(R.id.outputText);

        if (!inputNumber.contains("ans") && (inputNumber != null && !inputNumber.equals("")) && inputNumber.length() != 0) {
            inputNumber = inputNumber.substring(0, inputNumber.length() - 1);
            inputTextView.setText(inputNumber);
        } else if (inputNumber.contains("ans")) {
            outPutTextView.setText("");
        }

        if (inputNumber.equals("") && allCurrencyInput.size() != 0) {
            manipulateArray();
        }
        updateHistoryTextView();
        clearRedButton(view);
        updateOutputView();
    }

    private void manipulateArray() {
        TextView inputText = (TextView) findViewById(R.id.inputTextView);
        String lastInput = allCurrencyInput.get(allCurrencyInput.size() - 1);
        allCurrencyInput.remove(allCurrencyInput.size() - 1);
        if (currencyMode) {
            performCurrArrayManipulation(lastInput);
        } else {
            if (!StringManipulator.isOperator(lastInput)) {
                inputNumber = lastInput;
            }
        }
        inputText.setText(inputNumber);
        updateHistoryTextView();
        updateOutputView();
    }

    private void performCurrArrayManipulation(String lastInput) {
        if (lastInput.contains(CurrencyConstant.CURR_DELIMITER.getValue())) {
            String[] splitValue = lastInput.split(CurrencyConstant.CURR_DELIMITER.getValue());
            if (!StringManipulator.isOperator(splitValue[1])) {
                inputNumber = splitValue[1];
            }
        }
    }

    private void clearRedButton(View view) {
        functionButtonPressed.setTextColor(Color.parseColor("#FFFFFF"));
        functionButtonPressed = (Button) view;
    }
}


text:
import unittest
from lib.utils import parse_command_text

class CommandParserTest(unittest.TestCase):

    def test_parse_search_query(self):
        cmds = (
            ('d\'oh', 'd\'oh'),
            ('don\'t you hate pants?', 'don\'t you hate pants?'),
            (u'Aurora borealis.', u'Aurora borealis.'),
            ('nothing at all!', 'nothing at all!'),
            ('     Checkmate, Mr. Trampoline.     ', 'Checkmate, Mr. Trampoline.')
        )
        for cmd in cmds:
            query, caption = parse_command_text(cmd[0])
            self.assertEqual(query, cmd[1])
            self.assertIsNone(caption)

    def test_parse_caption(self):
        cmds = (
            ('nothing at all "Nothing at all..."  " ...  ', ('nothing at all', 'Nothing at all...')),
            ('   Aurora borealis. "At this time of year"   ', (u'Aurora borealis.', 'At this time of year')),
            (u'trampoline "Checkmate, Mr Trampoline"', (u'trampoline', u'Checkmate, Mr Trampoline'))
        )
        for cmd in cmds:
            query, caption = parse_command_text(cmd[0])
            self.assertEqual(query, cmd[1][0])
            self.assertEqual(caption, cmd[1][1])

    def test_parse_linebreaks(self):
        cmds = (
            ('nothing at all "Nothing at all... | Nothing at all... | Nothing at all..."  " ...  ', ('nothing at all', 'Nothing at all...\nNothing at all...\nNothing at all...')),
            ('am I out of touch "Am I out of touch? No it\'s the children who are wrong."', ('am I out of touch', 'Am I out of touch? No\nit\'s the children who are\nwrong.'))
        )
        for cmd in cmds:
            query, caption = parse_command_text(cmd[0])
            self.assertEqual(query, cmd[1][0])
            self.assertEqual(caption, cmd[1][1])

    def test_parse_special_quotes(self):
        query, caption = parse_command_text(u'trampoline "Checkmate, Mr Trampoline"')
        self.assertEqual(caption, u'Checkmate, Mr Trampoline', u'Did not convert curly quotes wrapping caption')


text:
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace PrtgAPI.Tests.IntegrationTests.ObjectData
{
    [TestClass]
    public class DeviceTests : BasePrtgClientTest
    {
        [TestMethod]
        [IntegrationTest]
        public void Data_Device_GetDevices_HasAnyResults()
        {
            HasAnyResults(client.GetDevices);
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Device_GetDevices_ReturnsJustDevices()
        {
            ReturnsJustObjectsOfType(client.GetDevices, Settings.Group, Settings.DevicesInTestGroup, BaseType.Device);
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Device_ReadOnlyUser()
        {
            var device = readOnlyClient.GetDevice(Settings.Device);

            AssertEx.AllPropertiesRetrieveValues(device);
        }

        [TestMethod]
        [IntegrationTest]
        public async Task Data_Device_ReadOnlyUserAsync()
        {
            var device = await readOnlyClient.GetDeviceAsync(Settings.Device);

            AssertEx.AllPropertiesRetrieveValues(device);
        }
    }
}


text:
from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('museum_site', '0026_auto_20190307_0205'),
    ]

    operations = [
        migrations.RenameField(
            model_name='article',
            old_name='type',
            new_name='schema',
        ),
        migrations.AlterField(
            model_name='article',
            name='published',
            field=models.IntegerField(choices=[(1, 'Published'), (2, 'Upcoming'), (3, 'Unpublished'), (0, 'Removed')], default=0),
        ),
        migrations.AlterField(
            model_name='file',
            name='articles',
            field=models.ManyToManyField(blank=True, default=None, to='museum_site.Article'),
        ),
    ]


text:
import { css } from "styled-components"

export const listAnimationCSS = (toggle: boolean) => {
  let styles = ""
  const MAX_NUM = 10
  const OPEN_BASE = 0.1
  const CLOSE_BASE = 0.25
  const OFFSET = 0.06

  const TRANSFORM_DURING = 0.5
  const OPACITY_DURING = 0.3

  const TRANSFORM_TIMING_FUNC = toggle
    ? "cubic-bezier(.19,.2,0,.99)"
    : "ease-in"
  const OPACITY_TIMING_FUNC = "ease-out"

  const calcDelaySec = (i: number) =>
    toggle ? OPEN_BASE + i * OFFSET : CLOSE_BASE - i * OFFSET

  for (let i = 0; i < MAX_NUM; i += 1) {
    styles += `
    li:nth-child(${i}) {
        transition-property: transform, opacity;
        transition-duration: ${TRANSFORM_DURING}s, ${OPACITY_DURING}s;
        transition-delay: ${calcDelaySec(i)}s;
        transition-timing-function: ${TRANSFORM_TIMING_FUNC}, ${OPACITY_TIMING_FUNC};
    }
    `
  }

  return css`
    ${styles}
  `
}

export const navBackgroundAnimationCSS = (toggle: boolean) => {
  const TRANSITION = toggle ? "0.3s ease" : "0.4s ease-in-out 0.48s"
  const OPACITY = toggle ? 1 : 0
  return css`
    transition: opacity ${TRANSITION};
    opacity: ${OPACITY};
  `
}

export const curtainAnimationCSS = (toggle: boolean) => {
  const SCALE = toggle ? "scaleY(1)" : "scaleY(0)"
  return css`
    transition: transform 0.6s cubic-bezier(0.41, 0.06, 0.05, 1) 0.1s;
    transform: ${SCALE};
    transform-origin: top;
  `
}


text:
<?php

class Userpermission_Model extends CI_Model
{
    // public $userObj;
    public $userPermsObj;
    public $deptPermsObj;

    public function __construct()
    {
        parent::__construct();
        $this->userPermsObj = new User_Perms_Model($this->session->id);
        $this->deptPermsObj = new Dept_Perms_Model($this->session->department);
    }

    /**
     * return an array of all the Allowed files ( right >= view_right) ID
     * @param bool $limit
     * @return array
     */
    public function getAllowedFileIds($limit, $offset = null)
    {
        $viewableArray = $this->getViewableFileIds($limit, $offset);
        $readableArray = $this->getReadableFileIds($limit, $offset);
        $writeableArray = $this->getWriteableFileIds($limit, $offset);
        $adminableArray = $this->getAdminableFileIds($limit, $offset);
        $resultArray = array_values(array_unique(array_merge($viewableArray, $readableArray, $writeableArray, $adminableArray)));
        return $resultArray;
    }

    /**
     * return an array of all the Allowed files ( right >= view_right) object
     * @param bool $limit
     * @return array
     */
    public function getAllowedFileOBJs($limit = true, $offset = null)
    {
        return $this->convertToFileDataOBJ($this->getAllowedFileIds($limit, $offset));
    }

    /**
     * @param bool $limit
     * @return array
     */
    public function getViewableFileIds($limit = null, $offset = null)
    {
        //These 2 below takes half of the execution time for this function
        $uP = ($this->userPermsObj->getCurrentViewOnly($limit, $offset));
        $dP = ($this->deptPermsObj->getCurrentViewOnly($limit, $offset));

        if ($offset !== null) {
            $offset = 'OFFSET ' . $offset;
        } else {
            $offset = '';
        }
        if ($limit !== null) {
            $limit = 'LIMIT ' . $limit;
        } else {
            $limit = '';
        }
        $array = $this->db->query("
              SELECT
                up.fid as id
              FROM
               " . $this->db->dbprefix('documents') . " d,
               " . $this->db->dbprefix('user_perms') . " up
              WHERE
                (
        up.uid = {$this->session->id}
                  AND d.id = up.fid
        AND up.rights < {$this->config->item('VIEW_RIGHT')}
                  AND d.publishable = 1
                  )
        {$limit} {$offset}
            ");

        $array = $array->result_array();

        if (is_array($array) && is_array($dP)) {
            $totalListing = array_merge($dP, $array);
            $newArray = array();
            $usedFiles = array();

            foreach ($totalListing as $line) {
                if (!in_array($line['id'], $usedFiles)) {
                    $usedFiles[] = $line['id'];
                    $newArray[] = $line;
                }
            }
            $dP = $newArray;
            unset($newArray, $usedFiles);
        }

        if (is_array($dP) && is_array($uP)) {
            $totalListing = array_merge($uP, $dP);
            $newArray = array();
            $usedFiles = array();

            foreach ($totalListing as $line) {
                if (!in_array($line['id'], $usedFiles)) {
                    $usedFiles[] = $line['id'];
                    $newArray[] = $line;
                }
            }
            $dP = $newArray;
            unset($newArray, $usedFiles);
            return $dP;
        }
    }

    /**
     * return an array of all the Allowed files ( right >= view_right) OBJ
     * @param bool $limit
     * @return array
     */
    public function getViewableFileOBJs($limit = true, $offset = null)
    {
        return $this->convertToFileDataOBJ($this->getViewableFileIds($limit, $offset));
    }

    /**
     * return an array of all the Allowed files ( right >= read_right) ID
     * @param bool $limit
     * @return array
     */
    public function getReadableFileIds($limit = true, $offset = null)
    {
        $userPermsFileArray = $this->userPermsObj->getCurrentReadRight($limit, $offset);
        $deptPermsFileArray = $this->deptPermsObj->getCurrentReadRight($limit, $offset);
        $publishedFileArray = $this->userObj->getPublishedData(1);
        $resultArray = array_values(array_unique(array_merge($publishedFileArray, $userPermsFileArray, $deptPermsFileArray)));
        return $resultArray;
    }

    /**
     * return an array of all the Allowed files ( right >= read_right) OBJ
     * @param bool $limit
     * @return array
     */
    public function getReadableFileOBJs($limit = true, $offset = null)
    {
        return $this->convertToFileDataOBJ($this->getReadableFileIds($limit, $offset));
    }

    /**
     * return an array of all the Allowed files ( right >= write_right) ID
     * @param bool $limit
     * @return array
     */
    public function getWriteableFileIds($limit = true, $offset = null)
    {
        $userPermsFileArray = $this->userPermsObj->getCurrentWriteRight($limit, $offset);
        $deptPermsFileArray = $this->deptPermsObj->getCurrentWriteRight($limit, $offset);
        $publishedFileArray = $this->userObj->getPublishedData(1);
        $resultArray = array_values(array_unique(array_merge($publishedFileArray, $userPermsFileArray, $deptPermsFileArray)));
        return $resultArray;
    }

    /**
     * return an array of all the Allowed files ( right >= write_right) ID
     * @param bool $limit
     * @return array
     */
    public function getWriteableFileOBJs($limit = true, $offset = null)
    {
        return $this->convertToFileDataOBJ($this->getWriteableFileIds($limit, $offset));
    }

    /**
     * return an array of all the Allowed files ( right >= admin_right) ID
     * @param bool $limit
     * @return array
     */
    public function getAdminableFileIds($limit = true, $offset = null)
    {
        $userPermsFileArray = $this->userPermsObj->getCurrentAdminRight($limit, $offset);
        $deptPermsFileArray = $this->deptPermsObj->getCurrentAdminRight($limit, $offset);
        $publishedFileArray = $this->userObj->getPublishedData(1);
        $resultArray = array_values(array_unique(array_merge($publishedFileArray, $userPermsFileArray, $deptPermsFileArray)));
        return $resultArray;
    }

    /**
     * return an array of all the Allowed files ( right >= admin_right) OBJ
     * @param bool $limit
     * @return array
     */
    public function getAdminableFileOBJs($limit = true, $offset = null)
    {
        return $this->convertToFileDataOBJ($this->getAdminableFileIds($limit, $offset));
    }

    /**
     * getAuthority
     * Return the authority that this user have on file data_id
     * by combining and prioritizing user and department right
     * @param int $data_id
     * @return int
     */
    public function getAuthority($dataId, $fileData)
    {
        $dataId = (int) $dataId;
        // $fileData = new Document_model($dataId);

        if ($this->session->admin or $this->userObj->isReviewerForFile($dataId)) {
            return $this->config->item('ADMIN_RIGHT');
        }

        if ($fileData->isOwner($this->uid) && $fileData->isLocked()) {
            return $this->config->item('WRITE_RIGHT');
        }

        $userPermissions = $this->userPermsObj->getPermission($dataId);
        $departmentPermissions = $this->deptPermsObj->getPermission($dataId);

        if ($userPermissions >= $this->config->item('NONE_RIGHT') and $userPermissions <= $this->config->item('ADMIN_RIGHT')) {
            return $userPermissions;
        } else {
            return $departmentPermissions;
        }
    }
}


text:
var CSLStyles = function(){

	var availableStyles =
	["academy-of-management-review"
	,"acm-sig-proceedings-long-author-list"
	,"acm-sig-proceedings"
	,"acm-sigchi-proceedings-extended-abstract-format"
	,"acm-sigchi-proceedings"
	,"acm-siggraph"
	,"acs-nano"
	,"acta-anaesthesiologica-scandinavica"
	,"acta-anaesthesiologica-taiwanica"
	,"acta-naturae"
	,"acta-neurochirurgica"
	,"acta-ophthalmologica"
	,"acta-palaeontologica-polonica"
	,"acta-pharmaceutica-sinica-b"
	,"acta-pharmaceutica"
	,"acta-philosophica"
	,"acta-polytechnica"
	,"acta-psychiatrica-scandinavica"
	,"acta-societatis-botanicorum-poloniae"
	,"acta-universitatis-agriculturae-sueciae"
	,"administrative-science-quarterly"
	,"advanced-engineering-materials"
	,"advanced-functional-materials"
	,"advanced-materials"
	,"advances-in-alzheimers-disease"
	,"advances-in-complex-systems"
	,"african-journal-of-emergency-medicine"
	,"african-zoology"
	,"aging-cell"
	,"aids"
	,"alexandria-journal-of-medicine"
	,"allergology-international"
	,"allergy"
	,"alternatives-to-animal-experimentation"
	,"ambio"
	,"ameghiniana"
	,"american-anthropological-association"
	,"american-association-for-cancer-research"
	,"american-association-of-petroleum-geologists"
	,"american-chemical-society-author-date"
	,"american-chemical-society-page-first"
	,"american-chemical-society-with-titles-no-et-al"
	,"american-chemical-society-with-titles-page-first"
	,"american-chemical-society-with-titles-sentence-case-doi"
	,"american-chemical-society-with-titles-sentence-case"
	,"american-chemical-society-with-titles"
	,"american-chemical-society"
	,"american-fisheries-society"
	,"american-geophysical-union"
	,"american-heart-association"
	,"american-institute-of-aeronautics-and-astronautics"
	,"american-institute-of-physics"
	,"american-journal-of-agricultural-economics"
	,"american-journal-of-archaeology"
	,"american-journal-of-botany"
	,"american-journal-of-clinical-pathology"
	,"american-journal-of-epidemiology"
	,"american-journal-of-health-behavior"
	,"american-journal-of-human-genetics"
	,"american-journal-of-medical-genetics"
	,"american-journal-of-neuroradiology"
	,"american-journal-of-orthodontics-and-dentofacial-orthopedics"
	,"american-journal-of-plant-sciences"
	,"american-journal-of-political-science"
	,"american-journal-of-primatology"
	,"american-journal-of-respiratory-and-critical-care-medicine"
	,"american-journal-of-surgical-pathology"
	,"american-marketing-association"
	,"american-medical-association-alphabetical"
	,"american-medical-association-no-et-al"
	,"american-medical-association-no-url"
	,"american-medical-association"
	,"american-meteorological-society"
	,"american-mineralogist"
	,"american-physics-society"
	,"american-physiological-society"
	,"american-phytopathological-society-numeric"
	,"american-phytopathological-society"
	,"american-political-science-association"
	,"american-society-for-microbiology"
	,"american-society-for-pharmacology-and-experimental-therapeutics"
	,"american-society-of-civil-engineers"
	,"american-society-of-mechanical-engineers"
	,"american-sociological-association"
	,"american-veterinary-medical-association"
	,"anesthesia-and-analgesia"
	,"anesthesiology"
	,"angewandte-chemie"
	,"angiologia"
	,"animal-welfare"
	,"annalen-des-naturhistorischen-museums-in-wien"
	,"annales"
	,"annals-of-applied-biology"
	,"annals-of-biomedical-engineering"
	,"annals-of-botany"
	,"annals-of-neurology"
	,"annals-of-oncology"
	,"annals-of-the-association-of-american-geographers"
	,"annual-review-of-astronomy-and-astrophysics"
	,"annual-review-of-medicine"
	,"annual-review-of-nuclear-and-particle-science"
	,"annual-reviews-alphabetical"
	,"annual-reviews-author-date"
	,"annual-reviews-without-titles"
	,"annual-reviews"
	,"antarctic-science"
	,"anticancer-research"
	,"antiquity"
	,"apa-5th-edition"
	,"apa-annotated-bibliography"
	,"apa-cv"
	,"apa-fr-provost"
	,"apa-fr-universite-de-montreal"
	,"apa-no-ampersand"
	,"apa-no-doi-no-issue"
	,"apa-single-spaced"
	,"apa-tr"
	,"apa"
	,"applied-spectroscopy"
	,"aquatic-conservation"
	,"aquatic-living-resources"
	,"arachne"
	,"arachnology"
	,"archaeometry"
	,"archeologie-medievale"
	,"archiv-fur-die-civilistische-praxis"
	,"archiv-fur-geschichte-der-philosophie"
	,"archives-of-physical-medicine-and-rehabilitation"
	,"archivos-de-la-sociedad-espanola-de-oftalmologia"
	,"art-history"
	,"artery-research"
	,"arthritis-and-rheumatism"
	,"arzneimitteltherapie"
	,"asa-cssa-sssa"
	,"asaio-journal"
	,"asia-and-the-pacific-policy-studies"
	,"asian-studies-review"
	,"associacao-brasileira-de-normas-tecnicas-ipea"
	,"associacao-brasileira-de-normas-tecnicas-note"
	,"associacao-brasileira-de-normas-tecnicas-ufjf"
	,"associacao-brasileira-de-normas-tecnicas-ufmg-face-full"
	,"associacao-brasileira-de-normas-tecnicas-ufmg-face-initials"
	,"associacao-brasileira-de-normas-tecnicas-ufpr"
	,"associacao-brasileira-de-normas-tecnicas-usp-fmvz"
	,"associacao-brasileira-de-normas-tecnicas"
	,"associacao-nacional-de-pesquisa-e-ensino-em-transportes"
	,"association-for-computational-linguistics"
	,"association-for-computing-machinery"
	,"atencion-primaria"
	,"ausonius-editions"
	,"austral-ecology"
	,"australasian-emergency-nursing-journal"
	,"australian-critical-care"
	,"australian-guide-to-legal-citation"
	,"australian-historical-studies"
	,"australian-journal-of-earth-sciences"
	,"australian-journal-of-grape-and-wine-research"
	,"australian-veterinary-journal"
	,"austrian-legal"
	,"avian-conservation-and-ecology"
	,"avian-diseases"
	,"avian-pathology"
	,"aviation-space-and-environmental-medicine"
	,"babes-bolyai-university-faculty-of-orthodox-theology"
	,"beltz-padagogik"
	,"bibtex"
	,"bioarchaeology-of-the-near-east"
	,"biochemical-journal"
	,"biochemical-society-transactions"
	,"biochemistry"
	,"biochimica-et-biophysica-acta"
	,"bioelectromagnetics"
	,"bioessays"
	,"bioinformatics"
	,"biological-journal-of-the-linnean-society"
	,"biological-psychiatry"
	,"biological-reviews"
	,"biology-of-reproduction"
	,"biomed-central"
	,"biomed-research-international"
	,"biometrics"
	,"bioorganic-and-medicinal-chemistry-letters"
	,"biophysical-journal"
	,"biotechniques"
	,"biotechnology-and-bioengineering"
	,"biotropica"
	,"blood"
	,"bluebook-inline"
	,"bluebook-law-review"
	,"bluebook2"
	,"bmj"
	,"body-and-society"
	,"boreal-environment-research"
	,"brain"
	,"brazilian-journal-of-infectious-diseases"
	,"briefings-in-bioinformatics"
	,"british-ecological-society"
	,"british-journal-of-anaesthesia"
	,"british-journal-of-cancer"
	,"british-journal-of-dermatology"
	,"british-journal-of-haematology"
	,"british-journal-of-industrial-relations"
	,"british-journal-of-pharmacology"
	,"british-journal-of-political-science"
	,"british-journal-of-surgery"
	,"building-structure"
	,"bulletin-de-la-societe-prehistorique-francaise"
	,"bulletin-of-faculty-of-pharmacy-cairo-university"
	,"bulletin-of-marine-science"
	,"byzantina-symmeikta"
	,"cahiers-du-centre-gustave-glotz"
	,"campus-adventiste-du-saleve-faculte-adventiste-de-theologie"
	,"canadian-journal-of-dietetic-practice-and-research"
	,"canadian-journal-of-fisheries-and-aquatic-sciences"
	,"canadian-public-policy"
	,"carbohydrate-research"
	,"carcinogenesis"
	,"cardiocore"
	,"catholic-biblical-association"
	,"cell-numeric"
	,"cell-research"
	,"cell-transplantation"
	,"cell"
	,"cellular-and-molecular-bioengineering"
	,"cellular-reprogramming"
	,"centaurus"
	,"centre-de-recherche-sur-les-civilisations-de-l-asie-orientale"
	,"cerebral-cortex"
	,"chemical-senses"
	,"chest"
	,"chicago-annotated-bibliography"
	,"chicago-author-date-basque"
	,"chicago-author-date-de"
	,"chicago-author-date-fr"
	,"chicago-author-date"
	,"chicago-figures"
	,"chicago-fullnote-bibliography-fr"
	,"chicago-fullnote-bibliography-no-ibid"
	,"chicago-fullnote-bibliography"
	,"chicago-library-list"
	,"chicago-note-biblio-no-ibid"
	,"chicago-note-bibliography"
	,"chinese-gb7714-1987-numeric"
	,"chinese-gb7714-2005-author-date"
	,"chinese-gb7714-2005-numeric"
	,"chinese-journal-of-aeronautics"
	,"chroniques-des-activites-archeologiques-de-l-ecole-francaise-de-rome"
	,"circulation"
	,"cirugia-cardiovascular"
	,"cirugia-espanola"
	,"clay-minerals"
	,"clays-and-clay-minerals"
	,"clinica-e-investigacion-en-arteriosclerosis"
	,"clinical-infectious-diseases"
	,"clinical-nuclear-medicine"
	,"clinical-orthopaedics-and-related-research"
	,"clinical-otolaryngology"
	,"clinical-pharmacology-and-therapeutics"
	,"clio-medica"
	,"cns-and-neurological-disorders-drug-targets"
	,"cold-spring-harbor-laboratory-press"
	,"collection-du-centre-jean-berard"
	,"collections-electroniques-de-l-inha-author-date"
	,"collections-electroniques-de-l-inha-full-note"
	,"colombian-journal-of-anesthesiology"
	,"comision-economica-para-america-latina-y-el-caribe"
	,"computer-und-recht"
	,"conservation-biology"
	,"conservation-letters"
	,"conservation-physiology"
	,"copernicus-publications"
	,"coral-reefs"
	,"corrosion"
	,"council-of-science-editors-alphabetical"
	,"council-of-science-editors-author-date"
	,"council-of-science-editors"
	,"cranfield-university-numeric"
	,"critical-care-medicine"
	,"cuadernos-de-filologia-clasica"
	,"cultivos-tropicales"
	,"culture-medicine-and-psychiatry"
	,"current-opinion"
	,"current-proteomics"
	,"current-protocols"
	,"currents-in-biblical-research"
	,"cytometry"
	,"database"
	,"de-buck"
	,"decision-sciences"
	,"der-moderne-staat"
	,"deutsche-gesellschaft-fur-psychologie"
	,"deutsche-medizinische-wochenschrift"
	,"deutsche-sprache"
	,"deutsches-archaologisches-institut"
	,"diagnostico-prenatal"
	,"dialisis-y-trasplante"
	,"diatom-research"
	,"die-bachelorarbeit-samac-et-al-in-text"
	,"die-bachelorarbeit-samac-et-al-note"
	,"din-1505-2-alphanumeric"
	,"din-1505-2-numeric-alphabetical"
	,"din-1505-2-numeric"
	,"din-1505-2"
	,"diplo"
	,"disability-and-rehabilitation"
	,"dna-research"
	,"documents-d-archeologie-francaise"
	,"drug-development-research"
	,"drug-testing-and-analysis"
	,"drugs-of-today"
	,"ear-and-hearing"
	,"early-christianity"
	,"early-medieval-europe"
	,"earth-surface-processes-and-landforms"
	,"earthquake-engineering-and-structural-dynamics"
	,"ecological-entomology"
	,"ecology-and-society"
	,"ecology-letters"
	,"ecology"
	,"economic-commission-for-latin-america-and-the-caribbean"
	,"economie-et-statistique"
	,"ecoscience"
	,"ecosystems"
	,"el-profesional-de-la-informacion"
	,"elsevier-harvard-without-titles"
	,"elsevier-harvard"
	,"elsevier-harvard2"
	,"elsevier-vancouver"
	,"elsevier-with-titles-alphabetical"
	,"elsevier-with-titles"
	,"elsevier-without-titles"
	,"embo-reports"
	,"emerald-harvard"
	,"emu-austral-ornithology"
	,"endocrine-press"
	,"endocrinologia-y-nutricion"
	,"endoscopia"
	,"enfermeria-clinica"
	,"enfermeria-intensiva"
	,"engineering-in-life-sciences"
	,"ens-de-lyon-centre-d-ingenierie-documentaire"
	,"entomologia-experimentalis-et-applicata"
	,"entomological-society-of-america"
	,"environment-and-planning"
	,"environmental-and-engineering-geoscience"
	,"environmental-chemistry"
	,"environmental-conservation"
	,"environmental-health-perspectives"
	,"environmental-microbiology"
	,"environmental-toxicology-and-chemistry"
	,"environnement-risques-et-sante"
	,"epidemiologie-et-sante-animale"
	,"equine-veterinary-education"
	,"equine-veterinary-journal"
	,"ergoscience"
	,"escuela-nacional-de-antropologia-e-historia-author-date"
	,"escuela-nacional-de-antropologia-e-historia-full-note"
	,"escuela-nacional-de-antropologia-e-historia-short-note"
	,"ethics-book-reviews"
	,"ethnobiology-and-conservation"
	,"ets-ecole-de-technologie-superieure"
	,"european-cells-and-materials"
	,"european-journal-of-clinical-microbiology-and-infectious-diseases"
	,"european-journal-of-emergency-medicine"
	,"european-journal-of-human-genetics"
	,"european-journal-of-immunology"
	,"european-journal-of-information-systems"
	,"european-journal-of-neuroscience"
	,"european-journal-of-ophthalmology"
	,"european-journal-of-paediatric-neurology"
	,"european-journal-of-pain"
	,"european-journal-of-political-research"
	,"european-journal-of-soil-science"
	,"european-journal-of-surgical-oncology"
	,"european-journal-of-vascular-and-endovascular-surgery"
	,"european-respiratory-journal"
	,"european-retail-research"
	,"european-society-of-cardiology"
	,"european-union-interinstitutional-style-guide"
	,"evolution-and-development"
	,"evolution"
	,"evolutionary-anthropology"
	,"evolutionary-ecology-research"
	,"exercer"
	,"experimental-dermatology"
	,"eye"
	,"fachhochschule-kiel-fachbereich-medien"
	,"fachhochschule-vorarlberg"
	,"facial-plastic-surgery-clinics-of-north-america"
	,"fertility-and-sterility"
	,"finanzarchiv"
	,"first-monday"
	,"fish-and-fisheries"
	,"flavour-and-fragrance-journal"
	,"foerster-geisteswissenschaft"
	,"fold-and-r"
	,"food-and-agriculture-organization-of-the-united-nations"
	,"forensic-science-review"
	,"forest-science"
	,"free-radical-research"
	,"freie-universitat-berlin-geographische-wissenschaften"
	,"french-politics"
	,"french1"
	,"french2"
	,"french3"
	,"french4"
	,"freshwater-biology"
	,"freshwater-science"
	,"frontiers-in-ecology-and-the-environment"
	,"frontiers-in-optics"
	,"frontiers-in-physics"
	,"frontiers-medical-journals"
	,"frontiers"
	,"future-science-group"
	,"g3"
	,"gallia"
	,"gastroenterology"
	,"gastrointestinal-endoscopy-clinics-of-north-america"
	,"gastrointestinal-intervention"
	,"geistes-und-kulturwissenschaften-heilmann"
	,"genes-to-cells"
	,"geneses"
	,"genetics-and-molecular-biology"
	,"genetics"
	,"genome-biology-and-evolution"
	,"geoarchaeology"
	,"geochimica-et-cosmochimica-acta"
	,"geografie-sbornik-cgs"
	,"geological-magazine"
	,"geology"
	,"geopolitics"
	,"georg-august-universitat-gottingen-institut-fur-ethnologie-und-ethnologische-sammlung"
	,"gesellschaft-fur-popularmusikforschung"
	,"gewerblicher-rechtsschutz-und-urheberrecht"
	,"global-change-biology"
	,"global-ecology-and-biogeography"
	,"gost-r-7-0-5-2008-numeric-alphabetical"
	,"gost-r-7-0-5-2008-numeric"
	,"gost-r-7-0-5-2008"
	,"grasas-y-aceites"
	,"hamburg-school-of-food-science"
	,"hand"
	,"harvard-anglia-ruskin-university"
	,"harvard-bournemouth-university"
	,"harvard-cape-peninsula-university-of-technology"
	,"harvard-cardiff-university-biosi"
	,"harvard-cardiff-university"
	,"harvard-cite-them-right"
	,"harvard-coventry-university"
	,"harvard-cranfield-university"
	,"harvard-durham-university-business-school"
	,"harvard-edge-hill-university"
	,"harvard-european-archaeology"
	,"harvard-fachhochschule-salzburg"
	,"harvard-gesellschaft-fur-bildung-und-forschung-in-europa"
	,"harvard-imperial-college-london"
	,"harvard-institut-fur-praxisforschung-de"
	,"harvard-kings-college-london"
	,"harvard-leeds-beckett-university"
	,"harvard-leeds-metropolitan-university"
	,"harvard-limerick"
	,"harvard-london-south-bank-university"
	,"harvard-manchester-business-school"
	,"harvard-manchester-metropolitan-university"
	,"harvard-newcastle-university"
	,"harvard-north-west-university"
	,"harvard-oxford-brookes-university-faculty-of-health-and-life-sciences"
	,"harvard-pontificia-universidad-catolica-del-ecuador"
	,"harvard-southampton-solent-university"
	,"harvard-staffordshire-university"
	,"harvard-stellenbosch-university"
	,"harvard-swinburne-university-of-technology"
	,"harvard-the-university-of-melbourne"
	,"harvard-the-university-of-northampton"
	,"harvard-the-university-of-sheffield-school-of-east-asian-studies"
	,"harvard-the-university-of-sheffield-town-and-regional-planning"
	,"harvard-universiti-tunku-abdul-rahman"
	,"harvard-university-for-the-creative-arts"
	,"harvard-university-of-abertay-dundee"
	,"harvard-university-of-birmingham"
	,"harvard-university-of-brighton-school-of-environment-and-technology"
	,"harvard-university-of-cape-town"
	,"harvard-university-of-gloucestershire"
	,"harvard-university-of-greenwich"
	,"harvard-university-of-kent"
	,"harvard-university-of-leeds"
	,"harvard-university-of-sunderland"
	,"harvard-university-of-the-west-of-england"
	,"harvard-university-of-the-west-of-scotland"
	,"harvard-university-of-west-london"
	,"harvard-university-of-westminster"
	,"harvard-university-of-wolverhampton"
	,"harvard-university-of-worcester"
	,"harvard-york-st-john-university"
	,"harvard1"
	,"harvard7de"
	,"hawaii-international-conference-on-system-sciences-proceedings"
	,"health-and-social-care-in-the-community"
	,"health-economics-policy-and-law"
	,"health-policy-and-planning"
	,"health-services-research"
	,"heart-failure-clinics"
	,"heart-rhythm"
	,"hematology-oncology-clinics-of-north-america"
	,"hepatology"
	,"heredity"
	,"hipertension-y-riesgo-vascular"
	,"histoire-at-politique"
	,"histoire-et-mesure"
	,"history-and-theory"
	,"history-of-the-human-sciences"
	,"hochschule-fur-wirtschaft-und-recht-berlin"
	,"hong-kong-journal-of-radiology"
	,"human-brain-mapping"
	,"human-mutation"
	,"human-reproduction-update"
	,"human-reproduction"
	,"human-resource-management-journal"
	,"human-wildlife-interactions"
	,"hydrobiologia"
	,"hydrological-processes"
	,"hydrological-sciences-journal"
	,"hypertension-research"
	,"hypotheses-in-the-life-sciences"
	,"ices-journal-of-marine-science"
	,"ie-comunicaciones"
	,"ieee-with-url"
	,"ieee"
	,"igaku-toshokan"
	,"iica-catie"
	,"im-gesprach"
	,"immunological-reviews"
	,"indian-journal-of-medical-research"
	,"indoor-air"
	,"infectio"
	,"infectious-disease-clinics-of-north-america"
	,"inflammatory-bowel-diseases"
	,"infoclio-de"
	,"infoclio-fr-nocaps"
	,"infoclio-fr-smallcaps"
	,"information-systems-research"
	,"ingenieria-agricola"
	,"insectes-sociaux"
	,"institut-national-de-la-recherche-scientifique-sciences-sociales"
	,"institut-national-de-sante-publique-du-quebec-napp"
	,"institut-national-de-sante-publique-du-quebec-topo"
	,"institute-of-physics-harvard"
	,"institute-of-physics-numeric"
	,"inter-research-science-center"
	,"inter-ro"
	,"interaction-design-and-architectures"
	,"interdisziplinare-zeitschrift-fur-technologie-und-lernen"
	,"international-atomic-energy-agency"
	,"international-conference-on-information-systems-development"
	,"international-journal-of-audiology"
	,"international-journal-of-cancer"
	,"international-journal-of-climatology"
	,"international-journal-of-electronic-commerce"
	,"international-journal-of-epidemiology"
	,"international-journal-of-exercise-science"
	,"international-journal-of-food-science-and-technology"
	,"international-journal-of-geriatric-psychiatry"
	,"international-journal-of-humanoid-robotics"
	,"international-journal-of-infectious-diseases"
	,"international-journal-of-lexicography"
	,"international-journal-of-nuclear-security"
	,"international-journal-of-obstetric-anesthesia"
	,"international-journal-of-occupational-medicine-and-environmental-health"
	,"international-journal-of-oral-and-maxillofacial-surgery"
	,"international-journal-of-osteoarchaeology"
	,"international-journal-of-osteopathic-medicine"
	,"international-journal-of-plant-sciences"
	,"international-journal-of-radiation-oncology-biology-physics"
	,"international-journal-of-sports-medicine"
	,"international-journal-of-wildland-fire"
	,"international-labour-organization"
	,"international-microbiology"
	,"international-organization"
	,"international-pig-veterinary-society-congress-proceedings"
	,"international-studies-association"
	,"international-union-of-crystallography"
	,"invertebrate-biology"
	,"investigative-radiology"
	,"invisu"
	,"irish-historical-studies"
	,"iso690-author-date-cs"
	,"iso690-author-date-en"
	,"iso690-author-date-es"
	,"iso690-author-date-fr-no-abstract"
	,"iso690-author-date-fr"
	,"iso690-author-date-sk"
	,"iso690-full-note-sk"
	,"iso690-note-cs"
	,"iso690-note-fr"
	,"iso690-numeric-brackets-cs"
	,"iso690-numeric-cs"
	,"iso690-numeric-en"
	,"iso690-numeric-fr"
	,"iso690-numeric-lt"
	,"iso690-numeric-sk"
	,"israel-medical-association-journal"
	,"ithaque"
	,"jacc-cardiovascular-imaging"
	,"jahrbuch-der-osterreichischen-byzantinischen-gesellschaft"
	,"jahrbuch-fur-evangelikale-theologie"
	,"javnost-the-public"
	,"journal-for-the-history-of-astronomy"
	,"journal-of-adolescent-health"
	,"journal-of-aerosol-medicine-and-pulmonary-drug-delivery"
	,"journal-of-alzheimers-disease"
	,"journal-of-analytical-toxicology"
	,"journal-of-animal-physiology-and-animal-nutrition"
	,"journal-of-animal-science"
	,"journal-of-antimicrobial-chemotherapy"
	,"journal-of-applied-animal-science"
	,"journal-of-applied-ecology"
	,"journal-of-applied-entomology"
	,"journal-of-applied-philosophy"
	,"journal-of-archaeological-research"
	,"journal-of-atrial-fibrillation"
	,"journal-of-avian-biology"
	,"journal-of-basic-microbiology"
	,"journal-of-biogeography"
	,"journal-of-biological-chemistry"
	,"journal-of-biomedical-materials-research-part-a"
	,"journal-of-bone-and-mineral-research"
	,"journal-of-burn-care-and-research"
	,"journal-of-business-logistics"
	,"journal-of-cardiothoracic-and-vascular-anesthesia"
	,"journal-of-cellular-and-molecular-medicine"
	,"journal-of-chemistry-and-chemical-engineering"
	,"journal-of-child-and-adolescent-psychopharmacology"
	,"journal-of-chiropractic-medicine"
	,"journal-of-clinical-oncology"
	,"journal-of-combinatorics"
	,"journal-of-common-market-studies"
	,"journal-of-computational-chemistry"
	,"journal-of-consumer-research"
	,"journal-of-crohns-and-colitis-supplements"
	,"journal-of-crohns-and-colitis"
	,"journal-of-dental-research"
	,"journal-of-elections-public-opinion-and-parties"
	,"journal-of-endodontics"
	,"journal-of-european-public-policy"
	,"journal-of-evolutionary-biology"
	,"journal-of-experimental-botany"
	,"journal-of-field-ornithology"
	,"journal-of-finance"
	,"journal-of-fish-diseases"
	,"journal-of-food-protection"
	,"journal-of-forensic-and-legal-medicine"
	,"journal-of-forensic-sciences"
	,"journal-of-frailty-and-aging"
	,"journal-of-genetic-engineering-and-biotechnology"
	,"journal-of-geriatric-psychiatry-and-neurology"
	,"journal-of-glaciology"
	,"journal-of-hearing-science"
	,"journal-of-hospital-infection"
	,"journal-of-human-evolution"
	,"journal-of-hypertension"
	,"journal-of-industrial-and-engineering-chemistry"
	,"journal-of-industrial-ecology"
	,"journal-of-infection"
	,"journal-of-infectious-diseases"
	,"journal-of-information-technology"
	,"journal-of-institutional-and-theoretical-economics"
	,"journal-of-integrated-omics"
	,"journal-of-interactive-marketing"
	,"journal-of-internal-medicine"
	,"journal-of-international-business-studies"
	,"journal-of-investigative-dermatology"
	,"journal-of-lipid-research"
	,"journal-of-magnetic-resonance-imaging"
	,"journal-of-mammalogy"
	,"journal-of-management-information-systems"
	,"journal-of-management"
	,"journal-of-medical-genetics"
	,"journal-of-medical-internet-research"
	,"journal-of-minimally-invasive-gynecology"
	,"journal-of-molecular-endocrinology"
	,"journal-of-morphology"
	,"journal-of-nanoscience-and-nanotechnology"
	,"journal-of-neurochemistry"
	,"journal-of-neurological-disorders"
	,"journal-of-neurophysiology"
	,"journal-of-neuroscience-and-neuroengineering"
	,"journal-of-neurosurgery"
	,"journal-of-neurotrauma"
	,"journal-of-nutrition"
	,"journal-of-oral-and-maxillofacial-surgery"
	,"journal-of-orthopaedic-research"
	,"journal-of-orthopaedic-trauma"
	,"journal-of-orthopaedics-trauma-and-rehabilitation"
	,"journal-of-paleontology"
	,"journal-of-peace-research"
	,"journal-of-peptide-science"
	,"journal-of-perinatal-medicine"
	,"journal-of-petrology"
	,"journal-of-pharmacy-and-pharmacology"
	,"journal-of-phycology"
	,"journal-of-physical-therapy-science"
	,"journal-of-plant-nutrition-and-soil-science"
	,"journal-of-pollination-ecology"
	,"journal-of-psychiatric-and-mental-health-nursing"
	,"journal-of-psychiatry-and-neuroscience"
	,"journal-of-reconstructive-microsurgery"
	,"journal-of-retailing"
	,"journal-of-rheumatology"
	,"journal-of-roman-archaeology-a"
	,"journal-of-roman-archaeology-b"
	,"journal-of-science-and-medicine-in-sport"
	,"journal-of-separation-science"
	,"journal-of-shoulder-and-elbow-surgery"
	,"journal-of-simulation"
	,"journal-of-sleep-research"
	,"journal-of-social-archaeology"
	,"journal-of-spinal-disorders-and-techniques"
	,"journal-of-strength-and-conditioning-research"
	,"journal-of-studies-on-alcohol-and-drugs"
	,"journal-of-the-air-and-waste-management-association"
	,"journal-of-the-american-academy-of-orthopaedic-surgeons"
	,"journal-of-the-american-association-of-laboratory-animal-science"
	,"journal-of-the-american-ceramic-society"
	,"journal-of-the-american-college-of-cardiology"
	,"journal-of-the-american-college-of-surgeons"
	,"journal-of-the-american-society-of-brewing-chemists"
	,"journal-of-the-american-society-of-nephrology"
	,"journal-of-the-american-water-resources-association"
	,"journal-of-the-association-for-information-systems"
	,"journal-of-the-brazilian-chemical-society"
	,"journal-of-the-electrochemical-society"
	,"journal-of-the-royal-anthropological-institute"
	,"journal-of-thrombosis-and-haemostasis"
	,"journal-of-tropical-ecology"
	,"journal-of-vegetation-science"
	,"journal-of-vertebrate-paleontology"
	,"journal-of-veterinary-cardiology"
	,"journal-of-visualized-experiments"
	,"journal-of-wildlife-diseases"
	,"journal-of-zoo-and-wildlife-medicine"
	,"journal-of-zoology"
	,"journalistica"
	,"juristische-schulung"
	,"juristische-zitierweise"
	,"karger-journals-author-date"
	,"karger-journals"
	,"kidney-international"
	,"kidney-research-and-clinical-practice"
	,"kindheit-und-entwicklung"
	,"knee-surgery-sports-traumatology-arthroscopy"
	,"kolner-zeitschrift-fur-soziologie-und-sozialpsychologie"
	,"kommunikation-und-recht"
	,"korean-journal-of-anesthesiology"
	,"kritische-ausgabe"
	,"kth-royal-institute-of-technology-school-of-computer-science-and-communication-sv"
	,"kth-royal-institute-of-technology-school-of-computer-science-and-communication"
	,"landes-bioscience-journals"
	,"language-in-society"
	,"language"
	,"latin-american-perspectives"
	,"latin-american-research-review"
	,"law-and-society-review"
	,"le-mouvement-social"
	,"le-tapuscrit-author-date"
	,"le-tapuscrit-note"
	,"leidraad-voor-juridische-auteurs"
	,"les-journees-de-la-recherche-avicole"
	,"les-journees-de-la-recherche-porcine"
	,"lethaia"
	,"lettres-et-sciences-humaines-fr"
	,"leviathan"
	,"limnology-and-oceanography"
	,"liver-international"
	,"lluelles-lexisnexis"
	,"lluelles"
	,"london-south-bank-university-numeric"
	,"lund-university-school-of-economics-and-management"
	,"macromolecular-reaction-engineering"
	,"magnetic-resonance-in-medicine"
	,"magnetic-resonance-materials-in-physics-biology-and-medicine"
	,"mammal-review"
	,"manchester-university-press"
	,"mastozoologia-neotropical"
	,"mathematics-and-computers-in-simulation"
	,"mcdonald-institute-monographs"
	,"mcgill-en"
	,"mcgill-fr"
	,"medecine-sciences"
	,"media-culture-and-society"
	,"medical-dosimetry"
	,"medical-history"
	,"medical-physics"
	,"medicine-and-science-in-sports-and-exercise"
	,"melbourne-school-of-theology"
	,"memorias-do-instituto-oswaldo-cruz"
	,"metallurgical-and-materials-transactions"
	,"meteoritics-and-planetary-science"
	,"meteorological-applications"
	,"methods-in-ecology-and-evolution"
	,"methods-of-information-in-medicine"
	,"metropolitiques"
	,"microbial-drug-resistance"
	,"microscopy-and-microanalysis"
	,"middle-east-critique"
	,"mineralogical-magazine"
	,"mis-quarterly"
	,"modern-humanities-research-association-author-date"
	,"modern-humanities-research-association"
	,"modern-language-association-6th-edition-note"
	,"modern-language-association-underline"
	,"modern-language-association-with-url"
	,"modern-language-association"
	,"mohr-siebeck-recht"
	,"molecular-and-cellular-proteomics"
	,"molecular-biology-and-evolution"
	,"molecular-biology-of-the-cell"
	,"molecular-ecology"
	,"molecular-metabolism"
	,"molecular-microbiology"
	,"molecular-plant-microbe-interactions"
	,"molecular-plant-pathology"
	,"molecular-psychiatry-letters"
	,"molecular-therapy"
	,"moore-theological-college"
	,"moorlands-college"
	,"multidisciplinary-digital-publishing-institute"
	,"multiple-sclerosis-journal"
	,"mutagenesis"
	,"mycologia"
	,"myrmecological-news"
	,"nano-biomedicine-and-engineering"
	,"national-archives-of-australia"
	,"national-library-of-medicine-grant-proposals"
	,"national-science-foundation-grant-proposals"
	,"nature-neuroscience-brief-communications"
	,"nature-no-et-al"
	,"nature-no-superscript"
	,"nature-publishing-group-vancouver"
	,"nature"
	,"navigation"
	,"nccr-mediality"
	,"nephrology-dialysis-transplantation"
	,"neue-juristische-wochenschrift"
	,"neuroimaging-clinics-of-north-america"
	,"neurologia-argentina"
	,"neurologia"
	,"neurology-india"
	,"neurology"
	,"neuropsychopharmacology"
	,"neurorehabilitation-and-neural-repair"
	,"neuroreport"
	,"neurosurgery-clinics-of-north-america"
	,"new-harts-rules-the-oxford-style-guide"
	,"new-phytologist"
	,"new-solutions"
	,"new-testament-studies"
	,"new-zealand-plant-protection"
	,"new-zealand-veterinary-journal"
	,"norma-portuguesa-405"
	,"northeastern-naturalist"
	,"nowa-audiofonologia"
	,"nucleic-acids-research"
	,"obesity"
	,"occupational-medicine"
	,"oikos"
	,"onderstepoort-journal-of-veterinary-research"
	,"ophthalmology"
	,"optometry-and-vision-science"
	,"oral-diseases"
	,"organization-science"
	,"organization"
	,"ornitologia-neotropical"
	,"orthopedic-clinics-of-north-america"
	,"oryx"
	,"oscola-no-ibid"
	,"oscola"
	,"osterreichische-zeitschrift-fur-politikwissenschaft"
	,"owbarth-verlag"
	,"oxford-art-journal"
	,"oxford-centre-for-mission-studies-harvard"
	,"oxford-studies-in-ancient-philosophy"
	,"oxford-studies-on-the-roman-economy"
	,"oxford-the-university-of-new-south-wales"
	,"oxford-university-press-humsoc"
	,"oxford-university-press-scimed-author-date"
	,"oxford-university-press-scimed-numeric"
	,"padagogische-hochschule-fachhochschule-nordwestschweiz"
	,"padagogische-hochschule-heidelberg"
	,"padagogische-hochschule-vorarlberg"
	,"pain"
	,"palaeontologia-electronica"
	,"palaeontology"
	,"palaios"
	,"paleobiology"
	,"parasitology"
	,"past-and-present"
	,"pediatric-allergy-and-immunology"
	,"pediatric-anesthesia"
	,"pediatric-blood-and-cancer"
	,"pediatric-physical-therapy"
	,"pediatric-research"
	,"peerj"
	,"periodontology-2000"
	,"permafrost-and-periglacial-processes"
	,"perspectives-on-politics"
	,"pharmacoepidemiology-and-drug-safety"
	,"philippika"
	,"philosophia-scientiae"
	,"philosophiques"
	,"phycological-research"
	,"phyllomedusa"
	,"physiological-and-biochemical-zoology"
	,"pisa-university-press"
	,"plant-biology"
	,"plant-pathology"
	,"plant-physiology"
	,"plos"
	,"pnas"
	,"podzemna-voda"
	,"polish-legal"
	,"political-studies"
	,"politische-vierteljahresschrift"
	,"pontifical-athenaeum-regina-apostolorum"
	,"pontifical-biblical-institute"
	,"pontifical-gregorian-university"
	,"population-space-and-place"
	,"population"
	,"poultry-science"
	,"pour-reussir-note"
	,"preslia"
	,"presses-universitaires-de-rennes"
	,"primary-care-clinics-in-office-practice"
	,"proceedings-of-the-royal-society-b"
	,"proinflow"
	,"protein-engineering-design-and-selection"
	,"protein-science"
	,"proteomics"
	,"psychiatric-clinics-of-north-america"
	,"psychiatric-services"
	,"psychiatry-and-clinical-neurosciences"
	,"psychological-medicine"
	,"psychosomatics"
	,"public-health-nutrition"
	,"quaderni-degli-avogadro-colloquia"
	,"radiographics"
	,"radiography"
	,"radiologic-clinics-of-north-america"
	,"radiology"
	,"radiopaedia"
	,"rapid-communications-in-mass-spectrometry"
	,"reports-of-practical-oncology-and-radiotherapy"
	,"reproduction"
	,"reviews-of-modern-physics-with-titles"
	,"revista-argentina-de-antropologia-biologica"
	,"revista-brasileira-de-ciencia-do-solo"
	,"revista-ciencias-tecnicas-agropecuarias"
	,"revista-de-biologia-tropical"
	,"revista-de-filologia-espanola"
	,"revista-fave-seccion-ciencias-agrarias"
	,"revista-virtual-de-quimica"
	,"revue-archeologique-du-centre-de-la-france"
	,"revue-archeologique"
	,"revue-de-medecine-veterinaire"
	,"revue-des-nouvelles-technologies-de-l-information"
	,"revue-dhistoire-moderne-et-contemporaine"
	,"revue-francaise-de-sociologie"
	,"rhodora"
	,"risk-analysis"
	,"rofo"
	,"romanian-humanities"
	,"rose-school"
	,"rossiiskii-fiziologicheskii-zhurnal-imeni-i-m-sechenova"
	,"royal-society-of-chemistry"
	,"rtf-scan"
	,"sage-harvard"
	,"sage-vancouver"
	,"scandinavian-journal-of-infectious-diseases"
	,"scandinavian-journal-of-work-environment-and-health"
	,"scandinavian-political-studies"
	,"science-translational-medicine"
	,"science-without-titles"
	,"science"
	,"seminaire-saint-sulpice-ecole-theologie"
	,"seminars-in-pediatric-neurology"
	,"sexual-development"
	,"sheffield-hallam-university-history"
	,"sist02"
	,"small"
	,"sociedade-brasileira-de-computacao"
	,"societe-nationale-des-groupements-techniques-veterinaires"
	,"society-for-american-archaeology"
	,"society-for-general-microbiology"
	,"society-for-historical-archaeology"
	,"society-for-laboratory-automation-and-screening"
	,"society-of-automotive-engineers-technical-papers-numeric"
	,"society-of-biblical-literature-fullnote-bibliography"
	,"socio-economic-review"
	,"sociology-of-health-and-illness"
	,"soil-biology-and-biochemistry"
	,"soil-science-and-plant-nutrition"
	,"soziale-welt"
	,"sozialpadagogisches-institut-berlin-walter-may"
	,"sozialwissenschaften-heilmann"
	,"soziologie"
	,"spandidos-publications"
	,"spanish-legal"
	,"spectroscopy-letters"
	,"spie-bios"
	,"spie-journals"
	,"spie-proceedings"
	,"spip-cite"
	,"springer-basic-author-date-no-et-al"
	,"springer-basic-author-date"
	,"springer-basic-brackets-no-et-al-alphabetical"
	,"springer-basic-brackets-no-et-al"
	,"springer-basic-brackets"
	,"springer-fachzeitschriften-medizin-psychologie"
	,"springer-humanities-author-date"
	,"springer-humanities-brackets"
	,"springer-lecture-notes-in-computer-science-alphabetical"
	,"springer-lecture-notes-in-computer-science"
	,"springer-mathphys-author-date"
	,"springer-mathphys-brackets"
	,"springer-physics-author-date"
	,"springer-physics-brackets"
	,"springer-socpsych-author-date"
	,"springer-socpsych-brackets"
	,"springer-vancouver-author-date"
	,"springer-vancouver-brackets"
	,"springer-vancouver"
	,"springerprotocols"
	,"st-patricks-college"
	,"standards-in-genomic-sciences"
	,"stavebni-obzor"
	,"stem-cells-and-development"
	,"stem-cells"
	,"strategic-management-journal"
	,"stroke"
	,"structural-control-and-health-monitoring"
	,"studia-bas"
	,"studii-teologice"
	,"stuttgart-media-university"
	,"style-manual-australian-government"
	,"surgical-clinics-of-north-america"
	,"surgical-neurology-international"
	,"surgical-pathology-clinics"
	,"svensk-exegetisk-arsbok"
	,"swedish-legal"
	,"systematic-and-applied-microbiology"
	,"systematic-biology"
	,"taylor-and-francis-chicago-author-date"
	,"taylor-and-francis-chicago-f"
	,"taylor-and-francis-council-of-science-editors-author-date"
	,"taylor-and-francis-harvard-x"
	,"taylor-and-francis-national-library-of-medicine"
	,"technische-universitat-dresden-medizin"
	,"technische-universitat-dresden-wirtschaftswissenschaften"
	,"technische-universitat-munchen-controlling"
	,"technische-universitat-munchen-unternehmensfuhrung"
	,"technische-universitat-wien"
	,"teologia-catalunya"
	,"terra-nova"
	,"tgm-wien-diplom"
	,"the-accounting-review"
	,"the-american-journal-of-cardiology"
	,"the-american-journal-of-gastroenterology"
	,"the-american-journal-of-pathology"
	,"the-american-journal-of-psychiatry"
	,"the-american-naturalist"
	,"the-astrophysical-journal"
	,"the-auk"
	,"the-bone-and-joint-journal"
	,"the-british-journal-of-cardiology"
	,"the-british-journal-of-psychiatry"
	,"the-british-journal-of-sociology"
	,"the-company-of-biologists"
	,"the-design-journal"
	,"the-egyptian-heart-journal"
	,"the-embo-journal"
	,"the-faseb-journal"
	,"the-febs-journal"
	,"the-geological-society-of-america"
	,"the-geological-society-of-london"
	,"the-historical-journal"
	,"the-holocene"
	,"the-institute-of-electronics-information-and-communication-engineers"
	,"the-institution-of-engineering-and-technology"
	,"the-international-journal-of-developmental-biology"
	,"the-international-journal-of-psychoanalysis"
	,"the-isme-journal"
	,"the-journal-of-adhesive-dentistry"
	,"the-journal-of-clinical-investigation"
	,"the-journal-of-comparative-neurology"
	,"the-journal-of-eukaryotic-microbiology"
	,"the-journal-of-hellenic-studies"
	,"the-journal-of-immunology"
	,"the-journal-of-infection-in-developing-countries"
	,"the-journal-of-juristic-papyrology"
	,"the-journal-of-neuropsychiatry-and-clinical-neurosciences"
	,"the-journal-of-neuroscience"
	,"the-journal-of-pain"
	,"the-journal-of-peasant-studies"
	,"the-journal-of-physiology"
	,"the-journal-of-roman-studies"
	,"the-journal-of-the-acoustical-society-of-america"
	,"the-journal-of-the-torrey-botanical-society"
	,"the-journal-of-urology"
	,"the-journal-of-wildlife-management"
	,"the-lancet"
	,"the-lichenologist"
	,"the-neuroscientist"
	,"the-new-england-journal-of-medicine"
	,"the-oncologist"
	,"the-open-university-a251"
	,"the-open-university-harvard"
	,"the-open-university-m801"
	,"the-open-university-numeric-superscript"
	,"the-open-university-numeric"
	,"the-optical-society"
	,"the-plant-cell"
	,"the-plant-journal"
	,"the-review-of-financial-studies"
	,"the-rockefeller-university-press"
	,"the-saudi-journal-for-dental-research"
	,"the-scandinavian-journal-of-clinical-and-laboratory-investigation"
	,"the-world-journal-of-biological-psychiatry"
	,"theologie-und-philosophie"
	,"theory-culture-and-society"
	,"thieme-e-journals-vancouver"
	,"thomson-reuters-legal-tax-and-accounting-australia"
	,"thrombosis-and-haemostasis"
	,"tissue-engineering"
	,"traces"
	,"traffic-injury-prevention"
	,"traffic"
	,"transactions-of-the-american-philological-association"
	,"transactions-of-the-materials-research-society-of-japan"
	,"transplantation"
	,"transportation-research-record"
	,"tree-physiology"
	,"trends-journals"
	,"triangle"
	,"turabian-fullnote-bibliography"
	,"u-schylku-starozytnosci"
	,"ugeskrift-for-laeger"
	,"ultrasound-in-medicine-and-biology"
	,"unified-style-linguistics"
	,"united-nations-conference-on-trade-and-development"
	,"universidad-evangelica-del-paraguay"
	,"universidade-de-sao-paulo-instituto-de-matematica-e-estatistica"
	,"universita-cattolica-del-sacro-cuore"
	,"universita-di-bologna-lettere"
	,"universita-pontificia-salesiana-en"
	,"universita-pontificia-salesiana-es"
	,"universita-pontificia-salesiana-fr"
	,"universita-pontificia-salesiana-it"
	,"universita-pontificia-salesiana-pt-br"
	,"universita-pontificia-salesiana"
	,"universitat-bremen-institut-fur-politikwissenschaft"
	,"universitat-freiburg-geschichte"
	,"universitat-heidelberg-historisches-seminar"
	,"universitat-mainz-geographisches-institut"
	,"universitatsmedizin-gottingen"
	,"universite-de-liege-histoire"
	,"universite-de-picardie-jules-verne-ufr-de-medecine"
	,"universite-de-sherbrooke-departement-de-geomatique"
	,"universite-de-sherbrooke-faculte-d-education"
	,"universite-du-quebec-a-montreal"
	,"universite-laval-departement-dinformation-et-de-communication"
	,"universite-laval-faculte-de-theologie-et-de-sciences-religieuses"
	,"universite-libre-de-bruxelles-histoire"
	,"universiteit-utrecht-onderzoeksgids-geschiedenis"
	,"university-college-dublin-school-of-history-and-archives"
	,"university-college-lillebaelt-apa"
	,"university-college-lillebaelt-harvard"
	,"university-college-lillebaelt-vancouver"
	,"university-of-helsinki-faculty-of-theology"
	,"university-of-new-england-australia-note"
	,"university-of-south-australia-harvard-2011"
	,"university-of-south-australia-harvard-2013"
	,"urban-habitats"
	,"urban-studies"
	,"urological-science"
	,"us-geological-survey"
	,"user-modeling-and-user-adapted-interaction"
	,"vancouver-author-date"
	,"vancouver-brackets-no-et-al"
	,"vancouver-brackets-only-year-no-issue"
	,"vancouver-brackets"
	,"vancouver-fr-ca"
	,"vancouver-imperial-college-london"
	,"vancouver-superscript-brackets-only-year"
	,"vancouver-superscript-only-year"
	,"vancouver-superscript"
	,"vancouver"
	,"veterinary-medicine-austria"
	,"veterinary-radiology-and-ultrasound"
	,"veterinary-record"
	,"vienna-legal"
	,"vietnam-ministry-of-education-and-training-en"
	,"vietnam-ministry-of-education-and-training-vi"
	,"vilnius-gediminas-technical-university"
	,"vingtieme-siecle"
	,"water-environment-research"
	,"water-science-and-technology"
	,"weed-science-society-of-america"
	,"wetlands"
	,"wheaton-college-phd-in-biblical-and-theological-studies"
	,"who-europe-harvard"
	,"who-europe-numeric"
	,"wiley-vch-books"
	,"wireless-communications-and-mobile-computing"
	,"wissenschaftlicher-industrielogistik-dialog"
	,"world-congress-on-engineering-asset-management"
	,"world-journal-of-gastroenterology"
	,"world-mycotoxin-journal"
	,"world-politcs"
	,"xenotransplantation"
	,"yeast"
	,"zastosowania-komputerow-w-elektrotechnice"
	,"zdravniski-vestnik"
	,"zeitschrift-fur-deutsche-philologie"
	,"zeitschrift-fur-internationale-beziehungen"
	,"zeitschrift-fur-medienwissenschaft"
	,"zeitschrift-fur-padagogik"
	,"zeitschrift-fur-soziologie"
	,"zeitschrift-fur-theologie-und-kirche"
	,"zeszyty-prawnicze-bas"
	,"zookeys"
	,"zoological-journal-of-the-linnean-society"
	,"zootaxa"];

	function fetchStyleXML(styleName, callback){
		if ($.inArray(styleName, availableStyles) > -1){
			$.ajax({
					type: "GET",
		            url: "../styles/"+styleName+".csl",
		            dataType: "text",
		            success: function (data) {
		            	callback(data);
	            	},
	            	error: function (jqXHR, textStatus, errorThrown ){
	            		console.log(jqXHR);
	            	}
	        });
		}else{
			console.log(styleName + " not found");
		}
	}
	return {
		fetchStyleXML:fetchStyleXML,
		availableStyles:availableStyles
	}

}();


text:
package com.google.template.soy.passes;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Retention;

/**
 * Documents the passes this pass should run before.
 *
 * <p>Use this when you rely on the given pass performing some kind of mutation on the AST structure
 * you are producing. For example, a desugaring pass which creates new ExprNodes might want to run
 * before type checking so it doesn't have to populate type fields.
 */
@Retention(RUNTIME)
@interface RunBefore {
  Class<? extends CompilerPass>[] value();
}


text:
<?php

declare(strict_types=1);

namespace Sonata\Exporter\Tests\Writer;

use PHPUnit\Framework\TestCase;
use Sonata\Exporter\Writer\XmlExcelWriter;

final class XmlExcelWriterTest extends TestCase
{
    private string $filename;

    protected function setUp(): void
    {
        $this->filename = 'foobar.csv';

        if (is_file($this->filename)) {
            unlink($this->filename);
        }
    }

    protected function tearDown(): void
    {
        unlink($this->filename);
    }

    public function testWriter(): void
    {
        $writer = new XmlExcelWriter($this->filename, false);
        $writer->open();

        $writer->write(['firstname' => ' john', 'lastname' => 'doe &', 'extra' => 'é']);
        $writer->close();

        $expected = '<Row><Cell><Data ss:Type="String"> john</Data></Cell><Cell><Data ss:Type="String">doe &</Data></Cell><Cell><Data ss:Type="String">é</Data></Cell></Row>';

        $content = file_get_contents($this->filename);
        static::assertIsString($content);
        static::assertStringContainsString($expected, $content);
    }

    public function testWithHeaders(): void
    {
        $writer = new XmlExcelWriter($this->filename, true);
        $writer->open();

        $writer->write(['name' => 'john', 'surname' => 'doe ', 'year' => '2001']);

        $writer->close();

        $expected = '<Row><Cell><Data ss:Type="String">name</Data></Cell><Cell><Data ss:Type="String">surname</Data></Cell><Cell><Data ss:Type="String">year</Data></Cell></Row>';
        $expected .= '<Row><Cell><Data ss:Type="String">john</Data></Cell><Cell><Data ss:Type="String">doe </Data></Cell><Cell><Data ss:Type="Number">2001</Data></Cell></Row';

        $content = file_get_contents($this->filename);
        static::assertIsString($content);
        static::assertStringContainsString($expected, $content);
    }

    public function testForceTypes(): void
    {
        // force all cells to have Number type
        $writer = new XmlExcelWriter($this->filename, false, 'Number');
        $writer->open();

        $writer->write(['name' => 'john', 'surname' => 'doe ', 'year' => '2001']);

        $writer->close();

        $expected = '<Row><Cell><Data ss:Type="Number">john</Data></Cell><Cell><Data ss:Type="Number">doe </Data></Cell><Cell><Data ss:Type="Number">2001</Data></Cell></Row>';

        $content = file_get_contents($this->filename);
        static::assertIsString($content);
        static::assertStringContainsString($expected, $content);
    }

    public function testForceTypesWithHeaders(): void
    {
        // force all cells to have Number type
        $writer = new XmlExcelWriter($this->filename, true, 'Number');
        $writer->open();

        $writer->write(['name' => 'john', 'surname' => 'doe ', 'year' => '2001']);

        $writer->close();

        $expected = '<Row><Cell><Data ss:Type="String">name</Data></Cell><Cell><Data ss:Type="String">surname</Data></Cell><Cell><Data ss:Type="String">year</Data></Cell></Row>';
        $expected .= '<Row><Cell><Data ss:Type="Number">john</Data></Cell><Cell><Data ss:Type="Number">doe </Data></Cell><Cell><Data ss:Type="Number">2001</Data></Cell></Row>';

        $content = file_get_contents($this->filename);
        static::assertIsString($content);
        static::assertStringContainsString($expected, $content);
    }

    public function testSpecificTypes(): void
    {
        // define type for specific cell
        $writer = new XmlExcelWriter($this->filename, false, ['year' => 'String', 'surname' => 'Number']);
        $writer->open();

        $writer->write(['name' => 'john', 'surname' => 'doe ', 'year' => '2001']);

        $writer->close();

        $expected = '<Row><Cell><Data ss:Type="String">john</Data></Cell><Cell><Data ss:Type="Number">doe </Data></Cell><Cell><Data ss:Type="String">2001</Data></Cell></Row>';

        $content = file_get_contents($this->filename);
        static::assertIsString($content);
        static::assertStringContainsString($expected, $content);
    }
}


text:
from msrest.serialization import Model

class DetectedFace(Model):
    """Detected Face object.

    :param face_id:
    :type face_id: str
    :param face_rectangle:
    :type face_rectangle:
     ~azure.cognitiveservices.vision.face.models.FaceRectangle
    :param face_landmarks:
    :type face_landmarks:
     ~azure.cognitiveservices.vision.face.models.FaceLandmarks
    :param face_attributes:
    :type face_attributes:
     ~azure.cognitiveservices.vision.face.models.FaceAttributes
    """

    _validation = {
        'face_rectangle': {'required': True},
    }

    _attribute_map = {
        'face_id': {'key': 'faceId', 'type': 'str'},
        'face_rectangle': {'key': 'faceRectangle', 'type': 'FaceRectangle'},
        'face_landmarks': {'key': 'faceLandmarks', 'type': 'FaceLandmarks'},
        'face_attributes': {'key': 'faceAttributes', 'type': 'FaceAttributes'},
    }

    def __init__(self, face_rectangle, face_id=None, face_landmarks=None, face_attributes=None):
        super(DetectedFace, self).__init__()
        self.face_id = face_id
        self.face_rectangle = face_rectangle
        self.face_landmarks = face_landmarks
        self.face_attributes = face_attributes


text:
package org.hibersap.mapping.model;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import javax.annotation.Generated;
import org.hibersap.conversion.Converter;
import org.hibersap.conversion.ConverterCache;
import org.hibersap.execution.UnsafeCastHelper;
import org.hibersap.mapping.ReflectionHelper;

/**
 * @author Carsten Erker
 */
public final class StructureMapping extends ParameterMapping {

    private static final long serialVersionUID = 2930405767657861801L;

    private final Set<ParameterMapping> parameters = new HashSet<>();

    public StructureMapping(final Class<?> associatedClass,
                            final String sapName,
                            final String javaName,
                            final Class<? extends Converter<?, ?>> converterClass) {
        super(associatedClass, sapName, javaName, converterClass);
    }

    public void addParameter(final ParameterMapping param) {
        parameters.add(param);
    }

    public Set<ParameterMapping> getParameters() {
        return parameters;
    }

    @Override
    public ParamType getParamType() {
        return ParamType.STRUCTURE;
    }

    @Override
    protected Object getUnconvertedValueToJava(final Object fieldMap, final ConverterCache converterCache) {
        Map<String, Object> subMap = UnsafeCastHelper.castToMap(fieldMap);
        Object subBean = ReflectionHelper.newInstance(getAssociatedType());

        for (ParameterMapping parameter : parameters) {
            Object fieldValue = subMap.get(parameter.getSapName());

            if (fieldValue != null) {
                Object value = parameter.mapToJava(fieldValue, converterCache);
                ReflectionHelper.setFieldValue(subBean, parameter.getJavaName(), value);
            }
        }

        return subBean;
    }

    @Override
    protected Object getUnconvertedValueToSap(final Object bapiStructure, final ConverterCache converterCache) {
        HashMap<String, Object> functionMap = new HashMap<>();

        for (ParameterMapping parameter : parameters) {
            Object fieldValue = ReflectionHelper.getFieldValue(bapiStructure, parameter.getJavaName());

            if (fieldValue != null) {
                Object value = parameter.mapToSap(fieldValue, converterCache);
                functionMap.put(parameter.getSapName(), value);
            }
        }

        return functionMap;
    }

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

        StructureMapping that = (StructureMapping) o;

        //noinspection RedundantIfStatement
        if (!parameters.equals(that.parameters)) {
            return false;
        }

        return true;
    }

    @Override
    @Generated("")
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + parameters.hashCode();
        return result;
    }
}


text: {-# htermination show :: Ordering -> String #-}


text:
package org.cagrid.identifiers.namingauthority.hibernate;

import java.io.Serializable;
import java.net.URI;
import java.net.URISyntaxException;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;

import org.hibernate.HibernateException;
import org.hibernate.usertype.UserType;

/**
 * This type makes sure Hibernate stores URIs as strings in the database (when
 * its used).
 *
 * @author oster
 */
public class URIUserType implements UserType {

    public static final int[] SQL_TYPES = {Types.VARCHAR};

    public Object assemble(Serializable cached, Object owner) throws HibernateException {
        return cached;
    }

    public Object deepCopy(Object value) throws HibernateException {
        if (value != null) {
            URI uri = (URI) value;
            try {
                return new URI(uri.toString());
            } catch (URISyntaxException e) {
                throw new HibernateException("Invalid URI", e);
            }
        } else {
            return null;
        }

    }

    public Serializable disassemble(Object value) throws HibernateException {
        return (Serializable) value;
    }

    public boolean equals(Object o1, Object o2) throws HibernateException {
        if (o1 == null) {
            return o2 == null;
        }
        return o1.equals(o2);
    }

    public int hashCode(Object x) throws HibernateException {
        return x.hashCode();
    }

    public boolean isMutable() {
        return false;
    }

    public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
        if (rs.wasNull()) {
            return null;
        } else {
            try {
            	String val = rs.getString(names[0]);
            	if (val == null)
            		return null;
                return new URI(val);
            } catch (URISyntaxException e) {
                throw new HibernateException("Invalid URI", e);
            }
        }
    }

    public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
        if (value == null) {
            st.setNull(index, Types.VARCHAR);
        } else {
            URI uri = (URI) value;
            st.setString(index, uri.toString());
        }
    }

    public Object replace(Object original, Object target, Object owner) throws HibernateException {
        return original;
    }

    public Class returnedClass() {
        return URI.class;
    }

    public int[] sqlTypes() {
        return SQL_TYPES;
    }
}