text:
package echosign.api.clientv20.dto10;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for GetWidgetsForUserErrorCode.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *

 *

 * <simpleType name="GetWidgetsForUserErrorCode">
 *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     <enumeration value="OK"/>
 *     <enumeration value="INVALID_API_KEY"/>
 *     <enumeration value="INVALID_USER_CREDENTIALS"/>
 *     <enumeration value="PERMISSION_DENIED"/>
 *     <enumeration value="EXCEPTION"/>
 *     <enumeration value="MISC_ERROR"/>
 *   </restriction>
 * </simpleType>
 *

 *
 */
@XmlType(name = "GetWidgetsForUserErrorCode", namespace = "http://dto10.api.echosign")
@XmlEnum
public enum GetWidgetsForUserErrorCode {

    OK,
    INVALID_API_KEY,
    INVALID_USER_CREDENTIALS,
    PERMISSION_DENIED,
    EXCEPTION,
    MISC_ERROR;

    public String value() {
        return name();
    }

    public static GetWidgetsForUserErrorCode fromValue(String v) {
        return valueOf(v);
    }

}


text:
<?php defined('BASEPATH') OR exit('No direct script access allowed');

class Render {

	protected $CI;

	public function __construct()
	{
		$this->CI = &get_instance();
	}

	public function page($params=null)
	{
		if(empty($params) OR empty($params['page']))
		{
			redirect('error/404');
			return;
		}

		// if required parameters do not exist then set as NULL
		$_required_params = array('view_params','js_paths');
		foreach ($_required_params as $key)
		{
			if(empty($params[$key]))
			{
				$params[$key] = null;
			}
		}

		$_page_parts = array(
				'header' 	 => null,
				'body'   	 => null,
				'footer' 	 => null,
				'js'	 	 => null,
				'body_class' => empty($params['body_class'])?'':$params['body_class'],
			);

		// load header
		if(file_exists(views_path("page_builder/header.php")))
		{
			$_page_parts['header'] = $this->CI->load->view('page_builder/header',$params['view_params'],true);
		}

		// load js files
		if(file_exists(views_path("js_files.php")))
		{
			$_js_params = array_merge($params['view_params'],array('js_paths'=>$params['js_paths']));
			$_page_parts['js'] = $this->CI->load->view('js_files',$_js_params,true);
		}

		// load footer
		if(file_exists(views_path("page_builder/footer.php")))
		{
			$_page_parts['footer'] = $this->CI->load->view('page_builder/footer',$params['view_params'],true);
		}

		if( ! isset($_SESSION))
		{
			session_start();
		}

		// determine first the actual view format/layout
		$_menu = '';
		$_page_dir = '';
		$has_content_wrapper = true;
		$has_content_header = false;
		switch ($params['page'])
		{
			case 'home':
			case 'account':
				// top navigation menu
				$_menu = $this->menuHTML('top-nav',$params['view_params']);
				$_page_dir = "pages/overview/{$params['page']}";
				break;

			case 'login':
				$_page_dir = "pages/overview/{$params['page']}";
				$has_content_wrapper = false;
				break;

			case 'savings_home':
				$has_content_header = true;
				$_content_header_arr = array(
						'_content_header' => array(
							'title'      => 'Home',
							'breadcrumb' => array()
							)
						);

			case 'savings_pf':
				$has_content_header = true;
				$this->CI->load->model('systems_model','sys');
				$_menu_arr = $this->CI->sys->getMenuOf(1);

				// sort menu item list according to menu order
				$_menu_arr = array_column($_menu_arr, null,'menu_order');
				ksort($_menu_arr);

				// content header
				if (empty($_content_header_arr))
				{
					$_content_header_arr = array(
							'_content_header' => array(
								'title'      => 'Portfolio',
								'breadcrumb' => array()
								)
							);
					$_content_header_arr['_content_header']['breadcrumb'] = $this->CI->sys->getContentHeaderOf(1);
					// sort content header breadcrumb list according to content header order
					$_content_header_arr['_content_header']['breadcrumb'] = array_column($_content_header_arr['_content_header']['breadcrumb'], null,'header_order');
					ksort($_content_header_arr['_content_header']['breadcrumb']);
				}
				$_content_header = $this->headerHTML($params['page'],array_merge($params['view_params'],$_content_header_arr));
				// side navigation
				$_menu = $this->menuHTML('side-nav',array_merge($params['view_params'],array('_menu_arr'=>$_menu_arr)));
				$_page_dir = "pages/savings-monitor/{$params['page']}";
				break;

			default:
				// show failed msg
				$this->CI->load->view('failed',array('view_name'=>$params['page']));
				return;
		}

		if(file_exists(views_path("{$_page_dir}.php")))
		{
			// load actual view
			$_page_parts['body'] = $this->CI->load->view("{$_page_dir}",$params['view_params'],true);
		}
		else
		{
			// show failed msg
			$this->CI->load->view('failed',array('view_name'=>$params['page']));
		}

		if($has_content_wrapper)
		{
			if ($has_content_header)
			{
				$_page_parts['body'] = $_menu . '
'. $_content_header . $_page_parts['body'] . "
";
			}
			else
			{
				$_page_parts['body'] = $_menu . '
'. $_page_parts['body'] . "
";
			}
		}
		else
		{
			$_page_parts['body'] = $_menu . $_page_parts['body'];
		}

		// load page to contain everything
		if(file_exists(views_path("page_builder/body.php")))
		{
			$this->CI->load->view('page_builder/body',$_page_parts);
		}
		else
		{
			// show failed msg
			$this->CI->load->view('failed',array('view_name'=>$params['page']));
			return;
		}
	}

	/**
	 * menuHTML - generate menu HTML depending on $which (top-nav|side-nav)
	 * @param  string $which       top or side navigation menu
	 * @param  array  $view_params parameters for the current view/page
	 * @return string              menu HTML, NULL on unrecognized $which, or FALSE on failure
	 */
	private function menuHTML($which='side-nav',$view_params=null)
	{
		switch ($which)
		{
			case 'side-nav':
				// side navigation menu
				if(file_exists(views_path("page_builder/menu/side_nav.php")))
				{
					if( ! is_array($view_params) && ! is_null($view_params))
					{
						$view_params = null;
					}

					return $this->CI->load->view('page_builder/menu/side_nav',$view_params,true);
				}
				else
				{
					return null;
				}
				break;

			case 'top-nav':
				// top navigation menu
				if(file_exists(views_path("page_builder/menu/top_nav.php")))
				{
					if( ! is_array($view_params) && ! is_null($view_params))
					{
						$view_params = null;
					}

					return $this->CI->load->view('page_builder/menu/top_nav',$view_params,true);
				}
				else
				{
					return null;
				}
				break;

			default:
				return null;
		}

	}

	/**
	 * headerHTML - generate html of content/page header
	 * @param  string $which
	 * @param  array $view_params
	 * @return string
	 */
	private function headerHTML($which=null,$view_params=null)
	{
		switch ($which)
		{
			case 'savings_pf':
				// content header
				if(file_exists(views_path("page_builder/content_header.php")))
				{
					if( ! is_array($view_params) && ! is_null($view_params))
					{
						$view_params = null;
					}

					return $this->CI->load->view('page_builder/content_header',$view_params,true);
				}
				else
				{
					return null;
				}
				break;

			case 'savings_home':
			default:
				return null;
		}
	}
}

redpajama_set_name: RedPajamaGithub


text:
using ClosedXML.Excel;
using NUnit.Framework;
using System;
using System.Linq;

namespace ClosedXML.Tests.Excel.DataValidations
{
    public class XLDataValidationsTests
    {
        [Test]
        public void CannotCreateWithoutWorksheet()
        {
            Assert.Throws<ArgumentNullException>(() => new XLDataValidations(null));
        }

        [Test]
        public void AddedRangesAreTransferredToTargetSheet()
        {
            using (var wb = new XLWorkbook())
            {
                var ws1 = wb.AddWorksheet();
                var ws2 = wb.AddWorksheet();

                var dv1 = ws1.Range("A1:A3").CreateDataValidation();
                dv1.MinValue = "100";

                var dv2 = ws2.DataValidations.Add(dv1);

                Assert.AreEqual(1, ws1.DataValidations.Count());
                Assert.AreEqual(1, ws2.DataValidations.Count());

                Assert.AreNotSame(dv1, dv2);

                Assert.AreSame(ws1, dv1.Ranges.Single().Worksheet);
                Assert.AreSame(ws2, dv2.Ranges.Single().Worksheet);
            }
        }

        [TestCase("A1:A1", true)]
        [TestCase("A1:A3", true)]
        [TestCase("A1:A4", false)]
        [TestCase("C2:C2", true)]
        [TestCase("C1:C3", true)]
        [TestCase("A1:C3", false)]
        public void CanFindDataValidationForRange(string searchAddress, bool expectedResult)
        {
            using (var wb = new XLWorkbook())
            {
                var ws = wb.AddWorksheet();
                var dv = ws.Range("A1:A3").CreateDataValidation();
                dv.MinValue = "100";
                dv.AddRange(ws.Range("C1:C3"));

                var address = new XLRangeAddress(ws as XLWorksheet, searchAddress);

                var actualResult = ws.DataValidations.TryGet(address, out var foundDv);
                Assert.AreEqual(expectedResult, actualResult);
                if (expectedResult)
                    Assert.AreSame(dv, foundDv);
                else
                    Assert.IsNull(foundDv);
            }
        }

        [TestCase("A1:A1", 1)]
        [TestCase("A1:A3", 1)]
        [TestCase("B1:B4", 0)]
        [TestCase("A1:C3", 1)]
        [TestCase("C2:C3", 1)]
        [TestCase("C2:G6", 2)]
        [TestCase("E2:E3", 0)]
        public void CanGetAllDataValidationsForRange(string searchAddress, int expectedCount)
        {
            using (var wb = new XLWorkbook())
            {
                var ws = wb.AddWorksheet();
                var dv1 = ws.Range("A1:A3").CreateDataValidation();
                dv1.MinValue = "100";
                dv1.AddRange(ws.Range("C1:C3"));

                var dv2 = ws.Range("E4:G6").CreateDataValidation();
                dv2.MinValue = "200";

                var address = new XLRangeAddress(ws as XLWorksheet, searchAddress);

                var actualResult = ws.DataValidations.GetAllInRange(address);

                Assert.AreEqual(expectedCount, actualResult.Count());
            }
        }

        [Test]
        public void AddDataValidationSplitsExistingRanges()
        {
            using (var wb = new XLWorkbook())
            {
                var ws = wb.AddWorksheet();
                var dv1 = ws.Ranges("B2:G7,C11:C13").CreateDataValidation();
                dv1.MinValue = "100";

                var dv2 = ws.Range("E4:G6").CreateDataValidation();
                dv2.MinValue = "100";

                Assert.AreEqual(4, dv1.Ranges.Count());
                Assert.AreEqual("B2:G3,B4:D6,B7:G7,C11:C13",
                    string.Join(",", dv1.Ranges.Select(r => r.RangeAddress.ToString())));
            }
        }

        [Test]
        public void RemovedRangeExcludedFromIndex()
        {
            using (var wb = new XLWorkbook())
            {
                var ws = wb.AddWorksheet();
                var dv = ws.Range("A1:A3").CreateDataValidation();
                dv.MinValue = "100";
                var range = ws.Range("C1:C3");
                dv.AddRange(range);

                dv.RemoveRange(range);

                var actualResult = ws.DataValidations.TryGet(range.RangeAddress, out var foundDv);
                Assert.IsFalse(actualResult);
                Assert.IsNull(foundDv);
            }
        }

        [Test]
        public void ConsolidatedDataValidationsAreUnsubscribed()
        {
            using (var wb = new XLWorkbook())
            {
                var ws = wb.AddWorksheet();
                var dv1 = ws.Range("A1:A3").CreateDataValidation();
                dv1.MinValue = "100";
                var dv2 = ws.Range("B1:B3").CreateDataValidation();
                dv2.MinValue = "100";

                (ws.DataValidations as XLDataValidations).Consolidate();
                dv1.AddRange(ws.Range("C1:C3"));
                dv2.AddRange(ws.Range("D1:D3"));

                var consolidatedDv = ws.DataValidations.Single();
                Assert.AreSame(dv1, consolidatedDv);
                Assert.True(ws.Cell("C1").HasDataValidation);
                Assert.False(ws.Cell("D1").HasDataValidation);
            }
        }
    }
}


text:
ARG tag=5.0
FROM mcr.microsoft.com/dotnet/runtime:${tag} AS base
WORKDIR /app
EXPOSE 8080
EXPOSE 8443
COPY qemu-arm-static /usr/bin/
COPY ${project}/ .
RUN ln -s  /var/run/secrets/kubernetes.io/serviceaccount/ca.crt /etc/ssl/certs/kubernetes.pem \
    && groupadd -g 1200 house \
    && useradd -m house -g house -u 1200 \
    && chown -R house:house /app \
    && rm -f /usr/bin/qemu-arm-static
USER 1200
ENTRYPOINT ["dotnet", "${project}.dll"]


text:
	<title>500 INTERNAL SERVER ERROR</title>

500 INTERNAL SERVER ERROR

An internal error occurred while the Web server was processing your request.
		Please contact the webmaster to report this problem.

	<?php  if ($debug):  ?>

	<?php
		$ds = explode("\n", trim($debuginfo));
		$title = array_shift($ds);
		echo '
'.$title.'
';
		if ($ds) {
			echo '
Traces:
';
			foreach ((array)$ds as $d) {
				echo ''.$d.'
';
			}
		}
		echo '
Turn debug off in common/config.php to hide the debug information.';
	 ?>
	<?php  endif  ?>

	<?php echo $_SERVER['SERVER_SIGNATURE'] ?>


text:
package main

import (
	"context"
	"flag"

	"github.com/google/gapid/core/app"
	"github.com/google/gapid/core/log"
	"github.com/google/gapid/core/os/file"
	"github.com/google/gapid/test/robot/stash"
)

func init() {
	verb := &app.Verb{
		Name:      "upload",
		ShortHelp: "Upload a file to the stash",
		Action:    &uploadVerb{},
	}
	app.AddVerb(verb)
}

type uploadVerb struct{}

func (v *uploadVerb) Run(ctx context.Context, flags flag.FlagSet) error {
	if flags.NArg() == 0 {
		app.Usage(ctx, "No files to upload given")
		return nil
	}
	return withStore(ctx, false, func(ctx context.Context, client *stash.Client) error {
		return sendFiles(ctx, client, flags.Args())
	})
}

func sendFiles(ctx context.Context, client *stash.Client, filenames []string) error {
	for _, partial := range filenames {
		id, err := client.UploadFile(ctx, file.Abs(partial))
		if err != nil {
			return log.Err(ctx, err, "Failed calling Upload")
		}
		log.I(ctx, "Uploaded %s as %s", partial, id)
	}
	return nil
}


text:
package tally

import (
	"math"
	"testing"
	"time"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestValueBucketsString(t *testing.T) {
	result, err := LinearValueBuckets(1, 1, 3)
	require.NoError(t, err)
	assert.Equal(t, "[1.000000 2.000000 3.000000]", Buckets(result).String())
}

func TestDurationBucketsString(t *testing.T) {
	result, err := LinearDurationBuckets(time.Second, time.Second, 3)
	require.NoError(t, err)
	assert.Equal(t, "[1s 2s 3s]", Buckets(result).String())
}

func TestBucketPairsDefaultsToNegInfinityToInfinity(t *testing.T) {
	pairs := BucketPairs(nil)
	require.Equal(t, 1, len(pairs))

	assert.Equal(t, -math.MaxFloat64, pairs[0].LowerBoundValue())
	assert.Equal(t, math.MaxFloat64, pairs[0].UpperBoundValue())

	assert.Equal(t, time.Duration(math.MinInt64), pairs[0].LowerBoundDuration())
	assert.Equal(t, time.Duration(math.MaxInt64), pairs[0].UpperBoundDuration())
}

func TestBucketPairsSortsValueBuckets(t *testing.T) {
	pairs := BucketPairs(ValueBuckets{1.0, 3.0, 2.0})
	require.Equal(t, 4, len(pairs))

	assert.Equal(t, -math.MaxFloat64, pairs[0].LowerBoundValue())
	assert.Equal(t, 1.0, pairs[0].UpperBoundValue())

	assert.Equal(t, 1.0, pairs[1].LowerBoundValue())
	assert.Equal(t, 2.0, pairs[1].UpperBoundValue())

	assert.Equal(t, 2.0, pairs[2].LowerBoundValue())
	assert.Equal(t, 3.0, pairs[2].UpperBoundValue())

	assert.Equal(t, 3.0, pairs[3].LowerBoundValue())
	assert.Equal(t, math.MaxFloat64, pairs[3].UpperBoundValue())
}

func TestBucketPairsSortsDurationBuckets(t *testing.T) {
	pairs := BucketPairs(DurationBuckets{0 * time.Second, 2 * time.Second, 1 * time.Second})
	require.Equal(t, 4, len(pairs))

	assert.Equal(t, time.Duration(math.MinInt64), pairs[0].LowerBoundDuration())
	assert.Equal(t, 0*time.Second, pairs[0].UpperBoundDuration())

	assert.Equal(t, 0*time.Second, pairs[1].LowerBoundDuration())
	assert.Equal(t, 1*time.Second, pairs[1].UpperBoundDuration())

	assert.Equal(t, 1*time.Second, pairs[2].LowerBoundDuration())
	assert.Equal(t, 2*time.Second, pairs[2].UpperBoundDuration())

	assert.Equal(t, 2*time.Second, pairs[3].LowerBoundDuration())
	assert.Equal(t, time.Duration(math.MaxInt64), pairs[3].UpperBoundDuration())
}

func TestMustMakeLinearValueBuckets(t *testing.T) {
	assert.NotPanics(t, func() {
		assert.Equal(t, ValueBuckets{
			0.0, 1.0, 2.0,
		}, MustMakeLinearValueBuckets(0, 1, 3))
	})
}

func TestMustMakeLinearValueBucketsPanicsOnBadCount(t *testing.T) {
	assert.Panics(t, func() {
		MustMakeLinearValueBuckets(0, 1, 0)
	})
}

func TestMustMakeLinearDurationBuckets(t *testing.T) {
	assert.NotPanics(t, func() {
		assert.Equal(t, DurationBuckets{
			0, time.Second, 2 * time.Second,
		}, MustMakeLinearDurationBuckets(0*time.Second, 1*time.Second, 3))
	})
}

func TestMustMakeLinearDurationBucketsPanicsOnBadCount(t *testing.T) {
	assert.Panics(t, func() {
		MustMakeLinearDurationBuckets(0*time.Second, 1*time.Second, 0)
	})
}

func TestMustMakeExponentialValueBuckets(t *testing.T) {
	assert.NotPanics(t, func() {
		assert.Equal(t, ValueBuckets{
			2, 4, 8,
		}, MustMakeExponentialValueBuckets(2, 2, 3))
	})
}

func TestMustMakeExponentialValueBucketsPanicsOnBadCount(t *testing.T) {
	assert.Panics(t, func() {
		MustMakeExponentialValueBuckets(2, 2, 0)
	})
}

func TestMustMakeExponentialValueBucketsPanicsOnBadStart(t *testing.T) {
	assert.Panics(t, func() {
		MustMakeExponentialValueBuckets(0, 2, 2)
	})
}

func TestMustMakeExponentialValueBucketsPanicsOnBadFactor(t *testing.T) {
	assert.Panics(t, func() {
		MustMakeExponentialValueBuckets(2, 1, 2)
	})
}

func TestMustMakeExponentialDurationBuckets(t *testing.T) {
	assert.NotPanics(t, func() {
		assert.Equal(t, DurationBuckets{
			2 * time.Second, 4 * time.Second, 8 * time.Second,
		}, MustMakeExponentialDurationBuckets(2*time.Second, 2, 3))
	})
}

func TestMustMakeExponentialDurationBucketsPanicsOnBadCount(t *testing.T) {
	assert.Panics(t, func() {
		MustMakeExponentialDurationBuckets(2*time.Second, 2, 0)
	})
}

func TestMustMakeExponentialDurationBucketsPanicsOnBadStart(t *testing.T) {
	assert.Panics(t, func() {
		MustMakeExponentialDurationBuckets(0, 2, 2)
	})
}

func TestMustMakeExponentialDurationBucketsPanicsOnBadFactor(t *testing.T) {
	assert.Panics(t, func() {
		MustMakeExponentialDurationBuckets(2*time.Second, 1, 2)
	})
}

func TestBucketPairsNoRaceWhenSorted(t *testing.T) {
	buckets := DurationBuckets{}
	for i := 0; i < 99; i++ {
		buckets = append(buckets, time.Duration(i)*time.Second)
	}
	newPair := func() {
		pairs := BucketPairs(buckets)
		require.Equal(t, 100, len(pairs))
	}
	for i := 0; i < 10; i++ {
		go newPair()
	}
}

func TestBucketPairsNoRaceWhenUnsorted(t *testing.T) {
	buckets := DurationBuckets{}
	for i := 100; i > 1; i-- {
		buckets = append(buckets, time.Duration(i)*time.Second)
	}
	newPair := func() {
		pairs := BucketPairs(buckets)
		require.Equal(t, 100, len(pairs))
	}
	for i := 0; i < 10; i++ {
		go newPair()
	}
}

func BenchmarkBucketsEqual(b *testing.B) {
	bench := func(b *testing.B, x Buckets, y Buckets) {
		b.ResetTimer()

		for i := 0; i < b.N; i++ {
			bucketsEqual(x, y)
		}
	}

	b.Run("same 20 values", func(b *testing.B) {
		buckets := MustMakeLinearValueBuckets(1.0, 1.0, 20)
		bench(b, buckets, buckets)
	})

	b.Run("same 20 durations", func(b *testing.B) {
		buckets := MustMakeLinearDurationBuckets(time.Second, time.Second, 20)
		bench(b, buckets, buckets)
	})
}


text:
package fr.paris.lutece.util.html;

import java.util.ArrayList;
import java.util.List;

/**
 * Paginator provides a way to display a collection of items on severals pages. This implementation requires all items
 *
 * @param <E>
 *            Item of the list
 */
public class Paginator<E> extends AbstractPaginator<E>
{
    private static final long serialVersionUID = 1531851701326259139L;

    /**
     * Creates a new instance of Paginator
     *
     * @param list
     *            The collection to paginate
     * @param nItemPerPage
     *            Number of items to display per page
     * @param strBaseUrl
     *            The base Url for build links on each page link
     * @param strPageIndexParameterName
     *            The parameter name for the page index
     * @param strPageIndex
     *            The current page index
     */
    public Paginator( List<E> list, int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex )
    {
        _list = list;
        _nItemsCount = _list.size( );
        _nItemPerPage = ( nItemPerPage <= 0 ) ? 1 : nItemPerPage;
        _strBaseUrl = strBaseUrl;
        _strPageIndexParameterName = strPageIndexParameterName;
        _strItemsPerPageParameterName = PARAMETER_ITEMS_PER_PAGE;

        try
        {
            _nPageCurrent = Integer.parseInt( strPageIndex );
        }
        catch( NumberFormatException e )
        {
            // strPageIndex invalid, use 1 as default page index.
            _nPageCurrent = 1;
        }

        if ( _nPageCurrent > getPagesCount( ) )
        {
            _nPageCurrent = 1;
        }
    }

    /**
     * Creates a new instance of Paginator
     *
     * @param list
     *            The collection to paginate
     * @param nItemPerPage
     *            Number of items to display per page
     * @param strBaseUrl
     *            The base Url for build links on each page link
     * @param strPageIndexParameterName
     *            The parameter name for the page index
     * @param strPageIndex
     *            The current page index
     * @param strItemsPerPageParameterName
     *            The parameter name of the number items per page
     */
    public Paginator( List<E> list, int nItemPerPage, String strBaseUrl, String strPageIndexParameterName, String strPageIndex,
            String strItemsPerPageParameterName )
    {
        this( list, nItemPerPage, strBaseUrl, strPageIndexParameterName, strPageIndex );
        _strItemsPerPageParameterName = strItemsPerPageParameterName;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<E> getPageItems( )
    {
        int nStartIndex = ( _nPageCurrent - 1 ) * _nItemPerPage;
        int nMax = _nItemsCount;
        int nMaxPage = nStartIndex + _nItemPerPage;

        if ( nMaxPage < nMax )
        {
            nMax = nMaxPage;
        }

        List<E> list = new ArrayList<>( );

        for ( int i = nStartIndex; i < nMax; i++ )
        {
            list.add( _list.get( i ) );
        }

        return list;
    }
}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.contentwarehouse.v1.model;

/**
 * Pattern for when in the day the repeating task should trigger. Applies to all frequencies greater
 * than or equal to DAILY. Exactly one of the containing fields should be set (i.e. a specific time
 * or period).
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the contentwarehouse API. For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class NlpSemanticParsingModelsRecurrenceDailyPattern extends com.google.api.client.json.GenericJson {

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingDateTimeAnnotation dayPeriod;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingDateTimeAnnotation timeOfDay;

  /**
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingDateTimeAnnotation getDayPeriod() {
    return dayPeriod;
  }

  /**
   * @param dayPeriod dayPeriod or {@code null} for none
   */
  public NlpSemanticParsingModelsRecurrenceDailyPattern setDayPeriod(NlpSemanticParsingDateTimeAnnotation dayPeriod) {
    this.dayPeriod = dayPeriod;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingDateTimeAnnotation getTimeOfDay() {
    return timeOfDay;
  }

  /**
   * @param timeOfDay timeOfDay or {@code null} for none
   */
  public NlpSemanticParsingModelsRecurrenceDailyPattern setTimeOfDay(NlpSemanticParsingDateTimeAnnotation timeOfDay) {
    this.timeOfDay = timeOfDay;
    return this;
  }

  @Override
  public NlpSemanticParsingModelsRecurrenceDailyPattern set(String fieldName, Object value) {
    return (NlpSemanticParsingModelsRecurrenceDailyPattern) super.set(fieldName, value);
  }

  @Override
  public NlpSemanticParsingModelsRecurrenceDailyPattern clone() {
    return (NlpSemanticParsingModelsRecurrenceDailyPattern) super.clone();
  }

}


text:
> **IMPORTANT!** Replace any sensitive data (e.g. password) before including the log data in an issue.
>
> **IMPORTANT!** Disable the log if you are not investigating an issue. It makes the app slower. And with log to file enabled it may saves data to file that you don't want to be saved every time you are using the app.

Is possible to enable logging by adding the configuration below to your `~/.sqlectron.json`:

```js
  "log": {
    // Show logs in the dev tools panel
    // "false" by default in production
    "console": true,

    // Save logs into a file
    // "false" by default in production
    "file": true,

    // Level logging: debug, info, warn, error
    // "error" by default in production
    "level": "debug",

    // Log file path
    // "~/.sqlectron.log" by default in production
    "path": "~/.sqlectron.log"
  },
```

The log file is pretty easy to understand by just opening it in a text editor. But if you want an even better way to see that. Is possible to use [bunyan](https://github.com/trentm/node-bunyan) CLI:

> Requires to have Node and NPM installed

Install bunyan CLI globally

```
npm install -g bunyan
```

See the logs with a better output through bunyan CLI

```
tail -f ~/.sqlectron.log | bunyan -o short
```

or

```
cat ~/.sqlectron.log | bunyan -o short
```


text:
struct ChatUserData
{
	SocketWrapper clientSocket;
	UserPermission permissions;
	UserID id;
	CEGUI::Colour textColor;
	CEGUI::String userName;
};


text:
prettydatetime
==============

A Pretty formatter for DateTime in .NET, which supports internationalization.


text:
user = User.create(first_name: "Paul", last_name: "clegg", email: "paul@paul.com", password: "password", phone: "773-355-1422")
user2 = User.create(first_name: "Zach", last_name: "Harris", email: "z@z.com", password: "password")
user3 = User.create(first_name: "Morgan", last_name: "McCroy", email: "morgan@morgan.com", password: "password")
user4 = User.create(first_name: "Sara", last_name: "Chen", email: "sara@sara.com", password: "password")

address1 = Address.create(street: "1462 W Carmen Ave Apt 2", city: "Chicago", state: "IL", zip_code: "60640")
address2 = Address.create(street: "4950 N Marine Dr Apt 103", city: "Chicago", state: "IL", zip_code: "60640")
property_manager = PropertyManager.create(name: "tom", phone: "773-606-6186", email: "tom@tom.com", address: address1)
house = user.houses.create(name: "The Hater House", house_key: "igeekallweek", address: address2, property_manager_id: property_manager.id)
HousingAssignment.create(house_id: house.id, user_id: user2.id )
rule = Rule.create(content: "Flush the toilet", house_id: 1)
chore = Chore.create(task: "Do the dishes", house_id: 1)
user.chores.create(task: "Mop the floor", house_id: 1)
user2.chores.create(task: "Build an app in React.js", house_id: house.id )
communal_item = CommunalItem.create(name: "toilet paper", brand: "charmin", quantity: 12, house_id: 1, stock_level: "low")
message = Message.create(content: "You're the best!!", house_id: 1, author: user)
chore_issue = chore.issues.create(reason: "I HATE PAUL!!", user_id: 1)
item_issue = communal_item.issues.create(reason: "I hate paper towel", user_id: 1)
rule_issue = rule.issues.create(reason: "I hate flushing!!", user_id: 1)
chore.user_promise = UserPromise.create(user_id: 1)
communal_item.user_promise=UserPromise.create(user_id: 1)

chore2 = Chore.create(task: "Take out trash if it smells", house_id: 1)
chore3 = Chore.create(task: "Wash your face", house_id: 1)
chore4 = Chore.create(task: "Get out of my face", house_id: 1)
chore5 = Chore.create(task: "Say hello like a fucking normal person", house_id: 1)

Notification.create(alert: "You have no new notifications.", category: "")

m1 = Message.create(content: "I love my roommates", house_id: 1, author: user2)
m1.update_attributes(created_at: (rand*5).days.ago )
m2 = Message.create(content: "This app is so cool!", house_id: 1, author: user3)
m2.update_attributes(created_at: (rand*10).days.ago )
m3 = Message.create(content: "We should have a party!", house_id: 1, author: user4)
m3.update_attributes(created_at: (rand*2).days.ago )


text:
---
title: "Kitchen Sink"
description: "Design and UI elements for InlandSplash.org web site theme"
layout: flush
robots: none
---

Kitchen sink

This page demonstrates every single design element available for use with the InlandSplash.org site theme, along with instructions to include them in your web pages and blog posts.

Block Grid

Buttons

    .tiny.button

    .small.button

    .button

    .expand

    .tiny.secondary

    .small.success.radius

    .round.disabled

Button Groups

Button 1

Button 2

Button 3

Button 1

Button 2

Button 3

Button 4

Button 1

Button 2

Button 3

<input type="submit" class="button success" value="Button 1">

<input type="submit" class="button success" value="Button 2">

<input type="submit" class="button success" value="Button 3">

Dropdown Buttons

This is a link

This is another

Yet another link

Tiny Dropdown Button

Small Secondary Radius Dropdown Button

Button Alert Round Dropdown Button

Large Success Dropdown Button

Large Expanded Dropdown Button

Split Buttons

 Tiny Split Button

 Small Secondary Radius Split Button

 Round Alert Split Button

 Large Success Split Button

Clearing

Forms

<form>
  <fieldset>
    <legend>Fieldset</legend>

        Input Label
        <input type="text" placeholder="large-12.columns">

        Input Label
        <input type="text" placeholder="large-4.columns">

        Input Label
        <input type="text" placeholder="large-4.columns">

          Input Label

            <input type="text" placeholder="small-9.columns">

            .com

        Textarea Label
        <textarea placeholder="small-12.columns"></textarea>

  </fieldset>
</form>

Dropdowns

Link Dropdown »
  Content Dropdown »

This is a link

This is another

Yet another

Title

Some text that people will think is awesome! Some text that people will
    think is awesome! Some text that people will think is awesome!

Launching a Discovery Mission
Button

Flex Video

Inline Lists

Link 1

Link 2

Link 3

Link 4

Link 5

Labels

  Regular Label

  Radius Secondary Label

  Round Alert Label

  Success Label

Panels

This is a regular panel.

It has an easy to override visual style, and is appropriately subdued.

This is a radius callout panel.

It's a little ostentatious, but useful for important content.

Pricing Tables

Standard

$99.99

An awesome description

1 Database

5GB Storage

20 Users

Buy Now

Reveal

Example Modal…
Example Video Modal…

This is a modal.

Reveal makes these very easy to summon and dismiss. The close button is simply an anchor with a unicode character icon and a class of close-reveal-modal. Clicking anywhere outside the modal will also dismiss it.

Finally, if your modal summons another Reveal modal, the plugin will handle that for you gracefully.

Second Modal…

  ×

This is a second modal.

See? It just slides into place after the first modal. Very handy when you need subsequent dialogs, or when a modal option impacts or requires another decision.

  ×

This modal has video

  ×

Tabs

Tab 1

Tab 2

Tab 3

Tab 4

First panel content goes here...

Second panel content goes here...

Third panel content goes here...

Fourth panel content goes here...

Tab 1

Tab 2

Tab 3

Tab 4

Panel 1 content goes here.

Panel 2 content goes here.

Panel 3 content goes here.

Panel 4 content goes here.

Side Nav

Link 1

Link 2

Link 3

Link 4

Sub Nav

Filter:

Section 1

Section 2

Section 3

Tables

      Table Header
      Table Header
      Table Header
      Table Header

      Content Goes Here
      This is longer content Donec id elit non mi porta gravida at eget metus.
      Content Goes Here
      Content Goes Here

      Content Goes Here
      This is longer Content Goes Here Donec id elit non mi porta gravida at eget metus.
      Content Goes Here
      Content Goes Here

      Content Goes Here
      This is longer Content Goes Here Donec id elit non mi porta gravida at eget metus.
      Content Goes Here
      Content Goes Here

Thumbnails

Tooltips

The tooltips can be positioned on the "tip-bottom", which is the default position, "tip-top" (hehe), "tip-left", or "tip-right" of the target element by adding the appropriate class to them. You can even add your own custom class to style each tip differently. On a small device, the tooltips are full width and bottom aligned.

Top Bar

            Top Bar Title

menu

          Main Item 1

Section Name

              Has Dropdown, Level 1

Dropdown Options

Dropdown Options

Level 2

Subdropdown Option

Subdropdown Option

Subdropdown Option

Dropdown Option

Dropdown Option

Section Name

Dropdown Option

Dropdown Option

Dropdown Option

See all →

          Main Item 2

Dropdown Option

Dropdown Option

Dropdown Option

See all →

Type

h1. This is a very large header.

h2. This is a large header.

h3. This is a medium header.

h4. This is a moderate header.

h5. This is a small header.

h6. This is a tiny header.

h1. subheader

h2. subheader

h3. subheader

h4. subheader

h5. subheader

h6. subheader

Definition List

Definition lists are great for small block of copy that describe the header

Lower cost

The new version of this product costs significantly less than the previous one!

Easier to use

We've changed the product so that it's much easier to use!

Safe for kids

You can leave your kids alone in a room with this product and they won't get hurt (not a guarantee).

Un-ordered lists are great for making quick outlines bulleted.

List item with a much longer description or more content.

List item

List item

Nested List Item

Nested List Item

Nested List Item

List item

List item

List item

Ordered lists are great for lists that need order, duh.

List Item 1

List Item 2

List Item 3

Blockquote

I do not fear computers. I fear the lack of them. Maecenas faucibus mollis interdum. Aenean lacinia bibendum nulla sed consectetur.Isaac Asimov

Vcard

Gaius Baltar

123 Colonial Ave.

Caprica City

Caprica, 12345

[email protected]

Visibility Classes

Screen Size Visibility Control (Show)

The following text should describe the screen size you're using:

  You are on a small screen.
  You are on a medium screen.
  You are on a medium, large or xlarge screen.
  You are on a medium or small screen.
  You are on a large screen.
  You are on a large or xlarge screen.
  You are on a large, medium or small screen.
  You are on a xlarge screen.

Screen Size Visibility Control (Hide)

The following text should describe the screen size you aren't using:

  You are not on a small screen.
  You are not on a medium screen.
  You are not on a medium, large or xlarge screen.
  You are not on a medium or small screen.
  You are not on a large screen.
  You are not on a large or xlarge screen.
  You are not on a large, medium or small screen.
  You are not on a xlarge screen.

Orientation Detection

The following text should describe the device orientation you're using:

  You are in landscape orientation.
  You are in portrait orientation.

Touch Detection

The following text should describe if you're using a touch device:

  You are on a touch-enabled device.
  You are not on a touch-enabled device.


text:
!function (a, b) {
    "use strict";
    function c() {
        d.READY || (d.event.determineEventTypes(), d.utils.each(d.gestures, function (a) {
            d.detection.register(a)
        }), d.event.onTouch(d.DOCUMENT, d.EVENT_MOVE, d.detection.detect), d.event.onTouch(d.DOCUMENT, d.EVENT_END, d.detection.detect), d.READY = !0)
    }

    var d = function (a, b) {
        return new d.Instance(a, b || {})
    };
    d.defaults = {
        stop_browser_behavior: {
            userSelect: "none",
            touchAction: "none",
            touchCallout: "none",
            contentZooming: "none",
            userDrag: "none",
            tapHighlightColor: "rgba(0,0,0,0)"
        }
    }, d.HAS_POINTEREVENTS = a.navigator.pointerEnabled || a.navigator.msPointerEnabled, d.HAS_TOUCHEVENTS = "ontouchstart" in a, d.MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android|silk/i, d.NO_MOUSEEVENTS = d.HAS_TOUCHEVENTS && a.navigator.userAgent.match(d.MOBILE_REGEX), d.EVENT_TYPES = {}, d.DIRECTION_DOWN = "down", d.DIRECTION_LEFT = "left", d.DIRECTION_UP = "up", d.DIRECTION_RIGHT = "right", d.POINTER_MOUSE = "mouse", d.POINTER_TOUCH = "touch", d.POINTER_PEN = "pen", d.EVENT_START = "start", d.EVENT_MOVE = "move", d.EVENT_END = "end", d.DOCUMENT = a.document, d.plugins = d.plugins || {}, d.gestures = d.gestures || {}, d.READY = !1, d.utils = {
        extend: function (a, c, d) {
            for (var e in c)a[e] !== b && d || (a[e] = c[e]);
            return a
        }, each: function (a, c, d) {
            var e, f;
            if ("forEach" in a)a.forEach(c, d); else if (a.length !== b) {
                for (e = 0, f = a.length; f > e; e++)if (c.call(d, a[e], e, a) === !1)return
            } else for (e in a)if (a.hasOwnProperty(e) && c.call(d, a[e], e, a) === !1)return
        }, hasParent: function (a, b) {
            for (; a;) {
                if (a == b)return !0;
                a = a.parentNode
            }
            return !1
        }, getCenter: function (a) {
            var b = [], c = [];
            return d.utils.each(a, function (a) {
                b.push("undefined" != typeof a.clientX ? a.clientX : a.pageX), c.push("undefined" != typeof a.clientY ? a.clientY : a.pageY)
            }), {
                pageX: (Math.min.apply(Math, b) + Math.max.apply(Math, b)) / 2,
                pageY: (Math.min.apply(Math, c) + Math.max.apply(Math, c)) / 2
            }
        }, getVelocity: function (a, b, c) {
            return {x: Math.abs(b / a) || 0, y: Math.abs(c / a) || 0}
        }, getAngle: function (a, b) {
            var c = b.pageY - a.pageY, d = b.pageX - a.pageX;
            return 180 * Math.atan2(c, d) / Math.PI
        }, getDirection: function (a, b) {
            var c = Math.abs(a.pageX - b.pageX), e = Math.abs(a.pageY - b.pageY);
            return c >= e ? a.pageX - b.pageX > 0 ? d.DIRECTION_LEFT : d.DIRECTION_RIGHT : a.pageY - b.pageY > 0 ? d.DIRECTION_UP : d.DIRECTION_DOWN
        }, getDistance: function (a, b) {
            var c = b.pageX - a.pageX, d = b.pageY - a.pageY;
            return Math.sqrt(c * c + d * d)
        }, getScale: function (a, b) {
            return a.length >= 2 && b.length >= 2 ? this.getDistance(b[0], b[1]) / this.getDistance(a[0], a[1]) : 1
        }, getRotation: function (a, b) {
            return a.length >= 2 && b.length >= 2 ? this.getAngle(b[1], b[0]) - this.getAngle(a[1], a[0]) : 0
        }, isVertical: function (a) {
            return a == d.DIRECTION_UP || a == d.DIRECTION_DOWN
        }, stopDefaultBrowserBehavior: function (a, b) {
            b && a && a.style && (d.utils.each(["webkit", "khtml", "moz", "Moz", "ms", "o", ""], function (c) {
                d.utils.each(b, function (b) {
                    c && (b = c + b.substring(0, 1).toUpperCase() + b.substring(1)), b in a.style && (a.style[b] = b)
                })
            }), "none" == b.userSelect && (a.onselectstart = function () {
                return !1
            }), "none" == b.userDrag && (a.ondragstart = function () {
                return !1
            }))
        }
    }, d.Instance = function (a, b) {
        var e = this;
        return c(), this.element = a, this.enabled = !0, this.options = d.utils.extend(d.utils.extend({}, d.defaults), b || {}), this.options.stop_browser_behavior && d.utils.stopDefaultBrowserBehavior(this.element, this.options.stop_browser_behavior), d.event.onTouch(a, d.EVENT_START, function (a) {
            e.enabled && d.detection.startDetect(e, a)
        }), this
    }, d.Instance.prototype = {
        on: function (a, b) {
            var c = a.split(" ");
            return d.utils.each(c, function (a) {
                this.element.addEventListener(a, b, !1)
            }, this), this
        }, off: function (a, b) {
            var c = a.split(" ");
            return d.utils.each(c, function (a) {
                this.element.removeEventListener(a, b, !1)
            }, this), this
        }, trigger: function (a, b) {
            b || (b = {});
            var c = d.DOCUMENT.createEvent("Event");
            c.initEvent(a, !0, !0), c.gesture = b;
            var e = this.element;
            return d.utils.hasParent(b.target, e) && (e = b.target), e.dispatchEvent(c), this
        }, enable: function (a) {
            return this.enabled = a, this
        }
    };
    var e = null, f = !1, g = !1;
    d.event = {
        bindDom: function (a, b, c) {
            var e = b.split(" ");
            d.utils.each(e, function (b) {
                a.addEventListener(b, c, !1)
            })
        }, onTouch: function (a, b, c) {
            var h = this;
            this.bindDom(a, d.EVENT_TYPES[b], function (i) {
                var j = i.type.toLowerCase();
                if (!j.match(/mouse/) || !g) {
                    j.match(/touch/) || j.match(/pointerdown/) || j.match(/mouse/) && 1 === i.which ? f = !0 : j.match(/mouse/) && !i.which && (f = !1), j.match(/touch|pointer/) && (g = !0);
                    var k = 0;
                    f && (d.HAS_POINTEREVENTS && b != d.EVENT_END ? k = d.PointerEvent.updatePointer(b, i) : j.match(/touch/) ? k = i.touches.length : g || (k = j.match(/up/) ? 0 : 1), k > 0 && b == d.EVENT_END ? b = d.EVENT_MOVE : k || (b = d.EVENT_END), (k || null === e) && (e = i), c.call(d.detection, h.collectEventData(a, b, h.getTouchList(e, b), i)), d.HAS_POINTEREVENTS && b == d.EVENT_END && (k = d.PointerEvent.updatePointer(b, i))), k || (e = null, f = !1, g = !1, d.PointerEvent.reset())
                }
            })
        }, determineEventTypes: function () {
            var a;
            a = d.HAS_POINTEREVENTS ? d.PointerEvent.getEvents() : d.NO_MOUSEEVENTS ? ["touchstart", "touchmove", "touchend touchcancel"] : ["touchstart mousedown", "touchmove mousemove", "touchend touchcancel mouseup"], d.EVENT_TYPES[d.EVENT_START] = a[0], d.EVENT_TYPES[d.EVENT_MOVE] = a[1], d.EVENT_TYPES[d.EVENT_END] = a[2]
        }, getTouchList: function (a) {
            return d.HAS_POINTEREVENTS ? d.PointerEvent.getTouchList() : a.touches ? a.touches : (a.identifier = 1, [a])
        }, collectEventData: function (a, b, c, e) {
            var f = d.POINTER_TOUCH;
            return (e.type.match(/mouse/) || d.PointerEvent.matchType(d.POINTER_MOUSE, e)) && (f = d.POINTER_MOUSE), {
                center: d.utils.getCenter(c),
                timeStamp: (new Date).getTime(),
                target: e.target,
                touches: c,
                eventType: b,
                pointerType: f,
                srcEvent: e,
                preventDefault: function () {
                    this.srcEvent.preventManipulation && this.srcEvent.preventManipulation(), this.srcEvent.preventDefault && this.srcEvent.preventDefault()
                },
                stopPropagation: function () {
                    this.srcEvent.stopPropagation()
                },
                stopDetect: function () {
                    return d.detection.stopDetect()
                }
            }
        }
    }, d.PointerEvent = {
        pointers: {}, getTouchList: function () {
            var a = this, b = [];
            return d.utils.each(a.pointers, function (a) {
                b.push(a)
            }), b
        }, updatePointer: function (a, b) {
            return a == d.EVENT_END ? this.pointers = {} : (b.identifier = b.pointerId, this.pointers[b.pointerId] = b), Object.keys(this.pointers).length
        }, matchType: function (a, b) {
            if (!b.pointerType)return !1;
            var c = b.pointerType, e = {};
            return e[d.POINTER_MOUSE] = c === b.MSPOINTER_TYPE_MOUSE || c === d.POINTER_MOUSE, e[d.POINTER_TOUCH] = c === b.MSPOINTER_TYPE_TOUCH || c === d.POINTER_TOUCH, e[d.POINTER_PEN] = c === b.MSPOINTER_TYPE_PEN || c === d.POINTER_PEN, e[a]
        }, getEvents: function () {
            return ["pointerdown MSPointerDown", "pointermove MSPointerMove", "pointerup pointercancel MSPointerUp MSPointerCancel"]
        }, reset: function () {
            this.pointers = {}
        }
    }, d.detection = {
        gestures: [], current: null, previous: null, stopped: !1, startDetect: function (a, b) {
            this.current || (this.stopped = !1, this.current = {
                inst: a,
                startEvent: d.utils.extend({}, b),
                lastEvent: !1,
                name: ""
            }, this.detect(b))
        }, detect: function (a) {
            if (this.current && !this.stopped) {
                a = this.extendEventData(a);
                var b = this.current.inst.options;
                return d.utils.each(this.gestures, function (c) {
                    return this.stopped || b[c.name] === !1 || c.handler.call(c, a, this.current.inst) !== !1 ? void 0 : (this.stopDetect(), !1)
                }, this), this.current && (this.current.lastEvent = a), a.eventType == d.EVENT_END && !a.touches.length - 1 && this.stopDetect(), a
            }
        }, stopDetect: function () {
            this.previous = d.utils.extend({}, this.current), this.current = null, this.stopped = !0
        }, extendEventData: function (a) {
            var b = this.current.startEvent;
            !b || a.touches.length == b.touches.length && a.touches !== b.touches || (b.touches = [], d.utils.each(a.touches, function (a) {
                b.touches.push(d.utils.extend({}, a))
            }));
            var c, e, f = a.timeStamp - b.timeStamp, g = a.center.pageX - b.center.pageX, h = a.center.pageY - b.center.pageY, i = d.utils.getVelocity(f, g, h);
            return "end" === a.eventType ? (c = this.current.lastEvent && this.current.lastEvent.interimAngle, e = this.current.lastEvent && this.current.lastEvent.interimDirection) : (c = this.current.lastEvent && d.utils.getAngle(this.current.lastEvent.center, a.center), e = this.current.lastEvent && d.utils.getDirection(this.current.lastEvent.center, a.center)), d.utils.extend(a, {
                deltaTime: f,
                deltaX: g,
                deltaY: h,
                velocityX: i.x,
                velocityY: i.y,
                distance: d.utils.getDistance(b.center, a.center),
                angle: d.utils.getAngle(b.center, a.center),
                interimAngle: c,
                direction: d.utils.getDirection(b.center, a.center),
                interimDirection: e,
                scale: d.utils.getScale(b.touches, a.touches),
                rotation: d.utils.getRotation(b.touches, a.touches),
                startEvent: b
            }), a
        }, register: function (a) {
            var c = a.defaults || {};
            return c[a.name] === b && (c[a.name] = !0), d.utils.extend(d.defaults, c, !0), a.index = a.index || 1e3, this.gestures.push(a), this.gestures.sort(function (a, b) {
                return a.index < b.index ? -1 : a.index > b.index ? 1 : 0
            }), this.gestures
        }
    }, d.gestures.Drag = {
        name: "drag",
        index: 50,
        defaults: {
            drag_min_distance: 10,
            correct_for_drag_min_distance: !0,
            drag_max_touches: 1,
            drag_block_horizontal: !1,
            drag_block_vertical: !1,
            drag_lock_to_axis: !1,
            drag_lock_min_distance: 25
        },
        triggered: !1,
        handler: function (a, b) {
            if (d.detection.current.name != this.name && this.triggered)return b.trigger(this.name + "end", a), this.triggered = !1, void 0;
            if (!(b.options.drag_max_touches > 0 && a.touches.length > b.options.drag_max_touches))switch (a.eventType) {
                case d.EVENT_START:
                    this.triggered = !1;
                    break;
                case d.EVENT_MOVE:
                    if (a.distance < b.options.drag_min_distance && d.detection.current.name != this.name)return;
                    if (d.detection.current.name != this.name && (d.detection.current.name = this.name, b.options.correct_for_drag_min_distance && a.distance > 0)) {
                        var c = Math.abs(b.options.drag_min_distance / a.distance);
                        d.detection.current.startEvent.center.pageX += a.deltaX * c, d.detection.current.startEvent.center.pageY += a.deltaY * c, a = d.detection.extendEventData(a)
                    }
                    (d.detection.current.lastEvent.drag_locked_to_axis || b.options.drag_lock_to_axis && b.options.drag_lock_min_distance <= a.distance) && (a.drag_locked_to_axis = !0);
                    var e = d.detection.current.lastEvent.direction;
                    a.drag_locked_to_axis && e !== a.direction && (a.direction = d.utils.isVertical(e) ? a.deltaY < 0 ? d.DIRECTION_UP : d.DIRECTION_DOWN : a.deltaX < 0 ? d.DIRECTION_LEFT : d.DIRECTION_RIGHT), this.triggered || (b.trigger(this.name + "start", a), this.triggered = !0), b.trigger(this.name, a), b.trigger(this.name + a.direction, a), (b.options.drag_block_vertical && d.utils.isVertical(a.direction) || b.options.drag_block_horizontal && !d.utils.isVertical(a.direction)) && a.preventDefault();
                    break;
                case d.EVENT_END:
                    this.triggered && b.trigger(this.name + "end", a), this.triggered = !1
            }
        }
    }, d.gestures.Hold = {
        name: "hold",
        index: 10,
        defaults: {hold_timeout: 500, hold_threshold: 1},
        timer: null,
        handler: function (a, b) {
            switch (a.eventType) {
                case d.EVENT_START:
                    clearTimeout(this.timer), d.detection.current.name = this.name, this.timer = setTimeout(function () {
                        "hold" == d.detection.current.name && b.trigger("hold", a)
                    }, b.options.hold_timeout);
                    break;
                case d.EVENT_MOVE:
                    a.distance > b.options.hold_threshold && clearTimeout(this.timer);
                    break;
                case d.EVENT_END:
                    clearTimeout(this.timer)
            }
        }
    }, d.gestures.Release = {
        name: "release", index: 1 / 0, handler: function (a, b) {
            a.eventType == d.EVENT_END && b.trigger(this.name, a)
        }
    }, d.gestures.Swipe = {
        name: "swipe",
        index: 40,
        defaults: {swipe_min_touches: 1, swipe_max_touches: 1, swipe_velocity: .7},
        handler: function (a, b) {
            if (a.eventType == d.EVENT_END) {
                if (b.options.swipe_max_touches > 0 && a.touches.length < b.options.swipe_min_touches && a.touches.length > b.options.swipe_max_touches)return;
                (a.velocityX > b.options.swipe_velocity || a.velocityY > b.options.swipe_velocity) && (b.trigger(this.name, a), b.trigger(this.name + a.direction, a))
            }
        }
    }, d.gestures.Tap = {
        name: "tap",
        index: 100,
        defaults: {
            tap_max_touchtime: 250,
            tap_max_distance: 10,
            tap_always: !0,
            doubletap_distance: 20,
            doubletap_interval: 300
        },
        handler: function (a, b) {
            if (a.eventType == d.EVENT_END && "touchcancel" != a.srcEvent.type) {
                var c = d.detection.previous, e = !1;
                if (a.deltaTime > b.options.tap_max_touchtime || a.distance > b.options.tap_max_distance)return;
                c && "tap" == c.name && a.timeStamp - c.lastEvent.timeStamp < b.options.doubletap_interval && a.distance < b.options.doubletap_distance && (b.trigger("doubletap", a), e = !0), (!e || b.options.tap_always) && (d.detection.current.name = "tap", b.trigger(d.detection.current.name, a))
            }
        }
    }, d.gestures.Touch = {
        name: "touch",
        index: -1 / 0,
        defaults: {prevent_default: !1, prevent_mouseevents: !1},
        handler: function (a, b) {
            return b.options.prevent_mouseevents && a.pointerType == d.POINTER_MOUSE ? (a.stopDetect(), void 0) : (b.options.prevent_default && a.preventDefault(), a.eventType == d.EVENT_START && b.trigger(this.name, a), void 0)
        }
    }, d.gestures.Transform = {
        name: "transform",
        index: 45,
        defaults: {transform_min_scale: .01, transform_min_rotation: 1, transform_always_block: !1},
        triggered: !1,
        handler: function (a, b) {
            if (d.detection.current.name != this.name && this.triggered)return b.trigger(this.name + "end", a), this.triggered = !1, void 0;
            if (!(a.touches.length < 2))switch (b.options.transform_always_block && a.preventDefault(), a.eventType) {
                case d.EVENT_START:
                    this.triggered = !1;
                    break;
                case d.EVENT_MOVE:
                    var c = Math.abs(1 - a.scale), e = Math.abs(a.rotation);
                    if (c < b.options.transform_min_scale && e < b.options.transform_min_rotation)return;
                    d.detection.current.name = this.name, this.triggered || (b.trigger(this.name + "start", a), this.triggered = !0), b.trigger(this.name, a), e > b.options.transform_min_rotation && b.trigger("rotate", a), c > b.options.transform_min_scale && (b.trigger("pinch", a), b.trigger("pinch" + (a.scale < 1 ? "in" : "out"), a));
                    break;
                case d.EVENT_END:
                    this.triggered && b.trigger(this.name + "end", a), this.triggered = !1
            }
        }
    }, "function" == typeof define && "object" == typeof define.amd && define.amd ? define(function () {
        return d
    }) : "object" == typeof module && "object" == typeof module.exports ? module.exports = d : a.Hammer = d
}(this);
//# sourceMappingURL=hammer.min.map


text:
// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Testing;
using Test.Utilities;
using Xunit;
using VerifyCS = Test.Utilities.CSharpSecurityCodeFixVerifier<
    Microsoft.NetCore.Analyzers.Security.DoNotUseInsecureDeserializerLosFormatter,
    Microsoft.CodeAnalysis.Testing.EmptyCodeFixProvider>;
using VerifyVB = Test.Utilities.VisualBasicSecurityCodeFixVerifier<
    Microsoft.NetCore.Analyzers.Security.DoNotUseInsecureDeserializerLosFormatter,
    Microsoft.CodeAnalysis.Testing.EmptyCodeFixProvider>;

namespace Microsoft.NetCore.Analyzers.Security.UnitTests
{
    public class DoNotUseInsecureDeserializerLosFormatterTests
    {
        [Fact]
        public async Task DocSample1_CSharp_Violation_Diagnostic()
        {
            await VerifyCSharpAnalyzerAsync(@"
using System.IO;
using System.Web.UI;

public class ExampleClass
{
    public object MyDeserialize(byte[] bytes)
    {
        LosFormatter formatter = new LosFormatter();
        return formatter.Deserialize(new MemoryStream(bytes));
    }
}",
                GetCSharpResultAt(10, 16, "object LosFormatter.Deserialize(Stream stream)"));
        }

        [Fact]
        public async Task DocSample1_VB_Violation_Diagnostic()
        {
            await VerifyBasicAnalyzerAsync(@"
Imports System.IO
Imports System.Web.UI

Public Class ExampleClass
    Public Function MyDeserialize(bytes As Byte()) As Object
        Dim formatter As LosFormatter = New LosFormatter()
        Return formatter.Deserialize(New MemoryStream(bytes))
    End Function
End Class",
                GetBasicResultAt(8, 16, "Function LosFormatter.Deserialize(stream As Stream) As Object"));
        }

        [Fact]
        public async Task DeserializeStream_Diagnostic()
        {
            await VerifyCSharpAnalyzerAsync(@"
using System.IO;
using System.Web.UI;

namespace Blah
{
    public class Program
    {
        public object Deserialize(byte[] bytes)
        {
            LosFormatter formatter = new LosFormatter();
            return formatter.Deserialize(new MemoryStream(bytes));
        }
    }
}",
            GetCSharpResultAt(12, 20, "object LosFormatter.Deserialize(Stream stream)"));
        }

        [Fact]
        public async Task DeserializeString_Diagnostic()
        {
            await VerifyCSharpAnalyzerAsync(@"
using System.IO;
using System.Web.UI;

namespace Blah
{
    public class Program
    {
        public object Deserialize(string input)
        {
            LosFormatter formatter = new LosFormatter();
            return formatter.Deserialize(input);
        }
    }
}",
            GetCSharpResultAt(12, 20, "object LosFormatter.Deserialize(string input)"));
        }

        [Fact]
        public async Task DeserializeTextReader_Diagnostic()
        {
            await VerifyCSharpAnalyzerAsync(@"
using System.IO;
using System.Web.UI;

namespace Blah
{
    public class Program
    {
        public object Deserialize(TextReader tr)
        {
            LosFormatter formatter = new LosFormatter();
            return formatter.Deserialize(tr);
        }
    }
}",
            GetCSharpResultAt(12, 20, "object LosFormatter.Deserialize(TextReader input)"));
        }

        [Fact]
        public async Task Deserialize_Reference_Diagnostic()
        {
            await VerifyCSharpAnalyzerAsync(@"
using System.IO;
using System.Web.UI;

namespace Blah
{
    public class Program
    {
        public delegate object Des(string s);
        public Des GetDeserializer()
        {
            LosFormatter formatter = new LosFormatter();
            return formatter.Deserialize;
        }
    }
}",
                GetCSharpResultAt(13, 20, "object LosFormatter.Deserialize(string input)"));
        }

        [Fact]
        public async Task Serialize_NoDiagnostic()
        {
            await VerifyCSharpAnalyzerAsync(@"
using System.IO;
using System.Web.UI;

namespace Blah
{
    public class Program
    {
        public byte[] Serialize(object o)
        {
            LosFormatter formatter = new LosFormatter();
            MemoryStream stream = new MemoryStream();
            formatter.Serialize(stream, o);
            return stream.ToArray();
        }
    }
}");
        }

        [Fact]
        public async Task Serialize_Reference_NoDiagnostic()
        {
            await VerifyCSharpAnalyzerAsync(@"
using System.IO;
using System.Web.UI;

namespace Blah
{
    public class Program
    {
        public delegate void Ser(Stream s, object o);
        public Ser GetSerializer()
        {
            LosFormatter formatter = new LosFormatter();
            return formatter.Serialize;
        }
    }
}");
        }

        private static async Task VerifyCSharpAnalyzerAsync(string source, params DiagnosticResult[] expected)
        {
            var csharpTest = new VerifyCS.Test
            {
                ReferenceAssemblies = AdditionalMetadataReferences.DefaultWithSystemWeb,
                TestState =
                {
                    Sources = { source },
                }
            };

            csharpTest.ExpectedDiagnostics.AddRange(expected);

            await csharpTest.RunAsync();
        }

        private static async Task VerifyBasicAnalyzerAsync(string source, params DiagnosticResult[] expected)
        {
            var csharpTest = new VerifyVB.Test
            {
                ReferenceAssemblies = AdditionalMetadataReferences.DefaultWithSystemWeb,
                TestState =
                {
                    Sources = { source },
                }
            };

            csharpTest.ExpectedDiagnostics.AddRange(expected);

            await csharpTest.RunAsync();
        }

        private static DiagnosticResult GetCSharpResultAt(int line, int column, params string[] arguments)
#pragma warning disable RS0030 // Do not used banned APIs
            => VerifyCS.Diagnostic()
                .WithLocation(line, column)
#pragma warning restore RS0030 // Do not used banned APIs
                .WithArguments(arguments);

        private static DiagnosticResult GetBasicResultAt(int line, int column, params string[] arguments)
#pragma warning disable RS0030 // Do not used banned APIs
            => VerifyVB.Diagnostic()
                .WithLocation(line, column)
#pragma warning restore RS0030 // Do not used banned APIs
                .WithArguments(arguments);
    }
}


text:
(function(exports){
"use strict";

var isNode = typeof global !== "undefined" && {}.toString.call(global) == '[object global]';
console.log("isnode: "+isNode);

if (isNode == true){
    console.log('hi');
    var thiszdep = require("./zdep.js");
} else {
    var thiszdep = zdep;
}

console.log(thiszdep.S);

}(typeof exports === 'undefined' ? this.ztest = {} : exports));


text:
                SASS (CSS Preprocesser)

- [SASS Language](http://sass-lang.com/guide)

- [SASS Meister](http://www.sassmeister.com/)

- [The SASS Way](http://thesassway.com)


text:
using System.ComponentModel.DataAnnotations;
using Resources;

namespace SGH_Khronos.Model.Enums
{
    public enum Setor
    {
        [Display(Name = "Ambulatorio", ResourceType = typeof(StringResources))]
        Ambulatorio = 1,

        [Display(Name = "CentroCirurgico", ResourceType = typeof(StringResources))]
        CentroCirurgico = 2,

        [Display(Name = "Cti", ResourceType = typeof(StringResources))]
        Cti = 3,

        [Display(Name = "Uti", ResourceType = typeof(StringResources))]
        Uti = 4
    }
}


text:
export default goalFactory;

function goalFactory(DS) {
  'ngInject';

  return DS.defineResource({
    name: 'goal',
    relations: {
      hasOne: {
        player: {
          localField: 'player',
          localKey: 'playerId'
        }
      },
      belongsTo: {
        matchTeamStats: {
          localField: 'matchTeamStats',
          localKey: 'matchTeamStatsId',
          parent: true
        }
      }
    }
  });
}


text: from efl.evas import *


text:
package slaq.test

import org.junit.Test
import org.junit.Assert._
import slaq.session._
import slaq.test.util._
import slaq.test.util.TestDB._

object StatementParametersTest extends DBTestObject(H2Mem)

class StatementParametersTest(tdb: TestDB) extends DBTest(tdb) {

  @Test def testExplicit(): Unit = {
    println("*** Explicit ***")
    db withSession { s1 =>
      pr("start")(using s1)
      ResultSetType.ScrollInsensitive(s1) { s2 =>
        pr("in ScrollInsensitive block")(using s2)
        ResultSetHoldability.HoldCursorsOverCommit(s2) { s3 =>
          pr("in HoldCursorsOverCommit block")(using s3)
          check(ResultSetType.Auto, ResultSetConcurrency.Auto, ResultSetHoldability.Auto)(using s1)
          check(ResultSetType.ScrollInsensitive, ResultSetConcurrency.Auto, ResultSetHoldability.Auto)(using s2)
          check(ResultSetType.ScrollInsensitive, ResultSetConcurrency.Auto, ResultSetHoldability.HoldCursorsOverCommit)(using s3)
        }
        pr("back out")(using s2)
      }
      pr("back out")(using s1)
    }
  }

  @Test def testImplicit(): Unit = {
    println("*** Implicit ***")
    db withSession { implicit session =>
      pr("start")
      check(ResultSetType.Auto, ResultSetConcurrency.Auto, ResultSetHoldability.Auto)
      /*
       * need explicit reference to ResultSet*'s session to override above withSession implicit
       * looks like in order to set custom ResultSet* attribs one *must* be explicit
       */
      ResultSetType.ScrollInsensitive { (ss: Session) =>
        pr("in ScrollInsensitive block")(using ss)
        check(ResultSetType.ScrollInsensitive, ResultSetConcurrency.Auto, ResultSetHoldability.Auto)
        ResultSetHoldability.HoldCursorsOverCommit { (ss: Session) =>
          pr("in HoldCursorsOverCommit block")(using ss)
          check(ResultSetType.ScrollInsensitive, ResultSetConcurrency.Auto, ResultSetHoldability.HoldCursorsOverCommit)
        }
        pr("back out")
        check(ResultSetType.ScrollInsensitive, ResultSetConcurrency.Auto, ResultSetHoldability.Auto)
      }
      pr("back out")
      check(ResultSetType.Auto, ResultSetConcurrency.Auto, ResultSetHoldability.Auto)
    }
  }

  def pr(msg: String)(using ss: Session) =
    println(
      s"$msg: ${ss.cursorType} ${ss.concurrencyType} ${ss.holdabilityType}"
    )

  def check(t: ResultSetType, c: ResultSetConcurrency, h: ResultSetHoldability)(using ss: Session): Unit = {
    assertEquals(ss.cursorType, t)
    assertEquals(ss.concurrencyType, c)
    assertEquals(ss.holdabilityType, h)
  }
}


text:
<?php
/**
 * @ingroup okt_module_lbl_nyromodal_2
 * @brief La classe principale du module.
 *
 */
use Okatea\Tao\Modules\Module;

class module_lbl_nyromodal_2 extends Module
{

	public $config = null;

	protected static $jsLoader = 'loadNyromodal2();';

	protected function prepend()
	{
		# permissions
		$this->okt['permissions']->addPerm('nyromodal_2_config', __('m_lbl_nyromodal_2_perm_config'), 'configuration');

		# configuration
		$this->config = $this->okt->newConfig('conf_lbl_nyromodal_2');

		$this->okt->page->addLbl('nyromodal2', 'nyroModal2', array(
			'module_lbl_nyromodal_2',
			'nyromodal2'
		), self::$jsLoader);
	}

	protected function prepend_admin()
	{
		# on ajoutent un item au menu admin
		if ($this->okt->page->display_menu)
		{
			$this->okt->page->configSubMenu->add(__('m_lbl_nyromodal_2_menu_config'), 'module.php?m=lbl_nyromodal_2&action=config', $this->bCurrentlyInUse && ($this->okt->page->action === 'config'), 25, $this->okt['visitor']->checkPerm('nyromodal_2_config'), null);
		}
	}

	/**
	 * Met en place nyroModal 2 dans la page
	 *
	 * Voir http://nyromodal.nyrodev.com/indexFr.php#settings
	 * pour la liste des options possibles
	 *
	 * @param string $element
	 * @param string $conteneur
	 * @param array $user_options
	 * @return void
	 */
	public static function nyromodal2($element = 'a.modal', $conteneur = '.modal-box', $user_options = [])
	{
		global $okt;

		$okt->page->css->addFile($okt->theme->url . '/modules/lbl_nyromodal_2/styles/nyroModal.css');
		$okt->page->js->addFile($okt->theme->url . '/modules/lbl_nyromodal_2/js/jquery.nyroModal.min.js');
		$okt->page->js->addCCFile($okt->theme->url . '/modules/lbl_nyromodal_2/js/jquery.nyroModal-ie6.min.js', 'IE 6');

		$config = $okt->lbl_nyromodal_2->config;

		$options = array(
			# Indicates if it's a modal window or not
			'modal' => $config->modal,

			# Indicates if the modal should close on Escape key
			'closeOnEscape' => $config->closeOnEscape,

			# Indicates if a click on the background should close the modal
			'closeOnClick' => $config->closeOnClick,

			# Indicates if the closeButonn should be added
			'showCloseButton' => $config->showCloseButton,

			# Close button HTML
			'closeButton' => '' . __('c_c_action_Close') . '',

			# Indicates if the gallery should loop
			'galleryLoop' => $config->galleryLoop,

			# Indicates if the gallery counts should be shown
			'galleryCounts' => $config->galleryCounts,

			# Error message
			'errorMsg' => __('An error occured')
		);

		if (!empty($user_options))
		{
			$options = array_merge($options, (array) $user_options);
		}

		$okt->page->js->addScript('
			function loadNyromodal2() {
				jQuery("' . $element . '").nyroModal(' . json_encode($options) . ');
			}
		');

		$okt->page->js->addReady(self::$jsLoader);
	}
}


text:
template <class T>	struct CustomAllocator;
template <>		struct CustomAllocator<void>
{
  typedef void *	pointer;
  typedef const void *	const_pointer;
  typedef void		value_type;
  template <class U> struct rebind { typedef CustomAllocator<U> other; };
};
template <class T>	struct CustomAllocator
{
  typedef T*			pointer;
  typedef T const *		const_pointer;
  typedef T&			reference;
  typedef T const &		const_reference;
  typedef T			value_type;

  typedef size_t		size_type;
  typedef int			difference_type; // [?]

  pointer	adress(reference r)	{ return &r; }
  const_pointer	adress(pointer p)	{ return *p; }

  static const size_type	sizeOfElement = sizeof(T);

  template <typename U>
  struct rebind
  {
    typedef CustomAllocator<U> other;
  };

  CustomAllocator()				{}
  CustomAllocator(const CustomAllocator &)	{}
  ~CustomAllocator()				{}

  size_type	max_size(void)
  {
    return (CustomAllocator::size_type(-1) / sizeof(T));
  }

  pointer	allocate(size_type n, CustomAllocator<void>::const_pointer hint = 0)
  {
    return static_cast<pointer>(std::malloc(sizeOfElement * n));
    // return new T[n]; // Change by an  std::malloc [?]
  }
  void		deallocate(pointer p, size_type n = CustomAllocator<T>::sizeOfElement)
  {
    std::free(p);
  }
  void		construct(pointer p, const_reference t)
  {
    new ((void*) p) T(t);
  }
  void		destroy(pointer p)
  {
    ((T*)p)->~T();
  }
};

#endif // __CUSTOM_ALLOCATOR__


text:
package com.aaront.exercise.jvm.commands;

import com.aaront.exercise.jvm.ClassFile;
import com.aaront.exercise.jvm.constant.ClassConstant;
import com.aaront.exercise.jvm.constant.ConstantPool;
import com.aaront.exercise.jvm.constant.FieldRefConstant;
import com.aaront.exercise.jvm.engine.ExecutionResult;
import com.aaront.exercise.jvm.engine.Heap;
import com.aaront.exercise.jvm.engine.JavaObject;
import com.aaront.exercise.jvm.engine.StackFrame;

/**
 * @author tonyhui
 * @since 17/6/17
 */
public class GetStaticFieldCommand extends TwoOperandCommand {
    public GetStaticFieldCommand(ClassFile clzFile, String opCode, int operand1, int operand2) {
        super(clzFile, opCode, operand1, operand2);
    }

    @Override
    public String toString(ConstantPool pool) {
        return super.getOperandAsField(pool);
    }

    /**
     * 获取对象的静态字段值
     */
    @Override
    public void execute(StackFrame frame, ExecutionResult result) {
        FieldRefConstant fieldRefConstant = (FieldRefConstant) this.getConstantInfo(this.getIndex());
        ClassConstant classConstant = fieldRefConstant.getClassConstant();
        String className = classConstant.getClassName();
        JavaObject jo = Heap.getInstance().newObject(className);
        frame.getOperandStack().push(jo);
    }
}


text:
"use strict";
var $___46__46__47_util_47_ErrorReporter_46_js__;
var ErrorReporter = ($___46__46__47_util_47_ErrorReporter_46_js__ = require("../util/ErrorReporter.js"), $___46__46__47_util_47_ErrorReporter_46_js__ && $___46__46__47_util_47_ErrorReporter_46_js__.__esModule && $___46__46__47_util_47_ErrorReporter_46_js__ || {default: $___46__46__47_util_47_ErrorReporter_46_js__}).ErrorReporter;
var MultipleErrors = function($__super) {
  function MultipleErrors(errors) {
    $traceurRuntime.superConstructor(MultipleErrors).call(this);
    this.message = errors ? errors.join('\n') + '' : '';
    this.name = errors && (errors.length > 1) ? 'MultipleErrors' : '';
    this.errors = errors;
  }
  return ($traceurRuntime.createClass)(MultipleErrors, {}, {}, $__super);
}(Error);
var CollectingErrorReporter = function($__super) {
  function CollectingErrorReporter() {
    $traceurRuntime.superConstructor(CollectingErrorReporter).call(this);
    this.errors = [];
  }
  return ($traceurRuntime.createClass)(CollectingErrorReporter, {
    reportMessageInternal: function(location, message) {
      if (location)
        message = (location + ": " + message);
      this.errors.push(message);
    },
    errorsAsString: function() {
      return this.toError().message;
    },
    toError: function() {
      return new MultipleErrors(this.errors);
    }
  }, {}, $__super);
}(ErrorReporter);
Object.defineProperties(module.exports, {
  MultipleErrors: {get: function() {
      return MultipleErrors;
    }},
  CollectingErrorReporter: {get: function() {
      return CollectingErrorReporter;
    }},
  __esModule: {value: true}
});


text:
package com.modesteam.urutau.model.system;

import javax.enterprise.context.Dependent;

import org.apache.commons.mail.DefaultAuthenticator;
import org.apache.commons.mail.Email;
import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.SimpleEmail;

import com.modesteam.urutau.model.UrutaUser;

@Dependent
public class EmailManager {

	/**
	 * Sends an email
	 *
	 * @param subject What refers this email?
	 * @param receiver For whom?
	 * @param message Content of email
	 *
	 * @throws EmailException case of bad connection
	 */
	public void newEmail(String subject, UrutaUser receiver, String message)
			throws EmailException{
		Email email = new SimpleEmail();
		email.setSubject(subject);
		email.addTo(receiver.getEmail());
		email.setMsg(message);
		email.setSSLOnConnect(true);
		email.setHostName("smtp.gmail.com");
		email.setSslSmtpPort("465");
		email.setAuthenticator(new DefaultAuthenticator("phwener@gmail.com", "XXX"));
		email.setFrom("phwener@gmail.com");
		email.send();
	}
}


text:
<?php
/**
 * User: thorsten
 * Date: 18.04.13
 * Time: 14:03
 */

namespace BNRepo\Repository\Adapter;

use Gaufrette\Exception\FileNotFound;
use Gaufrette\Exception\UnexpectedFile;

interface Adapter extends \Gaufrette\Adapter {
	/**
	 * Returns the created time
	 *
	 * @param string $key
	 *
	 * @return integer|boolean An UNIX like timestamp or false
	 */
	public function ctime($key);

	/**
	 * Returns the last accessed time
	 *
	 * @param string $key
	 *
	 * @return integer|boolean An UNIX like timestamp or false
	 */
	public function atime($key);

	/**
	 * Returns an iterator over all keys (files and directories)
	 *
	 * @param null $prefix
	 * @return mixed
	 */
	public function getKeyIterator($prefix = null);

	/**
	 * Returns an array of all keys (files and directories)
	 *
	 * @param null $prefix
	 * @param null $withDirectories show directories?
	 * @return array
	 */
	public function keysWithPrefix($prefix, $withDirectories=false);

	/**
	 * Returns the MimeType of the given Key
	 * @param $key
	 * @return mixed
	 */
	public function getContentType($key);

	/**
	 * Downloads a file to Local
	 *
	 * @param string $sourceKey
	 * @param string $localTargetFile
	 *
	 * @return boolean                  TRUE if the download was successful
	 * @throws FileNotFound   when sourceKey does not exist
	 * @throws UnexpectedFile when targetKey exists
	 * @throws \RuntimeException        when cannot download
	 */
	public function pull($sourceKey, $localTargetFile);

	/**
	 * Uploads a Local file
	 *
	 * @param string $localFile
	 * @param string $targetKey
	 *
	 * @return boolean                  TRUE if the upload was successful
	 * @throws FileNotFound   when sourceKey does not exist
	 * @throws UnexpectedFile when targetKey exists
	 * @throws \RuntimeException        when cannot upload
	 */
	public function push($localFile, $targetKey);

	/**
	 * Appends the given content on the file
	 *
	 * @param string $key
	 * @param string $content
	 *
	 * @return integer|boolean The number of bytes that were written into the file
	 */
	public function append($key, $content);
}


text:
using namespace std;
using namespace cv;
#if CV_MAJOR_VERSION == 2
using namespace cv::gpu;
#define cuda gpu
#elif CV_MAJOR_VERSION == 3
using namespace cv::cuda;
#endif

// Using the input images provided, generate a ZCA transform
// matrix.  Images will be resized to the requested size
// before processing (the math doesn't work if input images
// are variable sized).  epsilon is a small positive value added
// to the magnitude of principal components before taking the
// square root of them - since many of these values are quite
// small the square root of them becomes numerically unstable.
ZCA::ZCA(const vector<Mat> &images,
		 const Size &size,
		 float epsilon) :
	size_(size),
	dPssIn_(NULL),
	epsilon_(epsilon),
	overallMin_(numeric_limits<double>::max()),
	overallMax_(numeric_limits<double>::min())
{
	if (images.size() == 0)
		return;

	// Build the transposed mat since that's the more
	// natural way opencv works - it is easier to add
	// new images as a new row but the math requires
	// them to columns. Since the later steps require
	// both the normal and transposed versions of the
	// data, generate the transpose and then "untranspose"
	// it to get the correct one
	Mat workingMatT;

	// For each input image, convert to a floating point mat
	//  and resize to constant size
	// Find the mean and stddev of each color channel. Subtract
	// out the mean and divide by stddev to get to 0-mean
	// 1-stddev for each channel of the image - this
	// helps normalize contrast between
	// images in different lighting conditions
	// flatten to a single channel, 1 row matrix
	Mat resizeImg;
	Mat tmpImg;
	Scalar mean;
	Scalar stddev;
	for (auto it = images.cbegin(); it != images.cend(); ++it)
	{
		it->convertTo(resizeImg, CV_32FC3);
		cv::resize(resizeImg, tmpImg, size_);
		cv::meanStdDev(tmpImg, mean, stddev);
		cv::subtract(tmpImg, mean, tmpImg);
		cv::divide(tmpImg, stddev, tmpImg);
		workingMatT.push_back(tmpImg.reshape(1,1).clone());
	}

	// Transpose so each image is its own column
	// rather than its own row
	Mat workingMat(workingMatT.t());

	// sigma is the covariance matrix of the
	// input data
	// Literature disagrees on dividing by cols or cols-1
	// Since we're using a large number of input
	// images it really doesn't matter that much
	Mat sigma = (workingMat * workingMatT) / (float)workingMat.cols;

	workingMatT.release();

	// Put this in a local scope so svd gets freed
	// after it isn't needed.
	{
		SVD svd;
		//Mat svdW; // eigenValues - magnitude of each principal component
		//Mat svdU; // eigenVectors - where each pricipal component points
		Mat svdVT;
		svd.compute(sigma, svdW_, svdU_, svdVT, SVD::FULL_UV);
	}

	//cout << "svdU" << endl << svdU_ << endl;
	//cout << "svdW" << endl << svdW_ << endl;

	// Add small epsilon to prevent sqrt(small number)
	// numerical instability. Larger epsilons have a
	// bigger smoothing effect
	// Take square root of each element, convert
	// from vector into diagonal array
	// Do the math on a local copy of svdW - save the original
	// in case we later want to re-do the calc using a differen
	// epsilon or whatever
	Mat svdW(svdW_.clone());
	svdW += epsilon_;
	cv::sqrt(svdW, svdW);
	svdW = 1.0 / svdW;
	Mat svdS(Mat::diag(svdW));

	// Weights are U * S * U'
	Mat weights = svdU_ * svdS * svdU_.t();

	// Transform the input images. Grab
	// a range of pixel values and use this
	// to convert back from floating point to
	// something in the range of 0-255
	// Don't want to use the full range of the
	// pixels since outliers will squash the range
	// most pixels end up in to just a few numbers.
	// Instead use the mean +/- 2.25 std deviations
	// This should allow full range representation of
	// > 96% of the pixels
	Mat transformedImgs = weights * workingMat;
	cv::meanStdDev(transformedImgs, mean, stddev);
	cout << "transformedImgs mean/stddev " << mean(0) << " " << stddev(0) << endl;
	overallMax_ = mean(0) + 2.25*stddev(0);
	overallMin_ = mean(0) - 2.25*stddev(0);

	// Formula to convert is uchar_val = alpha * float_val + beta
	// This will convert the majority of floating
	// point values into a 0-255 range that fits
	// into a normal 8UC3 mat without saturating
	cout << "Alpha / beta " << alpha() << " "<< beta() << endl;

	weightsT_ = weights.t();
	if (getCudaEnabledDeviceCount() > 0)
		weightsTGPU_.upload(weightsT_);
}

// Transform a typical 8 bit image as read from file
// Return the same 8UC3 type
// Just a wrapper around the faster version
// which does a batch at a time. Why aren't
// you using that one instead?
Mat ZCA::Transform8UC3(const Mat &input)
{
	vector<Mat> inputs;
	inputs.push_back(input);
	vector<Mat> outputs = Transform8UC3(inputs);
	return outputs[0].clone();
}

// Transform a typical 8 bit images as read from files
// Return the same 8UC3 type
vector<Mat> ZCA::Transform8UC3(const vector<Mat> &input)
{
	// If GPU is present do the transform
	// on the GPU
	if (getCudaEnabledDeviceCount() > 0)
	{
		GpuMat tmp;
		vector<GpuMat> f32List;
		for (auto it = input.cbegin(); it != input.cend(); ++it)
		{
			// Upload to GpuMat, convert to float array
			GpuMat(*it).convertTo(tmp, CV_32FC3);
			f32List.push_back(tmp.clone());
		}

		// Create result array in GPU memory
		float *dResult;
		const size_t resultSize = gm_.rows      *   // # of images per batch
								  size_.area()  *   // pixels / image channel
								  sizeof(float) *   // bytes / pixel
							  	  3;                // channels
		cudaSafeCall(cudaMalloc(&dResult, resultSize), "Transform8UC3 cudaMalloc");
		// Do the transform
		Transform32FC3(f32List, dResult);

		// Create space for results on CPU and copy
		// data from device into it
		float hResult[resultSize / sizeof(float)];
		cudaSafeCall(cudaMemcpy(hResult, dResult, resultSize, cudaMemcpyDeviceToHost),
				     "Transform8UC3 cudaMemcpy");

		// Free device memory
		cudaSafeCall(cudaFree(dResult), "Transform8UC3 cudaFree");

		// Output is in order expected by Caffe code -
		// each channel is contiguous.  3-channel images
		// are expected to have color channels interleaved
		// Rearrange things here :
		float *hPtr = hResult;

		Mat ml[3];  // separate channels
		Mat mF32;   // 3-channel float mat
		Mat mU8;    // 3-channel uint8 mat
		vector <Mat> result;
		for (size_t i = 0; i < f32List.size(); i++)
		{
			// Create a Mat wrapping the data from
			// each channel.  Then update the pointer to
			// move one image channel ahead (width * height
			// pixels) to get to the start of the
			// next color channel
			for (size_t j = 0; j < 3; j++)
			{
				ml[j] = Mat(size_, CV_32FC1, hPtr);
				hPtr += size_.area();
			}
			// Merge into a 3-channel mat
			merge(ml, 3, mF32);

			// See comment below about the need for
			// alpha and beta adjustments
			mF32.convertTo(mU8, CV_8UC3, alpha(), beta());
			result.push_back(mU8.clone());
		}
		return result;
	}

	// Non GPU-code
	vector<Mat> f32List;
	Mat tmp;

	// Create an intermediate vector of f32 versions
	// of the input image.
	for (auto it = input.cbegin(); it != input.cend(); ++it)
	{
		it->convertTo(tmp, CV_32FC3);
		f32List.push_back(tmp.clone());
	}
	// Do the transform
	vector <Mat> f32Ret = Transform32FC3(f32List);

	// Convert back to uchar array with correct 0 - 255 range
	// This turns it into a "normal" image file which
	// can be processed and visualized using typical
	// tools
	// The float version will have values in a range which
	// can't be exactly represented by the uchar version
	// (e.g. negative numbers, numbers larger than 255, etc).
	// Scaling by alpha/beta will shift the range of
	// float values to 0-255 (techinally, it'll move ~96%
	// of the value into that range, the rest will be saturated
	// to 0 or 255).  When training using these ucar images,
	// be sure to undo the scaling so they are converted back
	// to the correct float values
	vector <Mat> ret;
	for (auto it = f32Ret.cbegin(); it != f32Ret.cend(); ++it)
	{
		it->convertTo(tmp, CV_8UC3, alpha(), beta());
		ret.push_back(tmp.clone());
	}

	return ret;
}

// Expects a 32FC3 mat as input
// Just a wrapper around the faster version
// which does a batch at a time. Why aren't
// you using that one instead?
Mat ZCA::Transform32FC3(const Mat &input)
{
	vector<Mat> inputs;
	inputs.push_back(input);
	vector<Mat> outputs = Transform32FC3(inputs);
	return outputs[0].clone();
}

// Transform a vector of input images in floating
// point format using the weights loaded
// when this object was initialized
vector<Mat> ZCA::Transform32FC3(const vector<Mat> &input)
{
	Mat output;
	Mat work;
	// Create a large mat holding all of the pixels
	// from all of the input images.
	// Each row is data from one image. Each image
	// is flattened to 1 channel of interlaved B,G,R
	// values.
	// Global contrast normalization is applied to
	// each image - subtract the mean and divide
	// by the standard deviation separately for each
	// channel. That way each image is normalized to 0-mean
	// and a standard deviation of 1 before running it
	// through ZCA weights.
	for (auto it = input.cbegin(); it != input.cend(); ++it)
	{
		if (it->size() != size_)
			cv::resize(*it, output, size_);
		else
			// need clone so mat is contiguous -
			// reshape won't work otherwise
			output = it->clone();

		Scalar mean;
		Scalar stddev;
		cv::meanStdDev(output, mean, stddev);

		for (int r = 0; r < output.rows; r++)
		{
			Vec3f *p = output.ptr<Vec3f>(r);
			for (int c = 0; c < output.cols; c++)
				for (int ch = 0; ch < 3; ch++)
					p[c][ch] = (p[c][ch] - mean[ch]) / stddev[ch];
		}

		// Reshape flattens the image to 1 channel, 1 row.
		// Push that row into the bottom of work
		work.push_back(output.reshape(1,1));
	}

	// Apply ZCA transform matrix
	// Math here is weights * images = output images
	// This works if each image is a column of data
	// The natural way to add data above using push_back
	//  creates a transpose of that instead (i.e. each image is its
	//  own row rather than its own column).  Take advantage
	//  of the identiy (AB)^T = B^T A^T.  A=weights, B=images
	// Since we want to pull images apart in the same transposed
	// order, this saves a few transposes and gives a
	// slight performance bump.
#ifdef USE_MKL // Intel MKL libs speed up matrix math on Intel CPUs
	const size_t m = work.rows;
	const size_t n = weightsT_.rows;
	const size_t k = weightsT_.cols;

	output = Mat(work.rows, work.cols, CV_32FC1);
	cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,
			m, n, k, 1.0, (const float *)work.data, k, (const float *)weightsT_.data, n, 0.0, (float *)output.data, n);
#else
	cv::gemm(work, weightsT_, 1.0, Mat(), 0.0, output);
#endif

	// Matrix comes out transposed - instead
	// of an image per column it is an image per row.
	// That's a natural fit for taking them apart
	// back into images, though, so it save some time
	// not having to transpose the output

	// Each row is a different input image,
	// put them each into their own Mat
	vector<Mat> ret;
	for (int i = 0; i < output.rows; i++)
	{
		// Turn each row back into a 2-d mat with 3 float color channels
		ret.push_back(output.row(i).reshape(input[i].channels(), size_.height));
	}

	return ret;
}

void cudaZCATransform(const vector<GpuMat> &input,
		const GpuMat &weightsT,
		PtrStepSz<float> *dPssIn,
		GpuMat &gm,
		GpuMat &gmOut,
		float *output);

#if CV_MAJOR_VERSION == 3
#include <opencv2/cudawarping.hpp>
#endif
// Transform a vector of input images in floating
// point format using the weights loaded
// when this object was initialized
void ZCA::Transform32FC3(const vector<GpuMat> &input, float *dest)
{
	vector<GpuMat> foo;
	for (auto it = input.cbegin(); it != input.cend(); ++it)
	{
		if (it->size() != size_)
		{
			foo.push_back(GpuMat());
			cuda::resize(*it, foo[foo.size() - 1], size_);
		}
		else
		{
			foo.push_back(*it);
		}
	}
	cudaZCATransform(foo, weightsTGPU_, dPssIn_, gm_, gmOut_, dest);
}

// Load a previously calcuated set of weights from file
ZCA::ZCA(const string &fileName, size_t batchSize) :
	dPssIn_(NULL)
{
	string ext = boost::filesystem::extension(fileName);
	if (getCudaEnabledDeviceCount() > 0)
		setDevice(0);
	// .zca files are a binary, compressed version of the
	// weights.  Load these if they exist since it is
	// quicker than loading the test-based XML file below
	if ((ext == ".zca") || (ext == ".ZCA"))
	{
		using namespace boost::iostreams;

		ifstream serializeIn(fileName, ios::in | ios::binary);
		if (!serializeIn.good())
		{
			cerr << "Could not open ifstream(" << fileName << ") for reading" << endl;
			return;
		}

		filtering_streambuf<input> filtSBIn;
		filtSBIn.push(zlib_decompressor());
		filtSBIn.push(serializeIn);
		portable_binary_iarchive portableArchiveIn(filtSBIn);
		portableArchiveIn >> *this;
	}
	else if ((ext == ".xml") || (ext == ".XML"))
	{
		try
		{
			FileStorage fs(fileName, FileStorage::READ);
			if (fs.isOpened())
			{
				fs["ZCASize"] >> size_;
				fs["SVDU"] >> svdU_;
				fs["SVDW"] >> svdW_;
				Mat weights;
				fs["ZCAWeights"] >> weights;

				weightsT_ = weights.t();
				if (!weightsT_.empty() && (getCudaEnabledDeviceCount() > 0))
					weightsTGPU_.upload(weightsT_);

				fs["ZCAEpsilon"] >> epsilon_;
				fs["OverallMin"] >> overallMin_;
				fs["OverallMax"] >> overallMax_;
			}
			fs.release();
		}
		catch (const std::exception &e)
		{
			return;
		}
	}

	if (!weightsTGPU_.empty())
	{
		cudaSafeCall(cudaMalloc(&dPssIn_, batchSize * sizeof(PtrStepSz<float>)), "cudaMalloc dPssIn");
		gm_ = GpuMat(batchSize, size_.area() * 3, CV_32FC1);
		gmOut_ = GpuMat(gm_.size(), gm_.type());
	}
}

ZCA::ZCA(const ZCA &zca) :
	size_(zca.size_),
	svdU_(zca.svdU_),
	svdW_(zca.svdW_),
	weightsT_(zca.weightsT_),
	dPssIn_(NULL),
	epsilon_(zca.epsilon_),
	overallMin_(zca.overallMin_),
	overallMax_(zca.overallMax_)
{
	if (!weightsT_.empty() && (getCudaEnabledDeviceCount() > 0))
	{
		size_t batchSize = zca.gm_.rows;
		weightsTGPU_.upload(weightsT_);
		cudaSafeCall(cudaMalloc(&dPssIn_, batchSize * sizeof(PtrStepSz<float>)), "cudaMalloc dPssIn");
		gm_ = zca.gm_.clone();
		gmOut_ = zca.gm_.clone();
	}
}

ZCA &ZCA::operator=(const ZCA &zca)
{
	if (this != &zca)
	{
		size_ = zca.size_;
		svdU_ = zca.svdU_;
		svdW_ = zca.svdW_;
		weightsT_ = zca.weightsT_;
		if (dPssIn_)
		{
			cudaSafeCall(cudaFree(dPssIn_), "cudaFreedPssIn");
			dPssIn_ = NULL;
		}
		epsilon_ = zca.epsilon_;
		overallMin_ = zca.overallMin_;
		overallMax_ = zca.overallMax_;
		if (!weightsT_.empty() && (getCudaEnabledDeviceCount() > 0))
		{
			size_t batchSize = zca.gm_.rows;
			weightsTGPU_.upload(weightsT_);
			cudaSafeCall(cudaMalloc(&dPssIn_, batchSize * sizeof(PtrStepSz<float>)), "cudaMalloc dPssIn");
			gm_ = zca.gm_.clone();
			gmOut_ = zca.gm_.clone();
		}
	}
	return *this;
}

ZCA::~ZCA()
{
	if (dPssIn_)
		cudaSafeCall(cudaFree(dPssIn_), "cudaFree dPssIn");
}

// Remove the ZCA weights / eigenvectors with
// the lowest weights
void ZCA::Resize(int size)
{
	Mat weights(weightsT_.clone());

	Mat svdW(svdW_(Rect(0,0,1,size)).clone());
	cout << "svdW_" << svdW_.size() << endl;
	cout << "svdW" << svdW.size() << endl;
	svdW += epsilon_;
	cv::sqrt(svdW, svdW);
	svdW = 1.0 / svdW;
	Mat svdS(Mat::diag(svdW));
	cout << "svdS" << svdS.size() << endl;

	cout << "svdU_" << svdU_.size() << endl;
	Mat svdU(svdU_(Rect(0,0,size,svdU_.rows)).clone());
	cout << "svdU" << svdU.size() << endl;

	// Weights are U * S * U'
	weights = svdU * svdS * svdU.t();
	weightsT_ = weights.t();
	if (getCudaEnabledDeviceCount() > 0)
		weightsTGPU_.upload(weightsT_);
}

// Save calculated weights to a human-readble XML file
void ZCA::Write(const string &fileName) const
{
	FileStorage fs(fileName, FileStorage::WRITE);
	fs << "ZCASize" << size_;
	fs << "SVDU" << svdU_;
	fs << "SVDW" << svdW_;
	fs << "ZCAWeights" << weightsT_.t();
	fs << "ZCAEpsilon" << epsilon_;
	fs << "OverallMin" << overallMin_;
	fs << "OverallMax" << overallMax_;
}

//Serialization support for ZCA class
template <class Archive>
void ZCA::save(Archive &ar, const unsigned int version) const
{
	(void)version;
	ar & size_;
	ar & svdU_;
	ar & svdW_;
	Mat weights(weightsT_.t());
	ar & weights;
	ar & epsilon_;
	ar & overallMax_;
	ar & overallMin_;
}

template <class Archive>
void ZCA::load(Archive &ar, const unsigned int version)
{
	(void)version;
	ar & size_;
	ar & svdU_;
	ar & svdW_;
	Mat weights;
	ar & weights;
	weightsT_ = weights.t();
	if (!weightsT_.empty() && (getCudaEnabledDeviceCount() > 0))
		weightsTGPU_.upload(weightsT_);
	ar & epsilon_;
	ar & overallMax_;
	ar & overallMin_;
}

// Save calculated weights to a compressed binary file
void ZCA::WriteCompressed(const string &fileName) const
{
	using namespace boost::iostreams;

	ofstream serializeOut(fileName, ios::out | ios::binary);
	if (!serializeOut.is_open())
	{
		cerr << "Could not open ofstream(" << fileName << ") for writing" << endl;
		return;
	}

	// Create a pipeline which takes a stream and compresses
	// it before writing it out to a file
	filtering_streambuf<output> filtSBOut;

	filtSBOut.push(zlib_compressor(zlib::best_speed));
	filtSBOut.push(serializeOut);

	// Create an output archive which writes to the previously
	// created output chain (zlib->output file path)
	portable_binary_oarchive archiveOut(filtSBOut);
	archiveOut << *this;
}

void ZCA::Print(void) const
{
	Mat weights(weightsT_.t());

	for (int r = 0; r < weights.rows; r++)
	{
		const float *ptr = weights.ptr<float>(r);
		for (int c = 0; c < weights.cols; c++)
			cout << *ptr++ << " ";
		cout << endl;
	}
}

// Generate constants to convert from float
// mat back to 8UC3 one.
double ZCA::alpha(int maxPixelValue) const
{
	double range = overallMax_ - overallMin_;

	return maxPixelValue / range;
}
double ZCA::beta(void) const
{
	return -overallMin_ * alpha();
}

Size ZCA::size(void) const
{
	return size_;
}


text:
package com.linkedin.pinot.transport.common;

/**
 * Determines at what level the selection for nodes (replica) has to happen
 */
public enum ReplicaSelectionGranularity {
  /**
   * For each segmentId in the request, the replica-selection policy is applied to get the node.
   * If the selection policy is random or round-robin, then this granularity would likely increase
   * the fan-out of the scatter request since there is a greater chance all replicas will be queried
   **/
  SEGMENT_ID,
  /**
   * For each segmentId-group in the request, the replica-selection policy is applied to get the node.
   * This will likely reduce the fan-out as all segmentIds in the segmentId group goes to the same service.
   * This is assuming the services hosting each segmentId-groups are disjoint.
   **/
  SEGMENT_ID_SET
}