text:
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 Hauke Heibel <hauke.heibel@gmail.com>
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 3 of the License, or (at your option) any later version.
//
// Alternatively, you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License and a copy of the GNU General Public License along with
// Eigen. If not, see <http://www.gnu.org/licenses/>.

#ifndef EIGEN_UMEYAMA_H
#define EIGEN_UMEYAMA_H

// This file requires the user to include
// * Eigen/Core
// * Eigen/LU
// * Eigen/SVD
// * Eigen/Array

#ifndef EIGEN_PARSED_BY_DOXYGEN

// These helpers are required since it allows to use mixed types as parameters
// for the Umeyama. The problem with mixed parameters is that the return type
// cannot trivially be deduced when float and double types are mixed.
namespace
{
  // Compile time return type deduction for different MatrixBase types.
  // Different means here different alignment and parameters but the same underlying
  // real scalar type.
  template<typename MatrixType, typename OtherMatrixType>
  struct ei_umeyama_transform_matrix_type
  {
    enum {
      MinRowsAtCompileTime = EIGEN_SIZE_MIN_PREFER_DYNAMIC(MatrixType::RowsAtCompileTime, OtherMatrixType::RowsAtCompileTime),

      // When possible we want to choose some small fixed size value since the result
      // is likely to fit on the stack. So here, EIGEN_SIZE_MIN_PREFER_DYNAMIC is not what we want.
      HomogeneousDimension = int(MinRowsAtCompileTime) == Dynamic ? Dynamic : int(MinRowsAtCompileTime)+1
    };

    typedef Matrix<typename ei_traits<MatrixType>::Scalar,
      HomogeneousDimension,
      HomogeneousDimension,
      AutoAlign | (ei_traits<MatrixType>::Flags & RowMajorBit ? RowMajor : ColMajor),
      HomogeneousDimension,
      HomogeneousDimension
    > type;
  };
}

#endif

/**
* \geometry_module \ingroup Geometry_Module
*
* \brief Returns the transformation between two point sets.
*
* The algorithm is based on:
* "Least-squares estimation of transformation parameters between two point patterns",
* Shinji Umeyama, PAMI 1991, DOI: 10.1109/34.88573
*
* It estimates parameters \f$ c, \mathbf{R}, \f$ and \f$ \mathbf{t} \f$ such that
* \f{align*}
*   \frac{1}{n} \sum_{i=1}^n \vert\vert y_i - (c\mathbf{R}x_i + \mathbf{t}) \vert\vert_2^2
* \f}
* is minimized.
*
* The algorithm is based on the analysis of the covariance matrix
* \f$ \Sigma_{\mathbf{x}\mathbf{y}} \in \mathbb{R}^{d \times d} \f$
* of the input point sets \f$ \mathbf{x} \f$ and \f$ \mathbf{y} \f$ where
* \f$d\f$ is corresponding to the dimension (which is typically small).
* The analysis is involving the SVD having a complexity of \f$O(d^3)\f$
* though the actual computational effort lies in the covariance
* matrix computation which has an asymptotic lower bound of \f$O(dm)\f$ when
* the input point sets have dimension \f$d \times m\f$.
*
* Currently the method is working only for floating point matrices.
*
* \todo Should the return type of umeyama() become a Transform?
*
* \param src Source points \f$ \mathbf{x} = \left( x_1, \hdots, x_n \right) \f$.
* \param dst Destination points \f$ \mathbf{y} = \left( y_1, \hdots, y_n \right) \f$.
* \param with_scaling Sets \f$ c=1 \f$ when false is passed.
* \return The homogeneous transformation
* \f{align*}
*   T = \begin{bmatrix} c\mathbf{R} & \mathbf{t} \\ \mathbf{0} & 1 \end{bmatrix}
* \f}
* minimizing the resudiual above. This transformation is always returned as an
* Eigen::Matrix.
*/
template <typename Derived, typename OtherDerived>
typename ei_umeyama_transform_matrix_type<Derived, OtherDerived>::type
umeyama(const MatrixBase<Derived>& src, const MatrixBase<OtherDerived>& dst, bool with_scaling = true)
{
  typedef typename ei_umeyama_transform_matrix_type<Derived, OtherDerived>::type TransformationMatrixType;
  typedef typename ei_traits<TransformationMatrixType>::Scalar Scalar;
  typedef typename NumTraits<Scalar>::Real RealScalar;
  typedef typename Derived::Index Index;

  EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsComplex, NUMERIC_TYPE_MUST_BE_REAL)
  EIGEN_STATIC_ASSERT((ei_is_same_type<Scalar, typename ei_traits<OtherDerived>::Scalar>::ret),
    YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)

  enum { Dimension = EIGEN_SIZE_MIN_PREFER_DYNAMIC(Derived::RowsAtCompileTime, OtherDerived::RowsAtCompileTime) };

  typedef Matrix<Scalar, Dimension, 1> VectorType;
  typedef Matrix<Scalar, Dimension, Dimension> MatrixType;
  typedef typename ei_plain_matrix_type_row_major<Derived>::type RowMajorMatrixType;

  const Index m = src.rows(); // dimension
  const Index n = src.cols(); // number of measurements

  // required for demeaning ...
  const RealScalar one_over_n = 1 / static_cast<RealScalar>(n);

  // computation of mean
  const VectorType src_mean = src.rowwise().sum() * one_over_n;
  const VectorType dst_mean = dst.rowwise().sum() * one_over_n;

  // demeaning of src and dst points
  const RowMajorMatrixType src_demean = src.colwise() - src_mean;
  const RowMajorMatrixType dst_demean = dst.colwise() - dst_mean;

  // Eq. (36)-(37)
  const Scalar src_var = src_demean.rowwise().squaredNorm().sum() * one_over_n;

  // Eq. (38)
  const MatrixType sigma = one_over_n * dst_demean * src_demean.transpose();

  SVD<MatrixType> svd(sigma);

  // Initialize the resulting transformation with an identity matrix...
  TransformationMatrixType Rt = TransformationMatrixType::Identity(m+1,m+1);

  // Eq. (39)
  VectorType S = VectorType::Ones(m);
  if (sigma.determinant()<0) S(m-1) = -1;

  // Eq. (40) and (43)
  const VectorType& d = svd.singularValues();
  Index rank = 0; for (Index i=0; i<m; ++i) if (!ei_isMuchSmallerThan(d.coeff(i),d.coeff(0))) ++rank;
  if (rank == m-1) {
    if ( svd.matrixU().determinant() * svd.matrixV().determinant() > 0 ) {
      Rt.block(0,0,m,m).noalias() = svd.matrixU()*svd.matrixV().transpose();
    } else {
      const Scalar s = S(m-1); S(m-1) = -1;
      Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose();
      S(m-1) = s;
    }
  } else {
    Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose();
  }

  // Eq. (42)
  const Scalar c = 1/src_var * svd.singularValues().dot(S);

  // Eq. (41)
  // Note that we first assign dst_mean to the destination so that there no need
  // for a temporary.
  Rt.col(m).head(m) = dst_mean;
  Rt.col(m).head(m).noalias() -= c*Rt.topLeftCorner(m,m)*src_mean;

  if (with_scaling) Rt.block(0,0,m,m) *= c;

  return Rt;
}

#endif // EIGEN_UMEYAMA_H


text:
namespace myapps {

    class CreateInstanceImpl : public CreateInstance
    {
        std::vector<CreateInstance::Func> func_vector_;
    public:
        virtual void attach(CreateInstance::Func func) {
            func_vector_.push_back(std::bind(func, std::placeholders::_1, std::placeholders::_2));
        }

        virtual bool create(const std::string &id, void **object) {
            for (auto it = func_vector_.begin(); it != func_vector_.end(); it++)
                if (it->operator()(id, object)) return true;
            *object = nullptr;
            return false;
        }
    };

}

redpajama_set_name: RedPajamaGithub


text:
package org.openqa.selenium.grid.node.remote;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;

import org.openqa.selenium.Capabilities;
import org.openqa.selenium.NoSuchSessionException;
import org.openqa.selenium.RetrySessionRequestException;
import org.openqa.selenium.SessionNotCreatedException;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.grid.data.CreateSessionRequest;
import org.openqa.selenium.grid.data.CreateSessionResponse;
import org.openqa.selenium.grid.data.NodeId;
import org.openqa.selenium.grid.data.NodeStatus;
import org.openqa.selenium.grid.data.Session;
import org.openqa.selenium.grid.node.HealthCheck;
import org.openqa.selenium.grid.node.Node;
import org.openqa.selenium.grid.security.AddSecretFilter;
import org.openqa.selenium.grid.security.Secret;
import org.openqa.selenium.grid.web.Values;
import org.openqa.selenium.internal.Either;
import org.openqa.selenium.internal.Require;
import org.openqa.selenium.json.Json;
import org.openqa.selenium.json.JsonInput;
import org.openqa.selenium.remote.SessionId;
import org.openqa.selenium.remote.http.Filter;
import org.openqa.selenium.remote.http.HttpClient;
import org.openqa.selenium.remote.http.HttpHandler;
import org.openqa.selenium.remote.http.HttpRequest;
import org.openqa.selenium.remote.http.HttpResponse;
import org.openqa.selenium.remote.tracing.HttpTracing;
import org.openqa.selenium.remote.tracing.Tracer;

import java.io.IOException;
import java.io.Reader;
import java.io.UncheckedIOException;
import java.net.URI;
import java.util.Collection;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;

import static java.net.HttpURLConnection.HTTP_OK;
import static org.openqa.selenium.grid.data.Availability.DOWN;
import static org.openqa.selenium.grid.data.Availability.DRAINING;
import static org.openqa.selenium.grid.data.Availability.UP;
import static org.openqa.selenium.net.Urls.fromUri;
import static org.openqa.selenium.remote.http.Contents.asJson;
import static org.openqa.selenium.remote.http.Contents.reader;
import static org.openqa.selenium.remote.http.HttpMethod.DELETE;
import static org.openqa.selenium.remote.http.HttpMethod.GET;
import static org.openqa.selenium.remote.http.HttpMethod.POST;

public class RemoteNode extends Node {

  public static final Json JSON = new Json();
  private final HttpHandler client;
  private final URI externalUri;
  private final Set<Capabilities> capabilities;
  private final HealthCheck healthCheck;
  private final Filter addSecret;

  public RemoteNode(
      Tracer tracer,
      HttpClient.Factory clientFactory,
      NodeId id,
      URI externalUri,
      Secret registrationSecret,
      Collection<Capabilities> capabilities) {
    super(tracer, id, externalUri, registrationSecret);
    this.externalUri = Require.nonNull("External URI", externalUri);
    this.capabilities = ImmutableSet.copyOf(capabilities);

    this.client = Require.nonNull("HTTP client factory", clientFactory)
      .createClient(fromUri(externalUri));

    this.healthCheck = new RemoteCheck();

    Require.nonNull("Registration secret", registrationSecret);
    this.addSecret = new AddSecretFilter(registrationSecret);
  }

  @Override
  public boolean isReady() {
    try {
      return client.execute(new HttpRequest(GET, "/readyz")).isSuccessful();
    } catch (Exception e) {
      return false;
    }
  }

  @Override
  public boolean isSupporting(Capabilities capabilities) {
    return this.capabilities.stream()
        .anyMatch(caps -> caps.getCapabilityNames().stream()
            .allMatch(name -> Objects.equals(
                caps.getCapability(name),
                capabilities.getCapability(name))));

  }

  @Override
  public Either<WebDriverException, CreateSessionResponse> newSession(
    CreateSessionRequest sessionRequest) {
    Require.nonNull("Capabilities for session", sessionRequest);

    HttpRequest req = new HttpRequest(POST, "/se/grid/node/session");
    HttpTracing.inject(tracer, tracer.getCurrentContext(), req);
    req.setContent(asJson(sessionRequest));

    HttpResponse httpResponse = client.with(addSecret).execute(req);

    Optional<Map<String, Object>> maybeResponse =
      Optional.ofNullable(Values.get(httpResponse, Map.class));

    if (maybeResponse.isPresent()) {
      Map<String, Object> response = maybeResponse.get();

      if (response.containsKey("sessionResponse")) {
        String rawResponse = JSON.toJson(response.get("sessionResponse"));
        CreateSessionResponse sessionResponse = JSON.toType(rawResponse, CreateSessionResponse.class);
        return Either.right(sessionResponse);
      } else {
        String rawException = JSON.toJson(response.get("exception"));
        Map<String, Object> exception = JSON.toType(rawException, Map.class);
        String errorType = (String) exception.get("error");
        String errorMessage = (String) exception.get("message");

        if (RetrySessionRequestException.class.getName().contentEquals(errorType)) {
          return Either.left(new RetrySessionRequestException(errorMessage));
        } else {
          return Either.left(new SessionNotCreatedException(errorMessage));
        }
      }
    }

    return Either.left(new SessionNotCreatedException("Error while mapping response from Node"));
  }

  @Override
  public boolean isSessionOwner(SessionId id) {
    Require.nonNull("Session ID", id);

    HttpRequest req = new HttpRequest(GET, "/se/grid/node/owner/" + id);
    HttpTracing.inject(tracer, tracer.getCurrentContext(), req);

    HttpResponse res = client.with(addSecret).execute(req);

    return Boolean.TRUE.equals(Values.get(res, Boolean.class));
  }

  @Override
  public Session getSession(SessionId id) throws NoSuchSessionException {
    Require.nonNull("Session ID", id);

    HttpRequest req = new HttpRequest(GET, "/se/grid/node/session/" + id);
    HttpTracing.inject(tracer, tracer.getCurrentContext(), req);

    HttpResponse res = client.with(addSecret).execute(req);

    return Values.get(res, Session.class);
  }

  @Override
  public HttpResponse executeWebDriverCommand(HttpRequest req) {
    return client.execute(req);
  }

  @Override
  public HttpResponse uploadFile(HttpRequest req, SessionId id) {
    return client.execute(req);
  }

  @Override
  public void stop(SessionId id) throws NoSuchSessionException {
    Require.nonNull("Session ID", id);
    HttpRequest req = new HttpRequest(DELETE, "/se/grid/node/session/" + id);
    HttpTracing.inject(tracer, tracer.getCurrentContext(), req);

    HttpResponse res = client.with(addSecret).execute(req);

    Values.get(res, Void.class);
  }

  @Override
  public NodeStatus getStatus() {
    HttpRequest req = new HttpRequest(GET, "/status");
    HttpTracing.inject(tracer, tracer.getCurrentContext(), req);

    HttpResponse res = client.execute(req);

    try (Reader reader = reader(res);
         JsonInput in = JSON.newInput(reader)) {
      in.beginObject();

      // Skip everything until we find "value"
      while (in.hasNext()) {
        if ("value".equals(in.nextName())) {
          in.beginObject();

          while (in.hasNext()) {
            if ("node".equals(in.nextName())) {
              return in.read(NodeStatus.class);
            } else {
              in.skipValue();
            }
          }

          in.endObject();
        } else {
          in.skipValue();
        }
      }
    } catch (IOException e) {
      throw new UncheckedIOException(e);
    }

    throw new IllegalStateException("Unable to read status");
  }

  @Override
  public HealthCheck getHealthCheck() {
    return healthCheck;
  }

  @Override
  public void drain() {
    HttpRequest req = new HttpRequest(POST, "/se/grid/node/drain");
    HttpTracing.inject(tracer, tracer.getCurrentContext(), req);

    HttpResponse res = client.with(addSecret).execute(req);

    if(res.getStatus() == HTTP_OK) {
      draining = true;
    }
  }

  @SuppressWarnings("unused")
  private Map<String, Object> toJson() {
    return ImmutableMap.of(
      "id", getId(),
      "uri", externalUri,
      "capabilities", capabilities);
  }

  private class RemoteCheck implements HealthCheck {
    @Override
    public Result check() {
      try {
        NodeStatus status = getStatus();

        switch (status.getAvailability()) {
          case DOWN:
            return new Result(DOWN, externalUri + " is down");

          case DRAINING:
            return new Result(DRAINING, externalUri + " is draining");

          case UP:
            return new Result(UP, externalUri + " is ok");

          default:
            throw new IllegalStateException("Unknown node availability: " + status.getAvailability());
        }
      } catch (RuntimeException e) {
        return new Result(
            DOWN,
            "Unable to determine node status: " + e.getMessage());
      }
    }
  }
}


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-b10
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.11.27 at 05:21:34 PM CET
//

package com.mobileman.projecth.services.ws.mobile.model;

import java.math.BigDecimal;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

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

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="UserName" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="ActivationCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="Gender" type="{http://www.w3.org/2001/XMLSchema}integer"/>
 *         <element name="Birthday" type="{http://www.w3.org/2001/XMLSchema}integer"/>
 *         <element name="InitialSymptomDate" type="{http://www.w3.org/2001/XMLSchema}decimal"/>
 *         <element name="InitialDiagnosisDate" type="{http://www.w3.org/2001/XMLSchema}decimal"/>
 *         <element name="MedicineClass" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="Medicine" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "userName",
    "activationCode",
    "gender",
    "birthday",
    "initialSymptomDate",
    "initialDiagnosisDate",
    "medicineClass",
    "medicine"
})
@XmlRootElement(name = "ProjectHPostInitialRequest")
public class ProjectHPostInitialRequest {

    @XmlElement(name = "UserName", required = true)
    protected String userName;
    @XmlElement(name = "ActivationCode", required = true)
    protected String activationCode;
    @XmlElement(name = "Gender", required = true)
    protected BigInteger gender;
    @XmlElement(name = "Birthday", required = true)
    protected BigInteger birthday;
    @XmlElement(name = "InitialSymptomDate", required = true)
    protected BigDecimal initialSymptomDate;
    @XmlElement(name = "InitialDiagnosisDate", required = true)
    protected BigDecimal initialDiagnosisDate;
    @XmlElement(name = "MedicineClass", required = true)
    protected String medicineClass;
    @XmlElement(name = "Medicine", required = true)
    protected String medicine;

    /**
     * Gets the value of the userName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getUserName() {
        return userName;
    }

    /**
     * Sets the value of the userName property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setUserName(String value) {
        this.userName = value;
    }

    /**
     * Gets the value of the activationCode property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getActivationCode() {
        return activationCode;
    }

    /**
     * Sets the value of the activationCode property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setActivationCode(String value) {
        this.activationCode = value;
    }

    /**
     * Gets the value of the gender property.
     *
     * @return
     *     possible object is
     *     {@link BigInteger }
     *
     */
    public BigInteger getGender() {
        return gender;
    }

    /**
     * Sets the value of the gender property.
     *
     * @param value
     *     allowed object is
     *     {@link BigInteger }
     *
     */
    public void setGender(BigInteger value) {
        this.gender = value;
    }

    /**
     * Gets the value of the birthday property.
     *
     * @return
     *     possible object is
     *     {@link BigInteger }
     *
     */
    public BigInteger getBirthday() {
        return birthday;
    }

    /**
     * Sets the value of the birthday property.
     *
     * @param value
     *     allowed object is
     *     {@link BigInteger }
     *
     */
    public void setBirthday(BigInteger value) {
        this.birthday = value;
    }

    /**
     * Gets the value of the initialSymptomDate property.
     *
     * @return
     *     possible object is
     *     {@link BigDecimal }
     *
     */
    public BigDecimal getInitialSymptomDate() {
        return initialSymptomDate;
    }

    /**
     * Sets the value of the initialSymptomDate property.
     *
     * @param value
     *     allowed object is
     *     {@link BigDecimal }
     *
     */
    public void setInitialSymptomDate(BigDecimal value) {
        this.initialSymptomDate = value;
    }

    /**
     * Gets the value of the initialDiagnosisDate property.
     *
     * @return
     *     possible object is
     *     {@link BigDecimal }
     *
     */
    public BigDecimal getInitialDiagnosisDate() {
        return initialDiagnosisDate;
    }

    /**
     * Sets the value of the initialDiagnosisDate property.
     *
     * @param value
     *     allowed object is
     *     {@link BigDecimal }
     *
     */
    public void setInitialDiagnosisDate(BigDecimal value) {
        this.initialDiagnosisDate = value;
    }

    /**
     * Gets the value of the medicineClass property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getMedicineClass() {
        return medicineClass;
    }

    /**
     * Sets the value of the medicineClass property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setMedicineClass(String value) {
        this.medicineClass = value;
    }

    /**
     * Gets the value of the medicine property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getMedicine() {
        return medicine;
    }

    /**
     * Sets the value of the medicine property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setMedicine(String value) {
        this.medicine = value;
    }

}


text:
<?php

require 'vendor/autoload.php';

$loop = \React\EventLoop\Factory::create();
$dir = \React\Filesystem\Filesystem::create($loop)->dir(dirname(__DIR__));
$dir->ls()->then(function ($list) {
    foreach ($list as $node) {
        echo $node->getPath(), PHP_EOL;
    }
}, function ($e) {
    die($e->getMessage() . PHP_EOL);
});

$loop->run();


text:
<resources>
    <string name="app_name">Workshop3</string>
    <string name="title_activity_main2">Main2Activity</string>
</resources>


text:
using content::BrowserThread;

// Forward declaration of internal node functions.
namespace node {
void Init(int*, const char**, int*, const char***);
void Load(Environment* env);
void SetupProcessObject(Environment*, int, const char* const*, int,
                        const char* const*);
}

namespace atom {

namespace {

// Empty callback for async handle.
void UvNoOp(uv_async_t* handle, int status) {
}

// Convert the given vector to an array of C-strings. The strings in the
// returned vector are only guaranteed valid so long as the vector of strings
// is not modified.
scoped_ptr<const char*[]> StringVectorToArgArray(
    const std::vector<std::string>& vector) {
  scoped_ptr<const char*[]> array(new const char*[vector.size()]);
  for (size_t i = 0; i < vector.size(); ++i)
    array[i] = vector[i].c_str();
  return array.Pass();
}

#if defined(OS_WIN)
std::vector<std::string> String16VectorToStringVector(
    const std::vector<string16>& vector) {
  std::vector<std::string> utf8_vector;
  utf8_vector.reserve(vector.size());
  for (size_t i = 0; i < vector.size(); ++i)
    utf8_vector.push_back(UTF16ToUTF8(vector[i]));
  return utf8_vector;
}
#endif

}  // namespace

node::Environment* global_env = NULL;

NodeBindings::NodeBindings(bool is_browser)
    : is_browser_(is_browser),
      message_loop_(NULL),
      uv_loop_(uv_default_loop()),
      embed_closed_(false),
      uv_env_(NULL),
      weak_factory_(this) {
}

NodeBindings::~NodeBindings() {
  // Quit the embed thread.
  embed_closed_ = true;
  uv_sem_post(&embed_sem_);
  WakeupEmbedThread();

  // Wait for everything to be done.
  uv_thread_join(&embed_thread_);

  // Clear uv.
  uv_sem_destroy(&embed_sem_);
  uv_timer_stop(&idle_timer_);
}

void NodeBindings::Initialize() {
  // Init idle GC for browser.
  if (is_browser_) {
    uv_timer_init(uv_default_loop(), &idle_timer_);
    uv_timer_start(&idle_timer_, IdleCallback, 5000, 5000);
  }

  // Open node's error reporting system for browser process.
  node::g_standalone_mode = is_browser_;
  node::g_upstream_node_mode = false;

  // Init node.
  // (we assume it would not node::Init would not modify the parameters under
  // embedded mode).
  node::Init(NULL, NULL, NULL, NULL);
}

node::Environment* NodeBindings::CreateEnvironment(
    v8::Handle<v8::Context> context) {
  std::vector<std::string> args =
#if defined(OS_WIN)
      String16VectorToStringVector(CommandLine::ForCurrentProcess()->argv());
#else
      CommandLine::ForCurrentProcess()->argv();
#endif

  // Feed node the path to initialization script.
  base::FilePath exec_path(CommandLine::ForCurrentProcess()->argv()[0]);
  PathService::Get(base::FILE_EXE, &exec_path);
  base::FilePath resources_path =
#if defined(OS_MACOSX)
      is_browser_ ? exec_path.DirName().DirName().Append("Resources") :
                    exec_path.DirName().DirName().DirName().DirName().DirName()
                             .Append("Resources");
#else
      exec_path.DirName().AppendASCII("resources");
#endif
  base::FilePath script_path =
      resources_path.AppendASCII("atom")
                    .AppendASCII(is_browser_ ? "browser" : "renderer")
                    .AppendASCII("lib")
                    .AppendASCII("init.js");
  std::string script_path_str = script_path.AsUTF8Unsafe();
  args.insert(args.begin() + 1, script_path_str.c_str());

  // Convert string vector to const char* array.
  scoped_ptr<const char*[]> c_argv = StringVectorToArgArray(args);

  // Construct the parameters that passed to node::CreateEnvironment:
  v8::Isolate* isolate = context->GetIsolate();
  int argc = args.size();
  const char** argv = c_argv.get();
  int exec_argc = 0;
  const char** exec_argv = NULL;

  using namespace v8;  // NOLINT
  using namespace node;  // NOLINT

  // Following code are stripped from node::CreateEnvironment in node.cc:
  HandleScope handle_scope(isolate);
  Context::Scope context_scope(context);

  Environment* env = Environment::New(context);

  uv_check_init(env->event_loop(), env->immediate_check_handle());
  uv_unref(
      reinterpret_cast<uv_handle_t*>(env->immediate_check_handle()));
  uv_idle_init(env->event_loop(), env->immediate_idle_handle());

  uv_prepare_init(env->event_loop(), env->idle_prepare_handle());
  uv_check_init(env->event_loop(), env->idle_check_handle());
  uv_unref(reinterpret_cast<uv_handle_t*>(env->idle_prepare_handle()));
  uv_unref(reinterpret_cast<uv_handle_t*>(env->idle_check_handle()));

  Local<FunctionTemplate> process_template = FunctionTemplate::New();
  process_template->SetClassName(FIXED_ONE_BYTE_STRING(isolate, "process"));

  Local<Object> process_object = process_template->GetFunction()->NewInstance();
  env->set_process_object(process_object);

  SetupProcessObject(env, argc, argv, exec_argc, exec_argv);
  Load(env);

  return env;
}

void NodeBindings::PrepareMessageLoop() {
  DCHECK(!is_browser_ || BrowserThread::CurrentlyOn(BrowserThread::UI));

  // Add dummy handle for libuv, otherwise libuv would quit when there is
  // nothing to do.
  uv_async_init(uv_loop_, &dummy_uv_handle_, UvNoOp);

  // Start worker that will interrupt main loop when having uv events.
  uv_sem_init(&embed_sem_, 0);
  uv_thread_create(&embed_thread_, EmbedThreadRunner, this);
}

void NodeBindings::RunMessageLoop() {
  DCHECK(!is_browser_ || BrowserThread::CurrentlyOn(BrowserThread::UI));

  // The MessageLoop should have been created, remember the one in main thread.
  message_loop_ = base::MessageLoop::current();

  // Run uv loop for once to give the uv__io_poll a chance to add all events.
  UvRunOnce();
}

void NodeBindings::UvRunOnce() {
  DCHECK(!is_browser_ || BrowserThread::CurrentlyOn(BrowserThread::UI));

  // Use Locker in browser process.
  BrowserV8Locker locker(node_isolate);

  v8::HandleScope handle_scope(node_isolate);

  // Enter node context while dealing with uv events, by default the global
  // env would be used unless user specified another one (this happens for
  // renderer process, which wraps the uv loop with web page context).
  node::Environment* env = uv_env() ? uv_env() : global_env;
  v8::Context::Scope context_scope(env->context());

  // Deal with uv events.
  int r = uv_run(uv_loop_, (uv_run_mode)(UV_RUN_ONCE | UV_RUN_NOWAIT));
  if (r == 0 || uv_loop_->stop_flag != 0)
    message_loop_->QuitWhenIdle();  // Quit from uv.

  // Tell the worker thread to continue polling.
  uv_sem_post(&embed_sem_);
}

void NodeBindings::WakeupMainThread() {
  DCHECK(message_loop_);
  message_loop_->PostTask(FROM_HERE, base::Bind(&NodeBindings::UvRunOnce,
                                                weak_factory_.GetWeakPtr()));
}

void NodeBindings::WakeupEmbedThread() {
  uv_async_send(&dummy_uv_handle_);
}

// static
void NodeBindings::EmbedThreadRunner(void *arg) {
  NodeBindings* self = static_cast<NodeBindings*>(arg);

  while (true) {
    // Wait for the main loop to deal with events.
    uv_sem_wait(&self->embed_sem_);
    if (self->embed_closed_)
      break;

    // Wait for something to happen in uv loop.
    // Note that the PollEvents() is implemented by derived classes, so when
    // this class is being destructed the PollEvents() would not be available
    // anymore. Because of it we must make sure we only invoke PollEvents()
    // when this class is alive.
    self->PollEvents();
    if (self->embed_closed_)
      break;

    // Deal with event in main thread.
    self->WakeupMainThread();
  }
}

// static
void NodeBindings::IdleCallback(uv_timer_t*, int) {
  v8::V8::IdleNotification();
}

}  // namespace atom


text:
template <typename vector_type>
uint64_t PushBack(vector_type* vector) {
  for (typename vector_type::size_type i = 0; i < Config().num_elements();
       ++i) {
    vector->push_back(i);
  }
  return vector->size();
}

template <typename vector_type>
void PushBackUsingSTL(const char* vector_name, const int max_bit_width) {
  Benchmark<vector_type*, uint64_t> benchmark_reserved(
      PushBack<vector_type>,
      vector_name,
      "PushBackReserved");
  Benchmark<vector_type*, uint64_t> benchmark_unreserved(
      PushBack<vector_type>,
      vector_name,
      "PushBackUnreserved");
  for (int bit_width = 1; bit_width <= max_bit_width; ++bit_width) {
    vector_type reserved_vector, unreserved_vector;
    reserved_vector.reserve(Config().num_elements());
    volatile uint64_t result_reserved = benchmark_reserved.run(&reserved_vector,
                                                               bit_width);
    volatile uint64_t result_unreserved = benchmark_unreserved.run(
        &unreserved_vector,
        bit_width);
    assert(result_reserved == result_unreserved);
  }
}

template <typename vector_type>
void PushBackUsingVarbit(const char* vector_name) {
  Benchmark<vector_type*, uint64_t> benchmark_reserved(
      PushBack<vector_type>,
      vector_name,
      "PushBackReserved");
  Benchmark<vector_type*, uint64_t> benchmark_unreserved(
      PushBack<vector_type>,
      vector_name,
      "PushBackUnreserved");
  for (typename varbit::bit_size_type bit_width = 1;
       bit_width <= vector_type::max_bit_width();
       ++bit_width) {
    vector_type reserved_vector(bit_width, Config().num_elements());
    vector_type unreserved_vector(bit_width);
    volatile uint64_t result_reserved = benchmark_reserved.run(&reserved_vector,
                                                               bit_width);
    volatile uint64_t result_unreserved = benchmark_unreserved.run(
        &unreserved_vector,
        bit_width);
    assert(result_reserved == result_unreserved);
  }
}

int main(int argc, char** argv) {
  Configuration config = Config(argc, argv);
  PushBackUsingVarbit<varbit::vector<uint8_t> >("varbit8");
  PushBackUsingVarbit<varbit::vector<uint16_t> >("varbit16");
  PushBackUsingVarbit<varbit::vector<uint32_t> >("varbit32");
  PushBackUsingVarbit<varbit::vector<uint64_t> >("varbit64");
  PushBackUsingSTL<std::vector<uint8_t> >("std8", 8);
  PushBackUsingSTL<std::vector<uint16_t> >("std16", 16);
  PushBackUsingSTL<std::vector<uint32_t> >("std32", 32);
  PushBackUsingSTL<std::vector<uint64_t> >("std64", 64);
  return 0;
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#008577</color>
    <color name="colorPrimaryDark">#00574B</color>
    <color name="colorAccent">#D81B60</color>
    <color name="intel_blue">#0071c5</color>
    <color name="black">#000000</color>
    <color name="black_overlay">#66000000</color>
    <color name="white">#FFFFFF</color>
</resources>


text:
/* AUTO-GENERATED FILE.  DO NOT MODIFY.
 *
 * This class was automatically generated by the
 * aapt tool from the resource data it found.  It
 * should not be modified by hand.
 */

package com.example.mainframework02;

public final class R {
    public static final class attr {
    }
    public static final class dimen {
        /**  Default screen margins, per the Android Design guidelines.

         Customize dimensions originally defined in res/values/dimens.xml (such as
         screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.

         */
        public static final int activity_horizontal_margin=0x7f040000;
        public static final int activity_vertical_margin=0x7f040001;
    }
    public static final class drawable {
        public static final int bottom_bar=0x7f020000;
        public static final int ic_launcher=0x7f020001;
        public static final int tab_address_normal=0x7f020002;
        public static final int tab_address_pressed=0x7f020003;
        public static final int tab_bg2=0x7f020004;
        public static final int tab_find_frd_normal=0x7f020005;
        public static final int tab_find_frd_pressed=0x7f020006;
        public static final int tab_settings_normal=0x7f020007;
        public static final int tab_settings_pressed=0x7f020008;
        public static final int tab_weixin_normal=0x7f020009;
        public static final int tab_weixin_pressed=0x7f02000a;
        public static final int title_bar=0x7f02000b;
    }
    public static final class id {
        public static final int action_settings=0x7f08000d;
        public static final int btn_tab_bottom_contact=0x7f080007;
        public static final int btn_tab_bottom_friend=0x7f080005;
        public static final int btn_tab_bottom_setting=0x7f080009;
        public static final int btn_tab_bottom_weixin=0x7f080003;
        public static final int id_content=0x7f08000a;
        public static final int id_listview=0x7f08000c;
        public static final int id_tab_bottom_contact=0x7f080006;
        public static final int id_tab_bottom_friend=0x7f080004;
        public static final int id_tab_bottom_setting=0x7f080008;
        public static final int id_tab_bottom_weixin=0x7f080002;
        public static final int id_viewpager=0x7f080000;
        public static final int ly_main_tab_bottom=0x7f080001;
        public static final int ly_main_weixin=0x7f08000b;
    }
    public static final class layout {
        public static final int activity_main=0x7f030000;
        public static final int bottom_bar=0x7f030001;
        public static final int fragment_main=0x7f030002;
        public static final int main_tab_01=0x7f030003;
        public static final int main_tab_02=0x7f030004;
        public static final int main_tab_03=0x7f030005;
        public static final int main_tab_04=0x7f030006;
        public static final int title_bar=0x7f030007;
        public static final int welcome=0x7f030008;
    }
    public static final class menu {
        public static final int main=0x7f070000;
    }
    public static final class string {
        public static final int action_settings=0x7f050001;
        public static final int app_name=0x7f050000;
        public static final int hello_world=0x7f050002;
    }
    public static final class style {
        /**
        Base application theme, dependent on API level. This theme is replaced
        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.

            Theme customizations available in newer API levels can go in
            res/values-vXX/styles.xml, while customizations related to
            backward-compatibility can go here.

        Base application theme for API 11+. This theme completely replaces
        AppBaseTheme from res/values/styles.xml on API 11+ devices.

 API 11 theme customizations can go here.

        Base application theme for API 14+. This theme completely replaces
        AppBaseTheme from BOTH res/values/styles.xml and
        res/values-v11/styles.xml on API 14+ devices.

 API 14 theme customizations can go here.
         */
        public static final int AppBaseTheme=0x7f060000;
        /**  Application theme.
 All customizations that are NOT specific to a particular API-level can go here.
         */
        public static final int AppTheme=0x7f060001;
        public static final int MyAppTheme=0x7f060002;
    }
}


text:
"use strict";

var tweetRenderer = void 0;
var badTweetForm = void 0;
var lowTweetForm = void 0;
var gifTweetForm = void 0;
var incPanel = void 0;
var incUpgrade = void 0;
var avatarUpgrade = void 0;
var statsDiv = void 0;
var IncomeFormClass = void 0;
var IncomeUpgradeFormClass = void 0;
var AvatarUpgradeFormClass = void 0;
var BadTweetFormClass = void 0;
var LowTweetFormClass = void 0;
var GifTweetFormClass = void 0;
var StatsClass = void 0;
var TweetListClass = void 0;

var handleTweet = function handleTweet(e) {
    e.preventDefault();

    $("#tweetMessage").animate({ width: 'hide' }, 350);
    var incomes = document.getElementsByClassName("tweetIncome");
    var bcount = 1;
    for (var i = 0; i < incomes.length; i++) {
        if (incomes[i].innerHTML.substring(0, 1) === "1") {
            bcount++;
        }
    }
    var cost = bcount * bcount * 10;
    var newCost = (bcount + 1) * (bcount + 1) * 10;
    sendAjax('POST', $("#badTweetForm").attr("action"), $("#badTweetForm").serialize(), function () {
        tweetRenderer.loadTweetsFromServer();
        $("#credDisplay").html(parseInt($('#credDisplay').html()) - cost);
        $("#badCost").html(newCost);
    });

    return false;
};

var handleLowTweet = function handleLowTweet(e) {
    e.preventDefault();

    $("#tweetMessage").animate({ width: 'hide' }, 350);
    var incomes = document.getElementsByClassName("tweetIncome");
    var lcount = 1;
    for (var i = 0; i < incomes.length; i++) {
        if (incomes[i].innerHTML.substring(0, 1) === "2") {
            lcount++;
        }
    }
    var cost = lcount * lcount * 50;
    var newCost = (lcount + 1) * (lcount + 1) * 50;
    sendAjax('POST', $("#lowTweetForm").attr("action"), $("#lowTweetForm").serialize(), function () {
        tweetRenderer.loadTweetsFromServer();
        $("#credDisplay").html(parseInt($('#credDisplay').html()) - cost);
        $("#lowCost").html(newCost);
    });

    return false;
};

var handleGifTweet = function handleGifTweet(e) {
    e.preventDefault();

    $("#tweetMessage").animate({ width: 'hide' }, 350);

    if ($("#tag").val() == '') {
        handleError("Tag is required");
        return false;
    }
    var incomes = document.getElementsByClassName("tweetIncome");
    var gcount = 1;
    for (var i = 0; i < incomes.length; i++) {
        if (incomes[i].innerHTML.substring(0, 1) === "5") {
            gcount++;
        }
    }
    var cost = gcount * gcount * 100;
    var newCost = (gcount + 1) * (gcount + 1) * 100;
    sendAjax('POST', $("#gifTweetForm").attr("action"), $("#gifTweetForm").serialize(), function () {
        tweetRenderer.loadTweetsFromServer();
        $("#credDisplay").html(parseInt($('#credDisplay').html()) - cost);
        $("#gifCost").html(newCost);
    });

    return false;
};

var handleAvatarUpgrade = function handleAvatarUpgrade(e) {
    e.preventDefault();
    sendAjax('POST', $("#avaUpgrade").attr("action"), $("#avaUpgrade").serialize(), function () {
        var avatarPow = parseInt($('#avatarPow').html()) + 1;
        $("#credDisplay").html(parseInt($('#credDisplay').html()) - parseInt($('#avatarCost').html()));
        $("#avatarPow").html(avatarPow);
        $("#avatarCost").html((avatarPow + 1) * (avatarPow + 1) * 1000);
        location.reload();
    });
    return false;
};

var handleIncome = function handleIncome(e) {
    e.preventDefault();
    sendAjax('POST', $("#incPanel").attr("action"), $("#incPanel").serialize(), function () {
        $("#credDisplay").html(parseInt($('#credDisplay').html()) + parseInt($('#spamPow').html()));
    });
    return false;
};

var handleIncomeUpgrade = function handleIncomeUpgrade(e) {
    e.preventDefault();
    sendAjax('POST', $("#incUpgrade").attr("action"), $("#incUpgrade").serialize(), function () {
        var spamPow = parseInt(parseInt($('#spamPow').html()) + 1);
        var newCost = spamPow * spamPow * 75;
        $("#spamPow").html(spamPow);
        $("#credDisplay").html(parseInt($('#credDisplay').html()) - parseInt($('#spamCost').html()));
        $("#spamCost").html(newCost);
    });
    return false;
};

var renderIncome = function renderIncome() {
    if (this.state.data.length === 0) {
        return React.createElement(
            "form",
            { id: "incPanel",
                name: "panel",
                onSubmit: this.handleSubmit,
                action: "/addCredit",
                method: "POST" },
            React.createElement(
                "label",
                null,
                "Spam Power: "
            ),
            React.createElement(
                "label",
                { id: "spamPow" },
                "1"
            ),
            React.createElement(
                "label",
                null,
                "|"
            ),
            React.createElement("input", { type: "hidden", name: "_csrf", value: this.props.csrf }),
            React.createElement("input", { id: "doSpam", className: "makeSubmit", type: "submit", value: "Spam your account" })
        );
    }

    var csrf = this.props.csrf;
    var func = this;
    var incNodes = this.state.data.map(function (account) {
        return React.createElement(
            "form",
            { key: account._id, id: "incPanel",
                name: "panel",
                onSubmit: func.handleSubmit,
                action: "/addCredit",
                method: "POST" },
            React.createElement(
                "label",
                null,
                "Spam Power: "
            ),
            React.createElement(
                "label",
                { id: "spamPow" },
                account.spamPower
            ),
            React.createElement(
                "label",
                null,
                "|"
            ),
            React.createElement("input", { type: "hidden", name: "_csrf", value: csrf }),
            React.createElement("input", { id: "doSpam", className: "makeSubmit", type: "submit", value: "Spam your account" })
        );
    });

    return React.createElement(
        "div",
        null,
        incNodes
    );
};

var renderIncomeUpgrade = function renderIncomeUpgrade() {
    if (this.state.data.length === 0) {
        return React.createElement(
            "form",
            { id: "incUpgrade",
                name: "panel",
                onSubmit: this.handleSubmit,
                action: "/upgradeSpam",
                method: "POST" },
            React.createElement(
                "label",
                { htmlFor: "spamCost" },
                "Upgrade Cost: "
            ),
            React.createElement(
                "label",
                { id: "spamCost" },
                "100"
            ),
            React.createElement(
                "label",
                null,
                "|"
            ),
            React.createElement("input", { type: "hidden", name: "_csrf", value: this.props.csrf }),
            React.createElement("input", { id: "spamUpgrade", className: "makeSubmit", type: "submit", value: "Upgrade your spam" })
        );
    }
    var csrf = this.props.csrf;
    var func = this;
    var incNodes = this.state.data.map(function (account) {
        var cost = account.spamPower * account.spamPower * 75;
        return React.createElement(
            "form",
            { key: account._id, id: "incUpgrade",
                name: "panel",
                onSubmit: func.handleSubmit,
                action: "/upgradeSpam",
                method: "POST" },
            React.createElement(
                "label",
                { htmlFor: "spamCost" },
                "Upgrade Cost: "
            ),
            React.createElement(
                "label",
                { id: "spamCost" },
                cost
            ),
            React.createElement(
                "label",
                null,
                "|"
            ),
            React.createElement("input", { type: "hidden", name: "_csrf", value: csrf }),
            React.createElement("input", { id: "spamUpgrade", className: "makeSubmit", type: "submit", value: "Upgrade your spam" })
        );
    });

    return React.createElement(
        "div",
        null,
        incNodes
    );
};

var renderAvatarUpgrade = function renderAvatarUpgrade() {
    if (this.state.data.length === 0) {
        return React.createElement(
            "form",
            { id: "avaUpgrade",
                name: "panel",
                onSubmit: this.handleSubmit,
                action: "/upgradeAvatar",
                method: "POST" },
            React.createElement(
                "label",
                null,
                "Avatar Power: "
            ),
            React.createElement(
                "label",
                { id: "avatarPow" },
                "0"
            ),
            React.createElement(
                "label",
                null,
                "|"
            ),
            React.createElement(
                "label",
                null,
                "Upgrade Cost: "
            ),
            React.createElement(
                "label",
                { id: "avatarCost" },
                "0"
            ),
            React.createElement(
                "label",
                null,
                "|"
            ),
            React.createElement("input", { type: "hidden", name: "_csrf", value: this.props.csrf }),
            React.createElement("input", { id: "doAvatar", className: "makeSubmit", type: "submit", value: "Upgrade your avatar" })
        );
    }

    var csrf = this.props.csrf;
    var func = this;

    var avatarNodes = this.state.data.map(function (account) {
        return React.createElement(
            "form",
            { key: account._id, id: "avaUpgrade",
                name: "panel",
                onSubmit: func.handleSubmit,
                action: "/upgradeAvatar",
                method: "POST" },
            React.createElement(
                "label",
                null,
                "Avatar Power: "
            ),
            React.createElement(
                "label",
                { id: "avatarPow" },
                account.avatarPower
            ),
            React.createElement(
                "label",
                null,
                "|"
            ),
            React.createElement(
                "label",
                null,
                "Upgrade Cost: "
            ),
            React.createElement(
                "label",
                { id: "avatarCost" },
                (account.avatarPower + 1) * (account.avatarPower + 1) * 1000
            ),
            React.createElement(
                "label",
                null,
                "|"
            ),
            React.createElement("input", { type: "hidden", name: "_csrf", value: csrf }),
            React.createElement("input", { id: "doAvatar", className: "makeSubmit", type: "submit", value: "Upgrade your avatar" })
        );
    });

    return React.createElement(
        "div",
        null,
        avatarNodes
    );
};

var renderStats = function renderStats() {
    if (this.state.data.length === 0) {
        return React.createElement(
            "section",
            null,
            React.createElement(
                "label",
                null,
                "Impressions: "
            ),
            React.createElement(
                "label",
                { id: "credDisplay" },
                "0"
            ),
            React.createElement(
                "label",
                null,
                "|"
            ),
            React.createElement(
                "label",
                null,
                "Followers: "
            ),
            React.createElement(
                "label",
                { id: "incomeDisplay" },
                "0"
            )
        );
    }

    var statsNodes = this.state.data.map(function (account) {
        return React.createElement(
            "section",
            { key: account._id },
            React.createElement(
                "label",
                null,
                "Impressions: "
            ),
            React.createElement(
                "label",
                { id: "credDisplay" },
                account.impressions
            ),
            React.createElement(
                "label",
                null,
                "|"
            ),
            React.createElement(
                "label",
                null,
                "Followers: "
            ),
            React.createElement(
                "label",
                { id: "incomeDisplay" },
                "0"
            )
        );
    });

    return React.createElement(
        "section",
        null,
        statsNodes
    );
};

var renderBadTweet = function renderBadTweet() {
    var csrf = this.props.csrf;
    var i = 0;
    var tweets = this.state.data;
    var badCost = 1;
    for (i = 0; i < tweets.length; i++) {
        console.log(tweets[i].income);
        if (tweets[i].income === 1) {
            badCost++;
        }
    }
    badCost = badCost * badCost * 10;
    return React.createElement(
        "form",
        { id: "badTweetForm",
            name: "panel",
            action: "/tweetBad",
            onSubmit: this.handleSubmit,
            method: "POST",
            className: "panel" },
        React.createElement(
            "label",
            null,
            "Cost: "
        ),
        React.createElement(
            "label",
            { id: "badCost" },
            badCost
        ),
        React.createElement(
            "label",
            null,
            "|"
        ),
        React.createElement("input", { type: "hidden", name: "_csrf", value: csrf }),
        React.createElement("input", { className: "makeSubmit", type: "submit", value: "Tweet at a friend" })
    );
};

var renderLowTweet = function renderLowTweet() {
    var csrf = this.props.csrf;
    var i = 0;
    var tweets = this.state.data;
    var lowCost = 1;
    for (i = 0; i < tweets.length; i++) {
        console.log(tweets[i].income);
        if (tweets[i].income === 2) {
            lowCost++;
        }
    }
    lowCost = lowCost * lowCost * 50;
    return React.createElement(
        "form",
        { id: "lowTweetForm",
            name: "panel",
            action: "/tweetLow",
            onSubmit: this.handleSubmit,
            method: "POST",
            className: "panel" },
        React.createElement(
            "label",
            null,
            "Cost: "
        ),
        React.createElement(
            "label",
            { id: "lowCost" },
            lowCost
        ),
        React.createElement(
            "label",
            null,
            "|"
        ),
        React.createElement("input", { type: "hidden", name: "_csrf", value: csrf }),
        React.createElement("input", { className: "makeSubmit", type: "submit", value: "Tweet about cats" })
    );
};

var renderGifTweet = function renderGifTweet() {
    var csrf = this.props.csrf;
    var i = 0;
    var tweets = this.state.data;
    var gifCost = 1;
    for (i = 0; i < tweets.length; i++) {
        console.log(tweets[i].income);
        if (tweets[i].income === 5) {
            gifCost++;
        }
    }
    gifCost = gifCost * gifCost * 100;
    return React.createElement(
        "form",
        { id: "gifTweetForm",
            name: "panel",
            action: "/tweetGif",
            onSubmit: this.handleSubmit,
            method: "POST",
            className: "panel" },
        React.createElement(
            "label",
            null,
            "Cost: "
        ),
        React.createElement(
            "label",
            { id: "gifCost" },
            gifCost
        ),
        React.createElement(
            "label",
            null,
            "|"
        ),
        React.createElement(
            "label",
            { htmlFor: "tag" },
            "Gif Topic: "
        ),
        React.createElement("input", { id: "gifTag", type: "text", name: "tag", placeholder: "Ex. pixel art, walrus..." }),
        React.createElement("input", { type: "hidden", name: "_csrf", value: csrf }),
        React.createElement("input", { className: "makeSubmit", type: "submit", value: "Tweet a GIF" })
    );
};

var renderTweetList = function renderTweetList() {
    if (this.state.data.length === 0) {
        return React.createElement(
            "div",
            { className: "tweetList" },
            React.createElement(
                "h3",
                { className: "emptyTweet" },
                " No Tweets yet"
            )
        );
    }
    var func = this;
    var tweetNodes = this.state.tweetdata.map(function (tweet) {
        var avatar = func.state.data[0].avatar;
        var avatarPow = func.state.data[0].avatarPower;
        var avaSrc = "";
        if (avatar === -1) {
            avaSrc = "/assets/img/egg.jpg";
        } else {
            avaSrc = "https://unsplash.it/200?image=" + avatar;
        }
        console.log(avaSrc);
        if (tweet.income == 5) {
            return React.createElement(
                "div",
                { key: tweet._id, className: "tweet" },
                React.createElement("img", { src: avaSrc, alt: "userAvatar", className: "tweetFace" }),
                React.createElement(
                    "p",
                    { className: "tweetAcc" },
                    tweet.username,
                    " "
                ),
                React.createElement(
                    "p",
                    { className: "tweetAt" },
                    "@",
                    tweet.username
                ),
                React.createElement(
                    "p",
                    { className: "tweetIncome" },
                    tweet.income + " + " + avatarPow
                ),
                React.createElement("img", { className: "tweetImg", src: tweet.textContents })
            );
        }
        return React.createElement(
            "div",
            { key: tweet._id, className: "tweet" },
            React.createElement("img", { src: avaSrc, alt: "userAvatar", className: "tweetFace" }),
            React.createElement(
                "p",
                { className: "tweetAcc" },
                tweet.username,
                " "
            ),
            React.createElement(
                "p",
                { className: "tweetAt" },
                "@",
                tweet.username
            ),
            React.createElement(
                "p",
                { className: "tweetIncome" },
                tweet.income + " + " + avatarPow
            ),
            React.createElement(
                "p",
                { className: "tweetText" },
                tweet.textContents
            )
        );
    });

    return React.createElement(
        "div",
        { className: "tweetList" },
        tweetNodes
    );
};

var handleError = function handleError(message) {
    $("#errorMessage").text(message);
    $("#tweetMessage").animate({ width: 'toggle' }, 350);
};

var sendAjax = function sendAjax(action, data) {
    $.ajax({
        cache: false,
        type: "POST",
        url: action,
        data: data,
        dataType: "json",
        success: function success(result, status, xhr) {
            $("#tweetMessage").animate({ width: 'hide' }, 350);

            window.location = result.redirect;
        },
        error: function error(xhr, status, _error) {
            var messageObj = JSON.parse(xhr.responseText);

            handleError(messageObj.error);
        }
    });
};

$(document).ready(function () {
    $("#signupForm").on("submit", function (e) {
        e.preventDefault();

        $("#tweetMessage").animate({ width: 'hide' }, 350);

        if ($("#user").val() == '' || $("#pass").val() == '' || $("#pass2").val() == '') {
            handleError("All fields are required");
            return false;
        }

        if ($("#pass").val() !== $("#pass2").val()) {
            handleError("Passwords do not match");
            return false;
        }

        sendAjax($("#signupForm").attr("action"), $("#signupForm").serialize());

        return false;
    });

    $("#loginForm").on("submit", function (e) {
        e.preventDefault();

        $("#tweetMessage").animate({ width: 'hide' }, 350);

        if ($("#user").val() == '' || $("#pass").val() == '') {
            handleError("sername or password is empty");
            return false;
        }

        sendAjax($("#loginForm").attr("action"), $("#loginForm").serialize());

        return false;
    });

    $("#badTweetForm").on("submit", function (e) {
        e.preventDefault();

        $("#tweetMessage").animate({ width: 'hide' }, 350);

        sendAjax($("#badTweetForm").attr("action"), $("#badTweetForm").serialize());

        return false;
    });

    $("#lowTweetForm").on("submit", function (e) {
        e.preventDefault();

        $("#tweetMessage").animate({ width: 'hide' }, 350);

        sendAjax($("#lowTweetForm").attr("action"), $("#lowTweetForm").serialize());

        return false;
    });

    $("#gifTweetForm").on("submit", function (e) {
        e.preventDefault();

        $("#tweetMessage").animate({ width: 'hide' }, 350);

        sendAjax($("#gifTweetForm").attr("action"), $("#gifTweetForm").serialize());

        return false;
    });
});

var setup = function setup(csrf) {
    BadTweetFormClass = React.createClass({
        displayName: "BadTweetFormClass",

        handleSubmit: handleTweet,
        loadCost: function loadCost() {
            sendAjax('GET', '/getTweets', null, function (data) {
                this.setState({ data: data.tweets });
            }.bind(this));
        },
        getInitialState: function getInitialState() {
            return { data: [] };
        },
        componentDidMount: function componentDidMount() {
            this.loadCost();
        },
        render: renderBadTweet
    });

    LowTweetFormClass = React.createClass({
        displayName: "LowTweetFormClass",

        handleSubmit: handleLowTweet,
        loadCost: function loadCost() {
            sendAjax('GET', '/getTweets', null, function (data) {
                this.setState({ data: data.tweets });
            }.bind(this));
        },
        getInitialState: function getInitialState() {
            return { data: [] };
        },
        componentDidMount: function componentDidMount() {
            this.loadCost();
        },
        render: renderLowTweet
    });

    GifTweetFormClass = React.createClass({
        displayName: "GifTweetFormClass",

        handleSubmit: handleGifTweet,
        loadCost: function loadCost() {
            sendAjax('GET', '/getTweets', null, function (data) {
                this.setState({ data: data.tweets });
            }.bind(this));
        },
        getInitialState: function getInitialState() {
            return { data: [] };
        },
        componentDidMount: function componentDidMount() {
            this.loadCost();
        },
        render: renderGifTweet
    });

    AvatarUpgradeFormClass = React.createClass({
        displayName: "AvatarUpgradeFormClass",

        handleSubmit: handleAvatarUpgrade,
        loadAccount: function loadAccount() {
            sendAjax('GET', '/getAccount', null, function (data) {
                this.setState({ data: data.account });
            }.bind(this));
        },
        getInitialState: function getInitialState() {
            return { data: [] };
        },
        componentDidMount: function componentDidMount() {
            this.loadAccount();
        },
        render: renderAvatarUpgrade
    });

    StatsClass = React.createClass({
        displayName: "StatsClass",

        loadAccount: function loadAccount() {
            sendAjax('GET', '/getAccount', null, function (data) {
                this.setState({ data: data.account });
            }.bind(this));
        },
        getInitialState: function getInitialState() {
            return { data: [] };
        },
        componentDidMount: function componentDidMount() {
            this.loadAccount();
        },
        render: renderStats
    });

    IncomeFormClass = React.createClass({
        displayName: "IncomeFormClass",

        loadAcco: function loadAcco() {
            sendAjax('GET', '/getAccount', null, function (data) {
                console.log(data.account);
                this.setState({ data: data.account });
            }.bind(this));
        },
        getInitialState: function getInitialState() {
            return { data: [] };
        },
        componentDidMount: function componentDidMount() {
            this.loadAcco();
        },
        handleSubmit: handleIncome,
        render: renderIncome
    });

    IncomeUpgradeFormClass = React.createClass({
        displayName: "IncomeUpgradeFormClass",

        handleSubmit: handleIncomeUpgrade,
        loadAccount: function loadAccount() {
            sendAjax('GET', '/getAccount', null, function (data) {
                this.setState({ data: data.account });
            }.bind(this));
        },
        getInitialState: function getInitialState() {
            return { data: [] };
        },
        componentDidMount: function componentDidMount() {
            this.loadAccount();
        },
        render: renderIncomeUpgrade
    });

    TweetListClass = React.createClass({
        displayName: "TweetListClass",

        loadTweetsFromServer: function loadTweetsFromServer() {
            sendAjax('GET', '/getTweets', null, function (data) {
                var func = this;
                var tweetData = data.tweets;
                sendAjax('GET', '/getAccount', null, function (data) {
                    func.setState({ data: data.account, tweetdata: tweetData });
                });
            }.bind(this));
        },
        getInitialState: function getInitialState() {
            return { data: [] };
        },
        componentDidMount: function componentDidMount() {
            this.loadTweetsFromServer();
        },
        render: renderTweetList
    });

    incPanel = ReactDOM.render(React.createElement(IncomeFormClass, { csrf: csrf }), document.querySelector("#income"));

    incUpgrade = ReactDOM.render(React.createElement(IncomeUpgradeFormClass, { csrf: csrf }), document.querySelector("#incomeUpgrade"));

    statsDiv = ReactDOM.render(React.createElement(StatsClass, null), document.querySelector("#stats"));

    avatarUpgrade = ReactDOM.render(React.createElement(AvatarUpgradeFormClass, { csrf: csrf }), document.querySelector("#avatarUpgrade"));

    badTweetForm = ReactDOM.render(React.createElement(BadTweetFormClass, { csrf: csrf }), document.querySelector("#makeBadTweet"));

    lowTweetForm = ReactDOM.render(React.createElement(LowTweetFormClass, { csrf: csrf }), document.querySelector("#makeLowTweet"));

    gifTweetForm = ReactDOM.render(React.createElement(GifTweetFormClass, { csrf: csrf }), document.querySelector("#makeGifTweet"));

    tweetRenderer = ReactDOM.render(React.createElement(TweetListClass, null), document.querySelector("#tweets"));
};

var getToken = function getToken() {
    sendAjax('GET', '/getToken', null, function (result) {
        setup(result.csrfToken);
    });
};

$(document).ready(function () {
    getToken();
});
"use strict";

var handleError = function handleError(message) {
    $("#errorMessage").text(message);
    $("#domoMessage").animate({ width: 'toggle' }, 350);
};

var redirect = function redirect(response) {
    $("#domoMessage").animate({ width: 'hide' }, 350);
    window.location = response.redirect;
};

var sendAjax = function sendAjax(type, action, data, success) {
    $.ajax({
        cache: false,
        type: type,
        url: action,
        data: data,
        dataType: "json",
        success: success,
        error: function error(xhr, status, _error) {
            var messageObj = JSON.Parse(xhr.responseText);
            handleError(messageObj.error);
        }
    });
};


text:
Add support for a table of content syntax in showdown

Just add the extension and add `[toc]` to your document.

For running in NodeJS it requires [cheerio](https://github.com/cheeriojs/cheerio).

Based on the [showdown-footnote](https://github.com/tivie/showdown-footnotes)-extension.


text:
/*
    linux/wrapper.h compatibility header

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef __COMPAT_LINUX_WRAPPER_H_
#define __COMPAT_LINUX_WRAPPER_H_

#define mem_map_reserve(p)      set_bit(PG_reserved, &((p)->flags))
#define mem_map_unreserve(p)    clear_bit(PG_reserved, &((p)->flags))

#endif /* __COMPAT_LINUX_WRAPPER_H_ */


text:
.img-sm {
  width: 70px;
  overflow: hidden; }

/*# sourceMappingURL=image.css.map */


text:
package com.vk.api.sdk.queries.photos;

import com.vk.api.sdk.client.AbstractQueryBuilder;
import com.vk.api.sdk.client.VkApiClient;
import com.vk.api.sdk.client.actors.UserActor;
import com.vk.api.sdk.objects.photos.responses.GetCommentsResponse;
import com.vk.api.sdk.queries.EnumParam;

import java.util.Arrays;
import java.util.List;

/**
 * Query for Photos.getComments method
 */
public class PhotosGetCommentsQuery extends AbstractQueryBuilder<PhotosGetCommentsQuery, GetCommentsResponse> {
    /**
     * Creates a AbstractQueryBuilder instance that can be used to build api request with various parameters
     *
     * @param client  VK API client
     * @param actor   actor with access token
     * @param photoId value of "photo id" parameter.
     */
    public PhotosGetCommentsQuery(VkApiClient client, UserActor actor, int photoId) {
        super(client, "photos.getComments", GetCommentsResponse.class);
        accessToken(actor.getAccessToken());
        photoId(photoId);
    }

    /**
     * ID of the user or community that owns the photo.
     *
     * @param value value of "owner id" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    public PhotosGetCommentsQuery ownerId(Integer value) {
        return unsafeParam("owner_id", value);
    }

    /**
     * Photo ID.
     *
     * @param value value of "photo id" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    protected PhotosGetCommentsQuery photoId(int value) {
        return unsafeParam("photo_id", value);
    }

    /**
     * Return an additional "likes" field
     *
     * @param value value of "need likes" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    public PhotosGetCommentsQuery needLikes(Boolean value) {
        return unsafeParam("need_likes", value);
    }

    /**
     * Set start comment id
     *
     * @param value value of "start comment id" parameter. Minimum is 0.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    public PhotosGetCommentsQuery startCommentId(Integer value) {
        return unsafeParam("start_comment_id", value);
    }

    /**
     * Offset needed to return a specific subset of comments. By default, "0".
     *
     * @param value value of "offset" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    public PhotosGetCommentsQuery offset(Integer value) {
        return unsafeParam("offset", value);
    }

    /**
     * Number of comments to return.
     *
     * @param value value of "count" parameter. Maximum is 100. Minimum is 0. By default 20.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    public PhotosGetCommentsQuery count(Integer value) {
        return unsafeParam("count", value);
    }

    /**
     * Sort order
     *
     * @param value value of "sort" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    public PhotosGetCommentsQuery sort(PhotosGetCommentsSort value) {
        return unsafeParam("sort", value);
    }

    /**
     * Set access key
     *
     * @param value value of "access key" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    public PhotosGetCommentsQuery accessKey(String value) {
        return unsafeParam("access_key", value);
    }

    /**
     * Set fields
     *
     * @param value value of "fields" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    public PhotosGetCommentsQuery fields(EnumParam... value) {
        return unsafeParam("fields", value);
    }

    /**
     * Set fields
     *
     * @param value value of "fields" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    public PhotosGetCommentsQuery fields(List<EnumParam> value) {
        return unsafeParam("fields", value);
    }

    @Override
    protected PhotosGetCommentsQuery getThis() {
        return this;
    }

    @Override
    protected List<String> essentialKeys() {
        return Arrays.asList("photo_id", "access_token");
    }
}


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=fn.string_to_sign_v4.html">

Redirecting to fn.string_to_sign_v4.html...


text:
/**
 * Contains all of the classes associated with Interactive control input events returned from the Interactive service
 *
 * @author      Microsoft Corporation
 *
 * @since       1.0.0
 */
package com.mixer.interactive.event.control.input;


text:
<?php

declare(strict_types=1);

namespace Doctrine\ODM\MongoDB\Tests\Functional;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
use Doctrine\ODM\MongoDB\Tests\BaseTest;

class EmbeddedReferenceTest extends BaseTest
{
    public function testReferencedDocumentInsideEmbeddedDocument(): void
    {
        /* PARENT DOCUMENT */
        $offer = new Offer('My Offer');
        /* END PARENT DOCUMENT */

        /* ADD EMBEDDED DOCUMENT */
        $link1 = new Link('http://link1.com');
        $offer->links->add($link1);
        /* END ADD EMBEDDED DOCUMENT

        /* ADD REFERENCED DOCUMENTS TO EMBEDDED DOCUMENT */
        $referencedDocument1 = new ReferencedDocument('Referenced Document 1');
        $this->dm->persist($referencedDocument1);
        $link1->referencedDocuments->add($referencedDocument1);

        $referencedDocument2 = new ReferencedDocument('Referenced Document 2');
        $this->dm->persist($referencedDocument2);
        $link1->referencedDocuments->add($referencedDocument2);

        $referencedDocument3 = new ReferencedDocument('Referenced Document 3');
        $this->dm->persist($referencedDocument3);
        $link1->referencedDocuments->add($referencedDocument3);

        $referencedDocument4 = new ReferencedDocument('Referenced Document 4');
        $this->dm->persist($referencedDocument4);
        $link1->referencedDocuments->add($referencedDocument4);

        $referencedDocument5 = new ReferencedDocument('Referenced Document 5');
        $this->dm->persist($referencedDocument5);
        $link1->referencedDocuments->add($referencedDocument5);
        /* END ADD REFERENCED DOCUMENTS TO EMBEDDED DOCUMENT */

        // persist & flush
        $this->dm->persist($offer);
        $this->dm->flush();
        $this->dm->clear();

        $offer = $this->dm->getRepository(Offer::class)->findOneBy(['name' => 'My Offer']);

        // Should be: 1 Link, 5 referenced documents
        // Actual Result: 1 link, 10 referenced documents
        self::assertEquals(1, $offer->links->count());
        self::assertEquals(5, $offer->links[0]->referencedDocuments->count());
    }
}

/** @ODM\Document */
class Offer
{
    /**
     * @ODM\Id
     *
     * @var string|null
     */
    protected $id;

    /**
     * @ODM\Field(type="string")
     *
     * @var string
     */
    public $name;

    /**
     * @ODM\EmbedMany(targetDocument=Link::class)
     *
     * @var Collection<int, Link>
     */
    public $links;

    public function __construct(string $name)
    {
        $this->name  = $name;
        $this->links = new ArrayCollection();
    }
}

/** @ODM\EmbeddedDocument */
class Link
{
    /**
     * @ODM\Id
     *
     * @var string|null
     */
    protected $id;

    /**
     * @ODM\Field(type="string")
     *
     * @var string
     */
    public $url;

    /**
     * @ODM\ReferenceMany(targetDocument=ReferencedDocument::class)
     *
     * @var Collection<int, ReferencedDocument>
     */
    public $referencedDocuments;

    public function __construct(string $url)
    {
        $this->url                 = $url;
        $this->referencedDocuments = new ArrayCollection();
    }
}

/** @ODM\Document */
class ReferencedDocument
{
    /**
     * @ODM\Id
     *
     * @var string|null
     */
    protected $id;

    /**
     * @ODM\Field(type="string")
     *
     * @var string
     */
    public $name;

    public function __construct(string $name)
    {
        $this->name = $name;
    }
}


text:
package com.streamsets.datacollector.el;

import com.streamsets.datacollector.rules.AlertInfoEL;
import com.streamsets.datacollector.rules.DriftRuleEL;
import com.streamsets.pipeline.api.impl.Utils;
import com.streamsets.pipeline.lib.el.DataUnitsEL;
import com.streamsets.pipeline.lib.el.MathEL;
import com.streamsets.pipeline.lib.el.RecordEL;
import com.streamsets.pipeline.lib.el.StringEL;

/**
 * Registry which holds all EL functions which are useful for rules/conditions.
 */
public class RuleELRegistry {

  public static final String ALERT = "alert";
  public static final String GENERAL = "general";
  public static final String DRIFT = "drift";

  private static final String[] FAMILIES = {ALERT, GENERAL, DRIFT};

  private RuleELRegistry() {}

  public static String[] getFamilies() {
    return FAMILIES;
  }

  public static Class<?>[] getRuleELs(String family) {
    Utils.checkNotNull(family, "family");
    switch (family) {
      case GENERAL:
        return new Class[] {
            RecordEL.class,
            StringEL.class,
            MathEL.class,
            DataUnitsEL.class,
            RuntimeEL.class,
            JvmEL.class,
        };
      case DRIFT:
        return new Class[] {
            RecordEL.class,
            StringEL.class,
            DataUnitsEL.class,
            RuntimeEL.class,
            JvmEL.class,
            DriftRuleEL.class
        };
      case ALERT:
        return new Class[] {
            RecordEL.class,
            StringEL.class,
            RuntimeEL.class,
            JvmEL.class,
            AlertInfoEL.class
        };
      default:
        throw new IllegalArgumentException(Utils.format("Invalid data rule family '{}'", family));
    }
  }

}