text:
package org.hisp.dhis.analytics.util;

import static org.hisp.dhis.analytics.DataQueryParams.VALUE_HEADER_NAME;
import static org.hisp.dhis.analytics.DataQueryParams.VALUE_ID;
import static org.hisp.dhis.common.DimensionalObject.DATA_X_DIM_ID;
import static org.hisp.dhis.common.DimensionalObject.DIMENSION_SEP;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.hisp.dhis.DhisConvenienceTest;
import org.hisp.dhis.analytics.ColumnDataType;
import org.hisp.dhis.analytics.DataQueryParams;
import org.hisp.dhis.category.Category;
import org.hisp.dhis.category.CategoryCombo;
import org.hisp.dhis.category.CategoryOptionCombo;
import org.hisp.dhis.common.BaseDimensionalObject;
import org.hisp.dhis.common.CodeGenerator;
import org.hisp.dhis.common.DataDimensionItemType;
import org.hisp.dhis.common.DimensionItemType;
import org.hisp.dhis.common.DimensionType;
import org.hisp.dhis.common.DimensionalItemObject;
import org.hisp.dhis.common.DimensionalObject;
import org.hisp.dhis.common.DimensionalObjectUtils;
import org.hisp.dhis.common.DisplayProperty;
import org.hisp.dhis.common.Grid;
import org.hisp.dhis.common.GridHeader;
import org.hisp.dhis.common.ValueType;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementOperand;
import org.hisp.dhis.dataelement.DataElementOperand.TotalType;
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.dxf2.datavalueset.DataValueSet;
import org.hisp.dhis.indicator.Indicator;
import org.hisp.dhis.indicator.IndicatorType;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.period.DailyPeriodType;
import org.hisp.dhis.period.FinancialAprilPeriodType;
import org.hisp.dhis.period.FinancialJulyPeriodType;
import org.hisp.dhis.period.FinancialNovemberPeriodType;
import org.hisp.dhis.period.FinancialOctoberPeriodType;
import org.hisp.dhis.period.Period;
import org.hisp.dhis.period.PeriodType;
import org.hisp.dhis.program.Program;
import org.hisp.dhis.program.ProgramDataElementDimensionItem;
import org.hisp.dhis.program.ProgramIndicator;
import org.hisp.dhis.system.grid.ListGrid;
import org.junit.jupiter.api.Test;

import com.google.common.collect.Lists;

/**
 * @author Lars Helge Overland
 */
class AnalyticsUtilsTest extends DhisConvenienceTest
{

    @Test
    void testGetByDataDimensionType()
    {
        Program prA = createProgram( 'A' );
        DataElement deA = createDataElement( 'A', new CategoryCombo() );
        DataElement deB = createDataElement( 'B', new CategoryCombo() );
        ProgramDataElementDimensionItem pdeA = new ProgramDataElementDimensionItem( prA, deA );
        ProgramDataElementDimensionItem pdeB = new ProgramDataElementDimensionItem( prA, deB );
        ProgramIndicator piA = createProgramIndicator( 'A', prA, null, null );
        List<DimensionalItemObject> list = Lists.newArrayList( deA, deB, pdeA, pdeB, piA );
        assertEquals( Lists.newArrayList( deA, deB ),
            AnalyticsUtils.getByDataDimensionItemType( DataDimensionItemType.DATA_ELEMENT, list ) );
        assertEquals( Lists.newArrayList( pdeA, pdeB ),
            AnalyticsUtils.getByDataDimensionItemType( DataDimensionItemType.PROGRAM_DATA_ELEMENT, list ) );
        assertEquals( Lists.newArrayList( piA ),
            AnalyticsUtils.getByDataDimensionItemType( DataDimensionItemType.PROGRAM_INDICATOR, list ) );
        assertEquals( Lists.newArrayList(),
            AnalyticsUtils.getByDataDimensionItemType( DataDimensionItemType.PROGRAM_ATTRIBUTE, list ) );
    }

    @Test
    void testConvertDxToOperandCocOnly()
    {
        Map<String, Double> map = new HashMap<>();
        map.put( "GauDLAiXPKT-kC1OT9Q1n1j-R9U8q7X1aJG", 10d );
        map.put( "YkRvCLedQa4-h1dJ9W4dWor-Zrd4DAf8M99", 11d );
        map.put( "PcfRp1HETO8-zqXKIEycBck-KBJBZopYMPV", 12d );
        Map<String, Double> convertedMap = AnalyticsUtils.convertDxToOperand( map, TotalType.COC_ONLY );
        assertTrue( convertedMap.containsKey( "GauDLAiXPKT.kC1OT9Q1n1j-R9U8q7X1aJG" ) );
        assertTrue( convertedMap.containsKey( "YkRvCLedQa4.h1dJ9W4dWor-Zrd4DAf8M99" ) );
        assertTrue( convertedMap.containsKey( "PcfRp1HETO8.zqXKIEycBck-KBJBZopYMPV" ) );
    }

    @Test
    void testConvertDxToOperandCocOnlyNoDmensions()
    {
        Map<String, Double> map = new HashMap<>();
        map.put( "GauDLAiXPKT-kC1OT9Q1n1j", 10d );
        map.put( "YkRvCLedQa4-h1dJ9W4dWor", 11d );
        map.put( "PcfRp1HETO8-zqXKIEycBck", 12d );
        Map<String, Double> convertedMap = AnalyticsUtils.convertDxToOperand( map, TotalType.COC_ONLY );
        assertTrue( convertedMap.containsKey( "GauDLAiXPKT.kC1OT9Q1n1j" ) );
        assertTrue( convertedMap.containsKey( "YkRvCLedQa4.h1dJ9W4dWor" ) );
        assertTrue( convertedMap.containsKey( "PcfRp1HETO8.zqXKIEycBck" ) );
    }

    @Test
    void testConvertDxToOperandAocOnly()
    {
        Map<String, Double> map = new HashMap<>();
        map.put( "GauDLAiXPKT-kC1OT9Q1n1j-2016", 10d );
        map.put( "YkRvCLedQa4-h1dJ9W4dWor-2017", 11d );
        map.put( "w1G4l0cSxOi-gQhAMdimKO4-2017", 12d );
        Map<String, Double> convertedMap = AnalyticsUtils.convertDxToOperand( map, TotalType.AOC_ONLY );
        assertTrue( convertedMap.containsKey( "GauDLAiXPKT.*.kC1OT9Q1n1j-2016" ) );
        assertTrue( convertedMap.containsKey( "YkRvCLedQa4.*.h1dJ9W4dWor-2017" ) );
        assertTrue( convertedMap.containsKey( "w1G4l0cSxOi.*.gQhAMdimKO4-2017" ) );
    }

    @Test
    void testConvertDxToOperandCocAndAoc()
    {
        Map<String, Double> map = new HashMap<>();
        map.put( "GauDLAiXPKT-kC1OT9Q1n1j-R9U8q7X1aJG-201701", 10d );
        map.put( "YkRvCLedQa4-h1dJ9W4dWor-Zrd4DAf8M99-201702", 11d );
        map.put( "PcfRp1HETO8-zqXKIEycBck-KBJBZopYMPV-201703", 12d );
        Map<String, Double> convertedMap = AnalyticsUtils.convertDxToOperand( map, TotalType.COC_AND_AOC );
        assertTrue( convertedMap.containsKey( "GauDLAiXPKT.kC1OT9Q1n1j.R9U8q7X1aJG-201701" ) );
        assertTrue( convertedMap.containsKey( "YkRvCLedQa4.h1dJ9W4dWor.Zrd4DAf8M99-201702" ) );
        assertTrue( convertedMap.containsKey( "PcfRp1HETO8.zqXKIEycBck.KBJBZopYMPV-201703" ) );
    }

    @Test
    void testConvertDxToOperandNone()
    {
        Map<String, Double> map = new HashMap<>();
        map.put( "GauDLAiXPKT-kC1OT9Q1n1j-R9U8q7X1aJG", 10d );
        map.put( "YkRvCLedQa4-h1dJ9W4dWor-Zrd4DAf8M99", 11d );
        map.put( "PcfRp1HETO8-zqXKIEycBck-KBJBZopYMPV", 12d );
        Map<String, Double> convertedMap = AnalyticsUtils.convertDxToOperand( map, TotalType.NONE );
        assertTrue( convertedMap.containsKey( "GauDLAiXPKT-kC1OT9Q1n1j-R9U8q7X1aJG" ) );
        assertTrue( convertedMap.containsKey( "YkRvCLedQa4-h1dJ9W4dWor-Zrd4DAf8M99" ) );
        assertTrue( convertedMap.containsKey( "PcfRp1HETO8-zqXKIEycBck-KBJBZopYMPV" ) );
    }

    @Test
    void testGetRoundedValueObject()
    {
        DataQueryParams paramsA = DataQueryParams.newBuilder().build();
        DataQueryParams paramsB = DataQueryParams.newBuilder().withSkipRounding( true ).build();
        assertEquals( null, AnalyticsUtils.getRoundedValueObject( paramsA, null ) );
        assertEquals( "Car", AnalyticsUtils.getRoundedValueObject( paramsA, "Car" ) );
        assertEquals( 3d, AnalyticsUtils.getRoundedValueObject( paramsA, 3d ) );
        assertEquals( (Double) AnalyticsUtils.getRoundedValueObject( paramsA, 3.123 ), 0.01, 3.1 );
        assertEquals( (Double) AnalyticsUtils.getRoundedValueObject( paramsB, 3.123 ), 0.01, 3.123 );
    }

    @Test
    void testGetRoundedValueDouble()
    {
        DataQueryParams paramsA = DataQueryParams.newBuilder().build();
        DataQueryParams paramsB = DataQueryParams.newBuilder().withSkipRounding( true ).build();
        assertEquals( null, AnalyticsUtils.getRoundedValue( paramsA, null, null ) );
        assertEquals( AnalyticsUtils.getRoundedValue( paramsA, null, 3d ).doubleValue(), 0.01, 3d );
        assertEquals( AnalyticsUtils.getRoundedValue( paramsA, null, 3.123 ).doubleValue(), 0.01, 3.1 );
        assertEquals( AnalyticsUtils.getRoundedValue( paramsA, 1, 3.123 ).doubleValue(), 0.01, 3.1 );
        assertEquals( AnalyticsUtils.getRoundedValue( paramsA, 2, 3.123 ).doubleValue(), 0.01, 3.12 );
        assertEquals( AnalyticsUtils.getRoundedValue( paramsB, 3, 3.123 ).doubleValue(), 0.01, 3.123 );
        assertEquals( 3l, AnalyticsUtils.getRoundedValue( paramsB, 0, 3.123 ).longValue() );
        assertEquals( 12l, AnalyticsUtils.getRoundedValue( paramsB, 0, 12.34 ).longValue() );
        assertEquals( 13l, AnalyticsUtils.getRoundedValue( paramsB, 0, 13.999 ).longValue() );
    }

    @Test
    void testGetAggregatedDataValueMapping()
    {
        Grid grid = new ListGrid();
        grid.addRow();
        grid.addValue( "de1" );
        grid.addValue( "ou2" );
        grid.addValue( "pe1" );
        grid.addValue( 3 );
        grid.addRow();
        grid.addValue( "de2" );
        grid.addValue( "ou3" );
        grid.addValue( "pe2" );
        grid.addValue( 5 );
        Map<String, Object> map = AnalyticsUtils.getAggregatedDataValueMapping( grid );
        assertEquals( 3, map.get( "de1" + DIMENSION_SEP + "ou2" + DIMENSION_SEP + "pe1" ) );
        assertEquals( 5, map.get( "de2" + DIMENSION_SEP + "ou3" + DIMENSION_SEP + "pe2" ) );
    }

    @Test
    void testGetDimensionalItemObjectMap()
    {
        DataElement deA = createDataElement( 'A' );
        Indicator inA = createIndicator( 'A', null );
        DataSet dsA = createDataSet( 'A' );
        DimensionalObject dx = new BaseDimensionalObject( DimensionalObject.DATA_X_DIM_ID, DimensionType.DATA_X,
            DimensionalObjectUtils.getList( deA, inA, dsA ) );
        DataQueryParams params = DataQueryParams.newBuilder().addDimension( dx )
            .withDisplayProperty( DisplayProperty.NAME ).build();
        Map<String, DimensionalItemObject> map = AnalyticsUtils.getDimensionalItemObjectMap( params );
        assertEquals( map.get( deA.getDimensionItem() ), deA );
        assertEquals( map.get( inA.getDimensionItem() ), inA );
        assertEquals( map.get( dsA.getDimensionItem() ), dsA );
    }

    @Test
    void testGetDimensionItemNameMap()
    {
        DataElement deA = createDataElement( 'A' );
        Indicator inA = createIndicator( 'A', null );
        DataSet dsA = createDataSet( 'A' );
        OrganisationUnit ouA = createOrganisationUnit( 'A' );
        OrganisationUnit ouB = createOrganisationUnit( 'B' );
        DimensionalObject dx = new BaseDimensionalObject( DimensionalObject.DATA_X_DIM_ID, DimensionType.DATA_X,
            DimensionalObjectUtils.getList( deA, inA, dsA ) );
        DimensionalObject ou = new BaseDimensionalObject( DimensionalObject.ORGUNIT_DIM_ID,
            DimensionType.ORGANISATION_UNIT, Lists.newArrayList( ouA, ouB ) );
        DataQueryParams params = DataQueryParams.newBuilder().addDimension( dx ).addDimension( ou )
            .withDisplayProperty( DisplayProperty.NAME ).build();
        Map<String, String> map = AnalyticsUtils.getDimensionItemNameMap( params );
        assertEquals( map.get( deA.getDimensionItem() ), deA.getDisplayName() );
        assertEquals( map.get( inA.getDimensionItem() ), inA.getDisplayName() );
        assertEquals( map.get( dsA.getDimensionItem() ), dsA.getDisplayName() );
        assertEquals( map.get( ouA.getDimensionItem() ), ouA.getDisplayName() );
        assertEquals( map.get( ouB.getDimensionItem() ), ouB.getDisplayName() );
    }

    @Test
    void testGetCocNameMap()
    {
        CategoryCombo ccA = createCategoryCombo( 'A', new Category[0] );
        CategoryCombo ccB = createCategoryCombo( 'B', new Category[0] );
        CategoryOptionCombo cocA = createCategoryOptionCombo( 'A' );
        CategoryOptionCombo cocB = createCategoryOptionCombo( 'B' );
        ccA.getOptionCombos().add( cocA );
        ccB.getOptionCombos().add( cocB );
        DataElement deA = createDataElement( 'A' );
        DataElement deB = createDataElement( 'B' );
        deA.setCategoryCombo( ccA );
        deB.setCategoryCombo( ccB );
        DimensionalObject dx = new BaseDimensionalObject( DimensionalObject.DATA_X_DIM_ID, DimensionType.DATA_X,
            Lists.newArrayList( deA, deB ) );
        DataQueryParams params = DataQueryParams.newBuilder().addDimension( dx )
            .withDisplayProperty( DisplayProperty.NAME ).build();
        Map<String, String> map = AnalyticsUtils.getCocNameMap( params );
        assertEquals( map.get( cocA.getUid() ), cocA.getName() );
        assertEquals( map.get( cocB.getUid() ), cocB.getName() );
    }

    @Test
    void testHandleGridForDataValueSetEmpty()
    {
        Grid grid = new ListGrid();
        DataQueryParams params = DataQueryParams.newBuilder()
            .addDimension( new BaseDimensionalObject( DATA_X_DIM_ID, DimensionType.DATA_X, Lists.newArrayList() ) )
            .build();
        grid.addHeader( new GridHeader( DimensionalObject.DATA_X_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.ORGUNIT_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.PERIOD_DIM_ID ) );
        grid.addHeader( new GridHeader( VALUE_ID, VALUE_HEADER_NAME, ValueType.NUMBER, false, false ) );
        assertEquals( 4, grid.getHeaders().size() );
        assertEquals( 0, grid.getWidth() );
        assertEquals( 0, grid.getHeight() );
        AnalyticsUtils.handleGridForDataValueSet( params, grid );
        assertEquals( 6, grid.getHeaders().size() );
        assertEquals( 0, grid.getWidth() );
        assertEquals( 0, grid.getHeight() );
    }

    @Test
    void testHandleGridForDataValueSet()
    {
        IndicatorType itA = new IndicatorType();
        CategoryOptionCombo ocA = createCategoryOptionCombo( 'A' );
        ocA.setUid( "ceabcdefghA" );
        DataElement dxA = createDataElement( 'A' );
        dxA.setUid( "deabcdefghA" );
        dxA.setValueType( ValueType.INTEGER );
        DataElement dxB = createDataElement( 'B' );
        dxB.setUid( "deabcdefghB" );
        dxB.setValueType( ValueType.NUMBER );
        Indicator dxC = createIndicator( 'C', itA );
        dxC.setUid( "deabcdefghC" );
        dxC.setDecimals( 0 );
        dxC.setAggregateExportAttributeOptionCombo( "ceabcdefghA" );
        Indicator dxD = createIndicator( 'D', itA );
        dxD.setUid( "deabcdefghD" );
        dxD.setDecimals( 2 );
        dxD.setAggregateExportCategoryOptionCombo( "ceabcdefghB" );
        DataElementOperand dxE = new DataElementOperand( dxA, ocA );
        DataElementOperand dxF = new DataElementOperand( dxB, ocA );
        DataQueryParams params = DataQueryParams.newBuilder().addDimension( new BaseDimensionalObject( DATA_X_DIM_ID,
            DimensionType.DATA_X, Lists.newArrayList( dxA, dxB, dxC, dxD, dxE, dxF ) ) ).build();
        Grid grid = new ListGrid();
        grid.addHeader( new GridHeader( DimensionalObject.DATA_X_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.ORGUNIT_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.PERIOD_DIM_ID ) );
        grid.addHeader( new GridHeader( VALUE_ID, VALUE_HEADER_NAME, ValueType.NUMBER, false, false ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "deabcdefghA", "ouA", "peA", 1d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "deabcdefghB", "ouA", "peA", 2d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "deabcdefghC", "ouA", "peA", 3d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "deabcdefghD", "ouA", "peA", 4d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "deabcdefghA.ceabcdefghA", "ouA", "peA", 5d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "deabcdefghB.ceabcdefghA", "ouA", "peA", 6d ) );
        assertEquals( 4, grid.getWidth() );
        assertEquals( 6, grid.getHeight() );
        AnalyticsUtils.handleGridForDataValueSet( params, grid );
        assertEquals( 6, grid.getWidth() );
        assertEquals( 6, grid.getHeight() );
        assertEquals( "deabcdefghA", grid.getRow( 0 ).get( 0 ) );
        assertNull( grid.getRow( 0 ).get( 3 ) );
        assertNull( grid.getRow( 0 ).get( 4 ) );
        assertEquals( 1, grid.getRow( 0 ).get( 5 ) );
        assertEquals( "deabcdefghB", grid.getRow( 1 ).get( 0 ) );
        assertNull( grid.getRow( 1 ).get( 3 ) );
        assertNull( grid.getRow( 1 ).get( 4 ) );
        assertEquals( (Double) grid.getRow( 1 ).get( 5 ), 0.01, 2d );
        assertEquals( "deabcdefghC", grid.getRow( 2 ).get( 0 ) );
        assertNull( grid.getRow( 2 ).get( 3 ) );
        assertEquals( "ceabcdefghA", grid.getRow( 2 ).get( 4 ) );
        assertEquals( 3, grid.getRow( 2 ).get( 5 ) );
        assertEquals( "deabcdefghD", grid.getRow( 3 ).get( 0 ) );
        assertEquals( "ceabcdefghB", grid.getRow( 3 ).get( 3 ) );
        assertNull( grid.getRow( 3 ).get( 4 ) );
        assertEquals( (Double) grid.getRow( 3 ).get( 5 ), 0.01, 4d );
        assertEquals( "deabcdefghA", grid.getRow( 4 ).get( 0 ) );
        assertEquals( "ceabcdefghA", grid.getRow( 4 ).get( 3 ) );
        assertNull( grid.getRow( 4 ).get( 4 ) );
        assertEquals( 5, grid.getRow( 4 ).get( 5 ) );
        assertEquals( "deabcdefghB", grid.getRow( 5 ).get( 0 ) );
        assertEquals( "ceabcdefghA", grid.getRow( 5 ).get( 3 ) );
        assertNull( grid.getRow( 5 ).get( 4 ) );
        assertEquals( (Double) grid.getRow( 5 ).get( 5 ), 0.01, 6d );
    }

    @Test
    void testGetColumnType()
    {
        assertEquals( ColumnDataType.BIGINT, AnalyticsUtils.getColumnType( ValueType.INTEGER, true ) );
        assertEquals( ColumnDataType.GEOMETRY_POINT, AnalyticsUtils.getColumnType( ValueType.COORDINATE, true ) );
        assertEquals( ColumnDataType.TEXT, AnalyticsUtils.getColumnType( ValueType.COORDINATE, false ) );
    }

    @Test
    void testGetDataValueSetFromGridEmpty()
    {
        Grid grid = new ListGrid();
        grid.addHeader( new GridHeader( DimensionalObject.DATA_X_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.ORGUNIT_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.PERIOD_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.CATEGORYOPTIONCOMBO_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.ATTRIBUTEOPTIONCOMBO_DIM_ID ) );
        grid.addHeader( new GridHeader( VALUE_ID, VALUE_HEADER_NAME, ValueType.NUMBER, false, false ) );
        DataValueSet dvs = AnalyticsUtils.getDataValueSet( DataQueryParams.newBuilder().build(), grid );
        assertNotNull( dvs );
        assertNotNull( dvs.getDataValues() );
        assertEquals( 0, dvs.getDataValues().size() );
    }

    @Test
    void testGetDataValueSetFromGrid()
    {
        Grid grid = new ListGrid();
        grid.addHeader( new GridHeader( DimensionalObject.DATA_X_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.ORGUNIT_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.PERIOD_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.CATEGORYOPTIONCOMBO_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.ATTRIBUTEOPTIONCOMBO_DIM_ID ) );
        grid.addHeader( new GridHeader( VALUE_ID, VALUE_HEADER_NAME, ValueType.NUMBER, false, false ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouA", "peA", "coA", "aoA", 1d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouA", "peB", null, null, 2d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouB", "peA", null, null, 3d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouB", "peB", null, null, 4d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxB", "ouA", "peA", "coA", null, 5d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxB", "ouA", "peB", "coA", "aoB", 6d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxC", "ouA", "peA", null, "aoA", 7 ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxC", "ouA", "peB", null, null, 8d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxD", "ouA", "peA", "coB", null, 9d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxE", "ouA", "peB", null, null, 10 ) );

        DataValueSet dvs = AnalyticsUtils.getDataValueSet( DataQueryParams.newBuilder().build(), grid );
        assertNotNull( dvs );
        assertNotNull( dvs.getDataValues() );
        assertEquals( 10, dvs.getDataValues().size() );

        assertEquals( "dxA", dvs.getDataValues().get( 1 ).getDataElement() );
        assertEquals( "ouA", dvs.getDataValues().get( 1 ).getOrgUnit() );
        assertEquals( "peB", dvs.getDataValues().get( 1 ).getPeriod() );
        assertNull( dvs.getDataValues().get( 1 ).getCategoryOptionCombo() );
        assertNull( dvs.getDataValues().get( 1 ).getAttributeOptionCombo() );
        assertEquals( "2.0", dvs.getDataValues().get( 1 ).getValue() );

        assertEquals( "dxB", dvs.getDataValues().get( 4 ).getDataElement() );
        assertEquals( "ouA", dvs.getDataValues().get( 4 ).getOrgUnit() );
        assertEquals( "peA", dvs.getDataValues().get( 4 ).getPeriod() );
        assertEquals( "coA", dvs.getDataValues().get( 4 ).getCategoryOptionCombo() );
        assertNull( dvs.getDataValues().get( 4 ).getAttributeOptionCombo() );
        assertEquals( "5.0", dvs.getDataValues().get( 4 ).getValue() );

        assertEquals( "dxC", dvs.getDataValues().get( 6 ).getDataElement() );
        assertEquals( "ouA", dvs.getDataValues().get( 6 ).getOrgUnit() );
        assertEquals( "peA", dvs.getDataValues().get( 6 ).getPeriod() );
        assertNull( dvs.getDataValues().get( 6 ).getCategoryOptionCombo() );
        assertEquals( "aoA", dvs.getDataValues().get( 6 ).getAttributeOptionCombo() );
        assertEquals( "7", dvs.getDataValues().get( 6 ).getValue() );

        assertEquals( "dxD", dvs.getDataValues().get( 8 ).getDataElement() );
        assertEquals( "ouA", dvs.getDataValues().get( 8 ).getOrgUnit() );
        assertEquals( "peA", dvs.getDataValues().get( 8 ).getPeriod() );
        assertEquals( "coB", dvs.getDataValues().get( 8 ).getCategoryOptionCombo() );
        assertNull( dvs.getDataValues().get( 8 ).getAttributeOptionCombo() );
        assertEquals( "9.0", dvs.getDataValues().get( 8 ).getValue() );

        assertEquals( "dxE", dvs.getDataValues().get( 9 ).getDataElement() );
        assertEquals( "ouA", dvs.getDataValues().get( 9 ).getOrgUnit() );
        assertEquals( "peB", dvs.getDataValues().get( 9 ).getPeriod() );
        assertNull( dvs.getDataValues().get( 9 ).getCategoryOptionCombo() );
        assertNull( dvs.getDataValues().get( 9 ).getAttributeOptionCombo() );
        assertEquals( "10", dvs.getDataValues().get( 9 ).getValue() );
    }

    @Test
    void testGetDataValueSetFromGridWithDuplicates()
    {
        Grid grid = new ListGrid();
        grid.addHeader( new GridHeader( DimensionalObject.DATA_X_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.ORGUNIT_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.PERIOD_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.CATEGORYOPTIONCOMBO_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.ATTRIBUTEOPTIONCOMBO_DIM_ID ) );
        grid.addHeader( new GridHeader( VALUE_ID, VALUE_HEADER_NAME, ValueType.NUMBER, false, false ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouA", "peA", null, null, 1d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouA", "peB", null, null, 2d ) );
        // Duplicate
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouA", "peB", null, null, 2d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouB", "peA", null, null, 3d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouB", "peB", null, null, 4d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxB", "ouA", "peA", null, null, 5d ) );
        // Duplicate
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxB", "ouA", "peA", null, null, 5d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxB", "ouA", "peB", null, null, 6d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxC", "ouA", "peA", null, null, 7d ) );
        // Duplicate
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxC", "ouA", "peA", null, null, 7d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxC", "ouA", "peB", null, null, 8d ) );
        DataValueSet dvs = AnalyticsUtils
            .getDataValueSet( DataQueryParams.newBuilder().withDuplicatesOnly( true ).build(), grid );
        assertNotNull( dvs );
        assertNotNull( dvs.getDataValues() );
        assertEquals( 3, dvs.getDataValues().size() );
    }

    @Test
    void testGetDataValueSetAsGridFromGrid()
    {
        Grid grid = new ListGrid();
        grid.addHeader( new GridHeader( DimensionalObject.DATA_X_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.ORGUNIT_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.PERIOD_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.CATEGORYOPTIONCOMBO_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.ATTRIBUTEOPTIONCOMBO_DIM_ID ) );
        grid.addHeader( new GridHeader( VALUE_ID, VALUE_HEADER_NAME, ValueType.NUMBER, false, false ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouA", "peA", "coA", "aoA", 1d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouA", "peB", "coB", "aoB", 2d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouB", "peA", null, null, 3d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "ouB", "peB", "coA", null, 4d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxB", "ouA", "peA", "coA", null, 5d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxB", "ouA", "peB", "coA", "aoB", 6d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxC", "ouA", "peA", null, "aoA", 7 ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxC", "ouA", "peB", null, null, 8d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxD", "ouA", "peA", "coB", null, 9d ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxE", "ouA", "peB", null, null, 10 ) );

        Grid dvs = AnalyticsUtils.getDataValueSetAsGrid( grid );
        assertNotNull( dvs );
        assertEquals( 10, dvs.getHeight() );
        assertEquals( 11, dvs.getWidth() );

        assertEquals( "data_element", dvs.getHeaders().get( 0 ).getName() );
        assertEquals( "organisation_unit", dvs.getHeaders().get( 2 ).getName() );
        assertEquals( "value", dvs.getHeaders().get( 5 ).getName() );
        assertEquals( "comment", dvs.getHeaders().get( 9 ).getName() );

        assertEquals( "dxA", dvs.getRow( 1 ).get( 0 ) );
        assertEquals( "peB", dvs.getRow( 1 ).get( 1 ) );
        assertEquals( "ouA", dvs.getRow( 1 ).get( 2 ) );
        assertEquals( "coB", dvs.getRow( 1 ).get( 3 ) );
        assertEquals( "aoB", dvs.getRow( 1 ).get( 4 ) );
        assertEquals( 2d, dvs.getRow( 1 ).get( 5 ) );
        assertEquals( "[aggregated]", dvs.getRow( 1 ).get( 6 ) );

        assertEquals( "dxA", dvs.getRow( 3 ).get( 0 ) );
        assertEquals( "peB", dvs.getRow( 3 ).get( 1 ) );
        assertEquals( "ouB", dvs.getRow( 3 ).get( 2 ) );
        assertEquals( "coA", dvs.getRow( 3 ).get( 3 ) );
        assertNull( dvs.getRow( 3 ).get( 4 ) );
        assertEquals( 4d, dvs.getRow( 3 ).get( 5 ) );
        assertEquals( "[aggregated]", dvs.getRow( 3 ).get( 6 ) );

        assertEquals( "dxC", dvs.getRow( 6 ).get( 0 ) );
        assertEquals( "peA", dvs.getRow( 6 ).get( 1 ) );
        assertEquals( "ouA", dvs.getRow( 6 ).get( 2 ) );
        assertNull( dvs.getRow( 6 ).get( 3 ) );
        assertEquals( "aoA", dvs.getRow( 6 ).get( 4 ) );
        assertEquals( 7, dvs.getRow( 6 ).get( 5 ) );
        assertEquals( "[aggregated]", dvs.getRow( 6 ).get( 6 ) );
    }

    @Test
    void testGetDataValueSetAsGridFromGridMissingOrgUnitColumn()
    {
        Grid grid = new ListGrid();
        grid.addHeader( new GridHeader( DimensionalObject.DATA_X_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.PERIOD_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.CATEGORYOPTIONCOMBO_DIM_ID ) );
        grid.addHeader( new GridHeader( DimensionalObject.ATTRIBUTEOPTIONCOMBO_DIM_ID ) );
        grid.addHeader( new GridHeader( VALUE_ID, VALUE_HEADER_NAME, ValueType.NUMBER, false, false ) );
        grid.addRow().addValuesAsList( Lists.newArrayList( "dxA", "peA", "coA", "aoA", 1d ) );

        assertThrows( IllegalArgumentException.class, () -> AnalyticsUtils.getDataValueSetAsGrid( grid ) );
    }

    @Test
    void testIsPeriodOverApprovalThreshold()
    {
        java.util.Calendar calendar = java.util.Calendar.getInstance();
        int currentYear = calendar.get( Calendar.YEAR );
        Integer thisYear = currentYear;
        Integer oneYearAgo = currentYear - 1;
        Integer twoYearsAgo = currentYear - 2;
        Integer threeYearsAgo = currentYear - 3;
        // maxYears = 0 should always return false
        assertTrue( !AnalyticsUtils.periodIsOutsideApprovalMaxYears( thisYear, 0 ) );
        assertTrue( !AnalyticsUtils.periodIsOutsideApprovalMaxYears( oneYearAgo, 0 ) );
        assertTrue( !AnalyticsUtils.periodIsOutsideApprovalMaxYears( twoYearsAgo, 0 ) );
        assertTrue( !AnalyticsUtils.periodIsOutsideApprovalMaxYears( threeYearsAgo, 0 ) );
        // maxYears = 1 should only return true for years other than thisYear
        assertTrue( !AnalyticsUtils.periodIsOutsideApprovalMaxYears( thisYear, 1 ) );
        assertTrue( AnalyticsUtils.periodIsOutsideApprovalMaxYears( oneYearAgo, 1 ) );
        assertTrue( AnalyticsUtils.periodIsOutsideApprovalMaxYears( twoYearsAgo, 1 ) );
        assertTrue( AnalyticsUtils.periodIsOutsideApprovalMaxYears( threeYearsAgo, 1 ) );
        // maxYears = 4 should only return false for all three years defined
        assertTrue( !AnalyticsUtils.periodIsOutsideApprovalMaxYears( thisYear, 5 ) );
        assertTrue( !AnalyticsUtils.periodIsOutsideApprovalMaxYears( oneYearAgo, 5 ) );
        assertTrue( !AnalyticsUtils.periodIsOutsideApprovalMaxYears( twoYearsAgo, 5 ) );
        assertTrue( !AnalyticsUtils.periodIsOutsideApprovalMaxYears( threeYearsAgo, 5 ) );
    }

    @Test
    void testGetLevelFromOrgUnitDimensionName()
    {
        assertEquals( 3, AnalyticsUtils.getLevelFromOrgUnitDimensionName( "oulevel3" ) );
        assertEquals( 5, AnalyticsUtils.getLevelFromOrgUnitDimensionName( "oulevel5" ) );
        assertEquals( -1, AnalyticsUtils.getLevelFromOrgUnitDimensionName( "notalevel" ) );
        assertEquals( -1, AnalyticsUtils.getLevelFromOrgUnitDimensionName( "oulevel" ) );
    }

    @Test
    void testGetIntegerOrValue()
    {
        ProgramIndicator pi = new ProgramIndicator();
        pi.setUid( CodeGenerator.generateUid() );
        pi.setDimensionItemType( DimensionItemType.PROGRAM_INDICATOR );
        pi.setDecimals( 0 );
        DataElement de = new DataElement();
        de.setUid( CodeGenerator.generateUid() );
        de.setDimensionItemType( DimensionItemType.DATA_ELEMENT );
        de.setValueType( ValueType.TEXT );
        assertEquals( 5, AnalyticsUtils.getIntegerOrValue( 5d, pi ) );
        assertEquals( "Male", AnalyticsUtils.getIntegerOrValue( "Male", de ) );
    }

    @Test
    void testCalculateYearlyWeightedAverage()
    {
        double avg = AnalyticsUtils.calculateYearlyWeightedAverage( 10D, 20D, 9D );
        assertEquals( avg, 0, 17.5 );
        avg = AnalyticsUtils.calculateYearlyWeightedAverage( 10D, -20D, 9D );
        assertEquals( avg, 0, 12.5 );
    }

    @Test
    void testGetBaseMonth()
    {
        assertEquals( AnalyticsUtils.getBaseMonth( new FinancialAprilPeriodType() ), 0, 3 );
        assertEquals( AnalyticsUtils.getBaseMonth( new FinancialJulyPeriodType() ), 0, 6 );
        assertEquals( AnalyticsUtils.getBaseMonth( new FinancialOctoberPeriodType() ), 0, 9 );
        assertEquals( AnalyticsUtils.getBaseMonth( new FinancialNovemberPeriodType() ), 0, 10 );
        assertEquals( AnalyticsUtils.getBaseMonth( new DailyPeriodType() ), 0, 0 );
    }

    @Test
    void testIsPeriodInPeriods()
    {
        Period p1 = PeriodType.getPeriodFromIsoString( "202001" );
        Period p2 = PeriodType.getPeriodFromIsoString( "202002" );
        Period p3 = PeriodType.getPeriodFromIsoString( "202003" );
        List<DimensionalItemObject> periods = Lists.newArrayList( p1, p2, p3 );
        assertTrue( AnalyticsUtils.isPeriodInPeriods( "202001", periods ) );
        assertFalse( AnalyticsUtils.isPeriodInPeriods( "202005", periods ) );
    }

    @Test
    void testFindDimensionalItems()
    {
        ProgramIndicator pi1 = new ProgramIndicator();
        pi1.setUid( CodeGenerator.generateUid() );
        ProgramIndicator pi2 = new ProgramIndicator();
        pi2.setUid( CodeGenerator.generateUid() );
        ProgramIndicator pi3 = new ProgramIndicator();
        pi3.setUid( CodeGenerator.generateUid() );
        ProgramIndicator pi4 = new ProgramIndicator();
        pi4.setUid( pi1.getUid() );
        List<DimensionalItemObject> dimensionalItems = AnalyticsUtils.findDimensionalItems( pi1.getUid(),
            Lists.newArrayList( pi1, pi2, pi3, pi4 ) );
        assertEquals( dimensionalItems.size(), 2 );
    }

    @Test
    void testHasPeriod()
    {
        List<Object> row = new ArrayList<>();
        row.add( "someUid" );
        row.add( "202010" );
        row.add( 100D );
        // pass - index 1 is a valid iso period
        assertTrue( AnalyticsUtils.hasPeriod( row, 1 ) );
        // fail - index 3 is too high
        assertFalse( AnalyticsUtils.hasPeriod( row, 3 ) );
        // fail - index 4 is too high
        assertFalse( AnalyticsUtils.hasPeriod( row, 4 ) );
        // fail - index 2 is a Double
        assertFalse( AnalyticsUtils.hasPeriod( row, 2 ) );
        row = new ArrayList<>();
        row.add( "someUid" );
        row.add( "2020A" );
        row.add( 100D );
        // pass - index 1 is not a valid period iso string
        assertFalse( AnalyticsUtils.hasPeriod( row, 1 ) );
    }
}


Description: The first visual clue that we are in the presence of a poem is language defying the dictates of margins. In poetry, the line ends where the poem compels the poet to say it must. Sometimes words flood the page, more often they spin and eddy, they splash and disperse, or make an abrupt staccato turn to prove their point. The word "verse" derives from the Latin and contains the meanings turn and toward. In poetry, each turn of the line is a turn toward deeper meaning. How do we determine when and why to turn or break each line in our poems? In this workshop, we'll focus on options and approaches inherent to the contemporary free-verse line and we'll look at poems that exemplify those choices in ways that are by turns sensory, conceptual, and emotional. In each case, one turn in the river at a time, we'll have the thrill of expanding our range of formal options, while experimenting with the exciting possibilities that an understanding of the poetic line and space on the page have to offer. This workshop is for beginning and intermediate poets, free-writers who are interested in giving shape to that flood of words in their notebooks, as well as for anyone who has experience writing poems and wishes to expand their range of expression and knowledge of craft, while having fun.


SANTA ROSA—A new web-site has started up in Santa Rosa and is aptly called The Purple Politico. (www.thepurplepolitico.com.) Although the web-site was first developed in June of 2004 it seems in the last few months it is really catching on—with over 32,000 visitors to date. The Purple Politico web-site is locally maintained and addresses the politics within the city of Santa Rosa.
The Purple Politico also provides several features such as an Event Calendar, Exit Polls, and a Discussion Board. The Event Calendar is especially useful to inform the public when city meetings are scheduled. Quite often, city meetings are poorly attended simply because the general public is not aware of when the city meetings are to be held. Exit Polls on a political web-site ask a question of the web-site visitor, after they have viewed the content of the web-site. One example of a question on the Purple Politico web-site is: What national political party do you affiliate with most often? The viewer can then click on the Republican, Democratic, or Independent selections. The Discussion Board is a forum where people can express their views anonymously, or with their name included. In a small town it is important for people to express their viewpoint and opinions without the fear of offending city administrators. In other words, the Discussion Board enables individuals in the community to say what they can't always verbalize to a city official face-to-face, or in a crowded public meeting. The statements made in an on-line forum can provide important feedback to public officials, who can read the comments and realize what other people besides their immediate peers are thinking. Hopefully then, the city official will consider the needs of the general public, not just the interests of fellow businessmen and the people who have the access and ability to express themselves to city officials. It is important to realize though—that in every city, whether large or small, this type of politics is American politics. A few individuals will prosper because they have the access and ability to communicate with the city officials who are making the decisions affecting the future of the community. Americans are notoriously ambivalent about voting and getting involved in politics. Fortunately, with web-sites like The Purple Politico, more citizens will be involved in city affairs, become organized and motivated to start taking charge of the future of their city—any American city, whether they live in Santa Monica, or Santa Rosa. So visit www.thepurplepolitico.com and take charge of your future.


text:
Q: visual studio configure dll reference so it tries to resolve it in an specific order at runtime In visual studio we reference an external dll in our project with the option copy local to true. The problem is that the client may have a different version of that dll in their system and in that case our app has to use their dll.
Is there a way in our visual studio project to specify the order in which it have to search for the dll at runtime?
Example:

*

*Search in C:\Program Files\RuntimeX\runtime.dll

*Search in current .exe folder

Clarification:
In this article they refer to the task i want to do, but i cannot find the technical part of how you configure the binding priority order.
How are references located in .NET?
Part: Runtime Reference Resolution (aka binding)

redpajama_set_name: RedPajamaStackExchange


text:
Priyanka Chopra Actress, Singer, Film producer, Philanthropist
Jamshedpur, Jharkhand, India
5' 6½"
Actress, Singer, Film producer, Philanthropist
Priyanka Chopra, is an Indian actress, model, film producer, philanthropist, and the winner of the Miss World 2000 pageant aside from now being an international icon, playing the lead in a prime-time American TV show, Quantico and bagging a role in the movie rendition of Baywatch which is up for release in Summer 2017.
She participated in several theatre productions and studied Western classical music, choral singing and Kathak dance. She was especially close to her father, got a tattoo reading "Daddy's lil girl", in his handwriting. For her exceptional work in Indian cinema, she has received numerous awards, including a National Film Award and Padma Shri, the fourth highest civilian award in 2006 and Time magazine named her one of the 100 most influential people in the world.
In 2015, Priyanka made a historic move as she became the first Indian film actress to play the lead in a prime-time American TV show. In addition to her acting career, Priyanka Chopra is noted for her philanthropic work; she has worked with UNICEF for the last ten years and was appointed as the national and global UNICEF Goodwill Ambassador for Child Rights in 2010 and 2016 respectively.
Priyanka Chopra and Nick Jonas were first seen together at the 2017 Met Gala when they attended the event as friends. It wasn't till later in 2018, when their relationship shifted from friendship to a romantic one. In June 2018, Priyanka accompanied Nick to his cousin's wedding in New Jersey where they were spotted laughing and mingling with family and friends. A few weeks later, the couple flew down to Mumbai for Nick to meet with Priyanka's mother, Madhu Chopra. On 18 August 2018, the couple had a roka ceremony which Nick's parents flew down for. The ceremony was followed by an engagement bash where the who's who of tinsel town was in attendance.
List of Movies - Thamizhan (2002), The Hero: Love Story Of A Spy (2003), Andaaz (2003), Kismat (2004), Asambhav (2004), Mujhse Shaadi Karogi (2004), Aitraaz (2004), Karam (2005), Waqt: The Race Against Time (2005), Yakeen (2005), Barsaat (2005), Bluffmaster! (2005), 36 China Town (2006), Krissh (2006), Aap Ki Khatir (2006), Don (2006), Salaam-E-Ishq (2007), Big Brother (2007), Love Story 2050 (2008), God Tussi Great Ho (2008) , Chamku (2008), Drona (2008), Fashion (2008), Dostana (2008), Kaminey: The Scoundrels (2009), What's Your Raashee? (2009), Pyaar Impossible! (2010), Anjaana Anjaani (2010), 7 Khoon Maaf (2011), Ra. One (2011), Don 2 (2011), Agneepath (2012), Teri Meri Kahaani (2012), Barfi! (2012), Deewana Main Deewana (2013), Shooutout At Wadala (2013), Planes (2013), Zanjeer (2013), Krrish 3 (2013), Gunday (2014), Mary Kom (2014), Dil Dhadakne Do (2015), Bajirao Mastani (2015), Jai Gangajaal (2016), The Jungle Book (2016), Ventilator (2016), Baywatch (2017)
Priyanka Chopra NewsView All News
Priyanka Chopra's Latest Photoshoot Is...
5 Times Priyanka Chopra-Jonas & Nick Jonas...
Priyanka Chopra Jonas Calls Her Mom "Diana's...
Cover Story: Desi Girl Priyanka Chopra Jonas...
Download Femina's November Issue Ft....
Priyanka Chopra Photos View All Photos
Eat sensibly at a buffet like Priyanka Chopra
A colour Priyanka Chopra is obsessed with...
How to get rid of dry and chapped lips this...
How to wear florals like Priyanka Chopra
Priyanka Chopra shows us the dressed-up side...
Priyanka Chopra Videos View All Videos
Priyanka Chopra Jonas And Nick Jonas Look...
Inside Pictures! Priyanka Chopra And Nick...
Here's How I Recreated Priyanka Chopra's...
Priyanka Chopra Jonas and hubby Nick are...
Nick Jonas talks about his wedding with...
Sonam Kapoor Ahuja
Priyanka Chopra News
#FeminaArchives: Check Out Priyanka Chopra...
#Fab50: The Global Star, Priyanka Chopra...
Priyanka Chopra Jonas Loves Simple Workouts
Priyanka Chopra Jonas: On Dreams And Beyond
Priyanka Chopra Jonas Reveals Her Dream...
#GetTheLook: Soft Glam Makeup Inspo By...
Priyanka Chopra Jonas Feels Technology Often...
Nick Jonas Is All Hearts For Priyanka Chopra...
Priyanka Chopra Talks About Her Comfort Food
Priyanka Chopra Jonas Reveals Her Favourite...
Click To Know More About Priyanka Chopra...
20 Perfect Pap Shots Of Priyanka Chopra...
Priyanka Chopra Jonas, Kajol And Others...
Priyanka Chopra Jonas On Coping With The...
Pictures Of Priyanka Chopra Jonas From Her...
Priyanka Chopra Photos
Priyanka Chopra's latest New York looks
The reason behind Priyanka Chopra's glowing...
Summer chic at Priyanka Chopra's party
Priyanka Chopra is on our best dressed list...
Priyanka Chopra rules the week's best...
8 times Priyanka Chopra got her lip game on...
Priyanka Chopra's style escapade in New...
Best dressed this week—Freida Pinto and...
Priyanka Chopra came, twirled and conquered...
Priyanka Chopra's 5 best makeup looks
Geek is chic prove Sonam Kapoor and Priyanka...
Jumpsuits are the new favourite with...
Priyanka Chopra's top Indian looks
Priyanka Chopra Videos
Nick Jonas saves wife Priyanka Chopra from...
Desi girls rock with Priyanka Chopra and...
Priyanka Chopra Jonas scared to have kids?
Ice cream feast with Priyanka Chopra Jonas...
Why Priyanka Chopra Jonas apologised to Nick...
Priyanka Chopra Jonas slammed by background...
Priyanka Chopra flaunts her diamond-studded...
Priyanka Chopra added Jonas to her name for...
Priyanka Chopra and Nick Jonas' latest...
Nick Jonas shares a slice of cake with wife...
It's official online too: PC is now Priyanka...
Priyanka Chopra's house decked up ahead of...
Priyanka Chopra and Nick Jonas's pre-wedding...
Sonali Bendre thanks Priyanka Chopra for...
Priyanka Chopra and Nick Jonas enjoy the...

redpajama_set_name: RedPajamaCommonCrawl


text:
NCAA Wrestling Championships: Penn State's Nico Megaludis Falls In 125-Pound Final
By FTG1855 Mar 17, 2012, 8:13pm EDT
Share All sharing options for: NCAA Wrestling Championships: Penn State's Nico Megaludis Falls In 125-Pound Final
Penn State's Nico Megaludis fell by a score of 4-1 against Iowa's No. 1 seeded Matt McDonough in the 125-pound title bout on Saturday at the NCAA wresting championships in St. Louis.
Megaludis, the No. 10 seed in the tournament, exceeded expectations much of the weekend, taking down three higher seeds on his way to the final, so the true freshman will probably be pretty happy with his result despite the defeat. The Murrysville native, named one of Penn State's six All-Americans, finished his season with a 28-8 record.
His match was the first of five that will feature Penn State wrestlers through this championship night. Frank Molinaro, Ed Ruth, Quentin Wright and David Taylor are all still awaiting their bouts.
The Nittany Lions clinched the team title (barring penalty points) earlier in the day when Dylan Alton finished his tournament with a third-place finish at 157 pounds.
For the latest on Penn State's efforts at the NCAA championships, be sure to stay tuned to SB Nation Pittsburgh.
NCAA Wrestling Championships: Penn State Clinches Back-To-Back Titles
NCAA Wrestling Championships: Penn State's Quentin Wright Denied At 184 Pounds


text:
DC IMPROPER
The Love-Hate Conundrum
I have been in a relationship for about eight months. My Valentine in 2015 is the District of Columbia.
I was infatuated at first, thinking it was pure bliss. Now, honestly, it's evolved into more of a love-hate thing.
Two summers ago, when I interned here, I remember being on the rooftop of the W Hotel overlooking the city. I wanted it to be mine in a very 'House of Cards' way. A year and a half later, I am not so sure I feel the same.
I came here both last summer and after graduation with the hope of reinventing myself as a confident, intellectual, sociable sort of person — one who goes to networking happy hours and hob-knobs with the likes of Hill staffers, lawyers, and contractors. Inside somewhere, however, will always be that girl who worries that she isn't smart or skilled enough to keep up. But that's a story for another day.
DC is incredible in that every aspect of it motivates me aspire to greatness. It's hard not to when you see the things that happen here every day.
There is something stirring about the marble-everything, wandering through the National Mall, hearing my polished heels click on the floor of any government building … it comes with a feeling of pride.
It hits me. I'm 23, and I'm living and working in the capital of the most powerful country in the world.
But even my wrinkleless black dress pants, blazer, and blouse can't keep out the chill I feel. Maybe it's just the winter talking, but I can't help wondering if DC hasn't made me colder.
The only way to really describe how I feel would be to say that DC brings out the worst sort of best in me.
Here, unlike anywhere else, I am competitive and maybe even opportunistic. While some might argue that it's the reason I was able to leverage not one but three jobs out of this city in my eight months here, there is something I resent about that.
I feel sometimes as though I've lost my sense of loyalty or human decency. My will to get ahead has trumped almost everything else. And while I can't deny that I feel victorious sometimes, it doesn't mean I am always proud of how I achieved success.
When I left for college, I wanted to be a writer unencumbered by expectations and bias. Now, I'm moving into the world of public affairs, and while I'm excited that there is writing involved, it's certainly not going to be unfettered. I just worry sometimes that I've allowed myself to be changed by the rapacity that comes with living in a city that thrives on pissing contests and ladder-climbing.
There are some days where I'm not sure I recognize myself. On those days, I consider what it might be like to give all this up and run back to New York or try somewhere like Chicago, or San Francisco, or London. Maybe I could write a novel or go to school for something else entirely.
But that's rash. I'm being silly. I came to DC for a reason.
This city was exciting because it seemed to have endless opportunities, and I certainly couldn't have asked for better friends than those I have made here. But I wonder if I can live in DC for long without hating myself for how I'm choosing to survive.
I love DC for the same reasons I seemingly hate it, but I'm going to try not to flirt with other cities. I'm committed to making it work for now, love or hate.


text:
Glastonbury Festival 2019: Brand new beer named as official Glasto lager supplier
It will be served at more than 100 bars across the festival site
Tomas MalloyReporter
Tuborg will be replaced as the official lager supplier for Glastonbury Festival 2019
GET THE LATEST UPDATES ON WHAT'S HAPPENING AT GLASTONBURY FESTIVAL
A new brand has been named as the official lager for Glastonbury Festival 2019.
Tuborg, which has been served from festival bars for several years, will be replaced this year by Carlsberg Danish Pilsner.
The re-branded Carlsberg lager is brewed to a new recipe, and was released earlier this year.
Carlsberg Danish Pilsner will be served from more than 100 bars at this year's Glastonbury Festival
Described as "full-bodied" with "a blend of quality hop varieties ensuring a consistent taste", the 3.8% ABV drop will be available from more than 100 bars across the site.
Speaking to Somerset Live today (May 21) Glastonbury Festival confirmed that Carlsberg Danish Pilsner will be on sale in place of Tuborg at this year's event.
There will no doubt be plenty of thirsty revellers at this year's Glastonbury Festival
"Perfect balance of bitterness and sweetness"
A Carlsberg spokesman said: "Carlsberg Danish Pilsner retains the light, refreshing qualities of its predecessor but has been rebrewed from head to hop to deliver a smoother, fuller mouth-feel and a perfect balance of bitterness and sweetness.
"Distinctive citrus and floral hop aromas deliver greater depth of flavour and a hoppy moreish aftertaste that will stay with you until the final sip."
Glastonbury Festival 2019 - Latest news
Exploring the hidden secrets of Glasto
Everything new coming about Glasto 2019
Everything we know about secret sets
'Mud expert' reveals all on Glasto mud
Bhavya Mandanna, master brewer at Carlsberg UK added: "Our new Pilsner has a fuller body and a perfect balance of bitterness and sweetness made possible through modifications to our brewing process and the addition of bittering hops in the brewhouse.
"Aroma hops with citrus and floral top notes give a greater depth of flavour whilst maintaining the light and refreshing qualities of Carlsberg.
"The result is a smooth, perfectly balanced, Danish Pilsner."
Glastonbury Festival 2019: EVERYTHING we know about 15 exciting new things coming to Glasto this year
Mallets named as official cider supplier
Carlsberg Danish Pilsner will join Mallets cider on sale at the main bars across the festival site.
Glastonbury Festival recently announced Mallets, whose cider is made from Somerset apples, as official cider supplier for the 2019 event.
Mallets will be the official cider supplier at this year's Glastonbury Festival
Mallets is made fewer than three miles down the road from Worthy Farm at Showerings Mill in Shepton Mallet.
Festival founder Michael Eavis said: "Showerings have been making quality cider in Shepton Mallet for over a hundred years and we're delighted that they'll be supplying their cider at this year's festival."
Glastonbury Festival 2019: 'Unleash your imagination' - Epic new Arcadia stage is built
Glastonbury Festival 2019 line up - EVERY act, artist, performer and band confirmed so far
To subscribe to our daily newsletter, enter your email address into the box at the top of this story.
To keep up to date with our latest news, follow us on Facebook and Twitter .
Find our Somerset Facebook page here , and our Bath Facebook page can be found here .


KAR PUC Result 2019 First and Second Results 2019 Karnataka. Unlike other states in India, Karnataka has their own Pre-University Examination Board, which is popularly known as PUC. There are two courses in PUC, one is 1st PUC and another one is 2nd PUC. It's interesting to know that, the 1st PUC is equivalent to class 11th examination and 2nd PUC is equivalent to class 12th.
The Department of Pre-University, Government of Karnataka, is responsible for publishing PUC Results and PUC Supplementary Results in the month of May and July respectively. However, we will update all latest news and result date on this page.
The Department of Pre-University, Government of Karnataka is the organization for implementation of higher secondary education in the state. All the board exam results of Karnataka are being published by Karnataka Examination Results 2019 official website karresults.nic.in.
There is another board called Karnataka Secondary Education Examination Board (KSEEB) responsible for conducting SSLC and other examinations in Karnakata state. However, we have another page on this board. Here SSLC is equivalent to class 10th. After the class, 10th examination students enroll for 2nd-year Pre-university courses in Karnataka.
This pre-university course is also known as the Plus-two or Intermediate course. The state of Karnataka conducts examinations at the end of the second year of the PUC for university admissions. The courses offered by the Department are broadly classified under the categories of Humanities (Arts), Science & Commerce. There are 34 subjects are being studied in class 12th (1st PUC and 2nd PUC).
The Department of Pre-University, Government of Karnataka administrated 1st and 2nd PUC. Before they published Marks Lists shall be prepared by each examiner which shall along with the valued answer scripts hand over to the Chief Examiners, who shall arrange for their review and scrutiny. The Turks list prepared SShall after review and scrutiny, be sent to the Competent at the end of each day of evaluation work.
Last year PUC Results announced on 11th May 2017 at 03:00 PM. However, we might say the PUC 2019 Result likely to be released on mid of May 2019.
Department Of Pre-university Education, Karnataka Puc Examination Results – 2019 can be checked only on the official website of PUC Karnataka.
Now Karnataka Examination Results 2019 official website karresults.nic.in will appear.
Please enter your "Registration Number" (at least 6 characters).
The eg. of PUC results generated from online is given below.
N.B: Students may download or print the online generated Marks Card / Result for future reference purpose online. Students should keep in mind, they have collected the original marks card from their respective schools.
The pass percentage in the state for the year 2017 is 52.83, which is 4.37 percent lower than the previous year (57.20). Udupi district is doing well, but the passing was decreased by 0.34%.
If any students score lower marks in 2 puc result 2019 then the students have a chance to improve the marks by appearing in the supplementary examination.


Apleona recognises the value of a diverse workforce, and is committed to the dignity of all people and their right to respect and equality of opportunity.
We welcome applications from all suitably qualified candidates who will be selected based on their suitability for the role regardless of age, gender, disability, gender reassignment, marriage or civil partnerships, pregnancy, race, religious belief or sexual orientation.
The promotion of equality and diversity will be pursued through all of our company processes, which includes recruitment and selection, training and career development. This also includes all other aspects of Apleona HSG business.
The main consideration for us in making any appointment is based on the evidence that a candidate is able to achieve and fulfil their potential in a workplace that is both diverse and inclusive.


Please find hereunder the list of A2E members for 2017-2018.
We juste have to send the payment ?
Europa28 and I paid in June 2017, the money should be in the account.
I paid the fee for 2017/18 today.
I paid the fee for 2017/18 last week.
Just paid up for 2017/2018 as well.
I collected yesterday at the monthly Viennes User Meeting the member fees for Burky, team nossi and -STAR-.
I transfered the money today (including my membership fee) to the Association account.


text:
Weird things I apparently taught my American friends about Canada
As I've mentioned, I recently moved to California from New York. As a goodbye gift, some of my New York friends compiled a document called "A List of the Things We Learned About Canada From Chris Tindal." It was a really special and thoughtful gift, especially now that I am able to use it as a blog post during this extra busy time.
Some of this is grossly inaccurate due to misunderstanding, and there are a few items that I can't even explain the origin of. It might also look like I complained about Canada all the time, but I hope not. Mostly I suspect I was just trying to impress my American friends with weird stuff and make Canada seem exotic.
What follows is the slightly edited document. Actual history to continue next week.
A List of the Things We Learned About Canada From Chris Tindal
Chris Tindal, a man we will have worked with until 3pm today, contains within him a wealth of knowledge about Canadian history and minutiae. Over the last two or so years we have had many conversations with him about this nonsense. We have treasured these talks though we have failed to accurately remember them. We will attempt to relay that information, in our best addled recollection, in this doc.
1. Canadian radio stations are required to play a certain number of Canadian artists per day, so there are a lot of Canadian musicians Americans have never heard of.
There is a board that manages this, but I don't remember the name of it. I do remember that there is a point system for figuring out how canadian a musical act is called MAPL. I think it is an acronym though I have no idea what it stands for. As a band a Canadian band member will land you one MAPL point, and you need at least two to be considered officially Canadian enough for radio. Radio stations need to then play a certain number of officially Canadian artists. This system works per artist – having one extremely Canadian band, for example a 40 piece operatic indie folk act from Ontario – will not be enough to carry your radio station.
2. Canadian people love that it bothers Americans that they call beanies "touques", and they will never stop talking about it.
They treat this like it's America's problem even when we are the ones who invented skateboarding. The two things might not seem connected but I assure you they really are. Also, a toque specifically has a pom-pom, and all canadians get really fucking mad when beanies don't have pom-poms.
3. There is a complex beer registry system in Canada and that's why Canada doesn't get a lot of good beer.
Having some kind of irritatingly pleasant deeply entrenched regulatory board for a banal thing is deeply Canadian. [Editor's note: I do not remember being this hard on Canadian beer, though I do get very mad at The Beer Store. Also I am sorry that pretty much this entire document mistakes either "Toronto" or "Ontario" for "Canada."]
4. Despite every funny person being from Canada, Canadian TV doesn't really have satire, and isn't a lot of fun.
This might be related to the irritatingly pleasant deeply entrenched regulatory boards I mentioned before?
5. At one point a video surfaced of a political candidate peeing in a cup and it was a big political scandal.
Canadian politics are fun. [Editor's note: I had forgotten about this! A great moment in Canadian history.]
6. Chris once met the lead singer from a band he liked who was bartending in Toronto or something.
It was a band I was totally unaware of (see #1) but this was a big deal to Chris and he brings it up from time to time. It is an anecdote about the unpredictability of life and finding humility in an idol's failure, and growing old. [Editor's note: I do not think Edwin is a failure, and enjoyed the evening I spent in his bar.]
7. Instead of Bloody Marys Canadians drink something called a "bloody Caesar"
It is a Bloody Mary guaranteed to contain Clamato and some kind of novelty garnish. That's it. Somehow this is of great cultural significance.
8. Canadian Thanksgiving is in early October
And they all drink bloody Caesars
9. Santa lives in Canada, and New Zealand is Australia's Canada
10. The Queen has many birthdays
The Queen of Canada's birthday is May 24th.
11. Canada has its own kindle! It is called a Kobo!
[Editor's note: I love, and would not shut up about, my Kobo.]
12. Canada also has a national font.
[Editor's note: I think this is a reference to how the word Canada often appears in the same font in government material?]
13. Canada was not actually an independent country until, I want to say, 1986
[Editor's note: Ha, ok.]
14. Oh Smarties! They are Canadian m&ms that Chris Tindal deems superior.
15. Canada has many fine treats such as: Maple Sandwich cookies, Coffee Crisp, All Dressed Chips, and Hickory Sticks
16. Famous Canadians, a list, from memory only, please. NO GOOGLING.
Chris Tindal
Cap Tindal (or whatever your brother's name is)
Handsome Idiot Justin Trudeau
Former PM _____ Trudeau (related to the handsome one)
Kate Beaton
The original Avril Lavigne (maybe not Avril Lavigne's doppelganger)
The rest of SCTV
Norm Macdonald?
J-Biebs
Snow, the white rapper who penned "Informer", a licky boom boom down
Uhhh winnie the pooh (like the actual bear) i think
Michael Ondaatje? Maybe he was born somewhere else?
The band Rush
Leslie Feist
Carl Newman
Many many hockey players
Bret "The Hitman" Hart
Tommy Chong (from Cheech &)
Late Former Toronto Mayor Rob "Crack-smokin'" Ford
Troy Hurtubise, inventor of the "Bear-proof Suit"
Everyone named "Gordon"
There are definitely some TV anchors that are from Canada.
18. Chris can name everyone on a Canadian coin from memory, as well as identify a respectable number of figures on American coins.
More people should know this:
View all posts by Chris Tindal
Categories General1 Comment
One thought on "Weird things I apparently taught my American friends about Canada"
Erich Jacoby-Hawkins says:
I enjoy all your blogs, but I have to admit that I enjoyed this one the most. It tells us a lot about what you talk about but more importantly about how much people around you actually listen & retain, which is impressive (for Americans). And how much they loved & appreciated and will miss you.
Previous Previous post: The Hunters become the hunted
Next Next post: Are you better off than you were 400 years ago?


text:
using System;
using System.Collections.Generic;
using System.Text;

namespace MercadoPagoSDK
{
    public class RESTAPIException : Exception
    {
        public string Cause { get; set; }
        public string Error { get; set; }
        public int Status { get; set; }

        public RESTAPIException(int status, string error, string msg, string cause = "")
            : base(msg)
        {
            Cause = cause;
            Error = error;
            Status = status;
        }

        public override string ToString()
        {
            return Status.ToString() + ": " + Error + "; Message: " + base.ToString() + "; Cause: " + Cause;
        }

        public RESTAPIException()
        { }
    }
}

redpajama_set_name: RedPajamaGithub