text:
namespace System.ServiceModel
{
    public enum TransactionFlowOption
    {
        NotAllowed,
        Allowed,
        Mandatory,
    }

    internal static class TransactionFlowOptionHelper
    {
        public static bool IsDefined(TransactionFlowOption option)
        {
            return (option == TransactionFlowOption.NotAllowed ||
                    option == TransactionFlowOption.Allowed ||
                    option == TransactionFlowOption.Mandatory);
            //option == TransactionFlowOption.Ignore);
        }
        internal static bool AllowedOrRequired(TransactionFlowOption option)
        {
            return (option == TransactionFlowOption.Allowed ||
                    option == TransactionFlowOption.Mandatory);
        }
    }
}


text:
package hydra;

import hydra.blackboard.Blackboard;

/**
 * Holds a singleton instance per JVM.
 * <p>
 * The shared map holds a mapping of rebooted host names to the {@link
 * RebootInfo} generated by invocation of {@link RebootMgr#reboot}.
 */

public class RebootBlackboard extends Blackboard {

  public static RebootBlackboard blackboard;

  /**
   * Zero-arg constructor for remote method invocations.
   */
  public RebootBlackboard() {
  }

  public RebootBlackboard(String name, String type) {
    super(name, type, RebootBlackboard.class);
  }

  /**
   * Creates a singleton blackboard.
   */
  public static synchronized RebootBlackboard getInstance() {
    if (blackboard == null) {
      blackboard = new RebootBlackboard("RebootBlackboard", "RMI");
    }
    return blackboard;
  }
}

redpajama_set_name: RedPajamaGithub


text:
package chenxi.livewire.yahoo;

import chenxi.livewire.yahoo.histquotes.HistQuotesRequest;
import chenxi.livewire.yahoo.histquotes.HistoricalQuote;
import chenxi.livewire.yahoo.histquotes.Interval;
import chenxi.livewire.yahoo.quotes.stock.*;

import java.io.IOException;
import java.lang.reflect.Field;
import java.util.Calendar;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Stijn Strickx
 */
public class Stock {

    private final String symbol;
    private String name;
    private String currency;
    private String stockExchange;

    private StockQuote quote;
    private StockStats stats;
    private StockDividend dividend;

    private List<HistoricalQuote> history;

    public Stock(String symbol) {
        this.symbol = symbol;
    }

    private void update() throws IOException {
        StockQuotesRequest request = new StockQuotesRequest(this.symbol);
        StockQuotesData data = request.getSingleResult();
        if(data != null) {
            this.setQuote(data.getQuote());
            this.setStats(data.getStats());
            this.setDividend(data.getDividend());
            YahooFinance.logger.log(Level.INFO, "Updated Stock with symbol: {0}", this.symbol);
        } else {
            YahooFinance.logger.log(Level.SEVERE, "Failed to update Stock with symbol: {0}", this.symbol);
        }
    }

    /**
     * Returns the basic quotes data available for this stock.
     *
     * @return      basic quotes data available for this stock
     * @see         #getQuote(boolean)
     */
    public StockQuote getQuote() {
        return this.quote;
    }

    /**
     * Returns the basic quotes data available for this stock.
     * This method will return null in the following situations:
     *

     *
 the data hasn't been loaded yet
     *      in a previous request and refresh is set to false.
     *
 refresh is true and the data cannot be retrieved from Yahoo Finance
     *      for whatever reason (symbol not recognized, no network connection, ...)
     *

     *

     * When the quote data gets refreshed, it will automatically also refresh
     * the statistics and dividend data of the stock from Yahoo Finance
     * in the same request.
     *
     * @param refresh   indicates whether the data should be requested again to Yahoo Finance
     * @return          basic quotes data available for this stock
     * @throws IOException when there's a connection problem
     */
    public StockQuote getQuote(boolean refresh) throws IOException {
        if(refresh) {
            this.update();
        }
        return this.quote;
    }

    public void setQuote(StockQuote quote) {
        this.quote = quote;
    }

    /**
     * Returns the statistics available for this stock.
     *
     * @return      statistics available for this stock
     * @see         #getStats(boolean)
     */
    public StockStats getStats() {
        return this.stats;
    }

    /**
     * Returns the statistics available for this stock.
     * This method will return null in the following situations:
     *

     *
 the data hasn't been loaded yet
     *      in a previous request and refresh is set to false.
     *
 refresh is true and the data cannot be retrieved from Yahoo Finance
     *      for whatever reason (symbol not recognized, no network connection, ...)
     *

     *

     * When the statistics get refreshed, it will automatically also refresh
     * the quote and dividend data of the stock from Yahoo Finance
     * in the same request.
     *
     * @param refresh   indicates whether the data should be requested again to Yahoo Finance
     * @return          statistics available for this stock
     * @throws IOException when there's a connection problem
     */
    public StockStats getStats(boolean refresh) throws IOException {
        if(refresh) {
            this.update();
        }
        return this.stats;
    }

    public void setStats(StockStats stats) {
        this.stats = stats;
    }

    /**
     * Returns the dividend data available for this stock.
     *
     * @return      dividend data available for this stock
     * @see         #getDividend(boolean)
     */
    public StockDividend getDividend() {
        return this.dividend;
    }

    /**
     * Returns the dividend data available for this stock.
     *
     * This method will return null in the following situations:
     *

     *
 the data hasn't been loaded yet
     *      in a previous request and refresh is set to false.
     *
 refresh is true and the data cannot be retrieved from Yahoo Finance
     *      for whatever reason (symbol not recognized, no network connection, ...)
     *

     *

     * When the dividend data get refreshed, it will automatically also refresh
     * the quote and statistics data of the stock from Yahoo Finance
     * in the same request.
     *
     * @param refresh   indicates whether the data should be requested again to Yahoo Finance
     * @return          dividend data available for this stock
     * @throws IOException when there's a connection problem
     */
    public StockDividend getDividend(boolean refresh) throws IOException {
        if(refresh) {
            this.update();
        }
        return this.dividend;
    }

    public void setDividend(StockDividend dividend) {
        this.dividend = dividend;
    }

    /**
     * This method will return historical quotes from this stock.
     * If the historical quotes are not available yet, they will
     * be requested first from Yahoo Finance.
     *

     * If the historical quotes are not available yet, the
     * following characteristics will be used for the request:
     *

     *
 from: 1 year ago (default)
     *
 to: today (default)
     *
 interval: MONTHLY (default)
     *

     *

     * There are several more methods available that allow you
     * to define some characteristics of the historical data.
     * Calling one of those methods will result in a new request
     * being sent to Yahoo Finance.
     *
     * @return      a list of historical quotes from this stock
     * @throws IOException when there's a connection problem
     * @see         #getHistory(Interval)
     * @see         #getHistory(Calendar)
     * @see         #getHistory(Calendar, Calendar)
     * @see         #getHistory(Calendar, Interval)
     * @see         #getHistory(Calendar, Calendar, Interval)
     */
    public List<HistoricalQuote> getHistory() throws IOException {
        if(this.history != null) {
            return this.history;
        }
        return this.getHistory(HistQuotesRequest.DEFAULT_FROM);
    }

    /**
     * Requests the historical quotes for this stock with the following characteristics.
     *

     *
 from: 1 year ago (default)
     *
 to: today (default)
     *
 interval: specified value
     *

     *
     * @param interval      the interval of the historical data
     * @return              a list of historical quotes from this stock
     * @throws IOException when there's a connection problem
     * @see                 #getHistory()
     */
    public List<HistoricalQuote> getHistory(Interval interval) throws IOException {
        return this.getHistory(HistQuotesRequest.DEFAULT_FROM, interval);
    }

    /**
     * Requests the historical quotes for this stock with the following characteristics.
     *

     *
 from: specified value
     *
 to: today (default)
     *
 interval: MONTHLY (default)
     *

     *
     * @param from          start date of the historical data
     * @return              a list of historical quotes from this stock
     * @throws IOException when there's a connection problem
     * @see                 #getHistory()
     */
    public List<HistoricalQuote> getHistory(Calendar from) throws IOException {
        return this.getHistory(from, HistQuotesRequest.DEFAULT_TO);
    }

    /**
     * Requests the historical quotes for this stock with the following characteristics.
     *

     *
 from: specified value
     *
 to: today (default)
     *
 interval: specified value
     *

     *
     * @param from          start date of the historical data
     * @param interval      the interval of the historical data
     * @return              a list of historical quotes from this stock
     * @throws IOException when there's a connection problem
     * @see                 #getHistory()
     */
    public List<HistoricalQuote> getHistory(Calendar from, Interval interval) throws IOException {
        return this.getHistory(from, HistQuotesRequest.DEFAULT_TO, interval);
    }

    /**
     * Requests the historical quotes for this stock with the following characteristics.
     *

     *
 from: specified value
     *
 to: specified value
     *
 interval: MONTHLY (default)
     *

     *
     * @param from          start date of the historical data
     * @param to            end date of the historical data
     * @return              a list of historical quotes from this stock
     * @throws IOException when there's a connection problem
     * @see                 #getHistory()
     */
    public List<HistoricalQuote> getHistory(Calendar from, Calendar to) throws IOException {
        return this.getHistory(from, to, Interval.MONTHLY);
    }

    /**
     * Requests the historical quotes for this stock with the following characteristics.
     *

     *
 from: specified value
     *
 to: specified value
     *
 interval: specified value
     *

     *
     * @param from          start date of the historical data
     * @param to            end date of the historical data
     * @param interval      the interval of the historical data
     * @return              a list of historical quotes from this stock
     * @throws IOException when there's a connection problem
     * @see                 #getHistory()
     */
    public List<HistoricalQuote> getHistory(Calendar from, Calendar to, Interval interval) throws IOException {
        HistQuotesRequest hist = new HistQuotesRequest(this.symbol, from, to, interval);
        this.setHistory(hist.getResult());
        return this.history;
    }

    public void setHistory(List<HistoricalQuote> history) {
        this.history = history;
    }

    public String getSymbol() {
        return symbol;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public String getStockExchange() {
        return stockExchange;
    }

    public void setStockExchange(String stockExchange) {
        this.stockExchange = stockExchange;
    }

    @Override
    public String toString() {
        return this.symbol + ": " + this.quote.getPrice();
    }

    public void print() {
        System.out.println(this.symbol);
        System.out.println("--------------------------------");
        for (Field f : this.getClass().getDeclaredFields()) {
            try {
                System.out.println(f.getName() + ": " + f.get(this));
            } catch (IllegalArgumentException ex) {
                Logger.getLogger(Stock.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IllegalAccessException ex) {
                Logger.getLogger(Stock.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        System.out.println("--------------------------------");
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/bottom_sheet"
    android:layout_width="match_parent"
    android:layout_height="300dp"
    android:elevation="4dp"
    android:orientation="vertical"
    android:padding="16dp"
    app:layout_behavior="@string/bottom_sheet_behavior">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Dandelion Chocolate"
        android:textAppearance="@style/TextAppearance.AppCompat.Display1"
        android:textColor="@android:color/black" />
</LinearLayout>


text:
// This file is part of the dune-grid-multiscale project:
//   http://users.dune-project.org/projects/dune-grid-multiscale
// Copyright holders: Felix Albrecht
// License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)

#ifndef DUNE_GRID_PART_ITERATOR_CODIM0_HH
#define DUNE_GRID_PART_ITERATOR_CODIM0_HH

// system
#include <map>

// dune-common
#include <dune/common/exceptions.hh>
#include <dune/common/shared_ptr.hh>

// dune-geometry
#include <dune/geometry/type.hh>

// dune-grid
#include <dune/grid/common/grid.hh>

namespace Dune {
namespace grid {
namespace Part {
namespace Iterator {
namespace Local {

/**
 *  \brief  Iterates over those entities of a grid part, the indices of which match predefined ones.
 *  \todo   Replace GlobalGridPartImp with Interface< GlobalGridPartTraitsImp >!
 *  \todo   Document!
 */
template <class GlobalGridPartImp, int codim, Dune::PartitionIteratorType pitype>
class IndexBased : public GlobalGridPartImp::template Codim<codim>::template Partition<pitype>::IteratorType
{
public:
  typedef GlobalGridPartImp GlobalGridPartType;

  typedef IndexBased<GlobalGridPartType, codim, pitype> ThisType;

  typedef typename GlobalGridPartImp::template Codim<codim>::template Partition<pitype>::IteratorType BaseType;

  typedef typename GlobalGridPartType::IndexSetType::IndexType IndexType;

  typedef Dune::GeometryType GeometryType;

private:
  typedef std::map<IndexType, IndexType> IndexMapType;

public:
  typedef std::map<GeometryType, std::map<IndexType, IndexType>> IndexContainerType;

  typedef typename BaseType::Entity Entity;

  IndexBased(const GlobalGridPartType& globalGridPart, const Dune::shared_ptr<const IndexContainerType> indexContainer,
             const bool end = false)
    : BaseType(end ? globalGridPart.template end<codim, pitype>() : globalGridPart.template begin<codim, pitype>())
    , globalGridPart_(globalGridPart)
    , indexContainer_(indexContainer)
    , workAtAll_(0)
  {
    if (!end) {
      // loop over all GeometryTypes
      for (typename IndexContainerType::const_iterator iterator = indexContainer_->begin();
           iterator != indexContainer_->end();
           ++iterator) {
        // treat only the codim 0 ones
        if (iterator->first.dim() == (GlobalGridPartType::GridType::dimension - codim)) {
          ++workAtAll_;
          last_.insert(std::make_pair(iterator->first, iterator->second.rbegin()->first));
          end_.insert(std::make_pair(iterator->first, iterator->second.end()));
        } // treat only the codim 0 ones
      }   // loop over all GeometryTypes
      forward();
    } // if (!end)
  }   // IndexBased

  ThisType& operator++()
  {
    if (workAtAll_ > 0) {
      BaseType::operator++();
      forward();
    } else
      BaseType::operator=(globalGridPart_.template end<codim, pitype>());
    return *this;
  } // ThisType& operator++()

private:
  //! iterates forward until we find the next entity that belongs to the local grid part
  void forward()
  {
    bool found = false;
    while (!found && (workAtAll_ > 0)) {
      const Entity& entity                                 = BaseType::operator*();
      const IndexType& index                               = globalGridPart_.indexSet().index(entity);
      const GeometryType& geometryType                     = entity.type();
      typename IndexContainerType::const_iterator indexMap = indexContainer_->find(geometryType);
      if (indexMap != indexContainer_->end()) {
        const typename IndexMapType::const_iterator result = indexMap->second.find(index);
        if ((result != end_.find(geometryType)->second)) {
          found = true;
          if (result->first == last_.find(geometryType)->second)
            --workAtAll_;
        } else
          BaseType::operator++();
      } else
        BaseType::operator++();
    }
  } // void forward()

  const GlobalGridPartType& globalGridPart_;
  const Dune::shared_ptr<const IndexContainerType> indexContainer_;
  unsigned int workAtAll_;
  std::map<GeometryType, IndexType> last_;
  std::map<GeometryType, typename IndexMapType::const_iterator> end_;
}; // class IndexBased

} // namespace Local
} // namespace Iterator
} // namespace Part
} // namespace grid
} // namespace Dune
namespace std {

template <class GlobalGridPartImp, int codim, Dune::PartitionIteratorType pitype>
struct iterator_traits<Dune::grid::Part::Iterator::Local::IndexBased<GlobalGridPartImp, codim, pitype>>
{
  typedef ptrdiff_t difference_type;
  typedef const typename Dune::grid::Part::Iterator::Local::IndexBased<GlobalGridPartImp, codim, pitype>::Entity
      value_type;
  typedef value_type* pointer;
  typedef value_type& reference;
  typedef forward_iterator_tag iterator_category;
};

} // namespace std

#endif // DUNE_GRID_PART_ITERATOR_CODIM0_HH


text:
<?xml version="1.0" encoding="utf-8" ?>

<sql>
    <datatypes db="mysql">
        <group label="Numeric" color="rgb(238,238,170)">
            <type label="Integer" length="0" sql="INTEGER" quote=""/>
            <type label="TINYINT" length="0" sql="TINYINT" quote=""/>
            <type label="SMALLINT" length="0" sql="SMALLINT" quote=""/>
            <type label="MEDIUMINT" length="0" sql="MEDIUMINT" quote=""/>
            <type label="INT" length="0" sql="INT" quote=""/>
            <type label="BIGINT" length="0" sql="BIGINT" quote=""/>
            <type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote=""/>
            <type label="Single precision" length="0" sql="FLOAT" quote=""/>
            <type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote=""/>
        </group>

        <group label="Character" color="rgb(255,200,200)">
            <type label="Char" length="1" sql="CHAR" quote="'"/>
            <type label="Varchar" length="1" sql="VARCHAR" quote="'"/>
            <type label="Text" length="0" sql="MEDIUMTEXT" re="TEXT" quote="'"/>
            <type label="Binary" length="1" sql="BINARY" quote="'"/>
            <type label="Varbinary" length="1" sql="VARBINARY" quote="'"/>
            <type label="BLOB" length="0" sql="BLOB" re="BLOB" quote="'"/>
        </group>

        <group label="Date & Time" color="rgb(200,255,200)">
            <type label="Date" length="0" sql="DATE" quote="'"/>
            <type label="Time" length="0" sql="TIME" quote="'"/>
            <type label="Datetime" length="0" sql="DATETIME" quote="'"/>
            <type label="Year" length="0" sql="YEAR" quote=""/>
            <type label="Timestamp" length="0" sql="TIMESTAMP" quote="'"/>
        </group>

        <group label="Miscellaneous" color="rgb(200,200,255)">
            <type label="ENUM" length="1" sql="ENUM" quote=""/>
            <type label="SET" length="1" sql="SET" quote=""/>
            <type label="Bit" length="0" sql="bit" quote=""/>
        </group>
    </datatypes>

        <row name="id" null="0" autoincrement="1">
            <datatype>INTEGER</datatype>
        </row>
        <row name="created" null="0" autoincrement="0">
            <datatype>DATETIME</datatype>
        </row>
        <row name="created_by" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
        </row>
        <row name="question_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="question" row="id"/>
        </row>
        <row name="score" null="1" autoincrement="0">
            <datatype>DECIMAL</datatype>
            <default>NULL</default>
        </row>
        <row name="content" null="0" autoincrement="0">
            <datatype>MEDIUMTEXT</datatype>
        </row>
        <key type="PRIMARY" name="">
            <part>id</part>
        </key>
        <comment>a specific answer to a specific question. Also includes 'solutions' which are teacher submitted answers
            to the question.
        </comment>

        <row name="id" null="0" autoincrement="1">
            <datatype>INTEGER</datatype>
        </row>
        <row name="created" null="0" autoincrement="0">
            <datatype>DATETIME</datatype>
        </row>
        <row name="created_by" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
        </row>
        <row name="language" null="0" autoincrement="0">
            <datatype>ENUM</datatype>
            <comment>c, c++, java...</comment>
        </row>
        <row name="type" null="0" autoincrement="0">
            <datatype>ENUM</datatype>
            <default>ALL</default>
            <comment>all, test, quiz, practice, inactive</comment>
        </row>
        <row name="difficulty" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <comment>1-10</comment>
        </row>
        <row name="prev_question_id" null="1" autoincrement="0">
            <datatype>INTEGER</datatype>
            <default>NULL</default>
            <relation table="question" row="id"/>
            <comment>references previous versions of the question</comment>
        </row>
        <row name="version_number" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <default>1</default>
        </row>
        <row name="last_given" null="1" autoincrement="0">
            <datatype>DATETIME</datatype>
            <default>NULL</default>
        </row>
        <row name="content" null="0" autoincrement="0">
            <datatype>MEDIUMTEXT</datatype>
        </row>
        <key type="PRIMARY" name="">
            <part>id</part>
        </key>

        <row name="id" null="0" autoincrement="1">
            <datatype>INTEGER</datatype>
        </row>
        <row name="created" null="0" autoincrement="0">
            <datatype>DATETIME</datatype>
        </row>
        <row name="created_by" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
            <relation table="user" row="id"/>
        </row>
        <row name="last_login" null="0" autoincrement="0">
            <datatype>DATETIME</datatype>
        </row>
        <row name="username" null="0" autoincrement="0">
            <datatype>VARCHAR(32)</datatype>
        </row>
        <row name="password" null="0" autoincrement="0">
            <datatype>VARCHAR(32)</datatype>
            <comment>username+password MD5</comment>
        </row>
        <row name="first_name" null="0" autoincrement="0">
            <datatype>VARCHAR(32)</datatype>
        </row>
        <row name="last_name" null="0" autoincrement="0">
            <datatype>VARCHAR(32)</datatype>
        </row>
        <row name="role" null="0" autoincrement="0">
            <datatype>ENUM</datatype>
            <comment>ADMIN, TEACHER, STUDENT</comment>
        </row>
        <row name="edit_user" null="0" autoincrement="0">
            <datatype>bit</datatype>
        </row>
        <row name="edit_question" null="0" autoincrement="0">
            <datatype>bit</datatype>
        </row>
        <row name="edit_answer" null="0" autoincrement="0">
            <datatype>bit</datatype>
        </row>
        <row name="edit_test_case" null="0" autoincrement="0">
            <datatype>bit</datatype>
        </row>
        <row name="add_assessment" null="0" autoincrement="0">
            <datatype>bit</datatype>
        </row>
        <row name="edit_permission" null="0" autoincrement="0">
            <datatype>bit</datatype>
        </row>
        <row name="view_student_info" null="0" autoincrement="0">
            <datatype>bit</datatype>
        </row>
        <row name="view_teacher_info" null="0" autoincrement="0">
            <datatype>bit</datatype>
        </row>
        <row name="view_answer" null="0" autoincrement="0">
            <datatype>bit</datatype>
        </row>
        <row name="view_test_case" null="0" autoincrement="0">
            <datatype>bit</datatype>
        </row>
        <row name="view_question" null="0" autoincrement="0">
            <datatype>bit</datatype>
        </row>
        <row name="view_all_question" null="0" autoincrement="0">
            <datatype>bit</datatype>
        </row>
        <key type="PRIMARY" name="">
            <part>id</part>
        </key>
        <key type="INDEX" name="">
        </key>
        <comment>contains username, passwords, and permissions. Includes all roles: Admin, Teacher, TA, student
        </comment>

        <row name="id" null="0" autoincrement="1">
            <datatype>INTEGER</datatype>
        </row>
        <row name="created" null="0" autoincrement="0">
            <datatype>DATETIME</datatype>
        </row>
        <row name="created_by" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
        </row>
        <row name="course_code" null="0" autoincrement="0">
            <datatype>CHAR(6)</datatype>
        </row>
        <row name="name" null="0" autoincrement="0">
            <datatype>VARCHAR(255)</datatype>
        </row>
        <key type="PRIMARY" name="">
            <part>id</part>
        </key>
        <comment>such as 'Databases'</comment>

        <row name="id" null="0" autoincrement="1">
            <datatype>INTEGER</datatype>
        </row>
        <row name="created" null="0" autoincrement="0">
            <datatype>DATETIME</datatype>
        </row>
        <row name="created_by" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
        </row>
        <row name="course_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="course" row="id"/>
        </row>
        <row name="year" null="0" autoincrement="0">
            <datatype>YEAR</datatype>
        </row>
        <row name="term" null="0" autoincrement="0">
            <datatype>ENUM</datatype>
            <comment>school dependant</comment>
        </row>
        <row name="period" null="0" autoincrement="0">
            <datatype>ENUM</datatype>
        </row>
        <key type="PRIMARY" name="">
            <part>id</part>
        </key>
        <comment>A concrete example of a class including specific dates, times, and roster.</comment>

        <row name="id" null="0" autoincrement="1">
            <datatype>INTEGER</datatype>
        </row>
        <row name="created" null="0" autoincrement="0">
            <datatype>DATETIME</datatype>
        </row>
        <row name="created_by" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
        </row>
        <row name="type" null="0" autoincrement="0">
            <datatype>ENUM</datatype>
            <comment>problem_set, test, quiz</comment>
        </row>
        <row name="section_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="section" row="id"/>
        </row>
        <row name="name" null="0" autoincrement="0">
            <datatype>VARCHAR(255)</datatype>
        </row>
        <key type="PRIMARY" name="">
            <part>id</part>
        </key>

        <row name="id" null="0" autoincrement="1">
            <datatype>INTEGER</datatype>
        </row>
        <row name="created" null="0" autoincrement="0">
            <datatype>DATETIME</datatype>
        </row>
        <row name="created_by" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
        </row>
        <row name="question_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="question" row="id"/>
        </row>
        <row name="weight" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
        </row>
        <row name="content" null="0" autoincrement="0">
            <datatype>MEDIUMTEXT</datatype>
        </row>
        <key type="PRIMARY" name="">
            <part>id</part>
        </key>
        <comment>cases specific to a question, weight signifies its relative importance to the problem</comment>

        <row name="id" null="0" autoincrement="1">
            <datatype>INTEGER</datatype>
        </row>
        <row name="created" null="0" autoincrement="0">
            <datatype>DATETIME</datatype>
        </row>
        <row name="created_by" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
        </row>
        <row name="name" null="0" autoincrement="0">
            <datatype>VARCHAR(255)</datatype>
            <default>'Underwater Basket Weaving'</default>
        </row>
        <key type="PRIMARY" name="">
            <part>id</part>
        </key>
        <comment>such as 'normal forms'</comment>

        <row name="id" null="0" autoincrement="1">
            <datatype>INTEGER</datatype>
        </row>
        <row name="created" null="0" autoincrement="0">
            <datatype>DATETIME</datatype>
        </row>
        <row name="created_by" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
        </row>
        <row name="answer_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="answer" row="id"/>
        </row>
        <row name="content" null="0" autoincrement="0">
            <datatype>VARCHAR(140)</datatype>
        </row>
        <key type="PRIMARY" name="">
            <part>id</part>
        </key>
        <comment>comments given by the teacher or TA specific to an answer</comment>

        <row name="id" null="0" autoincrement="1">
            <datatype>INTEGER</datatype>
        </row>
        <row name="created" null="0" autoincrement="0">
            <datatype>DATETIME</datatype>
        </row>
        <row name="created_by" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
        </row>
        <row name="section_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="section" row="id"/>
        </row>
        <row name="type" null="0" autoincrement="0">
            <datatype>ENUM</datatype>
        </row>
        <row name="assessment_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="assessment" row="id"/>
        </row>
        <row name="assigned_to_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
        </row>
        <row name="content" null="0" autoincrement="0">
            <datatype>VARCHAR(140)</datatype>
        </row>
        <row name="taken_by_user_id" null="1" autoincrement="0">
            <datatype>INTEGER</datatype>
            <default>NULL</default>
            <relation table="user" row="id"/>
            <comment>used when TA is grading, name of gradee</comment>
        </row>
        <key type="PRIMARY" name="">
            <part>id</part>
        </key>
        <comment>task for a user to complete. Assigned by teachers to students and TAs. The 'verb' to an assessment.
        </comment>

        <row name="assessment_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="assessment" row="id"/>
        </row>
        <row name="question_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="question" row="id"/>
        </row>
        <key type="PRIMARY" name="">
        </key>

        <row name="question_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="question" row="id"/>
        </row>
        <row name="topic_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="topic" row="id"/>
        </row>
        <key type="PRIMARY" name="">
        </key>

        <row name="section_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="section" row="id"/>
        </row>
        <row name="user_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
        </row>
        <key type="PRIMARY" name="">
        </key>

        <row name="user_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="user" row="id"/>
        </row>
        <row name="assessment_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="assessment" row="id"/>
        </row>
        <key type="PRIMARY" name="">
        </key>

        <row name="assessment_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="assessment" row="id"/>
        </row>
        <row name="topic_id" null="0" autoincrement="0">
            <datatype>INTEGER</datatype>
            <relation table="topic" row="id"/>
        </row>
        <key type="PRIMARY" name="">
        </key>

</sql>


text:
class BoardSerializer < BaseSerializer
  entity BoardSimpleEntity
end


text:
package com.example.android.sunshine.app;

import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.format.Time;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Forecast Fragment - the list of 7 days weather forecast.
 */
public class ForecastFragment extends Fragment {
    private ArrayAdapter mAdapter;

    public ForecastFragment() {
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setHasOptionsMenu(true);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View rootView = inflater.inflate(R.layout.fragment_main, container, false);
        String[] data = {
                "Mon 6/23 - Sunny - 31/17",
                "Tue 6/24 - Foggy - 21/8",
                "Wed 6/25 - Cloudy - 22/17",
                "Thurs 6/26 - Rainy - 18/11",
                "Fri 6/27 - Foggy - 21/10",
                "Sat 6/28 - TRAPPED IN WEATHERSTATION - 23/18",
                "Sun 6/29 - Sunny - 20/7"
        };
        List<String> weekForecast = new ArrayList<String>(Arrays.asList(data));
        mAdapter = new ArrayAdapter(getActivity(), R.layout.list_item_forcast, R.id.list_item_forcast_textview, weekForecast);
        ListView listView = (ListView) rootView.findViewById(R.id.listview_forcast);
        listView.setAdapter(mAdapter);

        return rootView;
    }

    @Override
    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
        super.onCreateOptionsMenu(menu, inflater);
        inflater.inflate(R.menu.forecastfragment, menu);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_refresh) {
            FetchWeatherTask fwt = new FetchWeatherTask();
            fwt.execute("60920");
            return true;
        }

        return super.onOptionsItemSelected(item);

    }

    public class FetchWeatherTask extends AsyncTask<String, Void, String[]> {
        private final String LOG_TAG = FetchWeatherTask.class.getSimpleName();

        /* The date/time conversion code is going to be moved outside the asynctask later,
         * so for convenience we're breaking it out into its own method now.
         */
        private String getReadableDateString(long time){
            // Because the API returns a unix timestamp (measured in seconds),
            // it must be converted to milliseconds in order to be converted to valid date.
            SimpleDateFormat shortenedDateFormat = new SimpleDateFormat("EEE MMM dd");
            return shortenedDateFormat.format(time);
        }

        /**
         * Prepare the weather high/lows for presentation.
         */
        private String formatHighLows(double high, double low) {
            // For presentation, assume the user doesn't care about tenths of a degree.
            long roundedHigh = Math.round(high);
            long roundedLow = Math.round(low);

            String highLowStr = roundedHigh + "/" + roundedLow;
            return highLowStr;
        }

        /**
         * Take the String representing the complete forecast in JSON Format and
         * pull out the data we need to construct the Strings needed for the wireframes.
         *
         * Fortunately parsing is easy:  constructor takes the JSON string and converts it
         * into an Object hierarchy for us.
         */
        private String[] getWeatherDataFromJson(String forecastJsonStr, int numDays)
                throws JSONException {

            // These are the names of the JSON objects that need to be extracted.
            final String OWM_LIST = "list";
            final String OWM_WEATHER = "weather";
            final String OWM_TEMPERATURE = "temp";
            final String OWM_MAX = "max";
            final String OWM_MIN = "min";
            final String OWM_DESCRIPTION = "main";

            JSONObject forecastJson = new JSONObject(forecastJsonStr);
            JSONArray weatherArray = forecastJson.getJSONArray(OWM_LIST);

            // OWM returns daily forecasts based upon the local time of the city that is being
            // asked for, which means that we need to know the GMT offset to translate this data
            // properly.

            // Since this data is also sent in-order and the first day is always the
            // current day, we're going to take advantage of that to get a nice
            // normalized UTC date for all of our weather.

            Time dayTime = new Time();
            dayTime.setToNow();

            // we start at the day returned by local time. Otherwise this is a mess.
            int julianStartDay = Time.getJulianDay(System.currentTimeMillis(), dayTime.gmtoff);

            // now we work exclusively in UTC
            dayTime = new Time();

            String[] resultStrs = new String[numDays];
            for(int i = 0; i < weatherArray.length(); i++) {
                // For now, using the format "Day, description, hi/low"
                String day;
                String description;
                String highAndLow;

                // Get the JSON object representing the day
                JSONObject dayForecast = weatherArray.getJSONObject(i);

                // The date/time is returned as a long.  We need to convert that
                // into something human-readable, since most people won't read "1400356800" as
                // "this saturday".
                long dateTime;
                // Cheating to convert this to UTC time, which is what we want anyhow
                dateTime = dayTime.setJulianDay(julianStartDay+i);
                day = getReadableDateString(dateTime);

                // description is in a child array called "weather", which is 1 element long.
                JSONObject weatherObject = dayForecast.getJSONArray(OWM_WEATHER).getJSONObject(0);
                description = weatherObject.getString(OWM_DESCRIPTION);

                // Temperatures are in a child object called "temp".  Try not to name variables
                // "temp" when working with temperature.  It confuses everybody.
                JSONObject temperatureObject = dayForecast.getJSONObject(OWM_TEMPERATURE);
                double high = temperatureObject.getDouble(OWM_MAX);
                double low = temperatureObject.getDouble(OWM_MIN);

                highAndLow = formatHighLows(high, low);
                resultStrs[i] = day + " - " + description + " - " + highAndLow;
            }

            for (String s : resultStrs) {
                Log.v(LOG_TAG, "Forecast entry: " + s);
            }
            return resultStrs;

        }

        @Override
        protected String[] doInBackground(String... postal) {
            // These two need to be declared outside the try/catch
            // so that they can be closed in the finally block.
            HttpURLConnection urlConnection = null;
            BufferedReader reader = null;

            // Will contain the raw JSON response as a string.
            String forecastJsonStr = null;

            String format = "json";
            String units = "metric";
            int numDays = 7;

            try {
                // Construct the URL for the OpenWeatherMap query
                // Possible parameters are avaiable at OWM's forecast API page, at
                // http://openweathermap.org/API#forecast
                //URL url = new URL("http://api.openweathermap.org/data/2.5/forecast/daily?q=94043&mode=json&units=metric&cnt=7");

                final String BASE_URL = "http://api.openweathermap.org/data/2.5/forecast/daily?";
                final String QUERY_PARAM = "q";
                final String UNIT_PARAM = "units";
                final String OUTPUT_PARAM = "mode";
                final String DAYS_PARAM = "cnt";

                Uri uriBuild = Uri.parse(BASE_URL).buildUpon()
                        .appendQueryParameter(QUERY_PARAM, postal[0])
                        .appendQueryParameter(UNIT_PARAM, units)
                        .appendQueryParameter(OUTPUT_PARAM,format)
                        .appendQueryParameter(DAYS_PARAM, Integer.toString(numDays))
                        .build();
                URL url = new URL(uriBuild.toString());

                Log.v(LOG_TAG, "url build:" + url);

                // Create the request to OpenWeatherMap, and open the connection
                urlConnection = (HttpURLConnection) url.openConnection();
                urlConnection.setRequestMethod("GET");
                urlConnection.connect();

                // Read the input stream into a String
                InputStream inputStream = urlConnection.getInputStream();
                StringBuffer buffer = new StringBuffer();
                if (inputStream == null) {
                    // Nothing to do.
                    return null;
                }
                reader = new BufferedReader(new InputStreamReader(inputStream));

                String line;
                while ((line = reader.readLine()) != null) {
                    // Since it's JSON, adding a newline isn't necessary (it won't affect parsing)
                    // But it does make debugging a *lot* easier if you print out the completed
                    // buffer for debugging.
                    buffer.append(line + "\n");
                }

                if (buffer.length() == 0) {
                    // Stream was empty.  No point in parsing.
                    return null;
                }
                forecastJsonStr = buffer.toString();
                Log.v(LOG_TAG, forecastJsonStr);
            } catch (IOException e) {
                Log.e(LOG_TAG, "Error ", e);
                // If the code didn't successfully get the weather data, there's no point in attemping
                // to parse it.
                return null;
            } finally {
                if (urlConnection != null) {
                    urlConnection.disconnect();
                }
                if (reader != null) {
                    try {
                        reader.close();
                    } catch (final IOException e) {
                        Log.e(LOG_TAG, "Error closing stream", e);
                    }
                }
            }
            try {
                if (forecastJsonStr != null) {
                    String[] parsedData = getWeatherDataFromJson(forecastJsonStr, numDays);
                    return parsedData;
                }
            }catch (JSONException e) {
                Log.e(LOG_TAG, "cannot parse JSON", e);
            }
            return null;
        }

        @Override
        protected void onPostExecute(String[] strings) {
            if (strings != null) {
                mAdapter.clear();
                for (String s : strings) {
                    mAdapter.add(s);
                }
            }
        }
    }
}


text:
template<class V, class M, int N>
struct test_my_matrix_vector {
    typedef typename V::value_type value_type;

    template<class VP, class MP>
    void test_with (VP &v1, VP &v2, MP &m1) const {
        {
#ifndef USE_DIAGONAL
            // Rows and columns
            initialize_matrix (m1);
            for (int i = 0; i < N; ++ i) {
                v2 = ublas::row (m1, i);
                std::cout << "row (m, " << i << ") = " << v2 << std::endl;
                v2 = ublas::column (m1, i);
                std::cout << "column (m, " << i << ") = " << v2 << std::endl;
            }

            // Outer product
            initialize_vector (v1);
            initialize_vector (v2);
            v1 (0) = 0;
            v1 (N - 1) = 0;
            m1 = ublas::outer_prod (v1, v2);
            std::cout << "outer_prod (v1, v2) = " << m1 << std::endl;

            // Matrix vector product
            initialize_matrix (m1);
            initialize_vector (v1);
            v2 = ublas::prod (m1, v1);
            std::cout << "prod (m1, v1) = " << v2 << std::endl;
            v2 = ublas::prod (v1, m1);
            std::cout << "prod (v1, m1) = " << v2 << std::endl;
#endif
        }
    }
    void operator () () const {
        {
            V v1 (N), v2 (N);
#ifdef USE_BANDED
            M m1 (N, N, 1, 1);
#endif
#ifdef USE_DIAGONAL
            M m1 (N, N);
#endif
            test_with (v1, v2, m1);

            ublas::matrix_row<M> mr1 (m1, 1), mr2 (m1, 1);
            test_with (mr1, mr2, m1);

            ublas::matrix_column<M> mc1 (m1, 1), mc2 (m1, 1);
            test_with (mc1, mc2, m1);

#ifdef USE_RANGE
            ublas::matrix_vector_range<M> mvr1 (m1, ublas::range (0, N), ublas::range (0, N)),
                                          mvr2 (m1, ublas::range (0, N), ublas::range (0, N));
            test_with (mvr1, mvr2, m1);
#endif

#ifdef USE_SLICE
            ublas::matrix_vector_slice<M> mvs1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
                                          mvs2 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
            test_with (mvs1, mvs2, m1);
#endif
        }
    }

    void operator () (int) const {
#ifdef USE_ADAPTOR
        {
#ifdef USE_BANDED
            V v1 (N), v2 (N);
            M m1 (N, N, 1, 1);
            ublas::banded_adaptor<M> bam1 (m1, 1, 1);
            test_with (v1, v2, bam1);

            ublas::matrix_row<ublas::banded_adaptor<M> > mr1 (bam1, 1), mr2 (bam1, 1);
            test_with (mr1, mr2, bam1);

            ublas::matrix_column<ublas::banded_adaptor<M> > mc1 (bam1, 1), mc2 (bam1, 1);
            test_with (mc1, mc2, bam1);

#ifdef USE_RANGE
            ublas::matrix_vector_range<ublas::banded_adaptor<M> > mvr1 (bam1, ublas::range (0, N), ublas::range (0, N)),
                                                                  mvr2 (bam1, ublas::range (0, N), ublas::range (0, N));
            test_with (mvr1, mvr2, bam1);
#endif

#ifdef USE_SLICE
            ublas::matrix_vector_slice<ublas::banded_adaptor<M> > mvs1 (bam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
                                                                  mvs2 (bam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
            test_with (mvs1, mvs2, bam1);
#endif
#endif
#ifdef USE_DIAGONAL
            V v1 (N), v2 (N);
            M m1 (N, N);
            ublas::diagonal_adaptor<M> dam1 (m1);
            test_with (v1, v2, dam1);

            ublas::matrix_row<ublas::diagonal_adaptor<M> > mr1 (dam1, 1), mr2 (dam1, 1);
            test_with (mr1, mr2, dam1);

            ublas::matrix_column<ublas::diagonal_adaptor<M> > mc1 (dam1, 1), mc2 (dam1, 1);
            test_with (mc1, mc2, dam1);

#ifdef USE_RANGE
            ublas::matrix_vector_range<ublas::diagonal_adaptor<M> > mvr1 (dam1, ublas::range (0, N), ublas::range (0, N)),
                                                                    mvr2 (dam1, ublas::range (0, N), ublas::range (0, N));
            test_with (mvr1, mvr2, dam1);
#endif

#ifdef USE_SLICE
            ublas::matrix_vector_slice<ublas::diagonal_adaptor<M> > mvs1 (dam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
                                                                    mvs2 (dam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
            test_with (mvs1, mvs2, dam1);
#endif
#endif
        }
#endif
    }
};

// Test matrix & vector
void test_matrix_vector () {
    std::cout << "test_matrix_vector" << std::endl;

#ifdef USE_BANDED
#ifdef USE_BOUNDED_ARRAY
#ifdef USE_FLOAT
    std::cout << "float, bounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<float, ublas::bounded_array<float, 3> >,
                          ublas::banded_matrix<float, ublas::row_major, ublas::bounded_array<float, 3 * 3> >, 3> () ();
    test_my_matrix_vector<ublas::vector<float, ublas::bounded_array<float, 3> >,
                          ublas::banded_matrix<float, ublas::row_major, ublas::bounded_array<float, 3 * 3> >, 3> () (0);
#endif

#ifdef USE_DOUBLE
    std::cout << "double, bounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<double, ublas::bounded_array<double, 3> >,
                          ublas::banded_matrix<double, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3> () ();
    test_my_matrix_vector<ublas::vector<double, ublas::bounded_array<double, 3> >,
                          ublas::banded_matrix<double, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3> () (0);
#endif

#ifdef USE_STD_COMPLEX
#ifdef USE_FLOAT
    std::cout << "std::complex<float>, bounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<std::complex<float>, ublas::bounded_array<std::complex<float>, 3> >,
                          ublas::banded_matrix<std::complex<float>, ublas::row_major, ublas::bounded_array<std::complex<float>, 3 * 3> >, 3> () ();
    test_my_matrix_vector<ublas::vector<std::complex<float>, ublas::bounded_array<std::complex<float>, 3> >,
                          ublas::banded_matrix<std::complex<float>, ublas::row_major, ublas::bounded_array<std::complex<float>, 3 * 3> >, 3> () (0);
#endif

#ifdef USE_DOUBLE
    std::cout << "std::complex<double>, bounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::bounded_array<std::complex<double>, 3> >,
                          ublas::banded_matrix<std::complex<double>, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3> () ();
    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::bounded_array<std::complex<double>, 3> >,
                          ublas::banded_matrix<std::complex<double>, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3> () (0);
#endif
#endif
#endif

#ifdef USE_UNBOUNDED_ARRAY
#ifdef USE_FLOAT
    std::cout << "float, unbounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<float, ublas::unbounded_array<float> >,
                          ublas::banded_matrix<float, ublas::row_major, ublas::unbounded_array<float> >, 3> () ();
    test_my_matrix_vector<ublas::vector<float, ublas::unbounded_array<float> >,
                          ublas::banded_matrix<float, ublas::row_major, ublas::unbounded_array<float> >, 3> () (0);
#endif

#ifdef USE_DOUBLE
    std::cout << "double, unbounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<double, ublas::unbounded_array<double> >,
                          ublas::banded_matrix<double, ublas::row_major, ublas::unbounded_array<double> >, 3> () ();
    test_my_matrix_vector<ublas::vector<double, ublas::unbounded_array<double> >,
                          ublas::banded_matrix<double, ublas::row_major, ublas::unbounded_array<double> >, 3> () (0);
#endif

#ifdef USE_STD_COMPLEX
#ifdef USE_FLOAT
    std::cout << "std::complex<float>, unbounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<std::complex<float>, ublas::unbounded_array<std::complex<float> > >,
                          ublas::banded_matrix<std::complex<float>, ublas::row_major, ublas::unbounded_array<std::complex<float> > >, 3> () ();
    test_my_matrix_vector<ublas::vector<std::complex<float>, ublas::unbounded_array<std::complex<float> > >,
                          ublas::banded_matrix<std::complex<float>, ublas::row_major, ublas::unbounded_array<std::complex<float> > >, 3> () (0);
#endif

#ifdef USE_DOUBLE
    std::cout << "std::complex<double>, unbounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::unbounded_array<std::complex<double> > >,
                          ublas::banded_matrix<std::complex<double>, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3> () ();
    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::unbounded_array<std::complex<double> > >,
                          ublas::banded_matrix<std::complex<double>, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3> () (0);
#endif
#endif
#endif

#ifdef USE_STD_VECTOR
#ifdef USE_FLOAT
    std::cout << "float, std::vector" << std::endl;
    test_my_matrix_vector<ublas::vector<float, std::vector<float> >,
                          ublas::banded_matrix<float, ublas::row_major, std::vector<float> >, 3> () ();
    test_my_matrix_vector<ublas::vector<float, std::vector<float> >,
                          ublas::banded_matrix<float, ublas::row_major, std::vector<float> >, 3> () (0);
#endif

#ifdef USE_DOUBLE
    std::cout << "double, std::vector" << std::endl;
    test_my_matrix_vector<ublas::vector<double, std::vector<double> >,
                          ublas::banded_matrix<double, ublas::row_major, std::vector<double> >, 3> () ();
    test_my_matrix_vector<ublas::vector<double, std::vector<double> >,
                          ublas::banded_matrix<double, ublas::row_major, std::vector<double> >, 3> () (0);
#endif

#ifdef USE_STD_COMPLEX
#ifdef USE_FLOAT
    std::cout << "std::complex<float>, std::vector" << std::endl;
    test_my_matrix_vector<ublas::vector<std::complex<float>, std::vector<std::complex<float> > >,
                          ublas::banded_matrix<std::complex<float>, ublas::row_major, std::vector<std::complex<float> > >, 3> () ();
    test_my_matrix_vector<ublas::vector<std::complex<float>, std::vector<std::complex<float> > >,
                          ublas::banded_matrix<std::complex<float>, ublas::row_major, std::vector<std::complex<float> > >, 3> () (0);
#endif

#ifdef USE_DOUBLE
    std::cout << "std::complex<double>, std::vector" << std::endl;
    test_my_matrix_vector<ublas::vector<std::complex<double>, std::vector<std::complex<double> > >,
                          ublas::banded_matrix<std::complex<double>, ublas::row_major, std::vector<std::complex<double> > >, 3> () ();
    test_my_matrix_vector<ublas::vector<std::complex<double>, std::vector<std::complex<double> > >,
                          ublas::banded_matrix<std::complex<double>, ublas::row_major, std::vector<std::complex<double> > >, 3> () (0);
#endif
#endif
#endif
#endif

#ifdef USE_DIAGONAL
#ifdef USE_BOUNDED_ARRAY
#ifdef USE_FLOAT
    std::cout << "float, bounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<float, ublas::bounded_array<float, 3> >,
                          ublas::diagonal_matrix<float, ublas::row_major, ublas::bounded_array<float, 3 * 3> >, 3> () ();
    test_my_matrix_vector<ublas::vector<float, ublas::bounded_array<float, 3> >,
                          ublas::diagonal_matrix<float, ublas::row_major, ublas::bounded_array<float, 3 * 3> >, 3> () (0);
#endif

#ifdef USE_DOUBLE
    std::cout << "double, bounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<double, ublas::bounded_array<double, 3> >,
                          ublas::diagonal_matrix<double, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3> () ();
    test_my_matrix_vector<ublas::vector<double, ublas::bounded_array<double, 3> >,
                          ublas::diagonal_matrix<double, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3> () (0);
#endif

#ifdef USE_STD_COMPLEX
#ifdef USE_FLOAT
    std::cout << "std::complex<float>, bounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<std::complex<float>, ublas::bounded_array<std::complex<float>, 3> >,
                          ublas::diagonal_matrix<std::complex<float>, ublas::row_major, ublas::bounded_array<std::complex<float>, 3 * 3> >, 3> () ();
    test_my_matrix_vector<ublas::vector<std::complex<float>, ublas::bounded_array<std::complex<float>, 3> >,
                          ublas::diagonal_matrix<std::complex<float>, ublas::row_major, ublas::bounded_array<std::complex<float>, 3 * 3> >, 3> () (0);
#endif

#ifdef USE_DOUBLE
    std::cout << "std::complex<double>, bounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::bounded_array<std::complex<double>, 3> >,
                          ublas::diagonal_matrix<std::complex<double>, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3> () ();
    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::bounded_array<std::complex<double>, 3> >,
                          ublas::diagonal_matrix<std::complex<double>, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3> () (0);
#endif
#endif
#endif

#ifdef USE_UNBOUNDED_ARRAY
#ifdef USE_FLOAT
    std::cout << "float, unbounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<float, ublas::unbounded_array<float> >,
                          ublas::diagonal_matrix<float, ublas::row_major, ublas::unbounded_array<float> >, 3> () ();
    test_my_matrix_vector<ublas::vector<float, ublas::unbounded_array<float> >,
                          ublas::diagonal_matrix<float, ublas::row_major, ublas::unbounded_array<float> >, 3> () (0);
#endif

#ifdef USE_DOUBLE
    std::cout << "double, unbounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<double, ublas::unbounded_array<double> >,
                          ublas::diagonal_matrix<double, ublas::row_major, ublas::unbounded_array<double> >, 3> () ();
    test_my_matrix_vector<ublas::vector<double, ublas::unbounded_array<double> >,
                          ublas::diagonal_matrix<double, ublas::row_major, ublas::unbounded_array<double> >, 3> () (0);
#endif

#ifdef USE_STD_COMPLEX
#ifdef USE_FLOAT
    std::cout << "std::complex<float>, unbounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<std::complex<float>, ublas::unbounded_array<std::complex<float> > >,
                          ublas::diagonal_matrix<std::complex<float>, ublas::row_major, ublas::unbounded_array<std::complex<float> > >, 3> () ();
    test_my_matrix_vector<ublas::vector<std::complex<float>, ublas::unbounded_array<std::complex<float> > >,
                          ublas::diagonal_matrix<std::complex<float>, ublas::row_major, ublas::unbounded_array<std::complex<float> > >, 3> () (0);
#endif

#ifdef USE_DOUBLE
    std::cout << "std::complex<double>, unbounded_array" << std::endl;
    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::unbounded_array<std::complex<double> > >,
                          ublas::diagonal_matrix<std::complex<double>, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3> () ();
    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::unbounded_array<std::complex<double> > >,
                          ublas::diagonal_matrix<std::complex<double>, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3> () (0);
#endif
#endif
#endif

#ifdef USE_STD_VECTOR
#ifdef USE_FLOAT
    std::cout << "float, std::vector" << std::endl;
    test_my_matrix_vector<ublas::vector<float, std::vector<float> >,
                          ublas::diagonal_matrix<float, ublas::row_major, std::vector<float> >, 3> () ();
    test_my_matrix_vector<ublas::vector<float, std::vector<float> >,
                          ublas::diagonal_matrix<float, ublas::row_major, std::vector<float> >, 3> () (0);
#endif

#ifdef USE_DOUBLE
    std::cout << "double, std::vector" << std::endl;
    test_my_matrix_vector<ublas::vector<double, std::vector<double> >,
                          ublas::diagonal_matrix<double, ublas::row_major, std::vector<double> >, 3> () ();
    test_my_matrix_vector<ublas::vector<double, std::vector<double> >,
                          ublas::diagonal_matrix<double, ublas::row_major, std::vector<double> >, 3> () (0);
#endif

#ifdef USE_STD_COMPLEX
#ifdef USE_FLOAT
    std::cout << "std::complex<float>, std::vector" << std::endl;
    test_my_matrix_vector<ublas::vector<std::complex<float>, std::vector<std::complex<float> > >,
                          ublas::diagonal_matrix<std::complex<float>, ublas::row_major, std::vector<std::complex<float> > >, 3> () ();
    test_my_matrix_vector<ublas::vector<std::complex<float>, std::vector<std::complex<float> > >,
                          ublas::diagonal_matrix<std::complex<float>, ublas::row_major, std::vector<std::complex<float> > >, 3> () (0);
#endif

#ifdef USE_DOUBLE
    std::cout << "std::complex<double>, std::vector" << std::endl;
    test_my_matrix_vector<ublas::vector<std::complex<double>, std::vector<std::complex<double> > >,
                          ublas::diagonal_matrix<std::complex<double>, ublas::row_major, std::vector<std::complex<double> > >, 3> () ();
    test_my_matrix_vector<ublas::vector<std::complex<double>, std::vector<std::complex<double> > >,
                          ublas::diagonal_matrix<std::complex<double>, ublas::row_major, std::vector<std::complex<double> > >, 3> () (0);
#endif
#endif
#endif
#endif
}


text:
package taiwan.no1.app.data.mapper.search;

import android.support.annotation.NonNull;

import com.innahema.collections.query.queriables.Queryable;

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

import javax.inject.Inject;

import taiwan.no1.app.data.entities.search.SearchTvShowsEntity;
import taiwan.no1.app.domain.mapper.IBeanMapper;
import taiwan.no1.app.mvp.models.search.SearchTvShowsModel;

/**
 * Created by weian on 2017/2/16.
 */

public class SearchTvShowsMapper implements IBeanMapper<SearchTvShowsModel, SearchTvShowsEntity> {
    @Inject
    public SearchTvShowsMapper() {
    }

    /**
     * Implement {@inheritDoc}
     */
    @NonNull
    @Override
    public SearchTvShowsEntity transformFrom(@NonNull SearchTvShowsModel model) {
        throw new Error("No-op");
    }

    /**
     * Implement {@inheritDoc}
     */
    @NonNull
    @Override
    public SearchTvShowsModel transformTo(@NonNull SearchTvShowsEntity entity) {
        List<SearchTvShowsModel.ResultsTvShowsBean> resultsTvShowsBean =
                null != entity.getResults() ?
                        Queryable.from(entity.getResults())
                                .map(data -> new SearchTvShowsModel.ResultsTvShowsBean(
                                        data.getPoster_path(),
                                        data.getPopularity(),
                                        data.getId(),
                                        data.getBackdrop_path(),
                                        data.getVote_average(),
                                        data.getOverview(),
                                        data.getFirst_air_date(),
                                        data.getOriginal_language(),
                                        data.getVote_count(),
                                        data.getName(),
                                        data.getOriginal_name(),
                                        null != data.getOrigin_country() ?
                                                new ArrayList<String>(data.getOrigin_country()) : null,
                                        null != data.getGenre_ids() ?
                                                new ArrayList<Integer>(data.getGenre_ids()) : null))
                                .toList(): Collections.emptyList();

        return new SearchTvShowsModel(entity.getPage(),
                entity.getTotal_results(),
                entity.getTotal_pages(),
                resultsTvShowsBean);
    }
}


text:
@interface FriendGrounpModel : NSObject

@property (nonatomic, copy) NSString *name;

@property (nonatomic,strong) NSArray *friends;

@end


text:
// #include "scope_test.hpp"
#include "xslt_test.hpp"
int main(int argc, const char* argv[])
{
  bool ok = XSLT_test_suite<std::string, Arabica::default_string_adaptor<std::string> >(argc, argv);
  //return !ok;
  return 77;  // the make check magic ignore this result marker
}  // main


text:
module Azure::Compute::Mgmt::V2020_12_01
  module Models
    #
    # Defines values for SecurityTypes
    #
    module SecurityTypes
      TrustedLaunch = "TrustedLaunch"
    end
  end
end


text:
package com.metamx.common;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class Props {

  public static Properties fromFilename(String filename) throws IOException {
    final Properties props = new Properties();
    props.load(new FileInputStream(filename));
    return props;
  }

}


text:
package com.example.android.support.wearable.notifications;

/**
 * Base class for presets that have a simple name to display.
 */
public abstract class NamedPreset {
    public final int nameResId;

    public NamedPreset(int nameResId) {
        this.nameResId = nameResId;
    }
}


text:
package org.apache.camel.component.atlasmap;

import java.util.Map;

import io.atlasmap.api.AtlasContextFactory;
import org.apache.camel.Endpoint;
import org.apache.camel.component.atlasmap.AtlasMapEndpoint.TargetMapMode;
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.annotations.Component;
import org.apache.camel.support.DefaultComponent;
import org.apache.camel.support.ResourceHelper;

/**
 * The AtlasMap Component is for working with AtlasMap
 * Data Mapper.
 */
@Component("atlasmap")
public class AtlasMapComponent extends DefaultComponent {

    @Metadata(label = "advanced")
    private AtlasContextFactory atlasContextFactory;

    public AtlasContextFactory getAtlasContextFactory() {
        return atlasContextFactory;
    }

    /**
     * To use the {@link AtlasContextFactory} otherwise a new engine is created.
     *
     * @param atlasContextFactory {@link AtlasContextFactory}
     */
    public void setAtlasContextFactory(AtlasContextFactory atlasContextFactory) {
        this.atlasContextFactory = atlasContextFactory;
    }

    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
        boolean cache = getAndRemoveParameter(parameters, "contentCache", Boolean.class, Boolean.TRUE);
        String sourceMapName = getAndRemoveParameter(parameters, "sourceMapName", String.class);
        String targetMapName = getAndRemoveParameter(parameters, "targetMapName", String.class);
        TargetMapMode targetMapMode = getAndRemoveParameter(parameters, "targetMapMode", TargetMapMode.class);

        AtlasMapEndpoint endpoint = new AtlasMapEndpoint(uri, this, remaining);
        setProperties(endpoint, parameters);
        endpoint.setContentCache(cache);
        endpoint.setSourceMapName(sourceMapName);
        endpoint.setTargetMapName(targetMapName);
        endpoint.setAtlasContextFactory(getAtlasContextFactory());
        if (targetMapMode != null) {
            endpoint.setTargetMapMode(targetMapMode);
        }

        // if its a http resource then append any remaining parameters and update the
        // resource uri
        if (ResourceHelper.isHttpUri(remaining)) {
            String remainingAndParameters = ResourceHelper.appendParameters(remaining, parameters);
            endpoint.setResourceUri(remainingAndParameters);
        }

        return endpoint;
    }
}


text:
import actions from './actions';
import mutations from './mutations';
import state from './state';
// import getters from './getters';

const ogmEditor = {
  namespaced: true,
  state,
  actions,
  mutations
  // getters
};

export default ogmEditor;


text:
/*

loader - framework CSS+JS ce poate fi folosit, impreuna cu FontAwesome si JQuery, pentru a genera loader pentru pagini web

Obs: Functii utile:
1.loader_launch() - activeaza modal-ul cu loader
2.loader_init(timer) - inchide modal-ul cu loader doar dupa trecerea a minim (timer)ms de la incarcarea completa a paginii
3.loader_hide() - inchide modal-ul cu loader dupa trecerea a (timer)ms de la chemarea functiei
Obs: Functiile pot fi customisate prin schimbarea variabilei timer. Initial, loader-ul este setat sa se inchida dupa 2s.

Utilizare:
1. Includere CSS
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="loader.css" rel="stylesheet" type="text/css">
2. Includere JS

3. Exemplu cod HTML

*/

.loader{
display: block;
position: fixed;
width: 100%;
height: 100%;
background-color: #fff;
text-align: center;
z-index: 3;
}

.loader i{
color: #3498db;
}


text:
/**
 * @fileOverview Language function meta
 */
define(['exports',
        'bes/record',
        'atum/compute',
        'atum/fun',
        'atum/builtin/meta/func',
        'atum/operations/declaration_binding',
        'atum/operations/environment',
        'atum/operations/execution_context',
        'atum/operations/func',
        'atum/operations/type_conversion',
        'atum/operations/value_reference',
        'atum/value/type',
        'atum/value/value',],
function(exports,
        record,
        compute,
        fun,
        meta_func,
        declaration_bindings,
        environment,
        execution_context,
        func,
        type_conversion,
        value_reference,
        type,
        value){
"use strict";

/* LanguageFunction
 ******************************************************************************/
/**
 * Meta object for a hosted language function defined in code.
 */
var LanguageFunction = record.extend(meta_func.Function, [
    'scope',
    'strict',
    'id',
    'names',
    'code',
    'declarations',
    'body']);

LanguageFunction.prototype._call = function(ref, thisObj, args) {
    var self = this;
    return environment.environmentBlock(
        compute.sequence(
            compute.bind(
                environment.createDeclativeEnvironment(self.scope),
                function(env) {
                    return declaration_bindings.initFunction(env,
                        self.strict,
                        ref,
                        self.id,
                        self.names,
                        args,
                        self.declarations);
                }),
            execution_context.withThisBinding(thisObj,
                self.body)));
};

LanguageFunction.prototype.call = function(ref, thisObj, args) {
    var self = this, strict = this.strict;
    return value_reference.dereference(thisObj, function(t, thisObj) {
        if (!strict && !value.isObject(t)) {
            switch (t.type) {
            case type.UNDEFINED:
            case type.NULL:
                return compute.bind(
                    execution_context.thisBinding,
                    function(t) {
                        return self._call(ref, t, args);
                    });

            case type.STRING:
            case type.NUMBER:
            case type.BOOLEAN:
                return compute.bind(
                    type_conversion.toObject(thisObj),
                    function(t) {
                        return func.forward(ref, t, args);
                    });
            }
        }
        return self._call(ref, thisObj, args);
    });
};

/* Export
 ******************************************************************************/
exports.LanguageFunction = LanguageFunction;

});