text:
// $Id$
//
//  Copyright (C) 2004-2006 Rational Discovery LLC
//
//   @@ All Rights Reserved @@
//  This file is part of the RDKit.
//  The contents are covered by the terms of the BSD license
//  which is included in the file license.txt, found at the root
//  of the RDKit source tree.
//

#include <RDBoost/python.h>
#include <RDBoost/Wrap.h>
#include <RDGeneral/Exceptions.h>
#include <GraphMol/GraphMol.h>
#include <ForceField/ForceField.h>
#include <ForceField/UFF/DistanceConstraint.h>
#include <ForceField/UFF/AngleConstraint.h>
#include <ForceField/UFF/TorsionConstraint.h>
#include <ForceField/UFF/PositionConstraint.h>
#include <ForceField/MMFF/DistanceConstraint.h>
#include <ForceField/MMFF/AngleConstraint.h>
#include <ForceField/MMFF/TorsionConstraint.h>
#include <ForceField/MMFF/PositionConstraint.h>
#include "PyForceField.h"

using namespace ForceFields;
namespace python = boost::python;

void ForceFieldAddDistanceConstraint(PyForceField *self, unsigned int idx1,
                                     unsigned int idx2, double minLen,
                                     double maxLen, double forceConstant) {
  UFF::DistanceConstraintContrib *constraint;
  constraint = new UFF::DistanceConstraintContrib(
      self->field.get(), idx1, idx2, minLen, maxLen, forceConstant);
  self->field->contribs().push_back(ForceFields::ContribPtr(constraint));
}

void ForceFieldAddFixedPoint(PyForceField *self, unsigned int idx) {
  self->field->fixedPoints().push_back(idx);
}

void UFFAddDistanceConstraint(PyForceField *self, unsigned int idx1,
                              unsigned int idx2, bool relative, double minLen,
                              double maxLen, double forceConstant) {
  auto *constraint = new UFF::DistanceConstraintContrib(
      self->field.get(), idx1, idx2, relative, minLen, maxLen, forceConstant);
  self->field->contribs().push_back(ForceFields::ContribPtr(constraint));
}

void UFFAddAngleConstraint(PyForceField *self, unsigned int idx1,
                           unsigned int idx2, unsigned int idx3, bool relative,
                           double minAngleDeg, double maxAngleDeg,
                           double forceConstant) {
  auto *constraint = new UFF::AngleConstraintContrib(
      self->field.get(), idx1, idx2, idx3, relative, minAngleDeg, maxAngleDeg,
      forceConstant);
  self->field->contribs().push_back(ForceFields::ContribPtr(constraint));
}

void UFFAddTorsionConstraint(PyForceField *self, unsigned int idx1,
                             unsigned int idx2, unsigned int idx3,
                             unsigned int idx4, bool relative,
                             double minDihedralDeg, double maxDihedralDeg,
                             double forceConstant) {
  auto *constraint = new UFF::TorsionConstraintContrib(
      self->field.get(), idx1, idx2, idx3, idx4, relative, minDihedralDeg,
      maxDihedralDeg, forceConstant);
  self->field->contribs().push_back(ForceFields::ContribPtr(constraint));
}

void UFFAddPositionConstraint(PyForceField *self, unsigned int idx,
                              double maxDispl, double forceConstant) {
  auto *constraint = new UFF::PositionConstraintContrib(
      self->field.get(), idx, maxDispl, forceConstant);
  self->field->contribs().push_back(ForceFields::ContribPtr(constraint));
}

void MMFFAddDistanceConstraint(PyForceField *self, unsigned int idx1,
                               unsigned int idx2, bool relative, double minLen,
                               double maxLen, double forceConstant) {
  auto *constraint = new MMFF::DistanceConstraintContrib(
      self->field.get(), idx1, idx2, relative, minLen, maxLen, forceConstant);
  self->field->contribs().push_back(ForceFields::ContribPtr(constraint));
}

void MMFFAddAngleConstraint(PyForceField *self, unsigned int idx1,
                            unsigned int idx2, unsigned int idx3, bool relative,
                            double minAngleDeg, double maxAngleDeg,
                            double forceConstant) {
  auto *constraint = new MMFF::AngleConstraintContrib(
      self->field.get(), idx1, idx2, idx3, relative, minAngleDeg, maxAngleDeg,
      forceConstant);
  self->field->contribs().push_back(ForceFields::ContribPtr(constraint));
}

void MMFFAddTorsionConstraint(PyForceField *self, unsigned int idx1,
                              unsigned int idx2, unsigned int idx3,
                              unsigned int idx4, bool relative,
                              double minDihedralDeg, double maxDihedralDeg,
                              double forceConstant) {
  auto *constraint = new MMFF::TorsionConstraintContrib(
      self->field.get(), idx1, idx2, idx3, idx4, relative, minDihedralDeg,
      maxDihedralDeg, forceConstant);
  self->field->contribs().push_back(ForceFields::ContribPtr(constraint));
}

void MMFFAddPositionConstraint(PyForceField *self, unsigned int idx,
                               double maxDispl, double forceConstant) {
  auto *constraint = new MMFF::PositionConstraintContrib(
      self->field.get(), idx, maxDispl, forceConstant);
  self->field->contribs().push_back(ForceFields::ContribPtr(constraint));
}

PyObject *ForceFieldGetExtraPointLoc(PyForceField *self, unsigned int idx) {
  if (idx >= self->extraPoints.size()) {
    throw IndexErrorException(idx);
  }
  PyObject *res = PyTuple_New(3);
  PyTuple_SetItem(res, 0, PyFloat_FromDouble(self->extraPoints[idx]->x));
  PyTuple_SetItem(res, 1, PyFloat_FromDouble(self->extraPoints[idx]->y));
  PyTuple_SetItem(res, 2, PyFloat_FromDouble(self->extraPoints[idx]->z));
  return res;
}

double PyForceField::calcEnergyWithPos(const python::object &pos) {
  PRECONDITION(this->field, "no force field");
  if (pos != python::object()) {
    size_t s = this->field->dimension() * this->field->numPoints();
    size_t numElements = python::extract<size_t>(pos.attr("__len__")());
    if (s != numElements) {
      throw ValueErrorException(
          "The Python container must have length equal to Dimension() * "
          "NumPoints()");
    }
    std::vector<double> c(s);
    for (size_t i = 0; i < s; ++i) {
      c[i] = python::extract<double>(pos[i]);
    }
    return this->field->calcEnergy(c.data());
  } else {
    return this->field->calcEnergy();
  }
}

PyObject *PyForceField::positions() {
  PRECONDITION(this->field, "no force field");
  size_t s = this->field->dimension() * this->field->numPoints();
  PyObject *coordTuple = PyTuple_New(s);
  const RDGeom::PointPtrVect &p = this->field->positions();
  size_t i = 0;
  PyObject *coordItem;
  for (const auto pptr : p) {
    for (size_t j = 0; j < 3; ++j) {
      coordItem = PyFloat_FromDouble((*pptr)[j]);
      PyTuple_SetItem(coordTuple, i++, coordItem);
    }
  }
  return coordTuple;
}

PyObject *PyForceField::calcGradWithPos(const python::object &pos) {
  PRECONDITION(this->field, "no force field");
  size_t s = this->field->dimension() * this->field->numPoints();
  std::vector<double> g(s, 0.0);
  PyObject *gradTuple = PyTuple_New(s);
  if (pos != python::object()) {
    size_t numElements = python::extract<size_t>(pos.attr("__len__")());
    if (s != numElements) {
      throw ValueErrorException(
          "The Python container must have length equal to Dimension() * "
          "NumPoints()");
    }
    std::vector<double> c(s);
    for (size_t i = 0; i < s; ++i) {
      c[i] = python::extract<double>(pos[i]);
    }
    this->field->calcGrad(c.data(), g.data());
  } else {
    this->field->calcGrad(g.data());
  }
  for (size_t i = 0; i < s; ++i) {
    PyObject *coordItem = PyFloat_FromDouble(g[i]);
    PyTuple_SetItem(gradTuple, i, coordItem);
  }
  return gradTuple;
}

python::tuple PyForceField::minimizeTrajectory(unsigned int snapshotFreq,
                                               int maxIts, double forceTol,
                                               double energyTol) {
  PRECONDITION(this->field, "no force field");
  RDKit::SnapshotVect snapshotVect;
  int resInt = this->field->minimize(snapshotFreq, &snapshotVect, maxIts,
                                     forceTol, energyTol);
  python::list l;
  for (RDKit::SnapshotVect::const_iterator it = snapshotVect.begin();
       it != snapshotVect.end(); ++it) {
    l.append(new RDKit::Snapshot(*it));
  }
  return python::make_tuple(resInt, l);
}

PyObject *PyMMFFMolProperties::getMMFFBondStretchParams(
    const RDKit::ROMol &mol, const unsigned int idx1, const unsigned int idx2) {
  PyObject *res = nullptr;
  unsigned int bondType;
  ForceFields::MMFF::MMFFBond mmffBondStretchParams;
  if (mmffMolProperties->getMMFFBondStretchParams(mol, idx1, idx2, bondType,
                                                  mmffBondStretchParams)) {
    res = PyTuple_New(3);
    PyTuple_SetItem(res, 0, PyInt_FromLong(bondType));
    PyTuple_SetItem(res, 1, PyFloat_FromDouble(mmffBondStretchParams.kb));
    PyTuple_SetItem(res, 2, PyFloat_FromDouble(mmffBondStretchParams.r0));
  }
  return res;
};

PyObject *PyMMFFMolProperties::getMMFFAngleBendParams(const RDKit::ROMol &mol,
                                                      const unsigned int idx1,
                                                      const unsigned int idx2,
                                                      const unsigned int idx3) {
  PyObject *res = nullptr;
  unsigned int angleType;
  ForceFields::MMFF::MMFFAngle mmffAngleBendParams;
  if (mmffMolProperties->getMMFFAngleBendParams(
          mol, idx1, idx2, idx3, angleType, mmffAngleBendParams)) {
    res = PyTuple_New(3);
    PyTuple_SetItem(res, 0, PyInt_FromLong(angleType));
    PyTuple_SetItem(res, 1, PyFloat_FromDouble(mmffAngleBendParams.ka));
    PyTuple_SetItem(res, 2, PyFloat_FromDouble(mmffAngleBendParams.theta0));
  }
  return res;
};

PyObject *PyMMFFMolProperties::getMMFFStretchBendParams(
    const RDKit::ROMol &mol, const unsigned int idx1, const unsigned int idx2,
    const unsigned int idx3) {
  PyObject *res = nullptr;
  unsigned int stretchBendType;
  ForceFields::MMFF::MMFFStbn mmffStretchBendParams;
  ForceFields::MMFF::MMFFBond mmffBondStretchParams[2];
  ForceFields::MMFF::MMFFAngle mmffAngleBendParams;
  if (mmffMolProperties->getMMFFStretchBendParams(
          mol, idx1, idx2, idx3, stretchBendType, mmffStretchBendParams,
          mmffBondStretchParams, mmffAngleBendParams)) {
    res = PyTuple_New(3);
    PyTuple_SetItem(res, 0, PyInt_FromLong(stretchBendType));
    PyTuple_SetItem(res, 1, PyFloat_FromDouble(mmffStretchBendParams.kbaIJK));
    PyTuple_SetItem(res, 2, PyFloat_FromDouble(mmffStretchBendParams.kbaKJI));
  }
  return res;
};

PyObject *PyMMFFMolProperties::getMMFFTorsionParams(const RDKit::ROMol &mol,
                                                    const unsigned int idx1,
                                                    const unsigned int idx2,
                                                    const unsigned int idx3,
                                                    const unsigned int idx4) {
  PyObject *res = nullptr;
  unsigned int torType;
  ForceFields::MMFF::MMFFTor mmffTorsionParams;
  if (mmffMolProperties->getMMFFTorsionParams(mol, idx1, idx2, idx3, idx4,
                                              torType, mmffTorsionParams)) {
    res = PyTuple_New(4);
    PyTuple_SetItem(res, 0, PyInt_FromLong(torType));
    PyTuple_SetItem(res, 1, PyFloat_FromDouble(mmffTorsionParams.V1));
    PyTuple_SetItem(res, 2, PyFloat_FromDouble(mmffTorsionParams.V2));
    PyTuple_SetItem(res, 3, PyFloat_FromDouble(mmffTorsionParams.V3));
  }
  return res;
};

PyObject *PyMMFFMolProperties::getMMFFOopBendParams(const RDKit::ROMol &mol,
                                                    const unsigned int idx1,
                                                    const unsigned int idx2,
                                                    const unsigned int idx3,
                                                    const unsigned int idx4) {
  PyObject *res = nullptr;
  ForceFields::MMFF::MMFFOop mmffOopBendParams;
  if (mmffMolProperties->getMMFFOopBendParams(mol, idx1, idx2, idx3, idx4,
                                              mmffOopBendParams)) {
    res = PyFloat_FromDouble(mmffOopBendParams.koop);
  }
  return res;
};

PyObject *PyMMFFMolProperties::getMMFFVdWParams(const unsigned int idx1,
                                                const unsigned int idx2) {
  PyObject *res = nullptr;
  ForceFields::MMFF::MMFFVdWRijstarEps mmffVdWParams;
  if (mmffMolProperties->getMMFFVdWParams(idx1, idx2, mmffVdWParams)) {
    res = PyTuple_New(4);
    PyTuple_SetItem(res, 0,
                    PyFloat_FromDouble(mmffVdWParams.R_ij_starUnscaled));
    PyTuple_SetItem(res, 1, PyFloat_FromDouble(mmffVdWParams.epsilonUnscaled));
    PyTuple_SetItem(res, 2, PyFloat_FromDouble(mmffVdWParams.R_ij_star));
    PyTuple_SetItem(res, 3, PyFloat_FromDouble(mmffVdWParams.epsilon));
  }
  return res;
};

BOOST_PYTHON_MODULE(rdForceField) {
  python::scope().attr("__doc__") = "Exposes the ForceField class";

  std::string docString;

  python::class_<PyForceField>("ForceField", "A force field", python::no_init)
      .def("CalcEnergy",
           (double(PyForceField::*)(const python::object &) const) &
               PyForceField::calcEnergyWithPos,
           (python::arg("pos") = python::object()),
           "Returns the energy (in kcal/mol) of the current arrangement\n"
           "or of the supplied coordinate list (if non-empty)")
      .def("CalcGrad", &PyForceField::calcGradWithPos,
           (python::arg("pos") = python::object()),
           "Returns a tuple filled with the per-coordinate gradients\n"
           "of the current arrangement or of the supplied coordinate list "
           "(if non-empty)")
      .def("Positions", &PyForceField::positions,
           "Returns a tuple filled with the coordinates of the\n"
           "points the ForceField is handling")
      .def("Dimension",
           (unsigned int (PyForceField::*)() const) & PyForceField::dimension,
           "Returns the dimension of the ForceField")
      .def("NumPoints",
           (unsigned int (PyForceField::*)() const) & PyForceField::numPoints,
           "Returns the number of points the ForceField is handling")
      .def("Minimize", &PyForceField::minimize,
           (python::arg("maxIts") = 200, python::arg("forceTol") = 1e-4,
            python::arg("energyTol") = 1e-6),
           "Runs some minimization iterations.\n\n  Returns 0 if the "
           "minimization succeeded.")
      .def("MinimizeTrajectory", &PyForceField::minimizeTrajectory,
           (python::arg("snapshotFreq"), python::arg("maxIts") = 200,
            python::arg("forceTol") = 1e-4, python::arg("energyTol") = 1e-6),
           "Runs some minimization iterations, recording the minimization "
           "trajectory every snapshotFreq steps.\n\n"
           "Returns a (int, []) tuple; the int is 0 if the minimization "
           "succeeded, "
           "while the list contains Snapshot objects.")
      .def("AddDistanceConstraint", ForceFieldAddDistanceConstraint,
           (python::arg("self"), python::arg("idx1"), python::arg("idx2"),
            python::arg("minLen"), python::arg("maxLen"),
            python::arg("forceConstant")),
           "Adds a distance constraint to the UFF force field "
           "(deprecated, use UFFAddDistanceConstraint instead).")
      .def("AddFixedPoint", ForceFieldAddFixedPoint,
           (python::arg("self"), python::arg("idx")),
           "Adds a fixed point to the force field.")
      .def("UFFAddDistanceConstraint", UFFAddDistanceConstraint,
           (python::arg("self"), python::arg("idx1"), python::arg("idx2"),
            python::arg("relative"), python::arg("minLen"),
            python::arg("maxLen"), python::arg("forceConstant")),
           "Adds a distance constraint to the UFF force field; if relative == "
           "True, "
           "then minLen and maxLen are intended as relative to the current "
           "distance.")
      .def("UFFAddAngleConstraint", UFFAddAngleConstraint,
           (python::arg("self"), python::arg("idx1"), python::arg("idx2"),
            python::arg("idx3"), python::arg("relative"),
            python::arg("minAngleDeg"), python::arg("maxAngleDeg"),
            python::arg("forceConstant")),
           "Adds an angle constraint to the UFF force field; if relative == "
           "True, "
           "then minAngleDeg and maxAngleDeg are intended as relative to the "
           "current angle.")
      .def("UFFAddTorsionConstraint", UFFAddTorsionConstraint,
           (python::arg("self"), python::arg("idx1"), python::arg("idx2"),
            python::arg("idx3"), python::arg("idx4"), python::arg("relative"),
            python::arg("minDihedralDeg"), python::arg("maxDihedralDeg"),
            python::arg("forceConstant")),
           "Adds a dihedral angle constraint to the UFF force field; if "
           "relative == True, "
           "then minDihedralDeg and maxDihedralDeg are intended as relative to "
           "the current "
           "dihedral angle.")
      .def("UFFAddPositionConstraint", UFFAddPositionConstraint,
           (python::arg("self"), python::arg("idx"), python::arg("maxDispl"),
            python::arg("forceConstant")),
           "Adds a position constraint to the UFF force field.")
      .def("MMFFAddDistanceConstraint", MMFFAddDistanceConstraint,
           (python::arg("self"), python::arg("idx1"), python::arg("idx2"),
            python::arg("relative"), python::arg("minLen"),
            python::arg("maxLen"), python::arg("forceConstant")),
           "Adds a distance constraint to the MMFF force field; if relative == "
           "True, "
           "then minLen and maxLen are intended as relative to the current "
           "distance.")
      .def("MMFFAddAngleConstraint", MMFFAddAngleConstraint,
           (python::arg("self"), python::arg("idx1"), python::arg("idx2"),
            python::arg("idx3"), python::arg("relative"),
            python::arg("minAngleDeg"), python::arg("maxAngleDeg"),
            python::arg("forceConstant")),
           "Adds an angle constraint to the MMFF force field; if relative == "
           "True, "
           "then minAngleDeg and maxAngleDeg are intended as relative to the "
           "current angle.")
      .def("MMFFAddTorsionConstraint", MMFFAddTorsionConstraint,
           (python::arg("self"), python::arg("idx1"), python::arg("idx2"),
            python::arg("idx3"), python::arg("idx4"), python::arg("relative"),
            python::arg("minDihedralDeg"), python::arg("maxDihedralDeg"),
            python::arg("forceConstant")),
           "Adds a dihedral angle constraint to the MMFF force field; if "
           "relative == True, "
           "then minDihedralDeg and maxDihedralDeg are intended as relative to "
           "the current "
           "dihedral angle.")
      .def("MMFFAddPositionConstraint", MMFFAddPositionConstraint,
           (python::arg("self"), python::arg("idx"), python::arg("maxDispl"),
            python::arg("forceConstant")),
           "Adds a position constraint to the MMFF force field.")
      .def("Initialize", &PyForceField::initialize,
           "initializes the force field (call this before minimizing)")
      .def("AddExtraPoint", &PyForceField::addExtraPoint,
           (python::arg("self"), python::arg("x"), python::arg("y"),
            python::arg("z"), python::arg("fixed") = true),
           "Adds an extra point, this can be useful for adding constraints.")
      .def("GetExtraPointPos", ForceFieldGetExtraPointLoc,
           (python::arg("self"), python::arg("idx")),
           "returns the location of an extra point as a tuple");
  python::class_<PyMMFFMolProperties>(
      "MMFFMolProperties", "MMFF molecular properties", python::no_init)
      .def("GetMMFFAtomType", &PyMMFFMolProperties::getMMFFAtomType,
           (python::arg("self"), python::arg("idx")),
           "Retrieves MMFF atom type for atom with index idx")
      .def("GetMMFFFormalCharge", &PyMMFFMolProperties::getMMFFFormalCharge,
           (python::arg("self"), python::arg("idx")),
           "Retrieves MMFF formal charge for atom with index idx")
      .def("GetMMFFPartialCharge", &PyMMFFMolProperties::getMMFFPartialCharge,
           (python::arg("self"), python::arg("idx")),
           "Retrieves MMFF partial charge for atom with index idx")
      .def("GetMMFFBondStretchParams",
           &PyMMFFMolProperties::getMMFFBondStretchParams,
           (python::arg("self"), python::arg("mol"), python::arg("idx1"),
            python::arg("idx2")),
           "Retrieves MMFF bond stretch parameters for atoms with indexes "
           "idx1, idx2 "
           "as a (bondType, kb, r0) tuple, or None if no parameters could be "
           "found")
      .def("GetMMFFAngleBendParams",
           &PyMMFFMolProperties::getMMFFAngleBendParams,
           (python::arg("self"), python::arg("mol"), python::arg("idx1"),
            python::arg("idx2"), python::arg("idx3")),
           "Retrieves MMFF angle bend parameters for atoms with indexes idx1, "
           "idx2, idx3 "
           "as a (angleType, ka, theta0) tuple, or None if no parameters could "
           "be found")
      .def("GetMMFFStretchBendParams",
           &PyMMFFMolProperties::getMMFFStretchBendParams,
           (python::arg("self"), python::arg("mol"), python::arg("idx1"),
            python::arg("idx2"), python::arg("idx3")),
           "Retrieves MMFF stretch-bend parameters for atoms with indexes "
           "idx1, idx2, idx3 "
           "as a (stretchBendType, kbaIJK, kbaKJI) tuple, or None if no "
           "parameters could be found")
      .def("GetMMFFTorsionParams", &PyMMFFMolProperties::getMMFFTorsionParams,
           (python::arg("self"), python::arg("mol"), python::arg("idx1"),
            python::arg("idx2"), python::arg("idx3"), python::arg("idx4")),
           "Retrieves MMFF torsion parameters for atoms with indexes idx1, "
           "idx2, idx3, idx4 "
           "as a (torsionType, V1, V2, V3) tuple, or None if no parameters "
           "could be found")
      .def("GetMMFFOopBendParams", &PyMMFFMolProperties::getMMFFOopBendParams,
           (python::arg("self"), python::arg("mol"), python::arg("idx1"),
            python::arg("idx2"), python::arg("idx3"), python::arg("idx4")),
           "Retrieves MMFF out-of-plane bending force constant for atoms with "
           "indexes "
           "idx1, idx2, idx3, idx4 as a koop float value")
      .def("GetMMFFVdWParams", &PyMMFFMolProperties::getMMFFVdWParams,
           (python::arg("self"), python::arg("idx1"), python::arg("idx2")),
           "Retrieves MMFF van der Waals parameters for atoms with indexes "
           "idx1, idx2 as a (R_ij_starUnscaled, epsilonUnscaled, R_ij_star, "
           "epsilon) tuple, "
           "or None if no parameters could be found")
      .def("SetMMFFDielectricModel",
           &PyMMFFMolProperties::setMMFFDielectricModel,
           (python::arg("self"), python::arg("dielModel") = 1),
           "Sets the DielModel MMFF property (1: constant; 2: "
           "distance-dependent; "
           "defaults to constant)")
      .def("SetMMFFDielectricConstant",
           &PyMMFFMolProperties::setMMFFDielectricConstant,
           (python::arg("self"), python::arg("dielConst") = 1.0),
           "Sets the DielConst MMFF property (defaults to 1.0)")
      .def("SetMMFFBondTerm", &PyMMFFMolProperties::setMMFFBondTerm,
           (python::arg("self"), python::arg("state") = true),
           "Sets the bond term to be included in the MMFF equation (defaults "
           "to True)")
      .def("SetMMFFAngleTerm", &PyMMFFMolProperties::setMMFFAngleTerm,
           (python::arg("self"), python::arg("state") = true),
           "Sets the angle term to be included in the MMFF equation (defaults "
           "to True)")
      .def("SetMMFFStretchBendTerm",
           &PyMMFFMolProperties::setMMFFStretchBendTerm,
           (python::arg("self"), python::arg("state") = true),
           "Sets the stretch-bend term to be included in the MMFF equation "
           "(defaults to True)")
      .def("SetMMFFOopTerm", &PyMMFFMolProperties::setMMFFOopTerm,
           (python::arg("self"), python::arg("state") = true),
           "Sets the out-of-plane bend term to be included in the MMFF "
           "equation (defaults to True)")
      .def("SetMMFFTorsionTerm", &PyMMFFMolProperties::setMMFFTorsionTerm,
           (python::arg("self"), python::arg("state") = true),
           "Sets the torsional term to be included in the MMFF equation "
           "(defaults to True)")
      .def("SetMMFFVdWTerm", &PyMMFFMolProperties::setMMFFVdWTerm,
           (python::arg("self"), python::arg("state") = true),
           "Sets the Van der Waals term to be included in the MMFF equation "
           "(defaults to True)")
      .def("SetMMFFEleTerm", &PyMMFFMolProperties::setMMFFEleTerm,
           (python::arg("self"), python::arg("state") = true),
           "Sets the electrostatic term to be included in the MMFF equation "
           "(defaults to True)")
      .def("SetMMFFVariant", &PyMMFFMolProperties::setMMFFVariant,
           (python::arg("self"), python::arg("mmffVariant") = "MMFF94"),
           "Sets the MMFF variant to be used (\"MMFF94\" or \"MMFF94s\"; "
           "defaults to \"MMFF94\")")
      .def("SetMMFFVerbosity", &PyMMFFMolProperties::setMMFFVerbosity,
           (python::arg("self"), python::arg("verbosity") = 0),
           "Sets the MMFF verbosity (0: none; 1: low; 2: high; defaults to 0)");
}
/*
    (python::arg("self"), python::arg("mol"), python::arg("idx1"),
   python::arg("idx2")),
    "Retrieves MMFF bond stretch parameters for atoms with indexes idx1, idx2; "
    "as a tuple (bondType, kb, r0)")
*/


text:
import Reflux from 'reflux';

import {ActivityService} from '../services';

const actions = Reflux.createActions({
	readActivity: { asyncResult: true },
	createActivity: { asyncResult: true },
	updateActivity: { asyncResult: true },
	removeActivity: { asyncResult: true },
	searchActivities: { asyncResult: true },
});

actions.readActivity.listen(function(activityId) {
	ActivityService.readActivity(activityId)
		.then(this.completed, this.failed);
});

actions.createActivity.listen(function(activityData) {
	ActivityService.createActivity(activityData)
		.then(this.completed, this.failed);
});

actions.updateActivity.listen(function(activityId, activityData) {
	ActivityService.updateActivity(activityId, activityData)
		.then(this.completed, this.failed);
});

actions.removeActivity.listen(function(activityId) {
	ActivityService.removeActivity(activityId)
		.then(this.completed, this.failed);
});

actions.searchActivities.listen(function(params, limit) {
	ActivityService.searchActivities(params, limit)
		.then(this.completed, this.failed);
});

export default actions;

redpajama_set_name: RedPajamaGithub


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>HadoopMapReduceJob</title>
<meta name="date" content="2015-03-06">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.jetel.hadoop.service.mapreduce

Class HadoopMapReduceJob

java.lang.Object

org.jetel.hadoop.service.mapreduce.HadoopMapReduceJob

public class HadoopMapReduceJob
extends java.lang.Object

Represents basic configuration of Hadoop map/reduce job. Holds all the information that mandatory for the job to
 be submitted to a jobtracker and executed on Hadoop cluster. In addition, it can store some common job settings like
 name of the map/reduce job.

 This is a bean class that does not contain any considerable logic nor is it intended to. All attributes are
 initialized in constructor and are made available by call to standard getters methods. All getters are expected to
 return non-null values unless otherwise specified by their documentation. This class is immutable.

Since:

rel-3-4-0-M2

See Also:

HadoopMapReduceService.sendJob(HadoopMapReduceJob, Properties),
HadoopJobRunner.runJobLogProgress(HadoopMapReduceService, HadoopMapReduceJob, Properties, boolean)

Nested Class Summary

Nested Classes

Modifier and Type
Class and Description

static class
HadoopMapReduceJob.APIVersion

Enum representing versions of map/reduce job implementation APIs.

Constructor Summary

Constructors

Constructor and Description

<a href="../../../../../org/jetel/hadoop/service/mapreduce/HadoopMapReduceJob.html#HadoopMapReduceJob(java.lang.String, java.net.URL, java.util.List, java.net.URI, java.net.URI, boolean, org.jetel.hadoop.service.mapreduce.HadoopMapReduceJob.APIVersion, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Integer, java.lang.Integer, long)">HadoopMapReduceJob(java.lang.String jobName,
                  java.net.URL jobJarFile,
                  java.util.List<java.net.URI> inputFiles,
                  java.net.URI outputDir,
                  java.net.URI workingDirectory,
                  boolean clearOutputDir,
                  HadoopMapReduceJob.APIVersion apiVersion,
                  java.lang.String mapper,
                  java.lang.String combiner,
                  java.lang.String partitioner,
                  java.lang.String reducer,
                  java.lang.String inputFormat,
                  java.lang.String outputFormat,
                  java.lang.String mapperOutKey,
                  java.lang.String mapperOutValue,
                  java.lang.String groupingComparator,
                  java.lang.String sortingComparator,
                  java.lang.String outputKey,
                  java.lang.String outputValue,
                  java.lang.Integer numMappers,
                  java.lang.Integer numReducers,
                  long timeout)

Initializes new HadoopMapReduceJob that contains at least the mandatory configuration required to execute
 the job.

Method Summary

Methods

Modifier and Type
Method and Description

HadoopMapReduceJob.APIVersion
getAPIVersion()

Returns job implementation API version.

java.lang.String
getCombiner()

Gets name of combiner class of the job.

java.lang.String
getGroupingComparator()

java.util.List<java.net.URI>
getInputFiles()

Gets list of job input files on Hadoop cluster file system.

java.lang.String
getInputFormat()

Gets input format class name of the job.

java.net.URL
getJobJarFile()

Gets URL of job jar file.

java.lang.String
getJobName()

Gets job name.

java.lang.String
getMapper()

Gets name of mapper class of the job.

java.lang.String
getMapperOutputKey()

java.lang.String
getMapperOutputValue()

java.lang.Integer
getNumMappers()

Gets number of mappers.

java.lang.Integer
getNumReducers()

Gets number of reducers.

java.net.URI
getOutputDir()

Gets job output directory on Hadoop cluster file system.

java.lang.String
getOutputFormat()

Gets output format class name of the job.

java.lang.String
getOutputKey()

Gets name of output key class of the job.

java.lang.String
getOutputValue()

Gets name of output value class of the job.

java.lang.String
getPartitioner()

Gets name of partitioner class of the job.

java.lang.String
getReducer()

Gets name of reducer class of the job.

java.lang.String
getSortingComparator()

long
getTimeout()

Gets job timeout limit.

java.net.URI
getWorkingDirectory()

Gets URI of job working directory on Hadoop file system.

boolean
isClearOutputPath()

Indicates whether job output directory is to be deleted (if existing) on Hadoop cluster file system before job
 execution.

java.lang.String
toString()

Methods inherited from class java.lang.Object

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

Constructor Detail

HadoopMapReduceJob

public HadoopMapReduceJob(java.lang.String jobName,
                  java.net.URL jobJarFile,
                  java.util.List<java.net.URI> inputFiles,
                  java.net.URI outputDir,
                  java.net.URI workingDirectory,
                  boolean clearOutputDir,
                  HadoopMapReduceJob.APIVersion apiVersion,
                  java.lang.String mapper,
                  java.lang.String combiner,
                  java.lang.String partitioner,
                  java.lang.String reducer,
                  java.lang.String inputFormat,
                  java.lang.String outputFormat,
                  java.lang.String mapperOutKey,
                  java.lang.String mapperOutValue,
                  java.lang.String groupingComparator,
                  java.lang.String sortingComparator,
                  java.lang.String outputKey,
                  java.lang.String outputValue,
                  java.lang.Integer numMappers,
                  java.lang.Integer numReducers,
                  long timeout)

Initializes new HadoopMapReduceJob that contains at least the mandatory configuration required to execute
 the job. If not stated otherwise parameters can be null (not specified).

Parameters:

jobName - A name of the job typically specified by user as an identification of the job. It is not needed to
        be unique.

jobJarFile - Absolute URL to locally stored JAR file containing definition of job classes (for example
        mapper class). May not be null.

inputFiles - List containing one or more location(s) of job input file(s) on Hadoop cluster file system.
        Location(s) can be absolute (in terms of Hadoop file system) or relative to working directory. May not be
        null not empty.

outputDir - URI of directory on Hadoop cluster file system where the output of the job should be stored. If
        this directory does not exist it is created but the parent directory must exist. Can be absolute or
        relative to specified working directory. May not be null.

workingDirectory - Hadoop file system URI to working directory of the job. Might be absolute or relative to
        previous working directory.

clearOutputDir - If true then in case that output directory of the job already exists it should be
        deleted before execution of the job.

apiVersion - version of API used to implement map/reduce job classes.

mapper - Fully qualified name of class that is to be used as mapper class of the map/reduce job. This class
        is typically contained in job JAR file. May not be null not empty.

combiner - Fully qualified name of the class that is to be used as combiner of map/reduce job. This class is
        typically contained in job JAR file.

partitioner - Fully qualified name of the class that is to be used as partitioner of map/reduce job. This class is
        typically contained in job JAR file.

reducer - Fully qualified name of the class that is to be used as reducer of map/reduce job. This class is
        typically contained in job JAR file.

inputFormat - Fully qualified name of input format class for this map/reduce job.

outputFormat - Fully qualified name of output format class for this map/reduce job.

mapperOutKey - Fully qualified name of mapper output key class.

mapperOutValue - Fully qualified name of mapper output value class.

groupingComparator - FQN of comparator that controls which keys are grouped together for a single call to reducer's reduce method.

sortingComparator - FQN of comparator that controls how the keys are sorted before they are passed to the reducer.

outputKey - Fully qualified name of output records key class for this map/reduce job. May not be
        null.

outputValue - Fully qualified name of output records value class for this map/reduce job. May not be
        null.

numMappers - Number of mappers to be used for job execution or null if not specified. If
        specified must be greater then 0.

numReducers - Number of reducers to be used for job execution or null if not specified. If
        specified must be greater or equal to 0.

timeout - Time limit for job execution in milliseconds. May not be less then 0. Value of 0 specifies no limit.

Method Detail

getJobName

public java.lang.String getJobName()

Gets job name.

Returns:

A name of the job typically specified by user as an identification of the job or null>. It
         is not required to be unique.

getJobJarFile

public java.net.URL getJobJarFile()

Gets URL of job jar file.

Returns:

Absolute URL to locally stored JAR file containing definition of job classes (for example mapper class)

getInputFiles

public java.util.List<java.net.URI> getInputFiles()

Gets list of job input files on Hadoop cluster file system.

Returns:

List containing one or more URI(s) of job input file(s). URI(s) can be absolute (in terms of that Hadoop
         file system) or relative to working directory.

getOutputDir

public java.net.URI getOutputDir()

Gets job output directory on Hadoop cluster file system.

Returns:

URI of directory where the output of the job should be stored. Can be absolute or relative to specified
         working directory.

getWorkingDirectory

public java.net.URI getWorkingDirectory()

Gets URI of job working directory on Hadoop file system.

Returns:

URI to working directory of the job or null if not specified. Might be absolute or relative
         to previous working directory.

isClearOutputPath

public boolean isClearOutputPath()

Indicates whether job output directory is to be deleted (if existing) on Hadoop cluster file system before job
 execution.

Returns:

true if and only if the output directory of the job is be deleted before job execution in case it
         exists.

getAPIVersion

public HadoopMapReduceJob.APIVersion getAPIVersion()

Returns job implementation API version.

Returns:

job implementation API version.

getMapper

public java.lang.String getMapper()

Gets name of mapper class of the job.

Returns:

Fully qualified name of class that is to be used as mapper class of the map/reduce job. This class is
         typically contained in job JAR file.

getCombiner

public java.lang.String getCombiner()

Gets name of combiner class of the job.

Returns:

Fully qualified name of the class that is to be used as combiner of map/reduce job or null
         if not specified. This class is typically contained in job JAR file.

getPartitioner

public java.lang.String getPartitioner()

Gets name of partitioner class of the job.

Returns:

Fully qualified name of the class that is to be used as partitioner of map/reduce job or null if
         not specified. This class is typically contained in job JAR file.

getReducer

public java.lang.String getReducer()

Gets name of reducer class of the job.

Returns:

Fully qualified name of the class that is to be used as reducer of map/reduce job or null if
         not specified. This class is typically contained in job JAR file.

getInputFormat

public java.lang.String getInputFormat()

Gets input format class name of the job.

Returns:

Fully qualified name of input format class for this map/reduce job or null if not specified.

getOutputFormat

public java.lang.String getOutputFormat()

Gets output format class name of the job.

Returns:

Fully qualified name of output format class for this map/reduce job or null if not
         specified.

getMapperOutputKey

public java.lang.String getMapperOutputKey()

getMapperOutputValue

public java.lang.String getMapperOutputValue()

getGroupingComparator

public java.lang.String getGroupingComparator()

getSortingComparator

public java.lang.String getSortingComparator()

getOutputKey

public java.lang.String getOutputKey()

Gets name of output key class of the job.

Returns:

Fully qualified name of output records key class for this map/reduce job.

getOutputValue

public java.lang.String getOutputValue()

Gets name of output value class of the job.

Returns:

Fully qualified name of output records value class for this map/reduce job.

getNumMappers

public java.lang.Integer getNumMappers()

Gets number of mappers.

Returns:

Number of mappers to be used for job execution or null if not specified. If
        non-null it is greater then 0.

getNumReducers

public java.lang.Integer getNumReducers()

Gets number of reducers.

Returns:

Number of reducers to be used for job execution or null if not specified. If
        non-null it is greater then 0.

getTimeout

public long getTimeout()

Gets job timeout limit.

Returns:

Time limit for job execution in milliseconds. Value returned is equal or greater then 0. Value of 0
         specifies no limit.

toString

public java.lang.String toString()

Overrides:

toString in class java.lang.Object

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

				<address>Copyright © 2002-2015 Javlin a.s.</address>


text:
/* The Good */

@interface ItemsViewController ()

@property (strong, nonatomic) NSArray *items;
@property (readwrite, nonatomic) NSInteger itemsCount;

@end

/* The Bad */

@interface ItemsViewController () {
    NSArray *items;
    NSInteger itemsCount;
}


text:
/* eslint-env jest */
const { resolve } = require('path')
const { clear, getPossibleModuleTypes, resolveAllRunnableModules, resolveRunnableModule } = require('../modules')
const rootDirectoryPath = resolve(__dirname, '../../..')

test('Gets possible module types', () => {
  let types

  process.chdir(resolve(rootDirectoryPath, `test-projects/empty`))
  types = getPossibleModuleTypes()
  expect(types).toEqual([])

  process.chdir(resolve(rootDirectoryPath, `test-projects/empty-run`))
  types = getPossibleModuleTypes()
  expect(types).toEqual([])

  process.chdir(resolve(rootDirectoryPath, `test-projects/only-bin`))
  types = getPossibleModuleTypes()
  expect(types).toEqual([])

  process.chdir(resolve(rootDirectoryPath, `test-projects/only-tasks`))
  clear()
  types = getPossibleModuleTypes()
  expect(types).toEqual(['tasks'])

  process.chdir(resolve(rootDirectoryPath, `test-projects/only-tools`))
  clear()
  types = getPossibleModuleTypes()
  expect(types).toEqual(['tools'])

  process.chdir(resolve(rootDirectoryPath, `test-projects/syntax-error`))
  clear()
  types = getPossibleModuleTypes()
  expect(types).toEqual(['tools'])

  process.chdir(resolve(rootDirectoryPath, `test-projects/all`))
  clear()
  types = getPossibleModuleTypes()
  expect(types).toEqual(['tasks', 'tools'])

  process.chdir(rootDirectoryPath)
})

test('Resolves all runnable modules', () => {
  let modules

  process.chdir(resolve(rootDirectoryPath, `test-projects/empty`))
  modules = resolveAllRunnableModules()
  expect(modules).toBeInstanceOf(Map)
  expect(modules.size).toBe(0)

  process.chdir(resolve(rootDirectoryPath, `test-projects/empty-run`))
  clear()
  modules = resolveAllRunnableModules()
  expect(modules.size).toBe(0)

  process.chdir(resolve(rootDirectoryPath, `test-projects/only-bin`))
  clear()
  modules = resolveAllRunnableModules()
  expect(modules.size).toBe(0)

  process.chdir(resolve(rootDirectoryPath, `test-projects/only-tasks`))
  clear()
  modules = resolveAllRunnableModules()
  expect(modules.size).toBe(1)
  expect(Array.from(modules.keys())).toEqual(['tasks'])
  expect(Array.from(modules.get('tasks').keys())).toEqual(['build', 'deploy', 'test'])

  process.chdir(resolve(rootDirectoryPath, `test-projects/only-tools`))
  clear()
  modules = resolveAllRunnableModules()
  expect(modules.size).toBe(1)
  expect(Array.from(modules.keys())).toEqual(['tools'])
  expect(Array.from(modules.get('tools').keys())).toEqual(['bundler', 'tester', 'transpiler'])

  process.chdir(resolve(rootDirectoryPath, `test-projects/all`))
  clear()
  modules = resolveAllRunnableModules()
  expect(modules.size).toBe(2)
  expect(Array.from(modules.keys())).toEqual(['tasks', 'tools'])
  expect(Array.from(modules.get('tasks').keys())).toEqual(['build', 'deploy', 'test'])
  expect(Array.from(modules.get('tools').keys())).toEqual(['bundler', 'tester', 'transpiler'])

  process.chdir(rootDirectoryPath)
})

test('Throws error when attempt is made to resolve module with syntax error', () => {
  process.chdir(resolve(rootDirectoryPath, `test-projects/syntax-error`))
  clear()
  expect(() => resolveRunnableModule('bundler')).toThrow()
  jest.resetModules()
  expect(() => resolveAllRunnableModules()).toThrow()
  process.chdir(rootDirectoryPath)
})


text:
import { format } from '@gethue/sql-formatter';
import { ExecutionStatus } from './execution/sqlExecutable';
import { CancellablePromise } from 'api/cancellablePromise';
import { get } from 'api/utils';

const HISTORY_API_URL = '/api/editor/get_history';

export const formatSql = async (options: {
  statements: string;
  silenceErrors?: boolean;
}): Promise<string> => {
  try {
    return format(options.statements, {
      uppercase: true,
      linesBetweenQueries: 2,
      indentQuerySeparator: true
    });
  } catch (err) {
    if (!options.silenceErrors) {
      throw err;
    }
  }
  return options.statements;
};

export interface FetchHistoryOptions {
  type: string;
  page?: number;
  limit?: number;
  docFilter?: string;
  isNotificationManager?: boolean;
}

export interface FetchHistoryResponse {
  count: number;
  history: {
    absoluteUrl: string;
    data: {
      lastExecuted: number;
      parentSavedQueryUuid: string;
      statement: string;
      status: ExecutionStatus;
    };
    id: number;
    name: string;
    type: string;
    uuid: string;
  }[];
  message: string;
  status: number;
}

export const fetchHistory = (
  options: FetchHistoryOptions
): CancellablePromise<FetchHistoryResponse> => {
  return get<FetchHistoryResponse>(HISTORY_API_URL, {
    doc_type: options.type,
    limit: options.limit || 50,
    page: options.page || 1,
    doc_text: options.docFilter,
    is_notification_manager: options.isNotificationManager
  });
};


text:
/******************************************************************
 HueLight plugin

Features:
- Control Philips Hue light

Note: Name must match that used in the Philips Hue app.

http://www.github.com/rlisle/Patriot

Written by Ron Lisle

BSD license, check license.txt for more information.
All text above must be included in any redistribution.

******************************************************************/
#pragma once

#include "Particle.h"
#include <device.h>

class HueLight : public Device
{
private:
    String    _userID;
    byte      _server[4];
    TCPClient _tcpClient;
    String    _hueId;

    void      writeToHue();
    void      notify();

public:
    HueLight(String name, String room, String hueId, byte *server, String userid);

    void begin();
    void loop();

    void setValue(int percent);
};


text:
@interface AppDelegate : UIResponder <UIApplicationDelegate, UITabBarControllerDelegate, UINavigationControllerDelegate>

@property (strong, nonatomic) UIWindow *window;

@property (strong, nonatomic) ButtonTabBarController *tabBarController;

@property (strong, nonatomic) ListingsTopViewController *offersViewController;
@property (strong, nonatomic) ListingsTopViewController *requestsViewController;
@property (strong, nonatomic) ConversationListViewController *messagesViewController;
@property (strong, nonatomic) ProfileViewController *profileViewController;

@property (strong, nonatomic) NewListingViewController *listingComposer;
@property (strong, nonatomic) UINavigationController *createListingNavigationController;

@property (strong, nonatomic) Community *community;

- (void)doInitialCheck;
- (void)refreshInitialContent;

+ (AppDelegate *)sharedAppDelegate;

@end


text:
dfn,img{font-style:italic}
body,html{overflow-y:auto;overflow-x:hidden}
[colspan="1"],td,th{text-align:left}
[bs-button],[rowspan]{vertical-align:middle}
[rowspan="1"],td,th{vertical-align:top}
[bs-header],[bs-header] [bs-header-row],main,sub,sup{position:relative}
[bs-header] [bs-header-row~=brand],[bs-toggle]{height:60px}
[bs-sidebar],[bs-toggle]:hover{background:#444}
[bs-content],body,html{overflow-x:hidden}
[bs-button]:focus,[bs-button]:hover,[bs-header] [bs-list~=header] a:hover,[bs-header] [bs-list~=header]:hover,a,a [class*=" icon-"],a [class^=icon-],ins,u{text-decoration:none}
[bs-list],[bs-list~=inline-controls]{word-wrap:break-word}
[bs-toggle],[colspan]{text-align:center}
pre,textarea{overflow:auto}
*,:after,:before{box-sizing:border-box}
blockquote,caption,dd,dl,fieldset,form,h1,h2,h3,h4,h5,h6,hr,legend,ol,p,pre,table,td,th,ul{margin:0;padding:0}
abbr[title],dfn[title]{cursor:help}
ins{border-bottom:1px solid}
img{border:0}
button,input,label,option,select,textarea{cursor:pointer}
.text-input:active,.text-input:focus,textarea:active,textarea:focus{cursor:text;outline:0}
/*! normalize.css v3.0.1 | MIT License | git.io/normalize */
body{margin:0;min-height:100%;max-width:100%;background:#fff;color:#777;text-rendering:optimizeLegibility}
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
audio,canvas,progress,video{display:inline-block;vertical-align:baseline}
audio:not([controls]){display:none;height:0}
[hidden],template{display:none}
a{background:0 0}
a:active,a:hover{outline:0}
abbr[title]{border-bottom:1px dotted}
b,dt,optgroup,strong,th{font-weight:700}
h1{margin:.67em 0}
mark{background:#ff0;color:#000}
small{font-size:80%}
sub,sup{font-size:75%;line-height:0;vertical-align:baseline}
sup{top:-.5em}
sub{bottom:-.25em}
svg:not(:root){overflow:hidden}
figure{margin:1em 40px}
code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}
button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}
button{overflow:visible}
button,select{text-transform:none}
button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
button[disabled],html input[disabled]{cursor:default}
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
input{line-height:normal}
input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}
input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}
input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}
input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}
fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
legend{border:0;padding:0}
table{border-collapse:collapse;border-spacing:0;margin-top:14px;width:100%}
@font-face{font-family:source_sans;src:url(../fonts/source-sans/sourcesanspro-it-webfont.eot);src:url(../fonts/source-sans/sourcesanspro-it-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/source-sans/sourcesanspro-it-webfont.woff2) format('woff2'),url(../fonts/source-sans/sourcesanspro-it-webfont.woff) format('woff'),url(../fonts/source-sans/sourcesanspro-it-webfont.ttf) format('truetype'),url(../fonts/source-sans/sourcesanspro-it-webfont.svg#source_sans_proitalic) format('svg');font-weight:400;font-style:italic}
@font-face{font-family:source_sans;src:url(../fonts/source-sans/sourcesanspro-bold-webfont.eot);src:url(../fonts/source-sans/sourcesanspro-bold-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/source-sans/sourcesanspro-bold-webfont.woff2) format('woff2'),url(../fonts/source-sans/sourcesanspro-bold-webfont.woff) format('woff'),url(../fonts/source-sans/sourcesanspro-bold-webfont.ttf) format('truetype'),url(../fonts/source-sans/sourcesanspro-bold-webfont.svg#source_sans_probold) format('svg');font-weight:700;font-style:normal}
@font-face{font-family:source_sans;src:url(../fonts/source-sans/sourcesanspro-regular-webfont.eot);src:url(../fonts/source-sans/sourcesanspro-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/source-sans/sourcesanspro-regular-webfont.woff2) format('woff2'),url(../fonts/source-sans/sourcesanspro-regular-webfont.woff) format('woff'),url(../fonts/source-sans/sourcesanspro-regular-webfont.ttf) format('truetype'),url(../fonts/source-sans/sourcesanspro-regular-webfont.svg#source_sans_proregular) format('svg');font-weight:400;font-style:normal}
@-webkit-keyframes spin{from{-webkit-transform:rotate(0);transform:rotate(0)}
to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}
}
@keyframes spin{from{-webkit-transform:rotate(0);transform:rotate(0)}
to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}
}
html{height:100%;font:112.5%/1.5 source_sans,"Lucida Grande","Lucida Sans",sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-font-smoothing:antialiased}
dl ol,dl ul,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}
ol,ul{margin-left:27px}
ul{list-style:disc}
ul ul{list-style:circle}
ol{list-style:decimal}
ol ol{list-style:lower-alpha}
dd+dt{padding-top:14px}
td,th{padding:7px 14px;border-bottom:1px solid #F0F0F0}
thead tr:last-child th{border-bottom:2px solid #F0F0F0}
hr{box-sizing:content-box;clear:both;margin-bottom:27px;border:none;border-bottom:1px solid #F0F0F0;padding-bottom:14px;height:1px}
[bs-grid]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;-webkit-flex-flow:wrap;-ms-flex-flow:wrap;flex-flow:wrap}
[bs-grid]>*{width:100%;padding-top:14px;padding-bottom:7px}
@media only screen and (min-width:750px){[bs-grid~=desk-2] [bs-grid-item]{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%}
}
@media only screen and (min-width:1000px){[bs-grid~=wide-4] [bs-grid-item]{-webkit-box-flex:0;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%}
}
.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}
[bs-header]{background:#222}
@media only screen and (min-width:600px){html{height:100vh}
body{height:100vh;overflow-y:hidden}
main{overflow:hidden}
[bs-grid-item~=padded-right]{padding-right:54px}
[bs-header]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}
}
[bs-header] [bs-header-row]{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}
[bs-header] [bs-header-row] *{margin-top:auto;margin-bottom:auto}
[bs-header] [bs-list~=header]{width:100%;padding-left:75px;font-size:14px;font-size:.77778rem}
[bs-header] [bs-list~=header],[bs-header] [bs-list~=header] a{color:#fff}
[bs-header] [bs-list~=header] a{display:block;position:relative}
[bs-header] [bs-list~=header] a:hover{color:#81be00;text-shadow:1px 1px 3px #000}
[bs-toggle]{font-size:24px;font-size:1.33333rem;position:absolute;right:0;cursor:pointer;width:55px;line-height:60px;color:#fff;-webkit-transition:background .2s;transition:background .2s;text-shadow:1px 1px 2px #00262C;border-left:1px solid #222;border-bottom:1px solid #222}
[bs-toggle] svg{position:absolute;top:14px;left:12px;height:30px;width:30px;pointer-events:none}
[bs-toggle] svg[bs-state=alt],[bs-toggle].active svg{opacity:0}
[bs-toggle].active svg[bs-state=alt]{opacity:1!important}
[bs-link~=version]{color:#777;margin-left:7px;font-size:20px;font-size:1.11111rem;position:relative;top:4px}
[bs-link~=version]:focus,[bs-link~=version]:hover{color:#F54747}
[bs-sidebar]{position:relative}
@media only screen and (min-width:600px){[bs-toggle]{display:none}
[bs-sidebar]{width:240px}
[bs-sidebar]:after{content:" ";width:10px;height:100%;position:absolute;right:0;top:0;z-index:10;background:-webkit-linear-gradient(left,transparent 0,rgba(0,0,0,.2) 100%);background:linear-gradient(to right,transparent 0,rgba(0,0,0,.2) 100%)}
}
[bs-section-nav]{background:#444;position:absolute;width:100%;-webkit-transform:translateX(-200%) translateY(20px) scale(1.2);-ms-transform:translateX(-200%) translateY(20px) scale(1.2);transform:translateX(-200%) translateY(20px) scale(1.2);-webkit-transition:all .3s;transition:all .3s;opacity:0;z-index:5}
[bs-section-nav] ul{margin-bottom:0}
[bs-section-nav] [bs-button]{text-transform:none;color:#ababab;width:100%;border-radius:0;text-align:left;border:0;position:relative;background:0 0;display:block;height:auto;padding:11px 0 11px 55px;border-bottom:1px solid #363636;font-size:16px;font-size:.88889rem;margin-bottom:0;box-shadow:0 0}
.icon-logo,[bs-button],[bs-control],[bs-footer]{text-align:center}
.icon,[bs-svg-icon]{display:inline-block}
[bs-section-nav] [bs-button] [bs-svg-icon]{top:14px;width:20px;height:20px;-webkit-filter:drop-shadow(1px 1px 1px #00262C);filter:drop-shadow(1px 1px 1px #00262C)}
[bs-section-nav] [bs-button].active{background:#363636;z-index:5;color:#fff}
[bs-section-nav] [bs-button].active [bs-svg-icon]{color:#F54747}
[bs-section-nav] [bs-button]:hover{color:#fff;background:#363636}
[bs-section-nav] [bs-button]:active{color:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,.1) inset;background:#292929}
@media only screen and (min-width:600px){[bs-section-nav]{position:relative;-webkit-transform:translateX(0) translateY(0) scale(1);-ms-transform:translateX(0) translateY(0) scale(1);transform:translateX(0) translateY(0) scale(1)}
[bs-section-nav].ready{opacity:1}
}
[bs-section-nav].active{-webkit-transform:translateX(0) translateY(0) scale(1);-ms-transform:translateX(0) translateY(0) scale(1);transform:translateX(0) translateY(0) scale(1);opacity:1}
[bs-content]{height:auto;position:relative;background:#fff;width:100%}
@media only screen and (min-width:600px){[bs-container]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}
[bs-content]{height:100vh;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:59px;margin-top:1px;width:auto;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}
}
svg{width:100%;height:100%;opacity:1;fill:currentColor!important;-webkit-transition:.3s;transition:.3s}
svg.icon-hidden{opacity:0}
.icon-trash{width:100%;max-width:26px;height:26px}
.icon-word{width:100%;max-width:150px;height:100%;margin-left:15px;color:#fff}
.icon-word svg{position:relative;top:-1px}
.icon-logo{color:#fff;-webkit-transition:all .1s;transition:all .1s;width:55px;height:37px}
[bs-svg-icon],[bs-svg-icon] use{width:27px;height:27px}
.icon-logo:hover{color:#fff;-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}
[bs-svg-icon]{line-height:inherit;position:relative;top:7px}
address,blockquote,details,dl,fieldset,figcaption,figure,h1,h2,h3,h4,h5,h6,hgroup,ol,p,pre,table,ul{margin-bottom:14px}
.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{color:#444;font-weight:400;line-height:1;font-family:source_sans,"Lucida Grande","Lucida Sans",sans-serif;margin-bottom:27px;-webkit-font-smoothing:antialiased}
.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-size:inherit;font-weight:400}
.h1,h1{font-size:36px;font-size:2rem}
.h2,h2{padding-top:14px;font-size:30px;font-size:1.66667rem}
.h3,h3{font-size:18px;font-size:1rem;font-weight:700}
.h4,.h5,.h6,h4,h5,h6{font-size:16px;font-size:.88889rem}
[bs-heading]{font-size:24px;font-size:1.33333rem;padding-left:55px;position:relative;line-height:52px;margin-top:0;margin-bottom:0;color:#FBFBFB;background:#3f3f3f;border-top:1px solid #3f3f3f}
[bs-heading] [bs-svg-icon]{position:absolute;left:14px;top:11px}
@media only screen and (min-width:600px){[bs-heading]{font-size:38px;font-size:2.11111rem;color:#444;background:#FBFBFB;padding-left:80px;border-top:0}
[bs-heading]:before{display:none}
[bs-heading] [bs-svg-icon]{height:38px;width:38px;top:6px}
}
.lede{font-size:24px;font-size:1.33333rem}
.small{font-size:14px;font-size:.77778rem}
a{color:#F54747;-webkit-transition:background .3s ease,color .3s ease;transition:background .3s ease,color .3s ease}
a:active,a:focus,a:hover{color:#000}
[bs-icon]{-webkit-transition:background .3s ease,color .3s ease;transition:background .3s ease,color .3s ease}
.flush--bottom{margin-bottom:0!important}
[bs-button-group],[bs-button],[bs-stack]{margin-bottom:14px}
.text--cap{text-transform:capitalize}
.color--lime{color:#81be00}
.hidden{display:none}
.hidden.active{display:block}
span.sep{margin-left:5px;margin-right:5px}
[bs-text~=lede]{font-size:18px;font-size:1rem}
[bs-text~=mono]{font-weight:400;font-size:16px;font-size:.88889rem;font-family:monospace;color:#000}
[bs-color~=white]{color:#fff}
[bs-color~=success]{color:#81be00}
@media only screen and (min-width:750px){[bs-visible~=not-desk]{display:none}
}
[bs-visible~=not-palm]{display:none!important}
@media only screen and (min-width:600px){.width-100{width:100%!important}
.width-90{width:90%!important}
.width-80{width:80%!important}
.width-70{width:70%!important}
.width-60{width:60%!important}
.width-50{width:50%!important}
.width-40{width:40%!important}
.width-30{width:30%!important}
.width-20{width:20%!important}
[bs-width~="100"]{width:100%!important}
[bs-width~="90"]{width:90%!important}
[bs-width~="80"]{width:80%!important}
[bs-width~="70"]{width:70%!important}
[bs-width~="60"]{width:60%!important}
[bs-width~="50"]{width:50%!important}
[bs-width~="40"]{width:40%!important}
[bs-width~="30"]{width:30%!important}
[bs-width~="25"]{width:25%!important}
[bs-width~="20"]{width:20%!important}
[bs-width~="10"]{-webkit-box-flex:0!important;-webkit-flex:0 0 10%!important;-ms-flex:0 0 10%!important;flex:0 0 10%!important}
[bs-width~="5"]{-webkit-box-flex:0!important;-webkit-flex:0 0 5%!important;-ms-flex:0 0 5%!important;flex:0 0 5%!important}
[bs-visible~=not-palm]{display:inherit!important}
[bs-visible~=palm]{display:none}
}
[bs-sep]{color:#d6d6d6;margin-left:3px;margin-right:3px}
[bs-button]{font-size:16px;font-size:.88889rem;display:inline-block;border:1px solid #e30c0c;padding:7px 21px;width:auto;background:#F54747;color:#fff;border-radius:3px;cursor:pointer;outline:0;-webkit-transition:color .2s,background .2s;transition:color .2s,background .2s;text-transform:uppercase;letter-spacing:1px;height:40px;-webkit-tap-highlight-color:transparent}
[bs-button]:hover{color:#fff;background:#f21717}
[bs-button]:focus{color:#fff}
[bs-button]:active{color:#fff;box-shadow:0 1px 0 0 rgba(0,0,0,.1) inset;text-shadow:1px 1px 0 rgba(0,0,0,.4)}
[bs-button].success{color:#81be00!important}
[bs-button].success [bs-state~=success]{opacity:1}
[bs-button].success [bs-state~=default]{opacity:0}
[bs-button][disabled]{border-color:#d86464;background:#d86464;color:#F2AAAA}
[bs-button] [bs-svg-icon]{position:absolute;top:11px;left:14px;width:16px;height:16px}
[bs-button~=subtle]{background:#fff;color:#F54747;border-color:#e3e3e3}
[bs-button~=subtle]:focus,[bs-button~=subtle]:hover{color:#F54747;background:#F0F0F0}
[bs-button~=subtle]:focus,[bs-button~=subtle-alt]:focus{background:#fff}
[bs-button~=subtle]:active{color:#F54747;text-shadow:1px 1px 1px rgba(0,0,0,.2);background:#f7f7f7}
[bs-button~=subtle][disabled]{border-color:#e3e3e3;background:#F0F0F0;color:#F2AAAA}
[bs-button~=subtle-alt]{background:#fff;color:#8a8a8a;border-color:#e3e3e3}
[bs-button~=subtle-alt]:focus,[bs-button~=subtle-alt]:hover{color:#8a8a8a;background:#F0F0F0}
[bs-button~=subtle-alt]:active{color:#8a8a8a;text-shadow:1px 1px 1px rgba(0,0,0,.2);background:#f7f7f7}
[bs-button~=subtle-alt][disabled]{border-color:#e3e3e3;background:#F0F0F0;color:#bdbdbd}
[bs-button~=size-small]{font-size:14px;font-size:.77778rem;padding:7px 14px 5px;height:34px}
[bs-button~=size-small] [bs-svg-icon]{top:9px;width:14px;height:14px}
[bs-button~=icon]{padding-left:14px;padding-right:14px}
[bs-button~=icon] [bs-svg-icon]{position:relative;top:2px;left:auto}
[bs-button~=icon-left]{position:relative;padding-left:41px}
[bs-button~=icon-left] [bs-svg-icon]{left:14px}
[bs-button~=icon-right]{position:relative;padding-right:41px}
[bs-button~=icon-right] [bs-svg-icon]{left:auto;right:14px}
[bs-button-group]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch}
[bs-button-group] [bs-button]{border-radius:0;margin-bottom:0}
[bs-button-group] [bs-button]:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px}
[bs-button-group] [bs-button]:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}
[bs-button~=inline]{position:relative;background:0 0;color:#000;border-radius:0;border:0;text-transform:uppercase;box-shadow:0 0;font-size:14px;font-size:.77778rem;margin-bottom:0;padding-top:10px}
[bs-input]>*,[bs-input~=inline]>*{margin-top:auto;margin-bottom:auto}
[bs-button~=inline] [bs-checkbox]{margin-right:8px}
[bs-button~=inline]:focus{background:0 0;color:#000}
[bs-button~=inline]:hover{background:#F0F0F0;color:#000}
[bs-button~=inline]:active{background:#d6d6d6;box-shadow:0 0}
[bs-button~=success] [bs-svg-icon]{color:#81be00}
[bs-button-row]{background:#FBFBFB;border-bottom:1px solid #d6d6d6}
@media only screen and (min-width:600px){[bs-button-row]{padding-left:27px}
[bs-action~=menu-toggle],[bs-action~=menu-close]{display:none}
}
button,input,select,textarea{vertical-align:middle;border-radius:3px;outline:0;height:40px;padding-left:7px;padding-right:14px;max-width:100%;font-family:source_sans,"Lucida Grande","Lucida Sans",sans-serif;color:#000}
[bs-input-label]{font-size:14px;font-size:.77778rem;position:relative;display:block;text-transform:uppercase;font-weight:700;color:#ababab;letter-spacing:.5px}
@media only screen and (min-width:600px){[bs-input-label]{font-size:14px;font-size:.77778rem}
}
[bs-label-heading]{color:#000;font-weight:700}
[bs-input]{padding:0;border-radius:3px;height:100%}
[bs-input] input{border:0;border-radius:0;padding:0;outline:0;font-size:16px;font-size:.88889rem;border-bottom:1px dashed #F0F0F0}
[bs-input] input:focus{color:#4A90E2}
[bs-input] input[type=text]{width:100%}
[bs-input] input[type=radio]:checked+label{color:#4A90E2!important}
[bs-input~=text]{height:auto}
[bs-input~=text] input{font-family:monospace}
[bs-input~=inline]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:auto}
[bs-input~=inline] input:focus+label{text-decoration:underline}
[bs-input~=inline]>:first-child{margin-right:14px}
.loader,.loader:after,.loader:before{background:#333;-webkit-animation:load1 .5s infinite ease-in-out;animation:load1 .5s infinite ease-in-out;width:1em;height:2em}
.loader:after,.loader:before{position:absolute;top:0;content:''}
.loader:before{left:-1.5em}
.loader{opacity:1;-webkit-transition:all 1s;transition:all 1s;text-indent:-9999em;margin:8em auto;position:absolute;font-size:11px;-webkit-animation-delay:-.16s;animation-delay:-.16s;z-index:1;left:50%}
.loader.behind{z-index:0}
.loader.ready{opacity:0;-webkit-transform:translateY(-200%);-ms-transform:translateY(-200%);transform:translateY(-200%)}
.loader:after{left:1.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}
@-webkit-keyframes load1{0%,100%,80%{box-shadow:0 0 #333;height:4em}
40%{box-shadow:0 -2em #333;height:5em}
}
@keyframes load1{0%,100%,80%{box-shadow:0 0 #333;height:4em}
40%{box-shadow:0 -2em #333;height:5em}
}
[bs-panel]{position:relative;background:#fff;padding:27px 0 14px;border-bottom:1px solid #F0F0F0}
[bs-panel] [bs-text~=lede]{font-size:20px;font-size:1.11111rem;position:relative;margin-bottom:0;color:#000}
[bs-panel] [bs-text~=prefixed]{text-transform:none}
[bs-panel] [bs-text~=prefixed] span{text-transform:uppercase;color:#F0F0F0;font-weight:200}
[bs-panel~=switch].disabled{background:#FBFBFB}
[bs-panel~=switch].disabled,[bs-panel~=switch].disabled [bs-text~=lede]{color:#ababab}
[bs-panel~=switch] [bs-panel-content]{padding-left:81px;margin-bottom:14px}
@media only screen and (min-width:600px){[bs-panel] [bs-text~=lede]{font-size:24px;font-size:1.33333rem}
[bs-panel~=switch] [bs-panel-content]{padding-left:108px}
[bs-panel~=switch] [bs-panel-content] [bs-panel-icon]{top:33px}
}
[bs-panel~=switch] [bs-panel-content~=basic]{padding-left:14px;padding-right:14px;max-width:none}
[bs-panel~=switch] [bs-panel-content~=tight]{padding-left:0;padding-right:0;max-width:none}
[bs-panel~=last]{border-bottom:2px solid #F0F0F0;position:relative}
[bs-panel~=last]:after{content:" ";width:100%;height:1px;display:block;background:#F0F0F0;position:absolute;bottom:-4px;z-index:2}
[bs-control],[bs-state-icons]{position:relative}
[bs-panel~=controls]{padding:0;background:#FBFBFB;border-bottom:1px solid #F0F0F0}
@media only screen and (min-width:600px){[bs-panel~=controls]{padding:27px 27px 14px}
[bs-panel~=controls] [bs-heading]{margin-bottom:14px}
}
[bs-panel~=no-border]{border-bottom:0}
[bs-panel~=outline]{border-bottom:1px solid #F0F0F0}
[bs-panel-icon]{position:absolute;left:14px;top:30px}
[bs-panel-icon] [bs-svg-icon]{color:#444;height:24px;width:24px;top:0}
[bs-panel-content]{padding-left:54px;padding-right:14px}
@media only screen and (min-width:600px){[bs-panel-content]{padding-left:108px}
[bs-panel-content] [bs-panel-icon]{left:44px;top:27px}
[bs-panel-content] [bs-panel-icon] [bs-svg-icon],[bs-panel-content] [bs-panel-icon] [bs-svg-icon] use{height:30px;width:30px}
}
[bs-panel~=trans] [bs-panel-content]{padding-left:68px}
[bs-panel-content~=basic]{padding-left:27px;padding-right:27px;max-width:50em}
@media only screen and (min-width:600px){[bs-panel-content~=basic]{padding-left:40.5px;padding-right:40.5px}
}
@media only screen and (min-width:1000px){[bs-skinny]{padding:54px 95px}
}
[bs-list]{margin-left:0;list-style:none}
[bs-list] p,[bs-list~=inline-controls] [bs-button-group]{margin-bottom:0}
[bs-list] [bs-button-group]{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;margin-bottom:0}
[bs-list] [bs-button-group] [bs-button]{height:auto;border:0;box-shadow:0 0;border-radius:0}
[bs-list] [bs-button-group] [bs-button]:active{box-shadow:0 0 1px rgba(0,0,0,.3) inset}
[bs-list~=inline] li{display:inline-block}
[bs-list~=bordered]>li{padding:11px 14px;border-bottom:1px solid #F0F0F0}
[bs-list~=bordered]>li:first-child{border-top:1px solid #F0F0F0}
[bs-list~=inline-controls] p{margin-bottom:7px}
[bs-list~=inline-controls] li{background:#fff;position:relative;padding-left:14px;-webkit-transition:background .5s;transition:background .5s}
[bs-list~=inline-controls] li:hover{background:#FBFBFB}
[bs-list~=inline-controls] li:hover [bs-button~=subtle-alt]{color:#000}
[bs-list~=inline-controls] li:hover [bs-button]{background:0 0}
[bs-list~=inline-controls] li:hover [bs-button]:hover{color:#F54747}
@media only screen and (min-width:750px){[bs-list~=inline-controls] li{padding:0 0 0 14px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}
[bs-list~=inline-controls] li p{margin-bottom:0;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;padding-top:11px;padding-bottom:11px}
}
[bs-list~=inline-controls] [bs-button-group] [bs-button~=icon-left]{line-height:35px}
[bs-list~=inline-controls] [bs-button-group] [bs-button~=icon-left] [bs-svg-icon]{top:12px}
[bs-list~=inline-controls] [bs-button-group] [bs-svg-icon]{top:4px;width:22px;height:22px}
[bs-list~=padded-left] li{padding-left:14px}
[bs-list~=basic]{list-style:circle;margin-left:27px}
[bs-offset~=basic]>li{padding-left:27px}
[bs-controls]{width:auto;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}
[bs-flex~=top]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;background:#2c2c2c;border-bottom:1px solid #424242}
@media only screen and (min-width:600px){[bs-offset~=basic]>li{padding-left:40.5px}
[bs-flex~=top]{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;height:59px}
}
[bs-control]{font-size:12px;font-size:.66667rem;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;border-left:1px solid #333;border-top:1px solid #333;color:#ababab;text-transform:uppercase;padding:10px 7px 6px}
[bs-control]:first-child{border-left-width:0}
@media only screen and (min-width:600px){[bs-control]{-webkit-box-flex:0;-webkit-flex:none;-ms-flex:none;flex:none;height:100%;padding-top:10px;padding-left:14px;padding-right:14px}
[bs-control]:first-child{border-left-width:1px}
}
[bs-control] [bs-svg-icon]{-webkit-transition:all .3s;transition:all .3s;width:14px;height:14px;top:0;display:block;margin-left:auto;margin-right:auto;margin-bottom:5px}
@media only screen and (min-width:600px){[bs-control] [bs-svg-icon]{width:19px;height:19px}
}
[bs-control]:focus{text-decoration:none;color:#ababab}
[bs-control]:hover{background:#444;text-decoration:none;color:#fff}
[bs-control]:hover [bs-svg-icon]{-webkit-transform:rotate(360deg) scale(1.1);-ms-transform:rotate(360deg) scale(1.1);transform:rotate(360deg) scale(1.1);color:#fff}
[bs-state~=success]{opacity:0;color:#81be00}
[bs-state~=waiting]{opacity:0;color:#4A90E2}
.cmn-toggle,[bs-state-icons] [bs-svg-icon]{position:absolute}
[bs-anim~=spin]{-webkit-animation:spin 1s infinite linear;animation:spin 1s infinite linear}
[bs-state-wrapper]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}
[bs-state-wrapper] [bs-state~=inline]{top:3px;left:14px;width:17px;height:27px}
[bs-state-wrapper].success [bs-state~=success],[bs-state-wrapper].waiting [bs-state~=waiting]{opacity:1}
.cmn-toggle{margin-left:-9999px;visibility:hidden}
.cmn-toggle+label{display:block;position:relative;cursor:pointer;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:#AAA}
input.cmn-toggle-round+label{padding:4px;width:44px;height:22px;border-radius:3px}
input.cmn-toggle-round+label:after,input.cmn-toggle-round+label:before{display:block;position:absolute;top:1px;left:2px;bottom:1px;content:""}
input.cmn-toggle-round+label:before{right:2px;background-color:#AAA;border-radius:3px;-webkit-transition:background .2s;transition:background .2s}
input.cmn-toggle-round+label:after{top:3px;width:16px;height:16px;background-color:#fff;border-radius:3px;-webkit-transition:margin .2s;transition:margin .2s;margin-left:1px}
input.cmn-toggle-round:checked+label,input.cmn-toggle-round:checked+label:before{background-color:#81be00}
input.cmn-toggle-round:checked+label:after{margin-left:23px}
[bs-footer]{color:#000;margin-bottom:27px;padding-top:27px;font-size:14px;font-size:.77778rem}
[bs-footer] p,[bs-notify] p{margin-bottom:0}
@media only screen and (min-width:600px){[bs-footer]{padding-top:27px;position:fixed;bottom:0;width:240px;color:#ababab}
}
[bs-footer] a{color:#000}
@media only screen and (min-width:600px){[bs-footer] a{color:#ababab}
}
[bs-footer] a:focus,[bs-footer] a:hover{text-decoration:none;color:#c4c4c4}
[bs-footer] [bs-icon]{padding:0 10px}
[bs-footer] [bs-svg-icon]{width:20px;height:20px}
[bs-notify],[bs-overlay]{position:absolute;width:100%;left:0;text-align:center}
pre{margin-top:14px;padding:14px;border-radius:3px;box-shadow:-10px 0 10px #F0F0F0 inset;border:1px solid #ebebeb}
pre code{font-size:12px;font-size:.66667rem;font-size:16px;font-size:.88889rem;color:currentColor;line-height:1;background:0 0;border:0}
code{background:#FBFBFB;display:inline-block;padding:0 5px;border:1px solid #F0F0F0;color:#2275d7;font-size:14px;font-size:.77778rem}
[bs-notify]{background:#444;color:#fff;padding:27px 14px;box-shadow:0 5px 5px 0 rgba(0,0,0,.2);-webkit-transform:translateY(-200%);-ms-transform:translateY(-200%);transform:translateY(-200%);-webkit-transition:all .3s;transition:all .3s;z-index:100}
[bs-notify].active{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}
[bs-notify].error{background:#ED6A13}
[bs-overlay]{height:100%;top:0;right:0;background:rgba(0,0,0,.9);padding:54px 14px;color:#fff;visibility:hidden;z-index:2000}
[bs-overlay].active{visibility:visible}
[bs-overlay] *{color:#fff}
[bs-overlay] [bs-svg-icon]{width:40px;height:40px}
@media only screen and (min-width:600px){[bs-footer] [bs-svg-icon]{-webkit-filter:drop-shadow(1px 1px 2px #00262C);filter:drop-shadow(1px 1px 2px #00262C)}
[bs-overlay] [bs-svg-icon]{width:100px;height:100px}
}


text:
<?php
/**
 * Auto generated from PB_server_common.proto at 2018-01-24 16:26:41
 *
 * protos package
 */

namespace Protos {
/**
 * PBS_GateRegister message
 */
class PBS_GateRegister extends \ProtobufMessage
{
    /* Field index constants */
    const LOCAL = 1;
    const OUT = 2;

    /* @var array Field descriptors */
    protected static $fields = array(
        self::LOCAL => array(
            'name' => 'local',
            'required' => true,
            'type' => '\Protos\PBS_GateServerInfo'
        ),
        self::OUT => array(
            'name' => 'out',
            'required' => true,
            'type' => '\Protos\PBS_GateServerInfo'
        ),
    );

    /**
     * Constructs new message container and clears its internal state
     */
    public function __construct()
    {
        $this->reset();
    }

    /**
     * Clears message values and sets default ones
     *
     * @return null
     */
    public function reset()
    {
        $this->values[self::LOCAL] = null;
        $this->values[self::OUT] = null;
    }

    /**
     * Returns field descriptors
     *
     * @return array
     */
    public function fields()
    {
        return self::$fields;
    }

    /**
     * Sets value of 'local' property
     *
     * @param \Protos\PBS_GateServerInfo $value Property value
     *
     * @return null
     */
    public function setLocal(\Protos\PBS_GateServerInfo $value=null)
    {
        return $this->set(self::LOCAL, $value);
    }

    /**
     * Returns value of 'local' property
     *
     * @return \Protos\PBS_GateServerInfo
     */
    public function getLocal()
    {
        return $this->get(self::LOCAL);
    }

    /**
     * Sets value of 'out' property
     *
     * @param \Protos\PBS_GateServerInfo $value Property value
     *
     * @return null
     */
    public function setOut(\Protos\PBS_GateServerInfo $value=null)
    {
        return $this->set(self::OUT, $value);
    }

    /**
     * Returns value of 'out' property
     *
     * @return \Protos\PBS_GateServerInfo
     */
    public function getOut()
    {
        return $this->get(self::OUT);
    }
}
}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.facebook.presto.kafka;

import com.facebook.presto.decoder.DecoderColumnHandle;
import com.facebook.presto.decoder.DecoderRegistry;
import com.facebook.presto.decoder.FieldDecoder;
import com.facebook.presto.decoder.RowDecoder;
import com.facebook.presto.spi.ColumnHandle;
import com.facebook.presto.spi.ConnectorSession;
import com.facebook.presto.spi.ConnectorSplit;
import com.facebook.presto.spi.RecordSet;
import com.facebook.presto.spi.connector.ConnectorRecordSetProvider;
import com.facebook.presto.spi.connector.ConnectorTransactionHandle;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;

import javax.inject.Inject;

import java.util.List;

import static com.facebook.presto.kafka.KafkaHandleResolver.convertColumnHandle;
import static com.facebook.presto.kafka.KafkaHandleResolver.convertSplit;
import static java.util.Objects.requireNonNull;

/**
 * Factory for Kafka specific {@link RecordSet} instances.
 */
public class KafkaRecordSetProvider
        implements ConnectorRecordSetProvider
{
    private final KafkaSimpleConsumerManager consumerManager;
    private final DecoderRegistry registry;

    @Inject
    public KafkaRecordSetProvider(DecoderRegistry registry, KafkaSimpleConsumerManager consumerManager)
    {
        this.registry = requireNonNull(registry, "registry is null");
        this.consumerManager = requireNonNull(consumerManager, "consumerManager is null");
    }

    @Override
    public RecordSet getRecordSet(ConnectorTransactionHandle transaction, ConnectorSession session, ConnectorSplit split, List<? extends ColumnHandle> columns)
    {
        KafkaSplit kafkaSplit = convertSplit(split);

        ImmutableList.Builder<DecoderColumnHandle> handleBuilder = ImmutableList.builder();
        ImmutableMap.Builder<DecoderColumnHandle, FieldDecoder<?>> keyFieldDecoderBuilder = ImmutableMap.builder();
        ImmutableMap.Builder<DecoderColumnHandle, FieldDecoder<?>> messageFieldDecoderBuilder = ImmutableMap.builder();

        RowDecoder keyDecoder = registry.getRowDecoder(kafkaSplit.getKeyDataFormat());
        RowDecoder messageDecoder = registry.getRowDecoder(kafkaSplit.getMessageDataFormat());

        for (ColumnHandle handle : columns) {
            KafkaColumnHandle columnHandle = convertColumnHandle(handle);
            handleBuilder.add(columnHandle);

            if (!columnHandle.isInternal()) {
                if (columnHandle.isKeyDecoder()) {
                    FieldDecoder<?> fieldDecoder = registry.getFieldDecoder(
                            kafkaSplit.getKeyDataFormat(),
                            columnHandle.getType().getJavaType(),
                            columnHandle.getDataFormat());

                    keyFieldDecoderBuilder.put(columnHandle, fieldDecoder);
                }
                else {
                    FieldDecoder<?> fieldDecoder = registry.getFieldDecoder(
                            kafkaSplit.getMessageDataFormat(),
                            columnHandle.getType().getJavaType(),
                            columnHandle.getDataFormat());

                    messageFieldDecoderBuilder.put(columnHandle, fieldDecoder);
                }
            }
        }

        ImmutableList<DecoderColumnHandle> handles = handleBuilder.build();
        ImmutableMap<DecoderColumnHandle, FieldDecoder<?>> keyFieldDecoders = keyFieldDecoderBuilder.build();
        ImmutableMap<DecoderColumnHandle, FieldDecoder<?>> messageFieldDecoders = messageFieldDecoderBuilder.build();

        return new KafkaRecordSet(kafkaSplit, consumerManager, handles, keyDecoder, messageDecoder, keyFieldDecoders, messageFieldDecoders);
    }
}


text:
package com.leavessilent.quanmintv.category.model;

import com.leavessilent.quanmintv.listener.OnLoadingDataListener;
import com.leavessilent.quanmintv.utils.HttpUtils;

import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;

import java.util.List;

import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;

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

public class CategoryModelImpl implements ICategoryModel {
    @Override
    public void getCategoryModelList(final OnLoadingDataListener<List<CategoryModel>> listener) {
        HttpUtils.getService()
                .getCategoryModelList()
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Observer<List<CategoryModel>>() {
                    @Override
                    public void onSubscribe(Disposable d) {

                    }

                    @Override
                    public void onNext(List<CategoryModel> value) {
                        listener.onCallback(value);
                    }

                    @Override
                    public void onError(Throwable e) {
                        listener.onError(e);
                    }

                    @Override
                    public void onComplete() {
                        listener.onComplete();
                    }
                });
    }
}


text:
/***************************************************************************/
// Copyright 2013-2022 Riley White
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/***************************************************************************/

using System;

namespace Bix.Core
{
    /// <summary>
    /// Contract for types that can be stored within an <see cref="IRepository{TIdentity, TItem}"/>
    /// </summary>
    /// <remarks>
    /// Do not implement this interface directly. Instead implement <see cref="IModel{TModel, TIdentity}"/>.
    /// This interface is primarily for ease of access in cases where the actual type doesn't matter. Normally this is used
    /// internally by repositories.
    /// </remarks>
    public interface IModel
    {
        /// <summary>
        /// Gets whether this is an aggregate root, meaning that it is the root
        /// of a graph of models through which the graph can be created, saved, updated,
        /// or deleted.
        /// </summary>
        bool IsAggregateRoot { get; }
    }

    /// <summary>
    /// Contract for types that can be stored in a <see cref="IRepository{TIdentity, TItem}"/>.
    /// </summary>
    /// <typeparam name="TIdentity">Type of identifier for a <typeparamref name="TModel"/></typeparam>
    public interface IModel<TIdentity> : IModel, IHasIdentity<TIdentity> { }
}


text:
package com.foolish.a2de.physics;

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

import android.graphics.RectF;

import com.foolish.a2de.graphics.Rectangle;
import com.foolish.a2de.graphics.Shape;

public class SimpleRectanglePhysics implements IPhysics2D {

	private List<Rectangle> mPossibleCollisions;
	private boolean mIntersects = false;

	public SimpleRectanglePhysics(Rectangle... rects) {
		this(Arrays.asList(rects));
	}

	public SimpleRectanglePhysics(List<Rectangle> rects) {
		mPossibleCollisions = rects;
	}

	public boolean addRect(Rectangle rect) {
		if (mPossibleCollisions == null)
			mPossibleCollisions = new ArrayList<>();

		return mPossibleCollisions.add(rect);
	}

	public boolean removeRect(Rectangle rect) {
		if (mPossibleCollisions == null)
			return false;

		return mPossibleCollisions.remove(rect);
	}

	@Override
	public void applyPhysics(Shape shape) {
		Rectangle rect = (Rectangle) shape;
		rect.update();

		mIntersects = false;

		for (Rectangle possibleCollision : mPossibleCollisions) {
			if (rect.intersects(possibleCollision)) {
				mIntersects = true;
				rect.translate(-rect.speed().x, -rect.speed().y);

				RectF boundsRect = rect.bounds();
				RectF boundsCollision = possibleCollision.bounds();

				if (boundsRect.bottom <= boundsCollision.top) {
					rect.translate(rect.speed().x, 0.0f);
					rect.setSpeed(rect.speed().x, 0.0f);
					rect.setGrounded(true);
				} else if (boundsRect.left >= boundsCollision.right) {
					rect.translate(0.0f, rect.speed().y);
					rect.setSpeed(0.0f, rect.speed().y);
				} else if (boundsRect.right <= boundsCollision.left) {
					rect.translate(0.0f, rect.speed().y);
					rect.setSpeed(0.0f, rect.speed().y);
				} else if (boundsRect.top >= boundsCollision.bottom) {
					rect.translate(rect.speed().x, 0.0f);
					rect.setSpeed(rect.speed().x, -0.01f);
				}
			}
		}

		if (!mIntersects) {
			float y = rect.speed().y;
			y -= 0.001f;
			if (y <= -0.02f) {
				y = -0.02f;
			}
			rect.setSpeed(rect.speed().x, y);
		}

	}
}


text:
```
npm install express-sendjson
```

Express-sendjson is a simple express middleware that wraps the res.status(#).json({}) functionality into a single function with additional metadata about the response.
By default the middleware wraps the json response under a root level property on the response called "data" which is configurable.
The other root level metadata properties about the json response are disabled by default.
If you wish to enable any of the metadata properties on the json response see the examples below.

## Setup
Default settings
```js
var sendJSON = require('express-sendjson');
var app = require('express')()
app.use(sendJSON(
    {
        "responseProperty": {
            "value": "data"
        },
        "apiVersion": {
            "enabled": false,
            "value": "1.0.0"
        },
        "status": {
            "enabled": false,
            "value": function(data) {
                  return (data instanceof Error) ? "error" : "success";
              }
        },
        "count": {
            "enabled": false
        },
        "statusCode": {
            "enabled": false,
            "value": function(data) {
                return (data instanceof Error) ? 500 : 200
            }
        }
    }
));
app.listen(3000)
```

Overriding default settings
```js
var sendJSON = require('express-sendjson');
var app = require('express')()
app.use(sendJSON(
    {
        "responseProperty": {
            "value": "result"
        },
        "apiVersion": {
            "enabled": true,
            "value": "1.2.3"
        },
        "status": {
            "enabled": true,
            "value": function(data) {
                // logic Here
                // return some status message
            }
        },
        "count": {
            "enabled": true
        },
        "statusCode": {
            "enabled": true,
            "value": function(data) {
                // logic Here
                // return a status code
            }
        }
    }
));
app.listen(3000)
```

## Examples

#### Object
```js
app.use(sendJSON(
    {
       "statusCode": {
            "enabled": true
        }
    }
));
```
Usage
```js
res.sendJSON({message: "hello"});
```
Response
```json
{
    "statusCode": 200,
    "data": {
      "message": "hello"
    }
}
```

#### Array
```js
app.use(sendJSON(
    {
        "count": {
            "enabled": true
        },
        "statusCode": {
            "enabled": true
        }
    }
));
```
Usage
```js
res.sendJSON([
    {message: "hello"},
    {message: "there"}
]);
```
Response
```json
{
    "count": 2,
    "statusCode": 200,
    "data": [
        {
          "message": "hello"
        },
        {
          "message": "there"
        }
    ]
}
```

### Error
```js
app.use(sendJSON(
    {
        "count": {
            "enabled": true
        },
        "statusCode": {
            "enabled": true
        }
    }
));
```
Usage
```js
res.sendJSON(new Error('Oh Noes!'))
```
Response
```json
{
    "statusCode": 500,
    "data": {
      "message": "Oh Noes!"
    }
}
```

#### Status Code

Usage
```js
res.sendJSON({message: "Entity created."}, 201)
```
Response
```json
{
    "statusCode": 201,
    "data": {
      "message": "Entity created."
    }
}
```

## Future Enhancements
* Response Time
* Self-Uri's

### Feedback
Feel free to open bugs or file enhancement requests. I'm always open to suggestions, Thanks!


text:
#ifndef ANDROID_CODECACHE_H
#define ANDROID_CODECACHE_H

#include <stdint.h>
#include <pthread.h>
#include <sys/types.h>

#include "tinyutils/KeyedVector.h"
#include "tinyutils/smartpointer.h"

namespace android {

using namespace tinyutils;

// ----------------------------------------------------------------------------

class AssemblyKeyBase {
public:
    virtual ~AssemblyKeyBase() { }
    virtual int compare_type(const AssemblyKeyBase& key) const = 0;
};

template  <typename T>
class AssemblyKey : public AssemblyKeyBase
{
public:
    AssemblyKey(const T& rhs) : mKey(rhs) { }
    virtual int compare_type(const AssemblyKeyBase& key) const {
        const T& rhs = static_cast<const AssemblyKey&>(key).mKey;
        return android::compare_type(mKey, rhs);
    }
private:
    T mKey;
};

// ----------------------------------------------------------------------------

class Assembly
{
public:
                Assembly(size_t size);
    virtual     ~Assembly();

    ssize_t     size() const;
    uint32_t*   base() const;
    ssize_t     resize(size_t size);

    // protocol for sp<>
            void    incStrong(const void* id) const;
            void    decStrong(const void* id) const;
    typedef void    weakref_type;

private:
    mutable int32_t     mCount;
            uint32_t*   mBase;
            size_t      mSize;
};

// ----------------------------------------------------------------------------

class CodeCache
{
public:
// pretty simple cache API...
                CodeCache(size_t size);
                ~CodeCache();

            sp<Assembly>        lookup(const AssemblyKeyBase& key) const;

            int                 cache(  const AssemblyKeyBase& key,
                                        const sp<Assembly>& assembly);

private:
    // nothing to see here...
    struct cache_entry_t {
        inline cache_entry_t() { }
        inline cache_entry_t(const sp<Assembly>& a, int64_t w)
                : entry(a), when(w) { }
        sp<Assembly>            entry;
        mutable int64_t         when;
    };

    class key_t {
        friend int compare_type(
            const key_value_pair_t<key_t, cache_entry_t>&,
            const key_value_pair_t<key_t, cache_entry_t>&);
        const AssemblyKeyBase* mKey;
    public:
        key_t() { };
        key_t(const AssemblyKeyBase& k) : mKey(&k)  { }
    };

    mutable pthread_mutex_t             mLock;
    mutable int64_t                     mWhen;
    size_t                              mCacheSize;
    size_t                              mCacheInUse;
    KeyedVector<key_t, cache_entry_t>   mCacheData;

    friend int compare_type(
        const key_value_pair_t<key_t, cache_entry_t>&,
        const key_value_pair_t<key_t, cache_entry_t>&);
};

// KeyedVector uses compare_type(), which is more efficient, than
// just using operator < ()
inline int compare_type(
    const key_value_pair_t<CodeCache::key_t, CodeCache::cache_entry_t>& lhs,
    const key_value_pair_t<CodeCache::key_t, CodeCache::cache_entry_t>& rhs)
{
    return lhs.key.mKey->compare_type(*(rhs.key.mKey));
}

// ----------------------------------------------------------------------------

}; // namespace android

#endif //ANDROID_CODECACHE_H


text:
<?php echo "<?php\n"; ?>

/**
 * <?php echo ucfirst($this->className)."ViewRenderer"; ?> implements a view renderer that allows users to use a template syntax similar to ...
 *
 *
 * @author Jon Doe <jonny@gmail.com>
 * @version
 * @package
 * @since 1.0
 */

class <?php echo ucfirst($this->className)."ViewRenderer"; ?> extends <?php echo $this->baseClass."\n"; ?>
{
	/**
	 * Parses the source view file and saves the results as another file.
	 * @param string the source view file path
	 * @param string the resulting view file path
	 */
	protected function generateViewFile($sourceFile,$viewFile)
    {
        // your code....
    }
}


text:
@interface APImageScrollView : APPageScrollView

@property(nonatomic, retain) NSArray * imageList;

- (void) showImageAtIndex:(int)index inImageArray:(NSArray*)imageArray;
- (void) showImageAtIndex:(int)index inImageArray:(NSArray*)imageArray animatedFromRect:(CGRect) rect;

@end


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>CCONJ</title>
    <link rel="root" href=""/>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/jquery-ui-redmond.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style-vis.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/hint.css"/>

          home

          edit page
          issue tracker

          <gcse:search></gcse:search>

        This page pertains to UD version 2.

            It appears that you have Javascript disabled.
            Please consider enabling Javascript for this page to see the visualizations.

CCONJ: coordinating conjunction

CCONJ

Definition

A coordinating conjunction is a word that links words or larger constituents without syntactically subordinating one to the other and expresses
a semantic relationship between them.

Single coordinating conjunction

Examples

alá "but", légnah ráno, alá na mažýh da záspem "I went to bed early, but I could not fall asleep"

am / áma / _amá "but", še dójdom, amá ne le isǽ - málko pó sétne "I shall come, but not now, just a little later"

Repetitive conjunction. These usually contain at least two parts.

Examples

hem… hem… "either… or…", fčéra hem letǽšo hem dúješo  - "yesterday it was both rainy and windy" [lit."yesterday it was raining and it also had wind"]

níta / níto… níta / níto… "neither… nor…", níta ty mí trǽbavaš níta drug - i samýj móžom da sí je stórem rábatono "I do not need either you or anyone else - since I can do my work on my own" [lit "neither you serve to me, nor another - and alone I can do my work"

Single and repetitive conjunction. These usually are used as singletons, but they also might be used in a repetitive chain.

Examples

i "and", samýj sí varí i peré "he does both cooking and washing on his own"  [lit. "alone he cooks and washes"]

i… i… "and… and…", i játo mí svaríh i vódo mí annésah i kahvǿ mí stórih "I cooked them food and I took them water and
 I served them coffee (as well)" [lit. "and food them I cooked and water them I took and coffee them I made"]

CCONJ in other languages:

[bej]

[bg]

[bm]

[cs]

[cy]

[da]

[el]

[en]

[ess]

[et]

[fi]

[fro]

[fr]

[ga]

[grc]

[hy]

[it]

[ja]

[kpv]

[myv]

[no]

[pcm]

[pt]

[qpm]

[ru]

[sl]

[sv]

[tr]

[tt]

[uk]

[u]

[urj]

[yue]

[zh]

© 2014–2021
            Universal Dependencies contributors.
            Site powered by Annodoc and brat
.