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

import java.io.Serializable;
import javax.annotation.Generated;

@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeMitigationActionResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {

    /**
     *

     * The friendly name that uniquely identifies the mitigation action.
     *

     */
    private String actionName;
    /**
     *

     * The type of mitigation action.
     *

     */
    private String actionType;
    /**
     *

     * The ARN that identifies this migration action.
     *

     */
    private String actionArn;
    /**
     *

     * A unique identifier for this action.
     *

     */
    private String actionId;
    /**
     *

     * The ARN of the IAM role used to apply this action.
     *

     */
    private String roleArn;
    /**
     *

     * Parameters that control how the mitigation action is applied, specific to the type of mitigation action.
     *

     */
    private MitigationActionParams actionParams;
    /**
     *

     * The date and time when the mitigation action was added to your AWS account.
     *

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

     * The date and time when the mitigation action was last changed.
     *

     */
    private java.util.Date lastModifiedDate;

    /**
     *

     * The friendly name that uniquely identifies the mitigation action.
     *

     *
     * @param actionName
     *        The friendly name that uniquely identifies the mitigation action.
     */

    public void setActionName(String actionName) {
        this.actionName = actionName;
    }

    /**
     *

     * The friendly name that uniquely identifies the mitigation action.
     *

     *
     * @return The friendly name that uniquely identifies the mitigation action.
     */

    public String getActionName() {
        return this.actionName;
    }

    /**
     *

     * The friendly name that uniquely identifies the mitigation action.
     *

     *
     * @param actionName
     *        The friendly name that uniquely identifies the mitigation action.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeMitigationActionResult withActionName(String actionName) {
        setActionName(actionName);
        return this;
    }

    /**
     *

     * The type of mitigation action.
     *

     *
     * @param actionType
     *        The type of mitigation action.
     * @see MitigationActionType
     */

    public void setActionType(String actionType) {
        this.actionType = actionType;
    }

    /**
     *

     * The type of mitigation action.
     *

     *
     * @return The type of mitigation action.
     * @see MitigationActionType
     */

    public String getActionType() {
        return this.actionType;
    }

    /**
     *

     * The type of mitigation action.
     *

     *
     * @param actionType
     *        The type of mitigation action.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see MitigationActionType
     */

    public DescribeMitigationActionResult withActionType(String actionType) {
        setActionType(actionType);
        return this;
    }

    /**
     *

     * The type of mitigation action.
     *

     *
     * @param actionType
     *        The type of mitigation action.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see MitigationActionType
     */

    public DescribeMitigationActionResult withActionType(MitigationActionType actionType) {
        this.actionType = actionType.toString();
        return this;
    }

    /**
     *

     * The ARN that identifies this migration action.
     *

     *
     * @param actionArn
     *        The ARN that identifies this migration action.
     */

    public void setActionArn(String actionArn) {
        this.actionArn = actionArn;
    }

    /**
     *

     * The ARN that identifies this migration action.
     *

     *
     * @return The ARN that identifies this migration action.
     */

    public String getActionArn() {
        return this.actionArn;
    }

    /**
     *

     * The ARN that identifies this migration action.
     *

     *
     * @param actionArn
     *        The ARN that identifies this migration action.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeMitigationActionResult withActionArn(String actionArn) {
        setActionArn(actionArn);
        return this;
    }

    /**
     *

     * A unique identifier for this action.
     *

     *
     * @param actionId
     *        A unique identifier for this action.
     */

    public void setActionId(String actionId) {
        this.actionId = actionId;
    }

    /**
     *

     * A unique identifier for this action.
     *

     *
     * @return A unique identifier for this action.
     */

    public String getActionId() {
        return this.actionId;
    }

    /**
     *

     * A unique identifier for this action.
     *

     *
     * @param actionId
     *        A unique identifier for this action.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeMitigationActionResult withActionId(String actionId) {
        setActionId(actionId);
        return this;
    }

    /**
     *

     * The ARN of the IAM role used to apply this action.
     *

     *
     * @param roleArn
     *        The ARN of the IAM role used to apply this action.
     */

    public void setRoleArn(String roleArn) {
        this.roleArn = roleArn;
    }

    /**
     *

     * The ARN of the IAM role used to apply this action.
     *

     *
     * @return The ARN of the IAM role used to apply this action.
     */

    public String getRoleArn() {
        return this.roleArn;
    }

    /**
     *

     * The ARN of the IAM role used to apply this action.
     *

     *
     * @param roleArn
     *        The ARN of the IAM role used to apply this action.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeMitigationActionResult withRoleArn(String roleArn) {
        setRoleArn(roleArn);
        return this;
    }

    /**
     *

     * Parameters that control how the mitigation action is applied, specific to the type of mitigation action.
     *

     *
     * @param actionParams
     *        Parameters that control how the mitigation action is applied, specific to the type of mitigation action.
     */

    public void setActionParams(MitigationActionParams actionParams) {
        this.actionParams = actionParams;
    }

    /**
     *

     * Parameters that control how the mitigation action is applied, specific to the type of mitigation action.
     *

     *
     * @return Parameters that control how the mitigation action is applied, specific to the type of mitigation action.
     */

    public MitigationActionParams getActionParams() {
        return this.actionParams;
    }

    /**
     *

     * Parameters that control how the mitigation action is applied, specific to the type of mitigation action.
     *

     *
     * @param actionParams
     *        Parameters that control how the mitigation action is applied, specific to the type of mitigation action.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeMitigationActionResult withActionParams(MitigationActionParams actionParams) {
        setActionParams(actionParams);
        return this;
    }

    /**
     *

     * The date and time when the mitigation action was added to your AWS account.
     *

     *
     * @param creationDate
     *        The date and time when the mitigation action was added to your AWS account.
     */

    public void setCreationDate(java.util.Date creationDate) {
        this.creationDate = creationDate;
    }

    /**
     *

     * The date and time when the mitigation action was added to your AWS account.
     *

     *
     * @return The date and time when the mitigation action was added to your AWS account.
     */

    public java.util.Date getCreationDate() {
        return this.creationDate;
    }

    /**
     *

     * The date and time when the mitigation action was added to your AWS account.
     *

     *
     * @param creationDate
     *        The date and time when the mitigation action was added to your AWS account.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeMitigationActionResult withCreationDate(java.util.Date creationDate) {
        setCreationDate(creationDate);
        return this;
    }

    /**
     *

     * The date and time when the mitigation action was last changed.
     *

     *
     * @param lastModifiedDate
     *        The date and time when the mitigation action was last changed.
     */

    public void setLastModifiedDate(java.util.Date lastModifiedDate) {
        this.lastModifiedDate = lastModifiedDate;
    }

    /**
     *

     * The date and time when the mitigation action was last changed.
     *

     *
     * @return The date and time when the mitigation action was last changed.
     */

    public java.util.Date getLastModifiedDate() {
        return this.lastModifiedDate;
    }

    /**
     *

     * The date and time when the mitigation action was last changed.
     *

     *
     * @param lastModifiedDate
     *        The date and time when the mitigation action was last changed.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeMitigationActionResult withLastModifiedDate(java.util.Date lastModifiedDate) {
        setLastModifiedDate(lastModifiedDate);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getActionName() != null)
            sb.append("ActionName: ").append(getActionName()).append(",");
        if (getActionType() != null)
            sb.append("ActionType: ").append(getActionType()).append(",");
        if (getActionArn() != null)
            sb.append("ActionArn: ").append(getActionArn()).append(",");
        if (getActionId() != null)
            sb.append("ActionId: ").append(getActionId()).append(",");
        if (getRoleArn() != null)
            sb.append("RoleArn: ").append(getRoleArn()).append(",");
        if (getActionParams() != null)
            sb.append("ActionParams: ").append(getActionParams()).append(",");
        if (getCreationDate() != null)
            sb.append("CreationDate: ").append(getCreationDate()).append(",");
        if (getLastModifiedDate() != null)
            sb.append("LastModifiedDate: ").append(getLastModifiedDate());
        sb.append("}");
        return sb.toString();
    }

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

        if (obj instanceof DescribeMitigationActionResult == false)
            return false;
        DescribeMitigationActionResult other = (DescribeMitigationActionResult) obj;
        if (other.getActionName() == null ^ this.getActionName() == null)
            return false;
        if (other.getActionName() != null && other.getActionName().equals(this.getActionName()) == false)
            return false;
        if (other.getActionType() == null ^ this.getActionType() == null)
            return false;
        if (other.getActionType() != null && other.getActionType().equals(this.getActionType()) == false)
            return false;
        if (other.getActionArn() == null ^ this.getActionArn() == null)
            return false;
        if (other.getActionArn() != null && other.getActionArn().equals(this.getActionArn()) == false)
            return false;
        if (other.getActionId() == null ^ this.getActionId() == null)
            return false;
        if (other.getActionId() != null && other.getActionId().equals(this.getActionId()) == false)
            return false;
        if (other.getRoleArn() == null ^ this.getRoleArn() == null)
            return false;
        if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false)
            return false;
        if (other.getActionParams() == null ^ this.getActionParams() == null)
            return false;
        if (other.getActionParams() != null && other.getActionParams().equals(this.getActionParams()) == false)
            return false;
        if (other.getCreationDate() == null ^ this.getCreationDate() == null)
            return false;
        if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == false)
            return false;
        if (other.getLastModifiedDate() == null ^ this.getLastModifiedDate() == null)
            return false;
        if (other.getLastModifiedDate() != null && other.getLastModifiedDate().equals(this.getLastModifiedDate()) == false)
            return false;
        return true;
    }

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

        hashCode = prime * hashCode + ((getActionName() == null) ? 0 : getActionName().hashCode());
        hashCode = prime * hashCode + ((getActionType() == null) ? 0 : getActionType().hashCode());
        hashCode = prime * hashCode + ((getActionArn() == null) ? 0 : getActionArn().hashCode());
        hashCode = prime * hashCode + ((getActionId() == null) ? 0 : getActionId().hashCode());
        hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
        hashCode = prime * hashCode + ((getActionParams() == null) ? 0 : getActionParams().hashCode());
        hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode());
        hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode());
        return hashCode;
    }

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

}


text:
<!-- <ClickTracking> with an invalid uri -->
<VAST version="3.0">
    <Ad id="601364">
        <InLine>
            <AdSystem>Acudeo Compatible</AdSystem>
            <AdTitle>VAST 2.0 Instream Test 1</AdTitle>
            <Description>VAST 2.0 Instream Test 1</Description>
            <Error>http://myErrorURL/error</Error>

            <Impression>http://myTrackingURL/impression</Impression>
            <Creatives>
                <Creative>
                    <Linear>
                        <Duration>01:00:00</Duration>
                        <VideoClicks>
                            <ClickTracking>ftp://127.0.0.1/test</ClickTracking>
                        </VideoClicks>
                    </Linear>
                </Creative>
            </Creatives>
        </InLine>
    </Ad>
</VAST>

redpajama_set_name: RedPajamaGithub


text:
.red { background-color : red }
address { margin-bottom : 1em ; margin-left : 1em }
address:not(:last-of-type) { background-color : lime }


text:
class Folio::Console::GroupByDayHeaderCell < Folio::ConsoleCell
  def show
    render if model[:date].present?
  end

  def count
    return @count unless @count.nil?

    date = model[:date].to_date
    @count = model[:scope].unscope(:limit, :offset)
                          .where("#{model[:attribute]} > ?",
                                 date.beginning_of_day)
                          .where("#{model[:attribute]} < ?",
                                 date.end_of_day)
                          .count
  end
end


text:
<!DOCTYPE html>

<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta charset="utf-8">

<title>wysihtml5 - Test Suite</title>

<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-git.css">
<link rel="stylesheet" href="../src/bootstrap-wysihtml5.css">
<link rel="stylesheet" href="../lib/css/bootstrap.css">

wysihtml5 - Test Suite


text:
package mobi.roshka.farmapy.activity;

import java.util.List;

import mobi.roshka.farmapy.R;
import mobi.roshka.farmapy.bean.SanitaryAlert;
import mobi.roshka.farmapy.comm.CommManager;
import mobi.roshka.farmapy.exception.AcataAppException;
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;

public class SanitaryActivity extends Activity {
	private ListView sanitaryListView;
	private List<SanitaryAlert> sanitaryAlert;
	protected ProgressBar activityIndicator;

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

        this.activityIndicator = (ProgressBar) this.findViewById(R.id.commonActivityIndicator);

        sanitaryListView = (ListView) this.findViewById(R.id.sanitaryList);

        Log.d("EmergencyActivity", "Launching GetEmergencyTask task.");

        reload();

	}

	private void reload(){
		activityIndicator.setVisibility(View.VISIBLE);
		new  GetSanitaryTask().execute();
	}

	public ListView getSanitaryListView() {
		return sanitaryListView;
	}

	public void setSanitaryListView(ListView sanitaryListView) {
		this.sanitaryListView = sanitaryListView;
	}

	public List<SanitaryAlert> getSanitaryAlert() {
		return sanitaryAlert;
	}

	public void setSanitaryAlert(List<SanitaryAlert> sanitaryAlert) {
		this.sanitaryAlert = sanitaryAlert;
		sanitaryListView.setAdapter(new SanitaryListAdapter());
	}

	//======================================================================

	private class GetSanitaryTask extends AsyncTask<Void, Void, List<SanitaryAlert>> {
		private AcataAppException farmaPyEx;
		@Override
		protected List<SanitaryAlert> doInBackground(Void... params) {
			try {
				return CommManager.getSanitaryAlert();
			} catch (AcataAppException e) {
				Log.e("AccountActivity", "Error while retrieving Sanitary Alerts", e);
				farmaPyEx = e;
			}
			return null;
		}

		@Override
		protected void onPostExecute(List<SanitaryAlert> sanitaryAlerts) {
			Log.d("sanitaryAlerts", "Finished executing sanitaryAlerts");
			if(farmaPyEx!=null){
				Log.e("Sanitary", "estamos en la B " + farmaPyEx.getMessage());
				return;
			}

			sanitaryAlert = sanitaryAlerts;
			setSanitaryAlert(sanitaryAlerts);

			activityIndicator.setVisibility(View.GONE);
		}

	}

	//======================================================================

	private class SanitaryListAdapter extends BaseAdapter
	{
		private LayoutInflater layoutInflater;

		SanitaryListAdapter()
		{
			layoutInflater = LayoutInflater.from(SanitaryActivity.this);
		}

		@Override
		public int getCount() {
			if (getSanitaryAlert() != null)
				return getSanitaryAlert().size();
			return 0;
		}

		@Override
		public Object getItem(int position) {
			if (getSanitaryAlert() != null) {
				SanitaryAlert sa = getSanitaryAlert().get(position);
				return sa;
			}
			return null;
		}

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

		@Override
		public View getView(int position, View convertView, ViewGroup parent) {
			if (convertView == null) {
				convertView = layoutInflater.inflate(R.layout.sanitary_entry, parent, false);
			}
			TextView description 	= (TextView) convertView.findViewById(R.id.sanitaryDescrip);
			TextView infoAdic 		= (TextView) convertView.findViewById(R.id.sanitaryInfoAdic);
			TextView url 			= (TextView) convertView.findViewById(R.id.sanitaryUrl);
			ImageView icon 			= (ImageView) convertView.findViewById(R.id.sanitaryIcon);

			infoAdic.setVisibility(View.GONE);
			url.setVisibility(View.GONE);

			final SanitaryAlert sa = getSanitaryAlert().get(position);
			description.setText(sa.getDescription());

			if(sa.getAdditionalInfo()!=null){
				infoAdic.setVisibility(View.VISIBLE);
				infoAdic.setText(sa.getAdditionalInfo());
			}

			if(sa.getUrl()!=null){
				url.setVisibility(View.VISIBLE);
				url.setText(sa.getUrl());
			}
			if(sa.getAlertType().equalsIgnoreCase("Epidemia")){
				icon.setImageResource(R.drawable.farma_py_alert_critical);
			}

			return convertView;
		}

	}

}


text:
var FicheCreate = {
  submitBtn: document.querySelectorAll('input[type="submit"]'),
  questionCount: 0,

  collectionHolder: document.getElementsByClassName('form-choices')[0],
  adderBtn: document.getElementById('adder'),

  init: function() {
    var app = this;

    this.adderBtn.addEventListener('click', function(e) {
      e.preventDefault();
      app.addForm();
      app.fieldLimit();
    }, false);

  },

  addForm: function() {
    var prototype = this.collectionHolder.getAttribute('data-prototype');
    var newForm = prototype.replace(/__name__/g, this.collectionHolder.children.length);

    var form = document.createElement('li');
    form.classList.add('fiche-question');
    form.innerHTML = newForm;

    this.collectionHolder.appendChild(form);

    this.removeForm();
    componentHandler.upgradeDom();
  },

  removeForm: function() {
    var removeBtn = document.querySelectorAll('.remover');

    for (var i = 0, l = removeBtn.length; i < l; i++) {
      removeBtn[i].addEventListener('click', function(e) {
        e.preventDefault();
        var id = this.getAttribute('data-id');
        var target = document.getElementById('form' + id).parentNode;
        target.parentNode.removeChild(target);
        componentHandler.upgradeDom();
      }, false);
    }

  },

  fieldLimit: function() {
    var inputs = document.querySelectorAll('.mdl-textfield__input');
    this.submitBtn[0].setAttribute('disabled', true);

    for (var i = 0, l = inputs.length; i < l; i++) {
      inputs[i].addEventListener('blur', this.submit.bind(this), false);
    }

    this.questionCount = document.querySelectorAll('.fiche-question').length;

    if (this.questionCount >= 5) {
      this.adderBtn.setAttribute("disabled", true);
    } else {
      this.adderBtn.removeAttribute("disabled");
    }
  },

  submit: function() {
    var self = this;
    setTimeout(function() { check() }, 300);

    var check = function() {
      var invalid = document.querySelectorAll('.is-invalid');

      if (invalid[0] == null || invalid[0] == 'undefined') {
        self.submitBtn[0].removeAttribute('disabled');
      } else {
        self.submitBtn[0].setAttribute('disabled', true);
      }
    };
  },
}


text:
/**
 * Created by apache on 15-11-25.
 */
import alt from '../alt';
import BigUploadActions from '../actions/BigUploadActions';
//import Resumable from '../resumable';

class BigUploadStore {
    constructor() {
        this.bindActions(BigUploadActions);
        this.file = {};
        //this.r = new Resumable({
        //    target:'/api/upload/music',
        //    chunkSize:1*1024*1024,
        //    simultaneousUploads:4,
        //    testChunks:false,
        //    throttleProgressCallbacks:1,
        //    generateUniqueIdentifier : null
        //});
        this.error = '';
    }

    onChangeFile(event) {
        let target = this.file = event.target.files[0];
        let $upload = $("#upload"),
            accept_type = [
                'audio/mpeg',
                'video/mp4'
            ];
        if(_.indexOf(accept_type,this.file.type) === -1) {
            toastr.warning('不支持的格式');
            this.error = '不支持的格式';
        } else {
            this.error = '';
            let $fileLoader = $('#upload_file_loader');
            if( ! $fileLoader.hasClass('mon-preview-block-o') ) {
                $("#upload_file_select").removeClass('mon-upload').addClass('mon-upload-o');
                $fileLoader.removeClass('mon-preview-block').addClass('mon-preview-block-o');
            }
        }

    }

    onPostBgFileSuccess(data) {
    }
}

export default alt.createStore(BigUploadStore);


text:
using System;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Text;
using prefSQL.SQLParser;
using prefSQL.SQLSkyline;

namespace Utility
{
    class Program
    {

        static void Main(string[] args)
        {
            Program prg = new Program();
            prg.MeasurePerformance();
            //prg.testPaper();
            //prg.Run();

            /*
            DominanceGraph graph = new DominanceGraph();
            graph.run();
            */

            //Application.Run(new FrmSQLParser());

        }

        private void testPaper()
        {
            Performance p = new Performance();
            p.GenerateScript = false;
            p.UseNormalizedValues = false;

            p.WindowSort = SQLCommon.Ordering.EntropyFunction;
            p.WindowHandling = 2; //Move To End             start with last tuple in window.

            p.UseCLR = false;
            p.Trials = 1;           //Amount of trials for each single sql preference statement

            p.MinDimensions = 3;   //Up from x dimensions
            p.MaxDimensions = 7;   //Up to x dimensions
            p.RandomDraws = 100;    //Amount of draws (x times randomly choose a some preferences)

            p.TableSize = Performance.Size.Superlarge;
            p.Set = Performance.PreferenceSet.All;
            p.Mode = Performance.PreferenceChooseMode.Shuffle;

            p.SkylineUpToLevel = 1;

            p.Strategy = null; // new SkylineBNLSort(); // null; //all algorithms should be tested

            p.WriteRCommand = true;

            p.GeneratePerformanceQueries();
        }

        private void MeasurePerformance()
        {
            Performance p = new Performance();

            p.GenerateScript = false;
            p.UseNormalizedValues = false;
            //p.UseNormalizedValues = true;

            p.WindowSort = SQLCommon.Ordering.AttributePosition;
            //p.WindowSort = SQLCommon.Ordering.EntropyFunction;

            //p.WindowHandling = 0; //Do not move           start with last tuple in window.
            //p.WindowHandling = 1; //Do not move           start with first tuple in window.
            p.WindowHandling = 2; //Move To End             start with last tuple in window.
            //p.WindowHandling = 3; //Move To Beginning     start with first tuple in window.

            //p.UseCLR = true;
            p.UseCLR = false;
            p.Trials = 1;           //Amount of trials for each single sql preference statement

            p.MinDimensions = 7;   //Up from x dimensions
            p.MaxDimensions = 7;   //Up to x dimensions
            p.RandomDraws = 10;    //Amount of draws (x times randomly choose a some preferences)

            //p.TableSize = Performance.Size.Small;
            //p.TableSize = Performance.Size.Medium;
            //p.TableSize = Performance.Size.Large;
            p.TableSize = Performance.Size.Superlarge;

            //p.Set = Performance.PreferenceSet.ArchiveComparable;
            //p.Set = Performance.PreferenceSet.ArchiveIncomparable;
            //p.Set = Performance.PreferenceSet.Jon;
            //p.Set = Performance.PreferenceSet.Mya;
            //p.Set = Performance.PreferenceSet.Barra;
            //p.Set = Performance.PreferenceSet.All;
            p.Set = Performance.PreferenceSet.Numeric;
            //p.Set = Performance.PreferenceSet.Categoric;
            //p.Set = Performance.PreferenceSet.MinCardinality;
            //p.Set = Performance.PreferenceSet.CategoricIncomparable;
            //p.Set = Performance.PreferenceSet.NumericIncomparable;

            p.Mode = Performance.PreferenceChooseMode.Combination;
            //p.Mode = Performance.PreferenceChooseMode.SameOrder;
            //p.Mode = Performance.PreferenceChooseMode.Shuffle;
            //p.Mode = Performance.PreferenceChooseMode.Correlation;
            //p.Mode = Performance.PreferenceChooseMode.AntiCorrelation;
            //p.Mode = Performance.PreferenceChooseMode.Independent;

            p.SkylineUpToLevel = 1;

            //p.Strategy = null; //all algorithms should be tested
            //p.Strategy = new SkylineSQL();
            //p.Strategy = new SkylineBNL();
            p.Strategy = new SkylineBNLSort();
            //p.Strategy = new SkylineDQ();
            //p.Strategy = new SkylineHexagon();
            //p.Strategy = new SkylineDecisionTree();

            //p.Sampling = true;
            //p.SamplingSubspacesCount = 10;
            //p.SamplingSubspaceDimension = 3;
            //p.SamplingSamplesCount = 10;

            p.GeneratePerformanceQueries();
        }

        public void Run()
        {

            try
            {

                //SKYLINE Queries

                //string strPrefSQL = "SELECT t.id                           FROM cars t SKYLINE OF t.price LOW, t.mileage LOW";
                //string strPrefSQL = "select cars.id from cars";
                //string strPrefSQL = "SELECT *                           FROM cars t WHERE t.doors = 5 SKYLINE OF t.price LOW, t.mileage LOW, t.horsepower HIGH, t.consumption LOW, t.registrationnumeric HIGH";
                //string strPrefSQL = "SELECT t.title AS Modellname, t.price AS Preis, t.consumption AS Verbrauch FROM cars t LEFT OUTER JOIN Makes m ON t.make_id = m.id LEFT OUTER JOIN Bodies b ON t.body_id = b.id WHERE m.name = 'VW' AND b.name = 'Bus' SKYLINE OF t.price LOW 1000 EQUAL, t.consumption LOW";
                //string strPrefSQL = "SELECT t.id, t.title, t.price, c.name, t.enginesize FROM cars t LEFT OUTER JOIN colors c ON t.color_id = c.id SKYLINE OF t.price LOW, c.name ('pink' >> 'black' >> OTHERS INCOMPARABLE), t.enginesize HIGH ORDER BY BEST_RANK()";
                //string strPrefSQL = "SELECT t.id, t.title, t.price, c.name, t.enginesize FROM cars t LEFT OUTER JOIN colors c ON t.color_id = c.id SKYLINE OF t.price LOW, c.name (OTHERS EQUAL >> 'pink' >> 'red'), t.enginesize HIGH ORDER BY SUM_RANK()";
                //string strPrefSQL = "SELECT t.id, t.title, t.price         FROM cars t SKYLINE OF t1.price LOW, t1.mileage LOW ORDER BY BEST_RANK()";
                //string strPrefSQL = "SELECT t.id, t.price, t.mileage       FROM cars t SKYLINE OF t1.price LOW, t1.mileage LOW ORDER BY SUM_RANK()";

                //string strPrefSQL = "SELECT t.id, t.title, bodies.name AS Chassis, t.price, fuels.name                        FROM cars t LEFT OUTER JOIN fuels ON t.fuel_id = fuels.ID LEFT OUTER JOIN bodies ON t.body_id = bodies.ID SKYLINE OF bodies.name ('bus' >> OTHERS EQUAL) IS MORE IMPORTANT THAN t.price LOW, fuels.name ('petrol' >> OTHERS EQUAL)";
                //string strPrefSQL = "SELECT t.id, t.title, t.price, t.mileage, t.enginesize                    FROM cars t SKYLINE OF t.mileage LOW IS MORE IMPORTANT THAN t.price LOW, t.engineszie HIGH ";

                //SKYLINE Queries with JOINS
                //string strPrefSQL = "SELECT c.id, c.price, b.name          FROM cars t LEFT OUTER JOIN bodies b ON c.body_id = b.ID SKYLINE OF c.price LOW, b.name ('Bus' >> 'Kleinwagen')";
                //string strPrefSQL = "SELECT c.id, c.price                  FROM cars t LEFT OUTER JOIN colors cc ON c.color_id = cc.id SKYLINE OF c.horsepower HIGH, cc.name ('red' >> 'blue' >> 'yellow')";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price      FROM cars t LEFT OUTER JOIN colors ON t1.color_id = colors.ID SKYLINE OF t1.price LOW, colors.name ('red' >> 'blue' >> OTHERS INCOMPARABLE)";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price      FROM cars t LEFT OUTER JOIN colors ON t1.color_id = colors.ID SKYLINE OF t1.price LOW, t1.mileage LOW, t1.horsepower HIGH, t1.enginesize HIGH, t1.doors HIGH, t1.consumption LOW, t1.cylinders HIGH, colors.name ('red' >> 'blue' >> 'yellow' >> OTHERS INCOMPARABLE)";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price      FROM cars t LEFT OUTER JOIN colors ON t1.color_id = colors.ID SKYLINE OF t1.price LOW, t1.mileage LOW, t1.horsepower HIGH, t1.enginesize HIGH, t1.doors HIGH, t1.consumption LOW, t1.cylinders HIGH";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.pric       FROM cars t LEFT OUTER JOIN colors ON t1.color_id = colors.ID WHERE t1.price < 10000 SKYLINE OF t1.price LOW, colors.name ('red' >> 'blue' >> OTHERS INCOMPARABLE)";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price      FROM cars t LEFT OUTER JOIN colors ON t1.color_id = colors.ID WHERE t1.price < 10000 SKYLINE OF t1.price LOW, colors.name (OTHERS INCOMPARABLE >> 'blue' >> 'red')";
                //string strPrefSQL = "SELECT c.id, c.price                  FROM cars t LEFT OUTER JOIN colors cc ON c.color_id = cc.id LEFT OUTER JOIN fuels f ON f.id = c.fuel_id SKYLINE OF c.price LOW 1000 INCOMPARABLE, cc.name ('red' == 'blue' >> OTHERS INCOMPARABLE >> 'gray'), f.name ('petrol' >> OTHERS INCOMPARABLE >> 'diesel')";
                //string strPrefSQL = "SELECT c.title AS Name, c.Price       FROM cars t LEFT OUTER JOIN colors co ON c.color_id = co.ID LEFT OUTER JOIN bodies b ON c.body_id = b.ID SKYLINE OF c.Price LOW, c.Mileage LOW";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price      FROM cars t LEFT OUTER JOIN colors ON t1.color_id = colors.ID WHERE t1.price < 10000 SKYLINE OF t1.price LOW, colors.name ('silver' >> 'yellow' >> OTHERS INCOMPARABLE)";
                //string strPrefSQL = "SELECT t.id, t.title, t.price         FROM cars t LEFT OUTER JOIN colors ON t.color_id = colors.id SKYLINE OF t.price LOW, t.mileage LOW, colors.name ('red' >> {'blue', 'yellow'} >> OTHERS INCOMPARABLE)";

                //string strPrefSQL = "SELECT t.id                        FROM cars t LEFT OUTER JOIN bodies ON t.body_id = bodies.ID LEFT OUTER JOIN colors ON colors.id = t.color_id SKYLINE OF t.price AROUND 10000, colors.name ('red' >> OTHERS EQUAL), bodies.name ('van' >> 'compact car' >> OTHERS EQUAL) ORDER BY BEST_RANK()";

                //RANKING Queries
                string strPrefSQL = "SELECT t.id, t.title FROM cars t ORDER BY WEIGHTEDSUM (t.price LOW 0.8, t.mileage LOW 0.2)";
                //string strPrefSQL = "SELECT t.id, t.title FROM cars t LEFT OUTER JOIN colors c ON t.color_id = c.id ORDER BY WEIGTHEDSUM (t.price LOW 0.5, c.name ('brown' >> 'green' >> OTHERS EQUAL) 0.5)";

                //Playground --> Test here your queries
                //string strPrefSQL = "SELECT c.id, c.price, b.name          FROM cars_small c   LEFT OUTER JOIN bodies b ON c.body_id = b.ID SKYLINE OF c.price LOW, b.name ('Bus' >> 'Kleinwagen')";
                //string strPrefSQL = "SELECT c.id, c.price                  FROM cars_small c   LEFT OUTER JOIN colors cc ON c.color_id = cc.id ORDER BY WEIGHTEDSUM (c.price LOW 0.5, cc.name ('brown' >> 'green') 0.5)";
                //string strPrefSQL = "SELECT c.id, c.price                  FROM cars_small c   LEFT OUTER JOIN colors cc ON c.color_id = cc.id SKYLINE OF c.horsepower HIGH, cc.name ('red' >> 'blue' >> 'yellow')";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price      FROM cars_small t1  LEFT OUTER JOIN colors ON t1.color_id = colors.ID SKYLINE OF t1.price LOW, colors.name ('red' >> 'blue' >> OTHERS INCOMPARABLE)";
                //string strPrefSQL = "SELECT t1.id                          FROM cars t1        ORDER BY WEIGHTEDSUM (t1.price HIGH 0.5, t1.mileage HIGH 0.5, t1.horsepower LOW 0.5, t1.enginesize LOW 0.5, t1.consumption HIGH 0.5, t1.doors LOW 0.5, t1.cylinders LOW 0.5)";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price      FROM cars t1        LEFT OUTER JOIN colors ON t1.color_id = colors.ID SKYLINE OF t1.price LOW, t1.mileage LOW, t1.horsepower HIGH, t1.enginesize HIGH, t1.doors HIGH, t1.consumption LOW, t1.cylinders HIGH, colors.name ('red' >> 'blue' >> 'yellow' >> OTHERS INCOMPARABLE)";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price      FROM cars t1        SKYLINE OF t1.price LOW, t1.mileage LOW ORDER BY BEST_RANK()";
                //string strPrefSQL = "SELECT t1.id                          FROM cars t1        SKYLINE OF t1.price LOW, t1.mileage LOW";
                //string strPrefSQL = "SELECT cars.id, cars.consumption      FROM cars           SKYLINE OF cars.consumption LOW, cars.enginesize HIGH, cars.price LOW";
                //string strPrefSQL = "SELECT *                              FROM cars           SKYLINE OF cars.registrationnumeric HIGH, cars.mileage LOW, cars.horsepower HIGH 100 EQUAL";
                //string strPrefSQL = "SELECT cars.id, cars.horsepower       FROM cars           SKYLINE OF cars.horsepower HIGH, cars.mileage LOW";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price      FROM cars t1        LEFT OUTER JOIN colors ON t1.color_id = colors.ID SKYLINE OF t1.price LOW, t1.mileage LOW, t1.horsepower HIGH, t1.enginesize HIGH, t1.doors HIGH, t1.consumption LOW, t1.cylinders HIGH";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price, t1.mileage, t1.enginesize           FROM cars t1        SKYLINE OF t1.price LOW, t1.mileage LOW, t1.enginesize HIGH ORDER BY SUM_RANK()";
                //string strPrefSQL = "SELECT t1.id                          FROM cars t1  SKYLINE OF t1.price LOW, t1.mileage LOW, t1.horsepower HIGH, t1.enginesize HIGH, t1.doors HIGH, t1.consumption LOW, t1.cylinders HIGH";
                //string strPrefSQL = "SELECT t1.id                          FROM cars_norm t1   SKYLINE OF t1.price LOW, t1.mileage LOW, t1.horsepower LOW, t1.enginesize LOW, t1.doors LOW, t1.consumption LOW, t1.cylinders LOW";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price      FROM cars t1        SKYLINE OF t1.price LOW, t1.mileage LOW ORDER BY BEST_RANK()";
                //string strPrefSQL = "SELECT t1.id AS ID, t1.title, t1.price FROM cars_small t1 SKYLINE OF t1.price LOW, t1.title ('hans' >> OTHERS INCOMPARABLE)";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price, t1.mileage, colors.name FROM cars_small t1 LEFT OUTER JOIN colors ON t1.color_id = colors.ID WHERE t1.price < 10000 SKYLINE OF t1.price LOW, colors.name ('red' >> 'blue' >> OTHERS INCOMPARABLE)";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price, t1.mileage, colors.name FROM cars_small t1 LEFT OUTER JOIN colors ON t1.color_id = colors.ID WHERE t1.price < 10000 SKYLINE OF t1.price LOW, colors.name (OTHERS INCOMPARABLE >> 'blue' >> 'red')";
                //string strPrefSQL = "SELECT * FROM cars_small cs SKYLINE OF cs.price LOW, cs.mileage LOW SAMPLE BY RANDOM_SUBSETS COUNT 2 DIMENSION 1";
                //string strPrefSQL = "SELECT t1.id, t1.price, t1.mileage FROM cars_small t1 SKYLINE OF t1.price LOW, t1.mileage LOW";
                //string strPrefSQL = "SELECT t1.id, t1.price, t1.mileage FROM cars_small t1 SKYLINE OF t1.price LOW, t1.mileage LOW ORDER BY SUM_RANK()";
                //string strPrefSQL = "SELECT t1.id                          FROM cars t1  SKYLINE OF t1.price LOW, t1.mileage LOW, t1.horsepower HIGH, t1.enginesize HIGH, t1.doors HIGH, t1.consumption LOW";

                //string strPrefSQL = "SELECT c.id, c.price                  FROM cars_medium c   LEFT OUTER JOIN colors cc ON c.color_id = cc.id LEFT OUTER JOIN fuels f ON f.id = c.fuel_id SKYLINE OF c.price LOW 1000 INCOMPARABLE, cc.name ('red' == 'blue' >> OTHERS INCOMPARABLE >> 'gray'), f.name ('petrol' >> OTHERS INCOMPARABLE >> 'diesel')";
                //string strPrefSQL = "SELECT c.title AS Name, c.Price, c.Mileage, co.Name AS Color, b.Name AS Body FROM Cars AS c LEFT OUTER JOIN colors co ON c.color_id = co.ID LEFT OUTER JOIN bodies b ON c.body_id = b.ID SKYLINE OF c.Price LOW, c.Mileage LOW";

                //string strPrefSQL = "SELECT t.id FROM cars t SKYLINE OF t.price LOW, t.mileage LOW";
                //string strPrefSQL = "SELECT t1.id, t1.title, t1.price, colors.name FROM cars t1 LEFT OUTER JOIN colors ON t1.color_id = colors.ID WHERE t1.price < 10000 SKYLINE OF t1.price LOW, colors.name ('silver' >> 'yellow' >> OTHERS INCOMPARABLE)";
                //string strPrefSQL = "SELECT cars.id, cars.title FROM  cars SKYLINE OF cars.price LOW,cars.mileage LOW,cars.horsepower HIGH,cars.enginesize HIGH,cars.consumption LOW,cars.doors HIGH,cars.seats HIGH";

                //string strPrefSQL = "SELECT t.id, t.title, t.price, colors.name AS colour FROM cars t LEFT OUTER JOIN colors ON t.color_id = colors.id SKYLINE OF t.price LOW, t.mileage LOW, colors.name ('red' >> {'blue', 'yellow'} >> OTHERS INCOMPARABLE)";
                //string strPrefSQL = "SELECT t.id, t.title FROM cars t ORDER BY WEIGHTEDSUM (t.price LOW 0.8, t.mileage LOW 0.2)";

                //string strPrefSQL = "SELECT t.id, t.title  FROM cars t    ORDER BY WEIGHTEDSUM( t.price LOW 0.8, t.mileage LOW 0.2)";

                //Query that results in more than 4000 Characters
                /*string strPrefSQL = "SELECT  t1.id	, t1.title	, t1.price	, t1.mileage	, colors.name FROM cars_small t1 " +
                                    "LEFT OUTER JOIN colors ON t1.color_id = colors.ID " +
                                    "LEFT OUTER JOIN bodies ON t1.body_id = bodies.id " +
                                    "LEFT OUTER JOIN Conditions ON t1.Condition_Id = Conditions.Id " +
                                    "LEFT OUTER JOIN Models ON t1.Model_Id = Models.Id " +
                                    "LEFT OUTER JOIN Makes ON t1.Make_Id = Makes.Id " +
                                    "LEFT OUTER JOIN Drives ON t1.Drive_Id = Drives.Id " +
                                    "LEFT OUTER JOIN Efficiencies ON t1.Efficiency_Id = Efficiencies.Id " +
                                    "LEFT OUTER JOIN Pollutions ON t1.Pollution_Id = Pollutions.Id " +
                                    "LEFT OUTER JOIN Transmissions ON t1.Transmission_Id = Transmissions.Id " +
                                    "LEFT OUTER JOIN Fuels ON t1.Fuel_Id = Fuels.Id " +
                                    "WHERE t1.price < 10000  " +
                                    "SKYLINE OF  " +
                                    "t1.price LOW " +
                                    ", colors.name " +
                                    "(" +
                                    "'anthracite' >> 'beige' >> 'blue' >> 'bordeaux' >> " +
                                    "    'brown' >> 'yellow' >> 'gold' >> 'gray' >> 'green' >> " +
                                    "    'orange' >> 'pink' >> 'red' >> 'black' >> 'silver' >> " +
                                    "    'turquoise' >> 'violet' >> 'white'" +
                                    ") " +

                                    ", bodies.name " +
                                    "(" +
                                    "    'bus' >> 'cabriolet' >> 'coupé' >> 'van' >> " +
                                    "    'compact car' >> 'estate car' >> 'minivan' >> " +
                                    "    'limousine' >> 'pick-up' >> 'scooter' >> 'suv' " +
                                    ")" +
                                    ", fuels.name " +
                                    "(" +
                                    "    'hybrid' >> 'bioethanol' >> 'diesel' >> 'gas' >> " +
                                    "    'electro' >> 'petrol' " +
                                    ")";*/

                //Query with 2 id spalten
                //string strPrefSQL = "SELECT t.id, colors.id as colorid, t.title, t.price, colors.name AS colour FROM cars t LEFT OUTER JOIN colors ON t.color_id = colors.id SKYLINE OF t.price LOW, t.mileage LOW, colors.name ('red' >> 'blue' >> OTHERS EQUAL)";

                Debug.WriteLine(strPrefSQL);
                SQLCommon parser = new SQLCommon();

                //Choose here your algorithm
                parser.SkylineType = new SkylineSQL();
                //parser.SkylineType = new SkylineBNL();
                //parser.SkylineType = new SkylineBNLSort();
                //parser.SkylineType = new SkylineHexagon();
                //parser.SkylineType = new SkylineDQ();
                //parser.SkylineType = new MultipleSkylineBNL();
                //parser.SkylineType = new SkylineDecisionTree();

                //Some other available properties
                parser.ShowInternalAttributes = true;
                parser.SkylineUpToLevel = 1;

                //First parse only (to get the parsed string for CLR)
                Debug.WriteLine(parser.ParsePreferenceSQL(strPrefSQL));

                //Now parse and execute
                Stopwatch sw = new Stopwatch();
                sw.Start();
                DataTable dt = parser.ParseAndExecutePrefSQL(Helper.ConnectionString, Helper.ProviderName, strPrefSQL);
                sw.Stop();

                StringBuilder sb = new StringBuilder();
                sb.AppendLine("------------------------------------------");
                sb.AppendLine("STATISTIC");
                sb.AppendLine("------------------------------------------");
                sb.AppendLine("         skyline size:" + dt.Rows.Count.ToString().PadLeft(6));
                sb.AppendLine("               fields:" + dt.Columns.Count.ToString().PadLeft(6));
                sb.AppendLine("algo  time elapsed ms:" + parser.TimeInMilliseconds.ToString().PadLeft(6));
                sb.AppendLine("total time elapsed ms:" + sw.ElapsedMilliseconds.ToString().PadLeft(6));
                Debug.Write(sb);

            }
            catch (Exception ex)
            {
                Debug.WriteLine("ERROR: " + ex);
            }

            Environment.Exit(0);
        }

    }
}


text:
require 'spec_helper'

feature 'test coverage badge' do
  given!(:user) { create(:user) }
  given!(:project) { create(:project, :private) }

  context 'when user has access to view badge' do
    background do
      project.team << [user, :developer]
      sign_in(user)
    end

    scenario 'user requests coverage badge image for pipeline' do
      create_pipeline do |pipeline|
        create_build(pipeline, coverage: 100, name: 'test:1')
        create_build(pipeline, coverage: 90, name: 'test:2')
      end

      show_test_coverage_badge

      expect_coverage_badge('95%')
    end

    scenario 'user requests coverage badge for specific job' do
      create_pipeline do |pipeline|
        create_build(pipeline, coverage: 50, name: 'test:1')
        create_build(pipeline, coverage: 50, name: 'test:2')
        create_build(pipeline, coverage: 85, name: 'coverage')
      end

      show_test_coverage_badge(job: 'coverage')

      expect_coverage_badge('85%')
    end

    scenario 'user requests coverage badge for pipeline without coverage' do
      create_pipeline do |pipeline|
        create_build(pipeline, coverage: nil, name: 'test')
      end

      show_test_coverage_badge

      expect_coverage_badge('unknown')
    end
  end

  context 'when user does not have access to view badge' do
    background { sign_in(user) }

    scenario 'user requests test coverage badge image' do
      show_test_coverage_badge

      expect(page).to have_http_status(404)
    end
  end

  def create_pipeline
    opts = { project: project }

    create(:ci_pipeline, opts).tap do |pipeline|
      yield pipeline
      pipeline.update_status
    end
  end

  def create_build(pipeline, coverage:, name:)
    opts = { pipeline: pipeline, coverage: coverage, name: name }

    create(:ci_build, :success, opts)
  end

  def show_test_coverage_badge(job: nil)
    visit coverage_project_badges_path(project, ref: :master, job: job, format: :svg)
  end

  def expect_coverage_badge(coverage)
    svg = Nokogiri::XML.parse(page.body)
    expect(page.response_headers['Content-Type']).to include('image/svg+xml')
    expect(svg.at(%Q{text:contains("#{coverage}")})).to be_truthy
  end
end


text:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context=".MainActivity">

    <!-- <item android:id="@+id/action_show_fx" android:title="@string/action_show_fx"
        android:orderInCategory="0" android:icon="@android:drawable/ic_menu_view" android:showAsAction="always" /> -->

    <item android:id="@+id/action_settings" android:title="@string/action_settings"
        android:orderInCategory="200" app:showAsAction="never" />
    <item android:id="@+id/action_about" android:title="@string/action_about"
        android:orderInCategory="190" app:showAsAction="never" />
    <item android:id="@+id/action_save" android:title="@string/action_save"
        android:orderInCategory="90" android:icon="@drawable/ic_action_save" android:showAsAction="always" />
    <item android:id="@+id/action_selectpic" android:title="@string/action_selectpic"
        android:orderInCategory="80" android:icon="@drawable/ic_action_add_pic" android:showAsAction="always" />
    <!--    Hidden welcome test menu entry
    <item android:id="@+id/tmpWelcome" android:title="Welcome Test"
        android:orderInCategory="820" android:showAsAction="never" /> -->
    <item android:id="@+id/action_resetFX" android:title="@string/action_resetFX_label"
        android:orderInCategory="115" app:showAsAction="never" />
    <item android:id="@+id/action_resetFXAll" android:title="@string/action_resetFXAll_label"
        android:orderInCategory="120" app:showAsAction="never" />

    <item android:id="@+id/action_savePreset" android:title="@string/action_savePreset_label"
        android:orderInCategory="122" app:showAsAction="never" />

    <!-- <item android:id="@+id/tmpLogVals" android:title="Log Vals"
        android:orderInCategory="1200" android:showAsAction="never" /> -->

    <!-- <item android:id="@+id/action_restore_originals" android:title="@string/action_restore_originals"
        android:orderInCategory="93" android:icon="@android:drawable/ic_menu_revert" android:showAsAction="always" /> -->

    <item android:id="@+id/menu_item_share" app:showAsAction="ifRoom"
        android:orderInCategory="95"
        android:title="@string/action_share"
        android:actionProviderClass="android.widget.ShareActionProvider" />
</menu>


text:
/* eslint-disable no-unused-vars */
import React from "react"
/* eslint-enable no-unused-vars */

import Note from "./Note"

export default function BracketNote({ width, height, depth, ...rest }) {
  let dx = rest.dx,
    orientation,
    align = "middle",
    dy = rest.dy

  if (height) {
    if (!dy) dy = height / 2
    if (!dx) dx = depth
    orientation = "leftRight"
  } else if (width) {
    if (!dx) dx = width / 2
    if (!dy) dy = depth
    orientation = "topBottom"
  }

  return (
    <Note
      align={align}
      orientation={orientation}
      padding={10}
      {...rest}
      editMode={false}
      dx={dx}
      dy={dy}
    />
  )
}


text:
Using Bower In Django
=======================

This repository illustrates how to use [Bower](http://bower.io/) to manage front end dependencies in [Django](https://www.djangoproject.com/) projects.

![](https://raw.githubusercontent.com/PabloVallejo/django-bower/master/screenshot.png)

## Original Article
> [View Original Article](http://axiacore.com/blog/effective-dependency-management-django-using-bower).

## Setup

In order to run the example project locally, issue the following commands.

```bash
# Clone the repo
$ git clone https://github.com/axiacore/django-bower & cd django-bower

# Install requirements
$ pip install -U -r requirements.txt

# Sync database
$ ./manage.py syncdb

# Run the server
$ ./manage.py runserver
```

## Contributing

1. Fork the repo.
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -m 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request.

## License
[MIT License](http://opensource.org/licenses/MIT)


text:
package org.apache.ignite.logger.log4j2;

import java.io.File;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.Map;
import java.util.UUID;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.internal.logger.IgniteLoggerEx;
import org.apache.ignite.internal.util.tostring.GridToStringExclude;
import org.apache.ignite.internal.util.typedef.C1;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteClosure;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager;
import org.apache.logging.log4j.core.Appender;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.appender.ConsoleAppender;
import org.apache.logging.log4j.core.appender.FileAppender;
import org.apache.logging.log4j.core.appender.RollingFileAppender;
import org.apache.logging.log4j.core.appender.routing.RoutingAppender;
import org.apache.logging.log4j.core.config.AppenderControl;
import org.apache.logging.log4j.core.config.Configuration;
import org.apache.logging.log4j.core.config.Configurator;
import org.apache.logging.log4j.core.config.DefaultConfiguration;
import org.apache.logging.log4j.core.config.LoggerConfig;
import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilder;
import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilderFactory;
import org.apache.logging.log4j.core.config.builder.api.RootLoggerComponentBuilder;
import org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration;
import org.apache.logging.log4j.core.layout.PatternLayout;
import org.jetbrains.annotations.Nullable;

import static org.apache.ignite.IgniteSystemProperties.IGNITE_CONSOLE_APPENDER;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_QUIET;
import static org.apache.logging.log4j.core.appender.ConsoleAppender.Target.SYSTEM_ERR;
import static org.apache.logging.log4j.core.appender.ConsoleAppender.Target.SYSTEM_OUT;

/**
 * Log4j2-based implementation for logging. This logger should be used
 * by loaders that have prefer log4j2-based logging.
 *

 * Here is a typical example of configuring log4j2 logger in Ignite configuration file:
 *

 *      <property name="gridLogger">
 *          <bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
 *              <constructor-arg type="java.lang.String" value="config/ignite-log4j.xml"/>
 *          </bean>
 *      </property>
 *

 * and from your code:
 *

 *      IgniteConfiguration cfg = new IgniteConfiguration();
 *      ...
 *      URL xml = U.resolveIgniteUrl("config/custom-log4j2.xml");
 *      IgniteLogger log = new Log4J2Logger(xml);
 *      ...
 *      cfg.setGridLogger(log);
 *

 *
 * Please take a look at Apache Log4j 2
 * for additional information.
 *

 * It's recommended to use Ignite logger injection instead of using/instantiating
 * logger in your task/job code. See {@link org.apache.ignite.resources.LoggerResource} annotation about logger
 * injection.
 */
public class Log4J2Logger implements IgniteLoggerEx {
    /** */
    private static final String NODE_ID = "nodeId";

    /** */
    private static final String APP_ID = "appId";

    /** */
    private static final String CONSOLE_APPENDER = "autoConfiguredIgniteConsoleAppender";

    /** */
    private static volatile boolean inited;

    /** */
    private static volatile boolean quiet0;

    /** */
    private static final Object mux = new Object();

    /** Logger implementation. */
    @GridToStringExclude
    @SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized")
    private Logger impl;

    /** Path to configuration file. */
    @GridToStringExclude
    private final String cfg;

    /** Quiet flag. */
    private final boolean quiet;

    /**
     * Creates new logger and automatically detects if root logger already
     * has appenders configured. If it does not, the root logger will be
     * configured with default appender, otherwise, existing appenders will be used.
     */
    public Log4J2Logger() {
        addConsoleAppenderIfNeeded(init -> LogManager.getRootLogger());

        quiet = quiet0;
        cfg = null;
    }

    /**
     * Creates new logger with given implementation.
     *
     * @param impl Log4j2 implementation to use.
     */
    private Log4J2Logger(final Logger impl, String path) {
        assert impl != null;

        addConsoleAppenderIfNeeded(new C1<Boolean, Logger>() {
            @Override public Logger apply(Boolean init) {
                return impl;
            }
        });

        quiet = quiet0;
        cfg = path;
    }

    /**
     * Creates new logger with given configuration {@code path}.
     *
     * @param path Path to log4j2 configuration XML file.
     * @throws IgniteCheckedException Thrown in case logger can't be created.
     */
    public Log4J2Logger(String path) throws IgniteCheckedException {
        if (path == null)
            throw new IgniteCheckedException("Configuration XML file for Log4j2 must be specified.");

        final URL cfgUrl = U.resolveIgniteUrl(path);

        if (cfgUrl == null)
            throw new IgniteCheckedException("Log4j2 configuration path was not found: " + path);

        addConsoleAppenderIfNeeded(new C1<Boolean, Logger>() {
            @Override public Logger apply(Boolean init) {
                if (init)
                    Configurator.initialize(LoggerConfig.ROOT, cfgUrl.toString());

                return LogManager.getRootLogger();
            }
        });

        quiet = quiet0;
        cfg = path;
    }

    /**
     * Creates new logger with given configuration {@code cfgFile}.
     *
     * @param cfgFile Log4j configuration XML file.
     * @throws IgniteCheckedException Thrown in case logger can't be created.
     */
    public Log4J2Logger(File cfgFile) throws IgniteCheckedException {
        if (cfgFile == null)
            throw new IgniteCheckedException("Configuration XML file for Log4j must be specified.");

        if (!cfgFile.exists() || cfgFile.isDirectory())
            throw new IgniteCheckedException("Log4j2 configuration path was not found or is a directory: " + cfgFile);

        final String path = cfgFile.getAbsolutePath();

        addConsoleAppenderIfNeeded(new C1<Boolean, Logger>() {
            @Override public Logger apply(Boolean init) {
                if (init)
                    Configurator.initialize(LoggerConfig.ROOT, path);

                return LogManager.getRootLogger();
            }
        });

        quiet = quiet0;
        cfg = cfgFile.getPath();
    }

    /**
     * Creates new logger with given configuration {@code cfgUrl}.
     *
     * @param cfgUrl URL for Log4j configuration XML file.
     * @throws IgniteCheckedException Thrown in case logger can't be created.
     */
    public Log4J2Logger(final URL cfgUrl) throws IgniteCheckedException {
        if (cfgUrl == null)
            throw new IgniteCheckedException("Configuration XML file for Log4j must be specified.");

        addConsoleAppenderIfNeeded(new C1<Boolean, Logger>() {
            @Override public Logger apply(Boolean init) {
                if (init)
                    Configurator.initialize(LoggerConfig.ROOT, cfgUrl.toString());

                return LogManager.getRootLogger();
            }
        });

        quiet = quiet0;
        cfg = cfgUrl.getPath();
    }

    /**
     * Cleans up the logger configuration. Should be used in unit tests only for sequential tests run with
     * different configurations
     */
    static void cleanup() {
        synchronized (mux) {
            System.clearProperty(APP_ID);

            if (inited)
                LogManager.shutdown();

            inited = false;
        }
    }

    /** {@inheritDoc} */
    @Nullable @Override public String fileName() {
        Configuration cfg = LoggerContext.getContext(false).getConfiguration();

        for (LoggerConfig logCfg = cfg.getLoggerConfig(impl.getName()); logCfg != null; logCfg = logCfg.getParent()) {
            for (Appender a : logCfg.getAppenders().values()) {
                if (a instanceof FileAppender)
                    return ((FileAppender)a).getFileName();

                if (a instanceof RollingFileAppender)
                    return ((RollingFileAppender)a).getFileName();

                if (a instanceof RoutingAppender) {
                    RoutingAppender routing = (RoutingAppender)a;

                    Map<String, AppenderControl> appenders = routing.getAppenders();

                    for (AppenderControl control : appenders.values()) {
                        Appender innerApp = control.getAppender();

                        if (innerApp instanceof FileAppender)
                            return normalize(((FileAppender)innerApp).getFileName());

                        if (innerApp instanceof RollingFileAppender)
                            return normalize(((RollingFileAppender)innerApp).getFileName());
                    }
                }
            }
        }

        return null;
    }

    /** {@inheritDoc} */
    @Override public void addConsoleAppender(boolean clearOutput) {
        if (!isConsoleAppenderConfigured())
            configureConsoleAppender(clearOutput);
    }

    /** {@inheritDoc} */
    @Override public void flush() {
        // No-op.
    }

    /**
     * Normalizes given path for windows.
     * Log4j2 doesn't replace unix directory delimiters which used at 'fileName' to windows.
     *
     * @param path Path.
     * @return Normalized path.
     */
    private String normalize(String path) {
        if (!U.isWindows())
            return path;

        return path.replace('/', File.separatorChar);
    }

    /**
     * Adds console appender when needed with some default logging settings.
     *
     * @param initLogClo Optional log implementation init closure.
     */
    private void addConsoleAppenderIfNeeded(@Nullable IgniteClosure<Boolean, Logger> initLogClo) {
        if (inited) {
            // Do not init.
            impl = initLogClo.apply(false);

            return;
        }

        synchronized (mux) {
            if (inited) {
                // Do not init.
                impl = initLogClo.apply(false);

                return;
            }

            // Init logger impl.
            impl = initLogClo.apply(true);

            boolean quiet = Boolean.parseBoolean(System.getProperty(IGNITE_QUIET, "true"));

            boolean consoleAppenderFound = isConsoleAppenderConfigured();

            if (consoleAppenderFound && quiet)
                quiet = false;  // User configured console appender, but log is quiet.

            if (!consoleAppenderFound && !quiet && Boolean.parseBoolean(System.getProperty(IGNITE_CONSOLE_APPENDER, "true"))) {
                // User launched ignite in verbose mode and did not add console appender with INFO level
                // to configuration and did not set IGNITE_CONSOLE_APPENDER to false.
                configureConsoleAppender(false);
            }

            quiet0 = quiet;
            inited = true;
        }
    }

    /** */
    private boolean isConsoleAppenderConfigured() {
        Configuration cfg = LoggerContext.getContext(false).getConfiguration();

        if (cfg instanceof DefaultConfiguration)
            return false;

        for (LoggerConfig logCfg = cfg.getLoggerConfig(impl.getName()); logCfg != null; logCfg = logCfg.getParent()) {
            for (Appender appender : logCfg.getAppenders().values()) {
                if (appender instanceof ConsoleAppender) {
                    if (((ConsoleAppender)appender).getTarget() == SYSTEM_ERR)
                        continue;

                    return true;
                }
            }
        }

        return false;
    }

    /**
     * Creates console appender with some reasonable default logging settings.
     *
     * @param clearOutput If {@code true} then console output must be configured without any additional info
     *                    like time, message level, thread info, etc.
     * @return Logger with auto configured console appender.
     */
    public Logger configureConsoleAppender(boolean clearOutput) {
        // from http://logging.apache.org/log4j/2.x/manual/customconfig.html
        LoggerContext ctx = LoggerContext.getContext(false);

        Configuration cfg = ctx.getConfiguration();

        if (cfg instanceof DefaultConfiguration) {
            ConfigurationBuilder<BuiltConfiguration> cfgBuilder = ConfigurationBuilderFactory.newConfigurationBuilder();

            RootLoggerComponentBuilder rootLog = cfgBuilder.newRootLogger(Level.INFO);

            cfg = cfgBuilder.add(rootLog).build();

            addConsoleAppender(cfg, clearOutput);

            ctx.reconfigure(cfg);
        }
        else {
            addConsoleAppender(cfg, clearOutput);

            ctx.updateLoggers();
        }

        return ctx.getRootLogger();
    }

    /** */
    private void addConsoleAppender(Configuration logCfg, boolean clearOutput) {
        PatternLayout layout = PatternLayout.newBuilder()
            .withPattern(clearOutput ? "%m%n" : "%d{ISO8601}][%-5p][%t][%c{1}] %m%n")
            .withCharset(Charset.defaultCharset())
            .withAlwaysWriteExceptions(false)
            .withNoConsoleNoAnsi(false)
            .build();

        ConsoleAppender consoleApp = ConsoleAppender.newBuilder()
            .setTarget(SYSTEM_OUT)
            .setName(CONSOLE_APPENDER)
            .setLayout(layout)
            .build();

        consoleApp.start();

        logCfg.addAppender(consoleApp);
        logCfg.getRootLogger().addAppender(consoleApp, Level.TRACE, null);
    }

    /**
     * Checks if Log4j is already configured within this VM or not.
     *
     * @return {@code True} if log4j was already configured, {@code false} otherwise.
     */
    public static boolean isConfigured() {
        return !(LoggerContext.getContext(false).getConfiguration() instanceof DefaultConfiguration);
    }

    /** {@inheritDoc} */
    @Override public void setApplicationAndNode(@Nullable String application, @Nullable UUID nodeId) {
        // Set nodeId as system variable to be used at configuration.
        System.setProperty(NODE_ID, nodeId == null ? "" : ("-" + U.id8(nodeId)));
        System.setProperty(APP_ID, application != null
            ? application
            : System.getProperty(APP_ID, "ignite"));

        if (inited) {
            synchronized (mux) {
                inited = false;
            }

            addConsoleAppenderIfNeeded(new C1<Boolean, Logger>() {
                @Override public Logger apply(Boolean init) {
                    if (init)
                        LoggerContext.getContext(false).reconfigure();

                    return LogManager.getRootLogger();
                }
            });
        }
    }

    /**
     * Gets {@link IgniteLogger} wrapper around log4j logger for the given
     * category. If category is {@code null}, then root logger is returned. If
     * category is an instance of {@link Class} then {@code (Class)ctgr).getName()}
     * is used as category name.
     *
     * @param ctgr {@inheritDoc}
     * @return {@link IgniteLogger} wrapper around log4j logger.
     */
    @Override public Log4J2Logger getLogger(Object ctgr) {
        if (ctgr == null)
            return new Log4J2Logger(LogManager.getRootLogger(), cfg);

        if (ctgr instanceof Class) {
            String name = ((Class<?>)ctgr).getName();

            return new Log4J2Logger(LogManager.getLogger(name), cfg);
        }

        String name = ctgr.toString();

        return new Log4J2Logger(LogManager.getLogger(name), cfg);
    }

    /** {@inheritDoc} */
    @Override public void trace(String msg) {
        trace(null, msg);
    }

    /** {@inheritDoc} */
    @Override public void trace(@Nullable String marker, String msg) {
        if (!isTraceEnabled())
            warning("Logging at TRACE level without checking if TRACE level is enabled: " + msg);

        impl.trace(getMarkerOrNull(marker), msg);
    }

    /** {@inheritDoc} */
    @Override public void debug(String msg) {
        debug(null, msg);
    }

    /** {@inheritDoc} */
    @Override public void debug(@Nullable String marker, String msg) {
        if (!isDebugEnabled())
            warning("Logging at DEBUG level without checking if DEBUG level is enabled: " + msg);

        impl.debug(getMarkerOrNull(marker), msg);
    }

    /** {@inheritDoc} */
    @Override public void info(String msg) {
        info(null, msg);
    }

    /** {@inheritDoc} */
    @Override public void info(@Nullable String marker, String msg) {
        if (!isInfoEnabled())
            warning("Logging at INFO level without checking if INFO level is enabled: " + msg);

        impl.info(getMarkerOrNull(marker), msg);
    }

    /** {@inheritDoc} */
    @Override public void warning(String msg, @Nullable Throwable e) {
        warning(null, msg, e);
    }

    /** {@inheritDoc} */
    @Override public void warning(@Nullable String marker, String msg, @Nullable Throwable e) {
        impl.warn(getMarkerOrNull(marker), msg, e);
    }

    /** {@inheritDoc} */
    @Override public void error(String msg, @Nullable Throwable e) {
        error(null, msg, e);
    }

    /** {@inheritDoc} */
    @Override public void error(@Nullable String marker, String msg, @Nullable Throwable e) {
        impl.error(getMarkerOrNull(marker), msg, e);
    }

    /** Returns Marker object for the specified name, or null if the name is null */
    private Marker getMarkerOrNull(@Nullable String marker) {
        return marker != null ? MarkerManager.getMarker(marker) : null;
    }

    /** {@inheritDoc} */
    @Override public boolean isTraceEnabled() {
        return impl.isTraceEnabled();
    }

    /** {@inheritDoc} */
    @Override public boolean isDebugEnabled() {
        return impl.isDebugEnabled();
    }

    /** {@inheritDoc} */
    @Override public boolean isInfoEnabled() {
        return impl.isInfoEnabled();
    }

    /** {@inheritDoc} */
    @Override public boolean isQuiet() {
        return quiet;
    }

    /** {@inheritDoc} */
    @Override public String toString() {
        return S.toString(Log4J2Logger.class, this, "config", cfg);
    }
}


text:
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE197_Numeric_Truncation_Error__short_rand_68a.c
Label Definition File: CWE197_Numeric_Truncation_Error__short.label.xml
Template File: sources-sink-68a.tmpl.c
*/
/*
 * @description
 * CWE: 197 Numeric Truncation Error
 * BadSource: rand Set data to result of RAND32(), which could be negative
 * GoodSource: Less than CHAR_MAX
 * Sink:
 *    BadSink : Convert data to a char
 * Flow Variant: 68 Data flow: data passed as a global variable from one function to another in different source files
 *
 * */

#include "std_testcase.h"

short CWE197_Numeric_Truncation_Error__short_rand_68_badData;
short CWE197_Numeric_Truncation_Error__short_rand_68_goodG2BData;

#ifndef OMITBAD

/* bad function declaration */
void CWE197_Numeric_Truncation_Error__short_rand_68b_badSink();

void CWE197_Numeric_Truncation_Error__short_rand_68_bad()
{
    short data;
    /* Initialize data */
    data = -1;
    /* FLAW: Use a random number */
    data = (short)RAND32();
    CWE197_Numeric_Truncation_Error__short_rand_68_badData = data;
    CWE197_Numeric_Truncation_Error__short_rand_68b_badSink();
}

#endif /* OMITBAD */

#ifndef OMITGOOD

/* good function declarations */
void CWE197_Numeric_Truncation_Error__short_rand_68b_goodG2BSink();

/* goodG2B uses the GoodSource with the BadSink */
static void goodG2B()
{
    short data;
    /* Initialize data */
    data = -1;
    /* FIX: Use a positive integer less than CHAR_MAX*/
    data = CHAR_MAX-5;
    CWE197_Numeric_Truncation_Error__short_rand_68_goodG2BData = data;
    CWE197_Numeric_Truncation_Error__short_rand_68b_goodG2BSink();
}

void CWE197_Numeric_Truncation_Error__short_rand_68_good()
{
    goodG2B();
}

#endif /* OMITGOOD */

/* Below is the main(). It is only used when building this testcase on
 * its own for testing or for building a binary to use in testing binary
 * analysis tools. It is not used when compiling all the testcases as one
 * application, which is how source code analysis tools are tested.
 */

#ifdef INCLUDEMAIN

int main(int argc, char * argv[])
{
    /* seed randomness */
    srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
    printLine("Calling good()...");
    CWE197_Numeric_Truncation_Error__short_rand_68_good();
    printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
    printLine("Calling bad()...");
    CWE197_Numeric_Truncation_Error__short_rand_68_bad();
    printLine("Finished bad()");
#endif /* OMITBAD */
    return 0;
}

#endif


text:
jquery.reset
============

A simple jQuery extension that will reset a form back to its default state.


text:
package main

import "fmt"

func main() {
	v := 10
	incv(v)
	fmt.Println("value outside func", v)
	incp(&v)
	fmt.Println("pointer value outside func", v)

	va := [1]int{10}
	fArray(va)
	fmt.Println("array outside func", va)

	vs := []int{10}
	fSlice(vs)
	fmt.Println("slice outside func", vs)

	vm := map[int]int{0: 10}
	fMap(vm)
	fmt.Println("map outside func", vm)

	vstr := "10"
	fString(vstr)
	fmt.Println("string outside func", vstr)

}

func incv(a int) { // passed by value
	a = 99
	fmt.Println("value inside func", a)
}

func incp(a *int) { // passed by reference
	*a = 99
	fmt.Println("pointer value inside func", *a)
}

func fArray(a [1]int) { // arrays are passed by value by default
	a[0] = 99
	fmt.Println("array inside func", a)
}

func fSlice(a []int) { // slices are passed by reference by default
	a[0] = 99
	fmt.Println("slice inside func", a)
}

func fMap(a map[int]int) { // maps are passed by reference by default
	a[0] = 99
	fmt.Println("map inside func", a)
}

func fString(a string) {
	a = "99"
	fmt.Println("string inside func", a)
}


text:
create table tab_index
(
  col_add_ix_1 number(15) not null,
  col_add_ix_2 number(15) not null
);

create unique index add_ix on tab_index (col_add_ix_1,col_add_ix_2) nologging compress parallel 4;


text:
#ifndef AudioNode_h
#define AudioNode_h

#include "modules/EventTargetModules.h"
#include "modules/ModulesExport.h"
#include "platform/audio/AudioBus.h"
#include "wtf/Forward.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/Vector.h"
#include "wtf/build_config.h"

#define DEBUG_AUDIONODE_REFERENCES 0

namespace blink {

class AbstractAudioContext;
class AudioNode;
class AudioNodeInput;
class AudioNodeOutput;
class AudioParam;
class ExceptionState;

// An AudioNode is the basic building block for handling audio within an AbstractAudioContext.
// It may be an audio source, an intermediate processing module, or an audio destination.
// Each AudioNode can have inputs and/or outputs. An AudioSourceNode has no inputs and a single output.
// An AudioDestinationNode has one input and no outputs and represents the final destination to the audio hardware.
// Most processing nodes such as filters will have one input and one output, although multiple inputs and outputs are possible.

// Each of AudioNode objects owns its dedicated AudioHandler object. AudioNode
// is responsible to provide IDL-accessible interface and its lifetime is
// managed by Oilpan GC. AudioHandler is responsible for anything else. We must
// not touch AudioNode objects in an audio rendering thread.

// AudioHandler is created and owned by an AudioNode almost all the time. When
// the AudioNode is about to die, the ownership of its AudioHandler is
// transferred to DeferredTaskHandler, and it does deref the AudioHandler on the
// main thread.
//
// Be careful to avoid reference cycles. If an AudioHandler has a reference
// cycle including the owner AudioNode, objects in the cycle are never
// collected.
class MODULES_EXPORT AudioHandler : public ThreadSafeRefCounted<AudioHandler> {
public:
    enum { ProcessingSizeInFrames = 128 };

    enum NodeType {
        NodeTypeUnknown,
        NodeTypeDestination,
        NodeTypeOscillator,
        NodeTypeAudioBufferSource,
        NodeTypeMediaElementAudioSource,
        NodeTypeMediaStreamAudioDestination,
        NodeTypeMediaStreamAudioSource,
        NodeTypeJavaScript,
        NodeTypeBiquadFilter,
        NodeTypePanner,
        NodeTypeStereoPanner,
        NodeTypeConvolver,
        NodeTypeDelay,
        NodeTypeGain,
        NodeTypeChannelSplitter,
        NodeTypeChannelMerger,
        NodeTypeAnalyser,
        NodeTypeDynamicsCompressor,
        NodeTypeWaveShaper,
        NodeTypeIIRFilter,
        NodeTypeEnd
    };

    AudioHandler(NodeType, AudioNode&, float sampleRate);
    virtual ~AudioHandler();
    // dispose() is called when the owner AudioNode is about to be
    // destructed. This must be called in the main thread, and while the graph
    // lock is held.
    // Do not release resources used by an audio rendering thread in dispose().
    virtual void dispose();

    // node() returns a valid object until dispose() is called.  This returns
    // nullptr after dispose().  We must not call node() in an audio rendering
    // thread.
    AudioNode* node() const;
    // context() returns a valid object until the AbstractAudioContext dies, and returns
    // nullptr otherwise.  This always returns a valid object in an audio
    // rendering thread, and inside dispose().  We must not call context() in
    // the destructor.
    virtual AbstractAudioContext* context() const;
    void clearContext() { m_context = nullptr; }

    enum ChannelCountMode {
        Max,
        ClampedMax,
        Explicit
    };

    NodeType getNodeType() const { return m_nodeType; }
    String nodeTypeName() const;

    // This object has been connected to another object. This might have
    // existing connections from others.
    // This function must be called after acquiring a connection reference.
    void makeConnection();
    // This object will be disconnected from another object. This might have
    // remaining connections from others.
    // This function must be called before releasing a connection reference.
    void breakConnection();

    // Can be called from main thread or context's audio thread.  It must be called while the context's graph lock is held.
    void breakConnectionWithLock();

    // The AudioNodeInput(s) (if any) will already have their input data available when process() is called.
    // Subclasses will take this input data and put the results in the AudioBus(s) of its AudioNodeOutput(s) (if any).
    // Called from context's audio thread.
    virtual void process(size_t framesToProcess) = 0;

    // No significant resources should be allocated until initialize() is called.
    // Processing may not occur until a node is initialized.
    virtual void initialize();
    virtual void uninitialize();

    // Clear internal state when the node is disabled. When a node is disabled,
    // it is no longer pulled so any internal state is never updated. But some
    // nodes (DynamicsCompressorNode) have internal state that is still
    // accessible by the user. Update the internal state as if the node were
    // still connected but processing all zeroes. This gives a consistent view
    // to the user.
    virtual void clearInternalStateWhenDisabled();

    bool isInitialized() const { return m_isInitialized; }

    unsigned numberOfInputs() const { return m_inputs.size(); }
    unsigned numberOfOutputs() const { return m_outputs.size(); }

    // Number of output channels.  This only matters for ScriptProcessorNodes.
    virtual unsigned numberOfOutputChannels() const;

    // The argument must be less than numberOfInputs().
    AudioNodeInput& input(unsigned);
    // The argument must be less than numberOfOutputs().
    AudioNodeOutput& output(unsigned);

    virtual float sampleRate() const { return m_sampleRate; }

    // processIfNecessary() is called by our output(s) when the rendering graph needs this AudioNode to process.
    // This method ensures that the AudioNode will only process once per rendering time quantum even if it's called repeatedly.
    // This handles the case of "fanout" where an output is connected to multiple AudioNode inputs.
    // Called from context's audio thread.
    void processIfNecessary(size_t framesToProcess);

    // Called when a new connection has been made to one of our inputs or the connection number of channels has changed.
    // This potentially gives us enough information to perform a lazy initialization or, if necessary, a re-initialization.
    // Called from main thread.
    virtual void checkNumberOfChannelsForInput(AudioNodeInput*);

#if DEBUG_AUDIONODE_REFERENCES
    static void printNodeCounts();
#endif

    // tailTime() is the length of time (not counting latency time) where
    // non-zero output may occur after continuous silent input.
    virtual double tailTime() const;

    // latencyTime() is the length of time it takes for non-zero output to
    // appear after non-zero input is provided. This only applies to processing
    // delay which is an artifact of the processing algorithm chosen and is
    // *not* part of the intrinsic desired effect. For example, a "delay" effect
    // is expected to delay the signal, and thus would not be considered
    // latency.
    virtual double latencyTime() const;

    // propagatesSilence() should return true if the node will generate silent output when given silent input. By default, AudioNode
    // will take tailTime() and latencyTime() into account when determining whether the node will propagate silence.
    virtual bool propagatesSilence() const;
    bool inputsAreSilent();
    void silenceOutputs();
    void unsilenceOutputs();

    void enableOutputsIfNecessary();
    void disableOutputsIfNecessary();

    unsigned long channelCount();
    virtual void setChannelCount(unsigned long, ExceptionState&);

    String channelCountMode();
    virtual void setChannelCountMode(const String&, ExceptionState&);

    String channelInterpretation();
    void setChannelInterpretation(const String&, ExceptionState&);

    ChannelCountMode internalChannelCountMode() const { return m_channelCountMode; }
    AudioBus::ChannelInterpretation internalChannelInterpretation() const { return m_channelInterpretation; }

    void updateChannelCountMode();

protected:
    // Inputs and outputs must be created before the AudioHandler is
    // initialized.
    void addInput();
    void addOutput(unsigned numberOfChannels);

    // Called by processIfNecessary() to cause all parts of the rendering graph connected to us to process.
    // Each rendering quantum, the audio data for each of the AudioNode's inputs will be available after this method is called.
    // Called from context's audio thread.
    virtual void pullInputs(size_t framesToProcess);

    // Force all inputs to take any channel interpretation changes into account.
    void updateChannelsForInputs();

private:
    void setNodeType(NodeType);

    volatile bool m_isInitialized;
    NodeType m_nodeType;

    // The owner AudioNode.  This untraced member is safe because dispose() is
    // called before the AudioNode death, and it clears m_node.  Do not access
    // m_node directly, use node() instead.
    // See http://crbug.com/404527 for the detail.
    UntracedMember<AudioNode> m_node;

    // This untraced member is safe because this is cleared for all of live
    // AudioHandlers when the AbstractAudioContext dies.  Do not access m_context
    // directly, use context() instead.
    // See http://crbug.com/404527 for the detail.
    UntracedMember<AbstractAudioContext> m_context;

    float m_sampleRate;
    Vector<OwnPtr<AudioNodeInput>> m_inputs;
    Vector<OwnPtr<AudioNodeOutput>> m_outputs;

    double m_lastProcessingTime;
    double m_lastNonSilentTime;

    volatile int m_connectionRefCount;

    bool m_isDisabled;

#if DEBUG_AUDIONODE_REFERENCES
    static bool s_isNodeCountInitialized;
    static int s_nodeCount[NodeTypeEnd];
#endif

protected:
    unsigned m_channelCount;
    ChannelCountMode m_channelCountMode;
    AudioBus::ChannelInterpretation m_channelInterpretation;
    // The new channel count mode that will be used to set the actual mode in the pre or post
    // rendering phase.
    ChannelCountMode m_newChannelCountMode;
};

class MODULES_EXPORT AudioNode : public RefCountedGarbageCollectedEventTargetWithInlineData<AudioNode> {
    REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(AudioNode);
    DEFINE_WRAPPERTYPEINFO();
    USING_PRE_FINALIZER(AudioNode, dispose);
public:
    DECLARE_VIRTUAL_TRACE();
    AudioHandler& handler() const;

    virtual AudioNode* connect(AudioNode*, unsigned outputIndex, unsigned inputIndex, ExceptionState&);
    void connect(AudioParam*, unsigned outputIndex, ExceptionState&);
    void disconnect();
    virtual void disconnect(unsigned outputIndex, ExceptionState&);
    void disconnect(AudioNode*, ExceptionState&);
    void disconnect(AudioNode*, unsigned outputIndex, ExceptionState&);
    void disconnect(AudioNode*, unsigned outputIndex, unsigned inputIndex, ExceptionState&);
    void disconnect(AudioParam*, ExceptionState&);
    void disconnect(AudioParam*, unsigned outputIndex, ExceptionState&);
    AbstractAudioContext* context() const;
    unsigned numberOfInputs() const;
    unsigned numberOfOutputs() const;
    unsigned long channelCount() const;
    void setChannelCount(unsigned long, ExceptionState&);
    String channelCountMode() const;
    void setChannelCountMode(const String&, ExceptionState&);
    String channelInterpretation() const;
    void setChannelInterpretation(const String&, ExceptionState&);

    // EventTarget
    const AtomicString& interfaceName() const final;
    ExecutionContext* getExecutionContext() const final;

    // Called inside AudioHandler constructors.
    void didAddOutput(unsigned numberOfOutputs);
    // Like disconnect, but no exception is thrown if the outputIndex is invalid.  Just do nothing
    // in that case.
    void disconnectWithoutException(unsigned outputIndex);

protected:
    explicit AudioNode(AbstractAudioContext&);
    // This should be called in a constructor.
    void setHandler(PassRefPtr<AudioHandler>);

private:
    void dispose();
    void disconnectAllFromOutput(unsigned outputIndex);
    // Returns true if the specified AudioNodeInput was connected.
    bool disconnectFromOutputIfConnected(unsigned outputIndex, AudioNode& destination, unsigned inputIndexOfDestination);
    // Returns true if the specified AudioParam was connected.
    bool disconnectFromOutputIfConnected(unsigned outputIndex, AudioParam&);

    Member<AbstractAudioContext> m_context;
    RefPtr<AudioHandler> m_handler;
    // Represents audio node graph with Oilpan references. N-th HeapHashSet
    // represents a set of AudioNode objects connected to this AudioNode's N-th
    // output.
    HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes;
    // Represents audio node graph with Oilpan references. N-th HeapHashSet
    // represents a set of AudioParam objects connected to this AudioNode's N-th
    // output.
    HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams;
};

} // namespace blink

#endif // AudioNode_h


text:
class UserParentsController < ApplicationController
  layout "registrations"
  before_filter :set_instance_variables

  def index
    redirect_to new_user_parent_path
  end

  def new
    @user_parent = UserParent.new( user: User.new )
    if current_user
      @user_parent.name = current_user.name
      @user_parent.email = current_user.email
    end
    respond_to do |format|
      format.html
    end
  end

  def create
    @user_parent = UserParent.new( params[:user_parent] )
    @user_parent.parent_user = current_user
    session[:user_parent_name] = @user_parent.name
    session[:user_parent_email] = @user_parent.email
    respond_to do |format|
      format.html do
        if @user_parent.save
          redirect_to confirm_user_parent_path( @user_parent )
        else
          render :new
        end
      end
    end
  end

  def confirm
    # If the user is signed in, load the data from the UserParent record if they created it
    if current_user
      if @user_parent = UserParent.where( id: params[:id], parent_user_id: current_user ).first
        @user_parent_name = @user_parent.name
        @user_parent_email = @user_parent.email
      end
    else
      @user_parent = UserParent.find_by_id( params[:id] )
    end
    unless @user_parent
      respond_to do |format|
        format.html { render_404 }
      end
      return
    end
    # Otherwise load it from the session so other people can't see the data in UserParent record
    @user_parent_name ||= session[:user_parent_name] || ""
    @user_parent_email ||= session[:user_parent_email] || ""
    if @user_parent_name.blank? && @user_parent_email.blank?
      respond_to do |format|
        format.html { redirect_back_or_default new_user_parent_path }
      end
      return
    end
    respond_to do |format|
      format.html
    end
  end

  private
  def set_instance_variables
    @footless = true
    @no_footer_gap = true
    @responsive = true
  end
end


text:
<?php

namespace a3mg\RussianPostBundle\Model;

/**
 * Class representing SmsHistoryData
 */
class SmsHistoryData
{

    /**
     * @property \a3mg\RussianPostBundle\Model\SmsHistoryRecordType[] $historyRecord
     */
    private $historyRecord = null;

    /**
     * Adds as historyRecord
     *
     * @return self
     * @param \a3mg\RussianPostBundle\Model\SmsHistoryRecordType $historyRecord
     */
    public function addToHistoryRecord(\a3mg\RussianPostBundle\Model\SmsHistoryRecordType $historyRecord)
    {
        $this->historyRecord[] = $historyRecord;
        return $this;
    }

    /**
     * isset historyRecord
     *
     * @param scalar $index
     * @return boolean
     */
    public function issetHistoryRecord($index)
    {
        return isset($this->historyRecord[$index]);
    }

    /**
     * unset historyRecord
     *
     * @param scalar $index
     * @return void
     */
    public function unsetHistoryRecord($index)
    {
        unset($this->historyRecord[$index]);
    }

    /**
     * Gets as historyRecord
     *
     * @return \a3mg\RussianPostBundle\Model\SmsHistoryRecordType[]
     */
    public function getHistoryRecord()
    {
        return $this->historyRecord;
    }

    /**
     * Sets a new historyRecord
     *
     * @param \a3mg\RussianPostBundle\Model\SmsHistoryRecordType[] $historyRecord
     * @return self
     */
    public function setHistoryRecord(array $historyRecord)
    {
        $this->historyRecord = $historyRecord;
        return $this;
    }

}


text:
/**
 * @author pm286
 *
 */
package org.xmlcml.ami.visitor.species;