text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Selection (apache-cassandra API)</title>
<meta name="date" content="2015-06-18">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.apache.cassandra.cql3.statements

Class Selection

java.lang.Object

org.apache.cassandra.cql3.statements.Selection

public abstract class Selection
extends java.lang.Object

Nested Class Summary

Nested Classes

Modifier and Type
Class and Description

class
Selection.ResultSetBuilder

Constructor Summary

Constructors

Modifier
Constructor and Description

protected
Selection(java.util.List<CFDefinition.Name> columns,
         SelectionColumns columnMapping,
         boolean collectTimestamps,
         boolean collectTTLs)

Method Summary

Methods

Modifier and Type
Method and Description

static Selection
forColumns(java.util.List<CFDefinition.Name> columns)

static Selection
fromSelectors(CFDefinition cfDef,
             java.util.List<RawSelector> rawSelectors)

SelectionColumns
getColumnMapping()

java.util.List<CFDefinition.Name>
getColumns()

ResultSet.Metadata
getResultMetadata()

protected abstract java.util.List<java.nio.ByteBuffer>
handleRow(Selection.ResultSetBuilder rs)

boolean
isWildcard()

java.util.List<ColumnIdentifier>
regularAndStaticColumnsToFetch()

Selection.ResultSetBuilder
resultSetBuilder(long now)

static Selection
wildcard(CFDefinition cfDef)

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Selection

protected Selection(java.util.List<CFDefinition.Name> columns,
         SelectionColumns columnMapping,
         boolean collectTimestamps,
         boolean collectTTLs)

Method Detail

isWildcard

public boolean isWildcard()

getResultMetadata

public ResultSet.Metadata getResultMetadata()

wildcard

public static Selection wildcard(CFDefinition cfDef)

forColumns

public static Selection forColumns(java.util.List<CFDefinition.Name> columns)

fromSelectors

public static Selection fromSelectors(CFDefinition cfDef,
                      java.util.List<RawSelector> rawSelectors)
                               throws InvalidRequestException

Throws:

InvalidRequestException

handleRow

protected abstract java.util.List<java.nio.ByteBuffer> handleRow(Selection.ResultSetBuilder rs)
                                                          throws InvalidRequestException

Throws:

InvalidRequestException

regularAndStaticColumnsToFetch

public java.util.List<ColumnIdentifier> regularAndStaticColumnsToFetch()

Returns:

the list of CQL3 "regular" (the "COLUMN_METADATA" ones) column names to fetch.

getColumns

public java.util.List<CFDefinition.Name> getColumns()

Returns:

the list of CQL3 columns value this SelectionClause needs.

getColumnMapping

public SelectionColumns getColumnMapping()

Returns:

the mappings between resultset columns and the underlying columns

resultSetBuilder

public Selection.ResultSetBuilder resultSetBuilder(long now)

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright © 2015 The Apache Software Foundation


text:
package com.lewisd.ksp.craftstats.gamedata;

import com.lewisd.ksp.craftstats.cfg.CfgProperties;

public class PartModule {

    private final String name;
    private final CfgProperties cfgProperties;

    public PartModule(final String name, final CfgProperties cfgProperties) {
        this.name = name;
        this.cfgProperties = cfgProperties.unmodifiable();
    }

    public String getName() {
        return name;
    }

    public CfgProperties getProperties() {
        return cfgProperties.unmodifiable();
    }

}

redpajama_set_name: RedPajamaGithub


text:
<html>
	<head>
		<title>Package documentation for com.hp.hpl.jena.datatypes.xsd.impl</title>
	</head>
	<body>
		<p>
			Provides implementations of the XSD datatype. These implementations are currently
                  just thin wrappers onto a set of internal classes defined by Xerces. This does make
                  Jena reliant on the Xerces version and alternative implementations may be explored in the future.
		</p>
	</body>
</html>


text:
package org.efaps.esjp.sales.document;

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

import org.efaps.admin.common.NumberGenerator;
import org.efaps.admin.datamodel.Status;
import org.efaps.admin.datamodel.Type;
import org.efaps.admin.event.Parameter;
import org.efaps.admin.event.Parameter.ParameterValues;
import org.efaps.admin.event.Return;
import org.efaps.admin.program.esjp.EFapsApplication;
import org.efaps.admin.program.esjp.EFapsUUID;
import org.efaps.admin.ui.field.Field;
import org.efaps.ci.CIType;
import org.efaps.db.AttributeQuery;
import org.efaps.db.Context;
import org.efaps.db.Insert;
import org.efaps.db.Instance;
import org.efaps.db.PrintQuery;
import org.efaps.db.QueryBuilder;
import org.efaps.db.SelectBuilder;
import org.efaps.esjp.ci.CIContacts;
import org.efaps.esjp.ci.CIERP;
import org.efaps.esjp.ci.CISales;
import org.efaps.esjp.common.util.InterfaceUtils;
import org.efaps.esjp.contacts.Contacts;
import org.efaps.esjp.db.InstanceUtils;
import org.efaps.esjp.sales.util.Sales;
import org.efaps.util.EFapsException;

/**
 * TODO comment!
 *
 * @author The eFaps Team
 */
@EFapsUUID("7eda4cc9-77ac-4050-a76a-fbc5ba973c04")
@EFapsApplication("eFapsApp-Sales")
public abstract class IncomingCreditNote_Base
    extends AbstractDocumentSum
{

    /** The Constant REVISIONKEY. */
    public static final String REVISIONKEY = IncomingCreditNote.class.getName() + ".RevisionKey";

    /**
     * Method for create a new Incoming Credit Note.
     *
     * @param _parameter Parameter as passed from eFaps API.
     * @return new Return.
     * @throws EFapsException on error.
     */
    public Return create(final Parameter _parameter)
        throws EFapsException
    {
        final CreatedDoc createdDoc = createDoc(_parameter);
        createPositions(_parameter, createdDoc);
        connect2DocumentType(_parameter, createdDoc);
        connect2Derived(_parameter, createdDoc);
        connect2Object(_parameter, createdDoc);
        return new Return();
    }

    /**
     * Method to create IncomingCreditNote into tree of the AccountPettyCash.
     *
     * @param _parameter Parameter as passed from the eFaps API.
     * @return new Return.
     * @throws EFapsException on error.
     */
    public Return create4Account(final Parameter _parameter)
        throws EFapsException
    {
        final CreatedDoc createdDoc = createDoc(_parameter);
        createPositions(_parameter, createdDoc);
        connect2DocumentType(_parameter, createdDoc);
        connect2Derived(_parameter, createdDoc);
        connect2Object(_parameter, createdDoc);
        connect2Account(_parameter, createdDoc);
        createTransaction(_parameter, createdDoc);
        return new Return();
    }

    /**
     * Edit.
     *
     * @param _parameter Parameter from the eFaps API.
     * @return new Return.
     * @throws EFapsException on error.
     */
    public Return edit(final Parameter _parameter)
        throws EFapsException
    {
        final EditedDoc editDoc = editDoc(_parameter);
        updatePositions(_parameter, editDoc);
        return new Return();
    }

    /**
     * Connect Account and PettyCash.
     *
     * @param _parameter Parameter as passed from the eFaps API
     * @param _createdDoc doc the account is connected to
     * @throws EFapsException on error
     */
    protected void connect2Account(final Parameter _parameter,
                                   final CreatedDoc _createdDoc)
        throws EFapsException
    {
        final Type relType;
        if (isUUID(getProperty(_parameter, "ConnectAccountType"))) {
            relType = Type.get(UUID.fromString(getProperty(_parameter, "ConnectAccountType")));
        } else {
            relType = Type.get(getProperty(_parameter, "ConnectAccountType"));
        }
        final Insert insert = new Insert(relType);
        insert.add(CISales.Account2DocumentAbstract.FromLinkAbstract, _parameter.getInstance());
        insert.add(CISales.Account2DocumentAbstract.ToLinkAbstract, _createdDoc.getInstance());
        insert.execute();
    }

    /**
     * Create the transaction for the PettyCash.
     *
     * @param _parameter Parameter as passed from the eFaps API
     * @param _createdDoc doc the transaction is connected to
     * @throws EFapsException on error
     */
    protected void createTransaction(final Parameter _parameter,
                                     final CreatedDoc _createdDoc)
        throws EFapsException
    {
        final Insert payInsert = new Insert(CISales.Payment);
        payInsert.add(CISales.Payment.Date, _createdDoc.getValue(CISales.DocumentSumAbstract.Date.name));
        payInsert.add(CISales.Payment.CreateDocument, _createdDoc.getInstance());
        payInsert.execute();

        final Insert transInsert = new Insert(CISales.TransactionInbound);
        transInsert.add(CISales.TransactionInbound.Amount,
                        _createdDoc.getValue(CISales.DocumentSumAbstract.RateCrossTotal.name));
        transInsert.add(CISales.TransactionInbound.CurrencyId,
                        _createdDoc.getValue(CISales.DocumentSumAbstract.RateCurrencyId.name));
        transInsert.add(CISales.TransactionInbound.Payment, payInsert.getInstance());
        transInsert.add(CISales.TransactionInbound.Account, _parameter.getInstance());
        transInsert.add(CISales.TransactionInbound.Description,
                        _createdDoc.getValue(CISales.DocumentSumAbstract.Note.name));
        transInsert.add(CISales.TransactionInbound.Date, _createdDoc.getValue(CISales.DocumentSumAbstract.Date.name));
        transInsert.execute();
    }

    @Override
    protected void add2DocCreate(final Parameter _parameter,
                                 final Insert _insert,
                                 final CreatedDoc _createdDoc)
        throws EFapsException
    {
        if (_parameter.getInstance() == null
                        || !InstanceUtils.isKindOf(_parameter.getInstance(), CIERP.DocumentAbstract)) {
            final String seqKey = Sales.INCOMINGCREDITNOTE_REVSEQ.get();
            final NumberGenerator numgen = isUUID(seqKey)
                            ? NumberGenerator.get(UUID.fromString(seqKey))
                            : NumberGenerator.get(seqKey);
            if (numgen != null) {
                final String revision = numgen.getNextVal();
                Context.getThreadContext().setSessionAttribute(IncomingCreditNote_Base.REVISIONKEY, revision);
                _insert.add(CISales.IncomingCreditNote.Revision, revision);
            }
        }
    }

    /**
     * Auto complete4 petty cash receipt.
     *
     * @param _parameter Parameter as passed by the eFaps API
     * @return the return
     * @throws EFapsException on error
     */
    public Return autoComplete4PettyCashReceipt(final Parameter _parameter)
        throws EFapsException
    {
        final QueryBuilder queryBldr = new QueryBuilder(CISales.PettyCashReceipt);
        queryBldr.addType(CISales.FundsToBeSettledReceipt);
        queryBldr.addWhereAttrNotEqValue(CISales.DocumentAbstract.StatusAbstract,
                        Status.find(CISales.PettyCashReceiptStatus.Canceled),
                        Status.find(CISales.FundsToBeSettledReceiptStatus.Canceled));
        return new IncomingCreditNote()
        {

            @Override
            protected void add2QueryBldr(final Parameter _parameter,
                                         final QueryBuilder _queryBldr)
                throws EFapsException
            {
                final Instance instance = _parameter.getInstance();

                if (instance != null && instance.isValid()
                                && (instance.getType().equals(CISales.AccountFundsToBeSettled.getType())
                                || instance.getType().equals(CISales.AccountPettyCash.getType()))) {
                    final QueryBuilder attrQueryBldr = new QueryBuilder(CISales.AccountPettyCash2PettyCashBalance);
                    attrQueryBldr.addType(CISales.AccountFundsToBeSettled2FundsToBeSettledBalance);
                    attrQueryBldr.addWhereAttrEqValue(CISales.Account2DocumentAbstract.FromLinkAbstract, instance);
                    final AttributeQuery attrQuery = attrQueryBldr
                                    .getAttributeQuery(CISales.Account2DocumentAbstract.ToLinkAbstract);

                    final QueryBuilder queryBldr = new QueryBuilder(CISales.PettyCashBalance);
                    queryBldr.addType(CISales.FundsToBeSettledBalance);
                    queryBldr.addWhereAttrInQuery(CISales.AccountBalance.ID, attrQuery);
                    queryBldr.addWhereAttrEqValue(CISales.AccountBalance.StatusAbstract,
                                    Status.find(CISales.PettyCashBalanceStatus.Verified),
                                    Status.find(CISales.FundsToBeSettledBalanceStatus.Verified));
                    final AttributeQuery attrQuery2 = queryBldr.getAttributeQuery(CISales.AccountBalance.ID);

                    final QueryBuilder attrQueryBldr2 = new QueryBuilder(CISales.PettyCashBalance2PettyCashReceipt);
                    attrQueryBldr2.addType(CISales.FundsToBeSettledBalance2FundsToBeSettledReceipt);
                    attrQueryBldr2.addWhereAttrInQuery(CISales.Document2DocumentAbstract.FromAbstractLink, attrQuery2);
                    final AttributeQuery attrQuery3 = attrQueryBldr2
                                    .getAttributeQuery(CISales.Document2DocumentAbstract.ToAbstractLink);

                    final QueryBuilder attrQueryBldr3 = new QueryBuilder(CISales.AccountPettyCash2PettyCashReceipt);
                    attrQueryBldr3.addType(CISales.AccountFundsToBeSettled2FundsToBeSettledReceipt);
                    attrQueryBldr3.addWhereAttrEqValue(CISales.Account2DocumentAbstract.FromLinkAbstract, instance);
                    attrQueryBldr3.addWhereAttrNotInQuery(CISales.Account2DocumentAbstract.ToLinkAbstract, attrQuery3);
                    final AttributeQuery attrQuery4 = attrQueryBldr3
                                    .getAttributeQuery(CISales.Account2DocumentAbstract.ToLinkAbstract);

                    _queryBldr.addWhereAttrInQuery(CISales.DocumentSumAbstract.ID, attrQuery4);
                    _queryBldr.addWhereAttrNotIsNull(CISales.DocumentSumAbstract.Contact);
                } else {
                    super.add2QueryBldr(_parameter, _queryBldr);
                }
            }

        }.autoComplete4Doc(_parameter, queryBldr);
    }

    @Override
    protected List<Map<String, Object>> updateFields4Doc(final Parameter _parameter)
        throws EFapsException
    {
        List<Map<String, Object>> ret = new ArrayList<>();
        final Map<String, Object> map = new HashMap<>();

        final Instance instance = _parameter.getInstance();

        if (instance != null && instance.isValid()
                        && (instance.getType().equals(CISales.AccountPettyCash.getType())
                                        || instance.getType().equals(CISales.AccountFundsToBeSettled.getType()))) {
            final StringBuilder js = new StringBuilder();

            final Field field = (Field) _parameter.get(ParameterValues.UIOBJECT);
            final String fieldName = field.getName();
            final String currentOid = _parameter.getParameterValue(fieldName);
            final PrintQuery print = new PrintQuery(currentOid);

            final SelectBuilder selContactInst = new SelectBuilder()
                            .linkto(CISales.DocumentSumAbstract.Contact).instance();
            final SelectBuilder selContactName = new SelectBuilder()
                            .linkto(CISales.DocumentSumAbstract.Contact).attribute(CIContacts.Contact.Name);
            print.addSelect(selContactInst, selContactName);
            print.execute();

            final Instance contactInst = print.<Instance>getSelect(selContactInst);
            final String contactName = print.<String>getSelect(selContactName);
            final String contactData = new Contacts().getFieldValue4Contact(contactInst, false);

            js.append(getSetFieldValue(0, "contact", contactInst.getOid(), contactName)).append("\n")
                .append(getSetFieldValue(0, "contactData", contactData)).append("\n");
            InterfaceUtils.appendScript4FieldUpdate(map, js.toString());
            ret.add(map);
        } else {
            ret = super.updateFields4Doc(_parameter);
        }
        return ret;
    }

    @Override
    public CIType getCIType()
        throws EFapsException
    {
        return CISales.IncomingCreditNote;
    }

    /**
     * Create the TransactionDocument for this invoice.
     *
     * @param _parameter Parameter from the eFaps API.
     * @return new Return.
     * @throws EFapsException on error.
     */
    public Return createTransDocShadow(final Parameter _parameter)
        throws EFapsException
    {
        final CreatedDoc createdDoc = new TransactionDocument().createDocumentShadow(_parameter);
        final Insert insert = new Insert(CISales.IncomingCreditNote2TransactionDocumentShadowIn);
        insert.add(CISales.IncomingCreditNote2TransactionDocumentShadowIn.FromLink, _parameter.getInstance());
        insert.add(CISales.IncomingCreditNote2TransactionDocumentShadowIn.ToLink, createdDoc.getInstance());
        insert.execute();
        return new Return();
    }
}


text:
import React, { PropTypes } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Waypoint from 'react-waypoint';
import { Map } from 'immutable';
import history from '../../routing/history';
import { resolvePath } from '../../lib/pathHelper';
import { selectFields, selectInferedField } from '../../reducers/collections';
import { Card } from '../UI';
import styles from './EntryListing.css';

export default class EntryListing extends React.Component {
  static propTypes = {
    children: PropTypes.node.isRequired,
    publicFolder: PropTypes.string.isRequired,
    collections: PropTypes.oneOfType([
      ImmutablePropTypes.map,
      ImmutablePropTypes.iterable,
    ]).isRequired,
    entries: ImmutablePropTypes.list,
    onPaginate: PropTypes.func.isRequired,
    page: PropTypes.number,
  };

  handleLoadMore = () => {
    this.props.onPaginate(this.props.page + 1);
  };

  inferFields(collection) { //eslint-disable-line
    const titleField = selectInferedField(collection, 'title');
    const descriptionField = selectInferedField(collection, 'description');
    const imageField = selectInferedField(collection, 'image');
    const fields = selectFields(collection);
    const inferedFields = [titleField, descriptionField, imageField];
    const remainingFields = fields && fields.filter(f => inferedFields.indexOf(f.get('name')) === -1);
    return { titleField, descriptionField, imageField, remainingFields };
  }

  renderCard(collection, entry, inferedFields, publicFolder) {
    const path = `/collections/${ collection.get('name') }/entries/${ entry.get('slug') }`;
    const label = entry.get('label');
    const title = label || entry.getIn(['data', inferedFields.titleField]);
    let image = entry.getIn(['data', inferedFields.imageField]);
    image = resolvePath(image, publicFolder);

    return (
      <Card
        key={entry.get('slug')}
        onClick={history.push.bind(this, path)} // eslint-disable-line
        className={styles.card}
      >
        { image &&
        <header className={styles.cardImage} style={{ backgroundImage: `url(${ image })` }} />
        }

{title}

        {inferedFields.descriptionField ?

{entry.getIn(['data', inferedFields.descriptionField])}

          : inferedFields.remainingFields && inferedFields.remainingFields.map(f => (

              {f.get('label')}:{' '}
              { (entry.getIn(['data', f.get('name')]) || '').toString() }

          ))
        }
      </Card>
    );
  }
  renderCards = () => {
    const { collections, entries, publicFolder } = this.props;

    if (Map.isMap(collections)) {
      const inferedFields = this.inferFields(collections);
      return entries.map(entry => this.renderCard(collections, entry, inferedFields, publicFolder));
    }
    return entries.map((entry) => {
      const collection = collections
        .filter(collection => collection.get('name') === entry.get('collection')).first();
      const inferedFields = this.inferFields(collection);
      return this.renderCard(collection, entry, inferedFields, publicFolder);
    });
  };

  render() {
    const { children } = this.props;
    return (

{children}

          { this.renderCards() }
          <Waypoint onEnter={this.handleLoadMore} />

    );
  }
}


text:
html {
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  -webkit-text-size-adjust: 100%;
      -ms-text-size-adjust: 100%;
}

body,
footer{
  background: #476176;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  line-height: 1.1;
  color: inherit;
}
.outline{
  outline: 1px solid red;
}
.row{
  margin-left: 0;
  margin-right: 0;
}
.top-container {
  padding-top: 10px;
  padding-bottom: 0;
  background: #3ca996;
  width: auto;
}

.leftBorder{
  border-left:1px solid #9ed4cb;
  margin-bottom: 10px;
}

.winWrap{
  border: 7px solid #fff;
  background: rgba(255,255,255,0.5);
  border-radius: 6px;
}

.playerWindowWrap{
  height: auto;
  margin-bottom: 10px;
}

.carousel-inner{
  /*overflow: visible;*/
  overflow-x: hidden;
}
.carousel-inner > .active{
  text-align: center;
}

.sliderWrap{
  height: auto;
}
.slideHeader .glyphicon-new-window{
  float: right;
  margin: 20px 0px 0px 7px !important;
  cursor: pointer;
  position: absolute;
  font-size: 18px;
  color: #476176;
}
.sliderWrap .slider,
.sliderWrap .sliderEspectador{
  width: 100%;
  height: auto;
  background: #eeeeee url('../images/pres-bg.jpg');
  text-align: center;
}
.sliderWrap .slider img,
.sliderWrap .sliderEspectador img{
  max-width: 100%;
  max-height: 100%;
  display: inline-block;
}
.sliderWrap .slideHeader{
  height: 50px;
  margin: 0;
  background: #cfeae5;
}
.sliderWrap .slideHeader .af-brand{
  display: block;
  float: left;
  height: 50px;
  width: 120px;
  margin-left:10px;
  background:center no-repeat;
  background-image:  url('../images/af-brand.png');
}
@media
(-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dppx) {
  .sliderWrap .slideHeader .af-brand{
    background-image:  url('../images/af-brand@2x.png');
    background-size: 120px 40px;
  }
}
.sliderWrap .slideHeader .rightText{
  float: right;
  margin-right: 10px;
  line-height: 50px;
  font-size: 18px;
  color:#476176;
}
.sliderControls{
  height: 80px;
  padding: 10px 0;
}
.sliderControlsEspectador{
    height: auto;
}
.sliderControls .prevSlide,
.sliderControls .nextSlide{
  width: 110px;
  height: 58px;
  background: rgba(255,255,255,0.5);
  font-size: 26px;
  float: left;
  border-radius: 6px;
  text-align: center;
  color: #3ca996;
  cursor: pointer;
}
.sliderControls .nextSlide{
  float: right;
}
.sliderControls .prevSlide:hover,
.sliderControls .nextSlide:hover{
  background: rgba(255,255,255,0.75);
  color: #476176;
}
.sliderControls .prevSlide .textSpan,
.sliderControls .nextSlide .textSpan{
  margin: 0 5px;
}
.sliderControls .prevSlide .glyphicon,
.sliderControls .nextSlide .glyphicon{
  display: inline-block;
  font-size: 22px;
  line-height: 52px;
}

.addFullScreen .sliderControls .nextSlide .glyphicon,
.addFullScreen .sliderControls .prevSlide .glyphicon{
  margin-right: 34px;
  line-height: 28px;
}
.addFullScreen .sliderControls .nextSlide .glyphicon{
  float: right;
  margin-right: 20px;
}
.addFullScreen .sliderControls .prevSlide .glyphicon{
  float: left;
  margin-left: 20px;
}
.sliderControls ul.slideCount{
  margin: 2px 120px;
  height: 24px;
  width: auto;
  text-align: center;
  padding: 0;
}

.sliderControls ul.slideCount li{
  list-style: none;
  margin: 0 0 5px 0;
  padding: 0;
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #9ed4cb;
  line-height: 20px;
  box-sizing: border-box;
  border: 2px solid #9ed4cb;
  cursor: pointer;
  font-weight: 700;
  color: #476176;
}
.sliderControls ul.slideCount li:hover{
  border: 2px solid #fff;
}
.sliderControls ul.slideCount li.active{
  border: 2px solid #fff;
  background: #fff;
}
.sliderControls ul.slideCount li.active:hover{
  border: 2px solid #fff;
  background: #9ed4cb;
}

/*Comments*/
.commentsWindowWrap{
  height: auto;
}
.commentsWindowWrap .commentHeader{
  height: 50px;
  margin: 0;
  background: #cfeae5;
}
.commentsWindowWrap .commentHeader span.leftText{
  margin-left: 10px;
  line-height: 50px;
  font-size: 18px;
  color: #476176;
}
.commentsWindowWrap .commentHeader .actionsWrap{
  position: relative;
  float: right;
  margin-top: 12px;
}
.doneBtn{
  display: none;
  width: auto;
  height: 26px;
  float: left;
  margin: 0;
  padding: 0 5px;
  background: #b22f2e;
  font-size: 14px;
  line-height: 26px;
  text-align: center;
  color: #fff;
  cursor: pointer;
  margin-right: 10px;
  border-radius: 4px;
}
.doneBtn:hover{
  background: #fff;
  color: #b22f2e;
}
.doneBtn.blue{
  background: #476176;
}
.doneBtn.blue:hover{
  background: #fff;
  color: #476176;
}

.commentsWindowWrap .commentHeader .actionsWrap .initialCall{
  position: absolute;
  top:0;
  right: 0;
  margin-right: 10px;
  width: 91px
}
.commentsWindowWrap .commentHeader .actionsWrap .initialCall > span{
  width: 45px;
  height: 26px;
  display: block;
  float: left;
  margin: 0;
  padding: 0 4px;
  background: #b0c7c3;
  font-size: 14px;
  line-height: 26px;
  text-align: center;
  color: #fff;
  cursor: pointer;
}
.commentsWindowWrap .commentHeader .actionsWrap .initialCall > span:hover{
  background: #fff;
  color: #476176;
}

.commentsWindowWrap .commentHeader .actionsWrap .initialCall .cameraCall{
 border-top-left-radius: 4px;
 border-bottom-left-radius: 4px;
 font-size: 14px;
 line-height: 28px;
}

.broadcast_stream.glyphicon.glyphicon-facetime-video {
  margin-top: 10px;
  font-size: 23px;
  color: #476176;
  cursor: pointer;
}

.broadcasted_video{
  /*width: 132px;*/
  /*border: solid 1px #cc3300;*/
  /*height: 100px;*/
  float: right;
  position: absolute;
  z-index: 1000;
  left: 1px;
  bottom: 1px;
}

.broadcasted_video video{
  max-width: 294px;
  display: block;
  position: relative;
  float: left;
}

.broadcasted_video.fullscreen video{
  max-width: 100%;
}

.commentsWindowWrap .commentHeader .actionsWrap .initialCall .commentsCall{
 border-top-right-radius: 4px;
 border-bottom-right-radius: 4px;
 border-left: 1px solid #b7dbd5;
}

.commentsWindowWrap .commentsList{
  height: 585px;
  overflow: scroll;
  -webkit-overflow-scrolling: touch;
}
.commentsWindowWrap .commentsList .commentItem{
  position: relative;
  padding-right: 0;
  padding-bottom: 10px;
  margin: 10px;
  border-bottom:1px solid rgba(255,255,255,0.50);
  color:#476176;
  overflow: hidden;
}
.commentsWindowWrap .commentsList .commentItem .glyphicon-facetime-video{
  margin-top: 10px;
}
.commentsWindowWrap .commentsList .commentItem.active{
  /*padding-right: 30px;*/
}
.commentsWindowWrap .commentsList .commentItem:last-child{
  border: none;
  margin-bottom: 0;
}
.commentsWindowWrap .commentsList .commentItem:first-child{
  border-bottom:1px solid rgba(255,255,255,0.50);
}

.commentsWindowWrap .commentsList .commentItem .commentText,
.commentsWindowWrap .commentsList .commentItem .commentAuthor{
  display: block;
  clear: both;
}
.commentsWindowWrap .commentsList .commentItem .commentText{
  line-height: 30px;
}
.commentsWindowWrap .commentsList .commentItem .commentAuthor{
  font-weight: 700;
}
.commentsWindowWrap .commentsList .commentItem .cameraBtn{display: none;
  /*position: absolute;
  top: 50%;
  right: 0;
  margin-top: -15px;*/
  width: auto;
  height: 24px;
  font-size: 20px;
  text-align: right;
  color: #476176;
  cursor: pointer;
  margin: -33px 24px 0px 5px;
  float: right;
}
.commentsWindowWrap .commentsList .commentItem .cameraBtn:hover{
  color: #fff;
}
.commentsWindowWrap .commentsList .commentItem .deleteBtn{display: none;
  /*position: absolute;
  top: 50%;
  right: 0;
  margin-top: -15px;*/
  width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #b22f2e;
  cursor: pointer;
  margin: -30px 0px 0px 5px;
  float: right;
}
.commentsWindowWrap .commentsList .commentItem .deleteBtn .lineDel{
  display: block;
  width: 12px;
  height: 4px;
  margin: 8px auto;
  background: #fff;
}
.commentsWindowWrap .commentsList .commentItem .deleteBtn:hover{
  background: #ff0200;
}

footer{
  width: 100%;
  height: 200px;

}

.colGraphWrap,
.graphWrap{
  height: 200px;
  box-sizing: border-box;
}
.graphWrap{
  border-right: 1px solid #5a768d;
}
.graphWrap .ciclerMark{
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 3px;
  margin: 0 auto;
}
.graphWrap .linesWarp{
  /*background:center no-repeat;
  background-image:  url('../images/graphSample.png');
  background-size: cover;*/
  height: 155px;
  margin-bottom: 10px;
  margin-top: 10px;
}
.colGraphWrap{
  border-left: 1px solid #2e506b;
  padding-top:10px;
}
.colGraphWrap .graphLabel{
  width: auto;
  margin-right: 15px;
  height: 36px;
}
.colGraphWrap .graphLabel .name{
  text-transform: uppercase;
  color: #ffffff;
}
.colGraphWrap .graphLabel .barGraphBg{
  display: block;
  background: #40576a;
  width: 100%;
  border-radius: 10px;
  height: 12px;
  color: #fff;
  box-shadow: inset 0 -1px 1px #517189;
}
.colGraphWrap .graphLabel .barGraphBg span{
  font-size: 10px;
  line-height: 10px;
  display: block;
  float: left;
  margin-left: 10px;
}

.colGraphWrap .graphLabel .barGraphBg .bar{
  display:block;
  float: left;
  /*width: 30px;*/
  height: 10px;
  margin-top: 1px;
  margin-left: 1px;
  border-radius: 9px;
}

/*Responsive Stuff*/
.btnShow{
  display: none;
  width: auto;
  float: right;
  height: 35px;
  margin: 8px 0 0;
  padding: 0 8px;
  background: #476176;
  font-size: 14px;
  line-height: 35px;
  text-align: center;
  color: #fff;
  cursor: pointer;
  margin-right: 10px;
  border-radius: 4px;
}
.timeLapseWrap{
  display: none;
  padding: 10px 15px;
}
.timeLapseWrap span{
  font-size: 20px;
  /*color: #ffffff;*/
}
.timeLapseWrap .timer{
  height: auto;
  width: auto;
  padding: 10px;
  font-size: 30px;
  line-height: 30px;
  font-weight: bold;
  color: #476176;
  background: #edf0f2;
  text-align: center;
  margin-top: 5px;
  border-radius: 5px;
}
.floatClear{
  width: 100%;
  height: 1px;
  float: none;
  clear: both;
}
.rateSlideWrap{
  margin-top: 10px;
  height: 105px;
}
.rateSlideWrap .tooltip-arrow{
  bottom: 1px;
}
.rateSlideWrap > span{
  font-size: 20px;
  color: #ffffff;
  display: block;
}
.rateOptionsWrap{
  position: relative;
  width: auto;
  height: 60px;
  margin: 0 20px;
  margin-right: 180px;
  clear: both;
}
.rateOptionsWrap .rateOption{
  position: absolute;
  top:10px;
  margin-left: -20px;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  cursor: pointer;
}
.rateOptionsWrap .rateOption.rateHorrible{
  left: 0;
  background: #fc4a02;
}
.rateOptionsWrap .rateOption.rateBad{
  left: 25%;
  background: #c17036
}
.rateOptionsWrap .rateOption.rateGood{
  left: 50%;
  background: #938e5e;
}
.rateOptionsWrap .rateOption.rateGreat{
  left: 75%;
  background: #6ba882;
}
.rateOptionsWrap .rateOption.rateAwesome{
  left: 100%;
  background: #4ebb9a;
}
.rateOptionsWrap .rateOption:hover{
  background: #ccc;
}
.rateOptionsWrap .rateOption span.inneCircle{
  display: block;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 12px;
  margin: 8px;
  text-align: center;
  line-height: 24px;
  color: #476176;
  font-size: 14px;
}
.rateOptionsWrap .rateOption span.label{
  position: absolute;
  top:45px;
  left: -10px;
  display: block;
  width: 60px;
  height: 14px;
  margin: 0;
  padding: 0;
  text-align: center;
  line-height: 14px;
  color: #fff;;
  font-size: 12px;
  font-weight: 300;
}
.showCommentBox{
  display: none;
  margin-top: 10px;
  height: auto;
  color: #fff;
  text-decoration: underline;
  font-size: 16px;
  cursor: pointer;
}
.hideCommentBox{
  display: none !important;
  margin-top: 10px;
  height: auto;
  color: #fff;
  text-decoration: underline;
  font-size: 16px !important;
  cursor: pointer;
  line-height: 14px;
  margin-left: 10px;
}
.commentSlideWrap{
  margin-top: 10px;
  height: auto;
}
.commentSlideWrap > span{
  font-size: 20px;
  color: #ffffff;
  display: block;
}
.commentSlideWrap .commentAuthor{
  width: 100%;
  padding: 2%;
  height: 30px;
  border: none;
  outline: none;
  border-radius: 4px;
  color: #476176;
  background: #edf0f2;
  font-size: 14px;
  margin-bottom: 10px;
  box-shadow: inset 0 -1px 1px #fff;
}
.commentSlideWrap .commentAuthor:focus{
  background: #fff;
  box-shadow: inset 0 0 3px #3ca996;
}
.commentSlideWrap .commentsHere{
  width: 100%;
  padding: 4px 2%;
  height: 100px;
  border: none;
  outline: none;
  border-radius: 4px;
  color: #476176;
  background: #edf0f2;
  font-size: 14px;
  margin-bottom: 10px;
  box-shadow: inset 0 -1px 1px #fff;
   resize: none;
}
.commentSlideWrap .commentsHere:focus{
  background: #fff;
  box-shadow: inset 0 0 3px #3ca996;
}
.commentSlideWrap .submitComment{
  width: 140px;
  height: 30px;
  line-height: 28px;
  font-size: 14px;
  border: none;
  outline: none;
  border-radius: 4px;
  background: #3ca996;
  color: #ffffff;
}

.commentSlideWrap .submitComment:hover{
  background: #ccc;
}

.commentsWindowWrap .commentsList{
  height: auto;
}
.sliderWrap .slider{
  height: auto;
}
.barHorrible{
  width:0%;
}
.barBad{
  width:0%;
}
.barGood{
  width:0%;
}
.barGreat{
  width:0%;
}
.barAwesome{
  width:0%;
}

.rateOptionsWrap .rateOption.rateHorrible,
.barHorrible{
background: #fc4a02;
}
.rateOptionsWrap .rateOption.rateBad,
.barBad{
background: #c17036
}
.rateOptionsWrap .rateOption.rateGood,
.barGood{
background: #938e5e;
}
.rateOptionsWrap .rateOption.rateGreat,
.barGreat{
background: #6ba882;
}
.rateOptionsWrap .rateOption.rateAwesome,
.barAwesome{
background: #4ebb9a;
}

/*Login Style*/

.login_container{
  width: 300px;
  height: auto;
  padding: 0;
  margin: 100px auto;
  border: 1px solid #fff;
  background: #cfeae5;
  border-radius: 10px;
}
.login_container .header{
  background: #f1fffc;
  width: 100%;
  height: auto;
  padding: 10px 0;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  text-align: center;
}
.login_container .body{
  width: 100%;
  height: auto;
  padding: 0 10px;
}
.login_container .body h4{
  line-height: 26px;
  border-bottom: 1px solid #d9f2ed;
  padding-bottom: 4px;
}
.login_container .body input{
  margin-bottom: 10px;
}

.login_container .footer{
  background: #f1fffc;
  width: 100%;
  height: 55px;
  padding:10px 10px 10px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.login_container .footer .btn-login{
  color:#fff;
  background: #3f6274;
  float: right;
}
.login_container .footer .btn-login:hover{
  color:#fff;
  background: #00a898;
  border: solid 1px #3f6274;
}
.btn-presentation{
  width: 140px;
  background: #3ca996;
  color: #ffffff;
}
.btn-presentation:hover, .btn-presentation:focus{
  background: #ccc;
}

/*Go Full Screen*/

.goFullScreen{
  float: right;
  min-width: 50px;
  height: 50px;
  line-height: 44px;
  text-align: center;
  font-size: 26px;
  border-left: 1px solid rgba(255,255,255,0.50);
  color: #476176;
}
.goFullScreen:hover{
  text-decoration: none;
}
.addFullScreen .slider{
  position: fixed;
  top: 0;
  left: 0;
  z-index: 500;
  height: 100%;
}
.addFullScreen a.goFullScreen{
  position: fixed;
  top:0;
  right:0;
  z-index: 1000;
  border: none;
}
.addFullScreen .sliderControls .prevSlide,
.addFullScreen .sliderControls .nextSlide{
  position: fixed;
  top: 50px;
  width: 13%;
  height: 100%;
  z-index: 1000;
  margin: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}
.addFullScreen .sliderControls .prevSlide span{
  display: block;
  float: left;
}
.addFullScreen .sliderControls .nextSlide span{
  display: block;
  float: left;
}
.addFullScreen .sliderControls .prevSlide{
  left: 0;
}
.addFullScreen .sliderControls .nextSlide{
  right:0;
}
.addFullScreen .sliderControls ul.slideCount li.active{
  position: fixed;
  top:10px;
  left: 10px;
  z-index: 500;
  margin: 0;
  padding: 0;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  line-height: 35px;
  font-size: 20px;
}

/* LOADING AGILITY */

.connecting{
  width: 165px;
  height: auto;
  padding: 10px 0 5px;
  margin: 250px auto;
  border: 1px solid #fff;
  background: #cfeae5;
  border-radius: 10px;
}

.loading_logo {
   /* position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    margin:-60px 0 0 -60px;*/
    -webkit-animation:spin 3s linear infinite;
    -moz-animation:spin 3s linear infinite;
    animation:spin 3s linear infinite;
}
@-moz-keyframes spin { 100% { -moz-transform: rotateY(360deg); } }
@-webkit-keyframes spin { 100% { -webkit-transform: rotateY(360deg); } }
@keyframes spin { 100% { -webkit-transform: rotateY(360deg); transform:rotateY(360deg); } }

.mood_count{
  position: absolute;
  float: right !important;
  right: 35px;
}
.modal{
  display: block;
  width: 400px;
  margin: 0px auto;
  background: #fff;
  max-height: 250px;
  border-radius: 10px;
  top: 40px;
}

/* SHAKE */

@keyframes shake{
  0% { transform: translate(2px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(0px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(2px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(2px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@-moz-keyframes shake{
  0% { -moz-transform: translate(2px, 1px) rotate(0deg); }
  10% { -moz-transform: translate(-1px, -2px) rotate(-1deg); }
  20% { -moz-transform: translate(-3px, 0px) rotate(1deg); }
  30% { -moz-transform: translate(0px, 2px) rotate(0deg); }
  40% { -moz-transform: translate(1px, -1px) rotate(1deg); }
  50% { -moz-transform: translate(-1px, 2px) rotate(-1deg); }
  60% { -moz-transform: translate(-3px, 1px) rotate(0deg); }
  70% { -moz-transform: translate(2px, 1px) rotate(-1deg); }
  80% { -moz-transform: translate(-1px, -1px) rotate(1deg); }
  90% { -moz-transform: translate(2px, 2px) rotate(0deg); }
  100% { -moz-transform: translate(1px, -2px) rotate(-1deg); }
}

@-webkit-keyframes shake {
  0% { -webkit-transform: translate(2px, 1px) rotate(0deg); }
  10% { -webkit-transform: translate(-1px, -2px) rotate(-1deg); }
  20% { -webkit-transform: translate(-3px, 0px) rotate(1deg); }
  30% { -webkit-transform: translate(0px, 2px) rotate(0deg); }
  40% { -webkit-transform: translate(1px, -1px) rotate(1deg); }
  50% { -webkit-transform: translate(-1px, 2px) rotate(-1deg); }
  60% { -webkit-transform: translate(-3px, 1px) rotate(0deg); }
  70% { -webkit-transform: translate(2px, 1px) rotate(-1deg); }
  80% { -webkit-transform: translate(-1px, -1px) rotate(1deg); }
  90% { -webkit-transform: translate(2px, 2px) rotate(0deg); }
  100% { -webkit-transform: translate(1px, -2px) rotate(-1deg); }
}

.phone_icon,.shake{
  display:inline-block;
  width: 50px;
}

.shake{
  animation-name: shake;
  animation-duration: 0.8s;
  transform-origin:50% 50%;
  animation-iteration-count: infinite;
  animation-timing-function: linear;

  -moz-animation-name: shake;
  -moz-animation-duration: 0.8s;
  -moz-transform-origin:50% 50%;
  -moz-animation-iteration-count: infinite;
  -moz-animation-timing-function: linear;

  -webkit-animation-name: shake;
  -webkit-animation-duration: 0.8s;
  -webkit-transform-origin:50% 50%;
  -webkit-animation-iteration-count: infinite;
  -webkit-animation-timing-function: linear;
}

.modal#conference-modal .modal-body {
  overflow: hidden;
}
.modal#conference-modal {
  display: block;
  width: 637px;
  margin: 0px auto;
  background: #fff;
  height: 455px;
  border-radius: 10px;
  top: 40px;
  max-height: 455px;
}

/* CONFERENCE VIDEO AND CONTAINERS */

#me {
/*  width: 250px;
  left: 58.5%;
  position: relative !important;
  top: 312px;
  display: none;*/
}
#you {
  /*width:430px;*/
  /*height: 500px;*/
}
#me,#you{
  /*position: absolute;*/
  width: 50%;
  border:solid 1px #e1e1e1;
  float: left;
}
.streaming_container{
  width: 600px;
  float: left;
  overflow: hidden;
}

.tooltip.top .tooltip-arrow

.rateSlideWrap .thanks_for_rating{
  width:100%;
  top: 20px;
  left: -100%;
  position: relative;
  color:#fff;
}

.rateSlideWrap .title{
  position: relative;
  left: 0px;
  width:90%;
}

.glyphicon-hand-up{
  cursor: pointer;
}

.glyphicon.glyphicon-fullscreen{
  width: 1em;
  display: block;
  position: relative;
  float: right;
  z-index: 1000;
  margin-left: -15px;
  cursor: pointer
}

.screenShareBtn{
  display: none;
}
.glyphicon-new-window{
  float: right;
  margin: -21px 53px 0px 0px;
  cursor: pointer;
}

/***************** AUDIO CONTROLS ******************/

.audio_controls{ position: absolute;top: 27px;cursor: pointer; background: white; border-radius: 50%;}

#your_audio_mute{
  left: 25px;
}

#your_audio_unmute{
  left: 25px;
  display: none;
}

#my_audio_mute{
  right: 20px;
}

#my_audio_unmute{
  right: 20px;
  display: none;
}

/********* HANDUP ANIMATION **************/

.commentSlideWrap .glyphicon-hand-up.bouncing {
  -webkit-animation-name: 'bounce';
  -webkit-animation-duration: 0.7s;
  -webkit-animation-iteration-count: infinite;
  -webkit-animation-timing-function: ease-in-out;
  font-size: 22px;
  margin: -11px 0px 0px 0px
}

.raise_hand_label{
  font-size: 15px;
  margin-right: 4px;
}

@-webkit-keyframes 'bounce'{
     from {top: 20px;}
     50%  {top: 10px;}
     to   {top: 20px;}
}


text:
//// [unusedClassesinNamespace1.ts]
namespace Validation {
    class c1 {

    }
}

//// [unusedClassesinNamespace1.js]
var Validation;
(function (Validation) {
    var c1 = /** @class */ (function () {
        function c1() {
        }
        return c1;
    }());
})(Validation || (Validation = {}));


text:
using OfficeOpenXml;
using OfficeOpenXml.Table;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Drawing;
using System.Linq;
using System.Reflection;

namespace EPPlusEnumerable
{
    public static class Spreadsheet
    {
        #region Static Fields

        private static readonly char[] _letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToArray();

        private const TableStyles DefaultTableStyle = TableStyles.Medium16;

        #endregion

        #region Public Methods

        /// <summary>
        /// Creates an Excel spreadsheet with worksheets for each collection of objects.
        /// </summary>
        /// <param name="data">A collection of data collections. Each outer collection will be used as a worksheet, while the inner collections will be used as data rows.</param>
        /// <returns>An Excel spreadsheet as a byte array.</returns>
        public static byte[] Create(IEnumerable<IEnumerable<object>> data)
        {
            var package = new ExcelPackage();

            foreach (var collection in data)
            {
                AddWorksheet(package, collection);
            }

            AddSpreadsheetLinks(package, data);

            return package.GetAsByteArray();
        }

        /// <summary>
        /// Creates an Excel spreadsheet with worksheets for each collection of objects.
        /// </summary>
        /// <param name="data">A collection of data collections. Each outer collection will be used as a worksheet, while the inner collections will be used as data rows.</param>
        /// <returns>A populated ExcelPackage object.</returns>
        public static ExcelPackage CreatePackage(IEnumerable<IEnumerable<object>> data)
        {
            var package = new ExcelPackage();

            foreach (var collection in data)
            {
                AddWorksheet(package, collection);
            }

            AddSpreadsheetLinks(package, data);

            return package;
        }

        /// <summary>
        /// Creates an Excel spreadsheet with a single worksheet for the supplied data.
        /// </summary>
        /// <param name="data">Each row of the spreadsheet will contain one item from the data collection.</param>
        /// <returns>An Excel spreadsheet as a byte array.</returns>
        public static byte[] Create(IEnumerable<object> data)
        {
            var package = new ExcelPackage();

            AddWorksheet(package, data);
            AddSpreadsheetLinks(package, new[] { data });

            return package.GetAsByteArray();
        }

        /// <summary>
        /// Creates an Excel spreadsheet with a single worksheet for the supplied data.
        /// </summary>
        /// <param name="data">Each row of the spreadsheet will contain one item from the data collection.</param>
        /// <returns>A populated ExcelPackage object.</returns>
        public static ExcelPackage CreatePackage(IEnumerable<object> data)
        {
            var package = new ExcelPackage();

            AddWorksheet(package, data);
            AddSpreadsheetLinks(package, new[] { data });

            return package;
        }

        #endregion

        #region Private Methods

        private static ExcelWorksheet AddWorksheet(ExcelPackage package, IEnumerable<object> data)
        {
            if (!(data is object) || !data.Any())
            {
                return null;
            }

            var firstRow = data.First();
            var collectionType = firstRow.GetType();
            var properties = collectionType.GetProperties();
            var worksheetName = GetWorksheetName(firstRow, collectionType);
            var worksheet = package.Workbook.Worksheets.Add(worksheetName);
            var col = 0;

            // add column headings
            for (var i = 0; i < properties.Count(); i++)
            {
                var property = properties[i];
                var propertyName = GetPropertyName(property, collectionType);

                if (property.GetCustomAttribute<SpreadsheetExcludeAttribute>() is object)
                {
                    // this property has a SpreadsheetExcludeAttribute
                    continue;
                }

                col += 1;
                worksheet.Cells[$"{GetColumnLetter(col)}1"].Value = propertyName;
            }

            // add rows (starting with two, since Excel is 1-based and we added a row of column headings)
            for (var row = 2; row < data.Count() + 2; row++)
            {
                var item = data.ElementAt(row - 2);
                col = 0;

                for (var i = 0; i < properties.Count(); i++)
                {
                    var property = properties.ElementAt(i);

                    if (property.GetCustomAttribute<SpreadsheetExcludeAttribute>() is object)
                    {
                        continue;
                    }

                    col += 1;
                    var cell = $"{GetColumnLetter(col)}{row}";

                    var cellStyleAttribute = property.GetCustomAttribute<SpreadsheetCellStyleAttribute>();
                    if (cellStyleAttribute is object)
                    {
                        cellStyleAttribute.ApplyCellStyles(worksheet.Cells[cell]);
                    }

                    _ = property.GetValue(item) ?? string.Empty;
                    worksheet.Cells[cell].Value = GetPropertyValue(property, item);
                }
            }

            // set table formatting
            using (var range = worksheet.Cells[$"A1:{GetColumnLetter(col)}{data.Count() + 1}"])
            {
                range.AutoFitColumns();

                var tableName = GetTableName(worksheetName);
                var table = worksheet.Tables.Add(range, $"table_{tableName}");
                table.TableStyle = GetTableStyle(collectionType);
            }

            return worksheet;
        }

        // Sanitize table name to only valid characters
        // https://support.office.com/en-us/article/Rename-an-Excel-table-FBF49A4F-82A3-43EB-8BA2-44D21233B114
        private static string GetTableName(string input)
        {
            var tableName = new char[input.Length];

            for (var i = 0; i < input.Length; i++)
            {
                tableName[i] = char.IsLetterOrDigit(input[i])
                    ? input[i]
                    : '_';
            }

            return new string(tableName);
        }

        private static string GetWorksheetName(object firstRow, Type collectionType)
        {
            var worksheetName = collectionType.Name;

            // this is just to strip out the giant string of numbers that EntityFramework appends to
            // proxy types if you passed in a collection of those rather than a type with a
            // displayname attribute specified
            if (worksheetName.Contains('_'))
            {
                worksheetName = worksheetName.Substring(0, worksheetName.IndexOf('_'));
            }

            var worksheetNameProperty = collectionType
                .GetProperties()
                .FirstOrDefault(prop => Attribute.IsDefined(prop, typeof(SpreadsheetTabNameAttribute), true));

            if (worksheetNameProperty is object)
            {
                var worksheetNameAttribute = worksheetNameProperty.GetCustomAttribute<SpreadsheetTabNameAttribute>();
                var worksheetPropertyValue = worksheetNameProperty.GetValue(firstRow);

                if (!string.IsNullOrWhiteSpace(worksheetNameAttribute.FormatString))
                {
                    worksheetName = string.Format(worksheetNameAttribute.FormatString, worksheetPropertyValue);
                }
                else
                {
                    worksheetName = worksheetPropertyValue.ToString();
                }
            }
            else
            {
                var displayNameAttribute = collectionType.GetCustomAttribute<DisplayNameAttribute>();
                if (displayNameAttribute is object)
                {
                    worksheetName = displayNameAttribute.DisplayName;
                }
                else
                {
                    var displayAttribute = collectionType.GetCustomAttribute<DisplayAttribute>();
                    if (displayAttribute is object)
                    {
                        worksheetName = displayAttribute.Name;
                    }
                }
            }

            return worksheetName;
        }

        private static TableStyles GetTableStyle(Type collectionType)
        {
            var tableStyle = DefaultTableStyle;

            var spreadsheetTableStyleAttribute = collectionType.GetCustomAttribute<SpreadsheetTableStyleAttribute>();
            if (spreadsheetTableStyleAttribute is object)
            {
                tableStyle = spreadsheetTableStyleAttribute.TableStyle;
            }

            return tableStyle;
        }

        private static string GetPropertyName(PropertyInfo property, Type collectionType)
        {
            var propertyName = property.Name;

            var displayNameAttribute = property.GetCustomAttribute<DisplayNameAttribute>();
            if (displayNameAttribute is object)
            {
                propertyName = displayNameAttribute.DisplayName;
            }
            else
            {
                var displayAttribute = property.GetCustomAttribute<DisplayAttribute>();
                if (displayAttribute is object)
                {
                    propertyName = displayAttribute.Name;
                }
            }

            return propertyName;
        }

        private static object GetPropertyValue(PropertyInfo property, object item)
        {
            var inputValue = property.GetValue(item);
            object outputValue = string.Empty;

            var displayFormatAttribute = property.GetCustomAttribute<DisplayFormatAttribute>();
            if (displayFormatAttribute is object)
            {
                if (!(inputValue is object) && !string.IsNullOrWhiteSpace(displayFormatAttribute.NullDisplayText))
                {
                    outputValue = displayFormatAttribute.NullDisplayText;
                }
                else if (inputValue is object)
                {
                    outputValue = string.Format(displayFormatAttribute.DataFormatString, inputValue);
                }
            }
            else if (inputValue is object)
            {
                if (property.PropertyType.IsValueType)
                {
                    // for value types, just output the raw value
                    outputValue = inputValue;
                }
                else
                {
                    var enumerable = (inputValue as IEnumerable<object>);
                    if (enumerable is object)
                    {
                        // for collections, return a count
                        outputValue = enumerable.Count();
                    }
                    else
                    {
                        // reference type
                        outputValue = inputValue.ToString();
                    }
                }
            }

            return outputValue;
        }

        private static void AddSpreadsheetLinks(ExcelPackage package, IEnumerable<IEnumerable<object>> data)
        {
            foreach (var collection in data)
            {
                if (!(collection is object) || !collection.Any())
                {
                    continue;
                }

                var firstRow = collection.First();
                var collectionType = firstRow.GetType();
                var properties = collectionType.GetProperties();
                var worksheetName = GetWorksheetName(firstRow, collectionType);
                var worksheet = package.Workbook.Worksheets[worksheetName];

                if (!(worksheet is object))
                {
                    continue;
                }

                // loop through the properties in the collection type
                // and see if any have a SpreadsheetLinkAttribute specified
                for (var prop = 1; prop <= properties.Count(); prop++)
                {
                    var property = properties.ElementAt(prop - 1);

                    if (property.GetCustomAttribute<SpreadsheetExcludeAttribute>() is object)
                    {
                        continue;
                    }

                    var attribute = property.GetCustomAttribute<SpreadsheetLinkAttribute>();

                    if (!(attribute is object))
                    {
                        // no SpreadsheetLinkAttribute for this property,
                        // so skip to the next property
                        continue;
                    }

                    // get the worksheet specified by the attribute
                    var linkSheet = package.Workbook.Worksheets[attribute.WorksheetName];

                    if (!(linkSheet is object))
                    {
                        // if the target worksheet specified by the attribute doesn't exist,
                        // we can't add any links, so just skip to the next property
                        continue;
                    }

                    var linkColumn = string.Empty;

                    // loop through the columns of the first row of the
                    // attribute's target worksheet and see if any
                    // match the attribute's column header value
                    for (var col = 1; col <= linkSheet.Dimension.Columns; col++)
                    {
                        var letter = GetColumnLetter(col);
                        if (linkSheet.Cells[letter + "1"].Value.ToString().Equals(attribute.ColumnHeaderValue))
                        {
                            linkColumn = letter;
                            break;
                        }
                    }

                    if (!string.IsNullOrWhiteSpace(linkColumn))
                    {
                        // we found the target column of the target worksheet, so we can add links!
                        AddColumnLinks(worksheet, prop, linkSheet, linkColumn);
                    }
                }
            }
        }

        private static void AddColumnLinks(ExcelWorksheet worksheet, int worksheetColumnIndex, ExcelWorksheet linkSheet, string linkColumn)
        {
            // loop through the cells of the worksheet that correspond to the property
            // that had the SpreadsheetLinkAttribute and try to find a link target for each
            for (var worksheetRow = 1; worksheetRow <= worksheet.Dimension.Rows; worksheetRow++)
            {
                var worksheetCell = worksheet.Cells[$"{GetColumnLetter(worksheetColumnIndex)}{worksheetRow}"];
                var worksheetValue = worksheetCell.Value.ToString();

                // loop through the cells of the target worksheet column and see if any of the values
                // match the value of the current worksheet cell
                for (var linksheetRow = 1; linksheetRow <= linkSheet.Dimension.Rows; linksheetRow++)
                {
                    var linksheetValue = linkSheet.Cells[$"{linkColumn}{linksheetRow}"].Value.ToString();

                    if (worksheetValue.Equals(linksheetValue))
                    {
                        // we found a match! this is the link target,
                        // so add the hyperlink to the worksheet cell
                        // and stop searching for targets for this row
                        worksheetCell.Hyperlink = new ExcelHyperLink($"'{linkSheet.Name}'!{linkColumn}{linksheetRow}", worksheetValue.ToString());
                        worksheetCell.Style.Font.UnderLine = true;
                        worksheetCell.Style.Font.Color.SetColor(Color.Blue);
                        break;
                    }
                }
            }
        }

        /// <summary>
        /// Gets the Excel-style column letter for the specified numerical index (e.g. 4 is D, 26 is Z, 27 is AA, 28 is AB...).
        /// </summary>
        /// <param name="column">The numerical index of the column.</param>
        /// <returns>The corresponding Excel-style column letter.</returns>
        private static string GetColumnLetter(int column)
        {
            if (column <= _letters.Length)
            {
                return _letters[column - 1].ToString();
            }

            var number = column;
            string letter = string.Empty;

            while (number > 0)
            {
                var remainder = (number - 1) % _letters.Length;
                letter = _letters[remainder] + letter;
                number = (number - remainder) / _letters.Length;
            }

            return letter;
        }

        #endregion
    }
}