text:
#ifndef _IRTKFREEFORMTRANSFORMATION3D_H

#define _IRTKFREEFORMTRANSFORMATION3D_H

/**
 * Class for 3D free form transformations
 *
 * This class implements a 3D free form transformation
 *
 */

class irtkFreeFormTransformation3D : public irtkFreeFormTransformation
{

protected:

  /// Number of control points in x
  int _x;

  /// Number of control points in y
  int _y;

  /// Number of control points in z
  int _z;

  /// Spacing of control points in x (in mm)
  double _dx;

  /// Spacing of control points in y (in mm)
  double _dy;

  /// Spacing of control points in z (in mm)
  double _dz;

  /// Direction of x-axis
  double _xaxis[3];

  /// Direction of y-axis
  double _yaxis[3];

  /// Direction of z-axis
  double _zaxis[3];

  /// Origin
  irtkPoint _origin;

  /// Transformation matrix from lattice coordinates to world coordinates
  irtkMatrix _matL2W;

  /// Transformation matrix from world coordinates to lattice coordinates
  irtkMatrix _matW2L;

  /// Displacement at the control points (in mm)
  irtkVector3D<double> ***_data;

  /// Allocate memory for control points
  static double ***Allocate  (double ***, int, int, int);

  /// Deallocate memory for control points
  static double ***Deallocate(double ***, int, int, int);

  /// Allocate memory for control points
  static irtkVector3D<double> ***Allocate  (irtkVector3D<double> ***, int, int, int);

  /// Deallocate memory for control points
  static irtkVector3D<double> ***Deallocate(irtkVector3D<double> ***, int, int, int);

  /// Update transformation matrix
  virtual void UpdateMatrix();

public:

  /// Returns the of control points in x
  virtual int GetX() const;

  /// Returns the of control points in y
  virtual int GetY() const;

  /// Returns the of control points in z
  virtual int GetZ() const;

  /// Returns the of control point spacing in x
  virtual double GetXSpacing() const;

  /// Returns the of control point spacing in y
  virtual double GetYSpacing() const;

  /// Returns the of control point spacing in z
  virtual double GetZSpacing() const;

  /// Returns the number of parameters of the transformation
  virtual int NumberOfDOFs() const;

  /// Get the control point spacing (in mm)
  virtual void GetSpacing(double &, double &, double &) const;

  /// Put origin of free-form deformation
  virtual void  PutOrigin(double , double , double );

  /// Put orientation of free-form deformation
  virtual void  PutOrientation(double *, double *, double *);

  /// Get orientation of free-form deformation
  virtual void  GetOrientation(double *, double *, double *) const;

  /// Puts a control point value
  virtual void   Put(int, double);

  /// Gets a control point value
  virtual void   Put(int, int, int, double, double, double);

  /// Gets a control point value
  virtual double Get(int) const;

  /// Gets a control point value
  virtual void   Get(int, int, int, double &, double &, double &) const;

  /// Puts a control point status
  void   PutStatusCP(int, int, int, _Status, _Status, _Status);

  /// Gets a control point status
  void   GetStatusCP(int, int, int, _Status &, _Status &, _Status &);

  /// Calculate the bending energy of the transformation
  virtual double Bending(double x, double y, double z, double t = 0) = 0;

  /// Transforms world coordinates (in mm) to FFD coordinates
  virtual void WorldToLattice(double &, double &, double &) const;

  /// Transforms world coordinates (in mm) to FFD coordinates
  virtual void WorldToLattice(irtkPoint &) const;

  /// Transforms FFD coordinates to world coordinates (in mm)
  virtual void LatticeToWorld(double &, double &, double &) const;

  /// Transforms FFD coordinates to world coordinates (in mm)
  virtual void LatticeToWorld(irtkPoint &) const;

  /// Transforms index of control points to FFD coordinates
  virtual void IndexToLattice(int index, int& i, int& j, int& k) const;

  /// Transforms  FFD coordinates to index of control point
  virtual int  LatticeToIndex(int i, int j, int k) const;

  /// Returns the control point location (in mm)
  virtual void  ControlPointLocation(int, double &, double &, double &) const;

  /// Returns the control point location (in mm)
  virtual irtkPoint ControlPointLocation(int) const;

  /// Put the bounding box for FFD (in mm)
  virtual void PutBoundingBox(irtkPoint, irtkPoint);

  /// Put the bounding box for FFD (in mm)
  virtual void PutBoundingBox(double, double, double,
                              double, double, double);

  /// Returns the bounding box for FFD (in mm)
  virtual void BoundingBox(irtkPoint &, irtkPoint &) const;

  /** Returns the bounding box for a control point (in mm). The last
   *  parameter specifies what fraction of the bounding box to return. The
   *  default is 1 which equals 100% of the bounding box.
   */
  virtual void BoundingBoxCP(int, irtkPoint &, irtkPoint &, double = 1) const = 0;

  /** Returns the bounding box for a control point (in pixels). The last
   *  parameter specifies what fraction of the bounding box to return. The
   *  default is 1 which equals 100% of the bounding box.
   */
  virtual void BoundingBoxImage(irtkGreyImage *, int, int &, int &, int &,
                                int &, int &, int &, double = 1) const = 0;
  virtual void BoundingBoxImage(irtkRealImage *, int, int &, int &, int &,
                                  int &, int &, int &, double = 1) const = 0;

  /** Approximate displacements: This function takes a set of points and a
      set of displacements and find a FFD which approximates these
      displacements. After approximatation the displacements replaced by
      the residual displacement errors at the points */
  virtual double Approximate(const double *, const double *, const double *, double *, double *, double *, int) = 0;

  /** Interpolates displacements: This function takes a set of displacements
      defined at the control points and finds a FFD which interpolates these
      displacements.
      \param dxs The x-displacements at each control point.
      \param dys The y-displacements at each control point.
      \param dzs The z-displacements at each control point. */
  virtual void Interpolate(const double* dxs, const double* dys, const double* dzs) = 0;

  /// Inverts the transformation (abstract)
  virtual double Inverse(double &, double &, double &, double = 0, double = 0.01);

  /// Checks whether transformation is an identity mapping
  virtual bool IsIdentity();

  /// Returns a string with the name of the instantiated class
  virtual const char *NameOfClass();

};

inline int irtkFreeFormTransformation3D::GetX() const
{
  return _x;
}

inline int irtkFreeFormTransformation3D::GetY() const
{
  return _y;
}

inline int irtkFreeFormTransformation3D::GetZ() const
{
  return _z;
}

inline double irtkFreeFormTransformation3D::GetXSpacing() const
{
  return _dx;
}

inline double irtkFreeFormTransformation3D::GetYSpacing() const
{
  return _dy;
}

inline double irtkFreeFormTransformation3D::GetZSpacing() const
{
  return _dz;
}

inline int irtkFreeFormTransformation3D::NumberOfDOFs() const
{
  return 3*_x*_y*_z;
}

inline double irtkFreeFormTransformation3D::Get(int index) const
{
  int i, j, k;

  if (index >= 3*_x*_y*_z) {
    cerr << "irtkFreeFormTransformation3D::Get: No such dof" << endl;
    exit(1);
  }
  if (index < _x*_y*_z) {
    i = index/(_y*_z);
    j = index%(_y*_z)/_z;
    k = index%(_y*_z)%_z;
    return _data[k][j][i]._x;
  } else {
    if (index < 2*_x*_y*_z) {
      index -= _x*_y*_z;
      i = index/(_y*_z);
      j = index%(_y*_z)/_z;
      k = index%(_y*_z)%_z;
      return _data[k][j][i]._y;
    } else {
      index -= 2*_x*_y*_z;
      i = index/(_y*_z);
      j = index%(_y*_z)/_z;
      k = index%(_y*_z)%_z;
      return _data[k][j][i]._z;
    }
  }
}

inline void irtkFreeFormTransformation3D::Get(int i, int j, int k, double &x, double &y, double &z) const
{
  if ((i < 0) || (i >= _x) || (j < 0) || (j >= _y) || (k < 0) || (k >= _z)) {
    cerr << "irtkFreeFormTransformation3D::Get: No such dof" << endl;
    exit(1);
  }
  x = _data[k][j][i]._x;
  y = _data[k][j][i]._y;
  z = _data[k][j][i]._z;
}

inline void irtkFreeFormTransformation3D::Put(int index, double x)
{
  irtkPoint p;
  int i, j, k;

  if (index >= 3*_x*_y*_z) {
    cerr << "irtkFreeFormTransformation3D::Put: No such dof" << endl;
    exit(1);
  }
  if (index < _x*_y*_z) {
    i = index/(_y*_z);
    j = index%(_y*_z)/_z;
    k = index%(_y*_z)%_z;
    _data[k][j][i]._x = x;
  } else {
    if (index < 2*_x*_y*_z) {
      index -= _x*_y*_z;
      i = index/(_y*_z);
      j = index%(_y*_z)/_z;
      k = index%(_y*_z)%_z;
      _data[k][j][i]._y = x;
    } else {
      index -= 2*_x*_y*_z;
      i = index/(_y*_z);
      j = index%(_y*_z)/_z;
      k = index%(_y*_z)%_z;
      _data[k][j][i]._z = x;
    }
  }
}

inline void irtkFreeFormTransformation3D::Put(int i, int j, int k, double x, double y, double z)
{
  if ((i < 0) || (i >= _x) || (j < 0) || (j >= _y) || (k < 0) || (k >= _z)) {
    cerr << "irtkFreeFormTransformation3D::Put: No such dof" << endl;
    exit(1);
  }
  _data[k][j][i]._x = x;
  _data[k][j][i]._y = y;
  _data[k][j][i]._z = z;
}

inline void irtkFreeFormTransformation3D::GetSpacing(double &dx, double &dy, double &dz) const
{
  dx = _dx;
  dy = _dy;
  dz = _dz;
}

inline void irtkFreeFormTransformation3D::PutOrigin(double x, double y, double z)
{
  _origin._x = x;
  _origin._y = y;
  _origin._z = z;

  this->UpdateMatrix();
}

inline void irtkFreeFormTransformation3D::PutOrientation(double *xaxis, double *yaxis, double *zaxis)
{
  _xaxis[0] = xaxis[0];
  _xaxis[1] = xaxis[1];
  _xaxis[2] = xaxis[2];
  _yaxis[0] = yaxis[0];
  _yaxis[1] = yaxis[1];
  _yaxis[2] = yaxis[2];
  _zaxis[0] = zaxis[0];
  _zaxis[1] = zaxis[1];
  _zaxis[2] = zaxis[2];

  this->UpdateMatrix();
}

inline void irtkFreeFormTransformation3D::GetOrientation(double *xaxis, double *yaxis, double *zaxis) const
{
  xaxis[0] = _xaxis[0];
  xaxis[1] = _xaxis[1];
  xaxis[2] = _xaxis[2];
  yaxis[0] = _yaxis[0];
  yaxis[1] = _yaxis[1];
  yaxis[2] = _yaxis[2];
  zaxis[0] = _zaxis[0];
  zaxis[1] = _zaxis[1];
  zaxis[2] = _zaxis[2];
}

inline void irtkFreeFormTransformation3D::PutBoundingBox(double x1, double y1, double z1, double x2, double y2, double z2)
{
  // Initialize control point domain
  _origin._x = (x2 + x1) / 2.0;
  _origin._y = (y2 + y1) / 2.0;
  _origin._z = (z2 + z1) / 2.0;

  double a = x1 * _xaxis[0] + y1 * _xaxis[1] + z1 * _xaxis[2];
  double b = x1 * _yaxis[0] + y1 * _yaxis[1] + z1 * _yaxis[2];
  double c = x1 * _zaxis[0] + y1 * _zaxis[1] + z1 * _zaxis[2];
  x1 = a;
  y1 = b;
  z1 = c;
  a = x2 * _xaxis[0] + y2 * _xaxis[1] + z2 * _xaxis[2];
  b = x2 * _yaxis[0] + y2 * _yaxis[1] + z2 * _yaxis[2];
  c = x2 * _zaxis[0] + y2 * _zaxis[1] + z2 * _zaxis[2];
  x2 = a;
  y2 = b;
  z2 = c;

  // Initialize control point spacing
  _dx = (x2 - x1) / (_x - 1);
  _dy = (y2 - y1) / (_y - 1);
  if (z2 > z1) {
    _dz = (z2 - z1) / (_z - 1);
  } else {
    _dz = 1;
  }

  this->UpdateMatrix();
}

inline void irtkFreeFormTransformation3D::PutBoundingBox(irtkPoint p1, irtkPoint p2)
{
  this->PutBoundingBox(p1._x, p1._y, p1._z, p2._x, p2._y, p2._z);
}

inline void irtkFreeFormTransformation3D::WorldToLattice(double &x, double &y, double &z) const
{
  double a, b, c;

  // Pre-multiply point with transformation matrix
  a = _matW2L(0, 0)*x+_matW2L(0, 1)*y+_matW2L(0, 2)*z+_matW2L(0, 3);
  b = _matW2L(1, 0)*x+_matW2L(1, 1)*y+_matW2L(1, 2)*z+_matW2L(1, 3);
  c = _matW2L(2, 0)*x+_matW2L(2, 1)*y+_matW2L(2, 2)*z+_matW2L(2, 3);

  // Copy result back
  x = a;
  y = b;
  z = c;
}

inline void irtkFreeFormTransformation3D::WorldToLattice(irtkPoint &p) const
{
  this->WorldToLattice(p._x, p._y, p._z);
}

inline void irtkFreeFormTransformation3D::LatticeToWorld(double &x, double &y, double &z) const
{
  double a, b, c;

  // Pre-multiply point with transformation matrix
  a = _matL2W(0, 0)*x+_matL2W(0, 1)*y+_matL2W(0, 2)*z+_matL2W(0, 3);
  b = _matL2W(1, 0)*x+_matL2W(1, 1)*y+_matL2W(1, 2)*z+_matL2W(1, 3);
  c = _matL2W(2, 0)*x+_matL2W(2, 1)*y+_matL2W(2, 2)*z+_matL2W(2, 3);

  // Copy result back
  x = a;
  y = b;
  z = c;
}

inline void irtkFreeFormTransformation3D::LatticeToWorld(irtkPoint &p) const
{
  this->LatticeToWorld(p._x, p._y, p._z);
}

inline void irtkFreeFormTransformation3D::IndexToLattice(int index, int& i, int& j, int& k) const
{

  if (index >= _x*_y*_z) {
    index -= _x*_y*_z;
    if (index >= _x*_y*_z) {
      index -= _x*_y*_z;
    }
  }
  i = index/(_y*_z);
  j = index%(_y*_z)/_z;
  k = index%(_y*_z)%_z;
}

inline int irtkFreeFormTransformation3D::LatticeToIndex(int i, int j, int k) const
{
  return i * _y * _z + j * _z + k;
}

inline const char *irtkFreeFormTransformation3D::NameOfClass()
{
  return "irtkFreeFormTransformation3D";
}

#endif


text:
package guitesting.model;

import guitesting.ui.GUITester;
import guitesting.util.TestProperty;

import java.io.Serializable;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import javax.swing.table.AbstractTableModel;

/*
 * This class is used for both TableModel and PropertyModel for event.
 * The information of component property will be stored in event.getComponentModel().map if eventModel is used, and use the method 'getRefMapPropertyKey(String)'if you want to retrieve info from TableModel in propertyPane
 */
//@SuppressWarnings("serial")
public class PropertyModel extends AbstractTableModel implements Map<String, String>,Serializable {
    private static final long serialVersionUID = 1L;

    public static final String[] columnNames  = { "Key", "Value" };
    protected static final int     KEY_COLUMN   = 0;
    protected static final int     VALUE_COLUMN = 1;
    protected Map<String, String>  map          = new HashMap<String, String>();
    protected Map<String, String>  refMap;

    public PropertyModel()
    {
	super();
    }
    public PropertyModel(PropertyModel propertyModel) {
	super();
	this.map.putAll(propertyModel.map);
	this.refMap=propertyModel.refMap;
    }

    public void setproperty(Map<String, String> properties) {
	int size = size();
	map.clear();
	if (size > 0)
	    fireTableRowsDeleted(0, size - 1);
	map.putAll(properties);
	if(map.size()>0)
	    fireTableRowsInserted(0, map.size() - 1);
	refMap = properties;
    }

    public Map<String,String> getMap()
    {
	return map;
    }

    public String getProperty(String key)
    {
	return map.get(key);
    }

    public String getRefMapProperty(String key)
    {
	return refMap.get(key);
    }

    /**
     * save properties to the original properties which are actually used.
     */
    public void saveToRefMap() {
	if (refMap != null) {
	    refMap.clear();
	    refMap.putAll(map);
	    refMap.remove(""); //delete empty key(because of existing empty key at ValuePropertyModel)
	}
    }

    // --- implements Table Model ---

    @Override
    public String getColumnName(int column) {
	return columnNames[column];
    }

    @Override
    public int getRowCount() {
	return size();
    }

    @Override
    public int getColumnCount() {
	return columnNames.length;
    }

    @Override
    public Class<?> getColumnClass(int column) {
	return getValueAt(0, column).getClass();
    }

    @Override
    public Object getValueAt(int row, int column) {
	// PENDING JW: solve in getColumnClass instead of hacking here
	if (row >= getRowCount()) {
	    return new Object();
	}

	int index = 0;
	// find a proper key for row
	String key = null;
	String value = null;
	for (String property : GUITester.getInstance().getGuiModelExtractor().getPropertyList()) {
	    value = get(property);
	    if (value != null) {
		if (row == index) {
		    key = property;
		    break;
		}
		index++;
	    }
	}
	if (key == null)
	    return new Object();

	switch (column) {
	case KEY_COLUMN:
	    return key;
	case VALUE_COLUMN:
	    return value;
	}
	return new Object();
    }

    @Override
    public boolean isCellEditable(int rowIndex, int columnIndex) {
	return columnIndex == 1;
    }

    @Override
    public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
	if (columnIndex == 0)
	    return;

	int index = 0;
	// find a proper key for row
	String key = null;
	String value = null;
	for (String property : GUITester.getInstance().getGuiModelExtractor().getPropertyList()) {
	    value = get(property);
	    if (value != null) {
		if (rowIndex == index) {
		    key = property;
		    break;
		}
		index++;
	    }
	}
	if (key == null)
	    return;
	// delete if empty string is entered
	if (aValue.equals("")) {
	    map.remove(key);
	    fireTableRowsDeleted(rowIndex, rowIndex);
	} else
	    map.put(key, (String) aValue);
    }

    // --- implements Map<String,String> interface ---

    @Override
    public void clear() {
	map.clear();
    }

    @Override
    public boolean containsKey(Object key) {
	return map.containsKey(key);
    }

    @Override
    public boolean containsValue(Object value) {
	return map.containsKey(value);
    }

    @Override
    public Set<java.util.Map.Entry<String, String>> entrySet() {
	return map.entrySet();
    }

    @Override
    public String get(Object key) {
	return map.get(key);
    }

    @Override
    public boolean isEmpty() {
	return map.isEmpty();
    }

    @Override
    public Set<String> keySet() {
	return map.keySet();
    }

    @Override
    public String put(String key, String value) {
	return map.put(key, value);
    }

    @Override
    public void putAll(Map<? extends String, ? extends String> m) {
	map.putAll(m);
    }

    @Override
    public String remove(Object key) {
	return map.remove(key);
    }

    @Override
    public int size() {
	return map.size();
    }

    @Override
    public Collection<String> values() {
	return map.values();
    }

}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.IO;

namespace Eshunna.Lib
{
    /// <summary>
    /// An SFM image file path to wedge file path map that assumes the file name is the same between the SFM and wedge images, but that the wedge image exists in a different directory.
    /// Also assumes that all wedge images are together in the same directory.
    /// </summary>
    public class DifferentDirectorySameFileName : ISfmToWedgeImageFilePathMap
    {
        #region Static

        public static string WedgeImageFilePathGet(string sfmImageFilePath, string wedgeImagesDirectoryPath)
        {
            string sfmImageFileName = Path.GetFileName(sfmImageFilePath);
            string output = Path.Combine(wedgeImagesDirectoryPath, sfmImageFileName);
            return output;
        }

        #endregion

        public string WedgeImagesDirectoryPath { get; }

        public DifferentDirectorySameFileName(string wedgeImagesDirectoryPath)
        {
            this.WedgeImagesDirectoryPath = wedgeImagesDirectoryPath;
        }

        public string WedgeImageFilePath(string sfmImageFilePath)
        {
            string output = DifferentDirectorySameFileName.WedgeImageFilePathGet(sfmImageFilePath, this.WedgeImagesDirectoryPath);
            return output;
        }
    }
}


text:
package io.deepsense.deeplang.params

import spray.json._

class BooleanParamSpec extends AbstractParamSpec[Boolean, BooleanParam] {

  override def className: String = "BooleanParam"

  override def paramFixture: (BooleanParam, JsValue) = {
    val description = "Boolean param description"
    val param = BooleanParam(
      name = "Boolean param name",
      description = Some(description))
    val json = JsObject(
      "type" -> JsString("boolean"),
      "name" -> JsString(param.name),
      "description" -> JsString(description),
      "isGriddable" -> JsFalse,
      "default" -> JsNull
    )
    (param, json)
  }

  override def valueFixture: (Boolean, JsValue) = (true, JsBoolean(true))
}


text:
<iframe src="https://appetize.io/embed/5p4nc7mma7tkt5ycc0cbzv2fvg?device=iphone5s&scale=75&autoplay=true&orientation=portrait&deviceColor=black"
        width="274px" height="587px" frameborder="0" scrolling="no"
        style="float:right;margin-left:1em;"> </iframe>

Pull To Bounce can wrap any `UIScrollView` and add a cool, bouncy pull-to-refresh animation. All
that needs to be done is to add a `UIScrollView` as a sub view, and then subscribe to an event.

##  Using PullToBounceWrapper

`PullToBounceWrapper` can be used in both storyboards and code-behind. Once instantiated, it can
be used to wrap any `UIScrollView`.

    // create the wrapper
    var wrapper = new PullToBounceWrapper(View.Frame);
    View.AddSubview(wrapper);

    // add the UIScrollView
    var tableView = new SampleTableView(View.Frame);
    tableView.BackgroundColor = UIColor.Clear;
    wrapper.AddSubview(tableView);

    // listen for a refresh
    wrapper.RefreshStarted += async delegate {
        await Task.Delay(2000);

        // let the view know we have loaded our content
        wrapper.StopLoadingAnimation();
    };

## Using Properties

`PullToBounceWrapper` is fully supported in storyboards and in the storyboard designer.
There are several properties that are available in the designer and in code:

  * `BallColor`
    The color of the refresh ball

  * `WaveColor`
    The color of the wave animation

  * `WaveBounceDuration`
    The duration of the wave animation

  * `BallMoveUpDuration`
    The duration of the ball movement animation

  * `BallMovementTimingFunction`
    The animation curve of the ball movement

  * `BallSize`
    The diameter of the refresh ball

  * `PullDistance`
    The distance the user has to pull before a refresh is triggered

  * `BendDistance`
    The distance the wave will curve during a pull

## Using Events

When we want to listen for a refresh event, we can subscribe to the `RefreshStarted` event:

  * `RefreshStarted`
    The event that is raised when the user triggers a refresh.

After the work has been completed, we need to let the `PullToBounceWrapper` know. We do this
by invoking the `StopLoadingAnimation` method:

    pullToBounceWrapper.StopLoadingAnimation();


text:
#if defined(_MSC_VER) && _MSC_VER < 1910  // VS 2015's MSVC
#  pragma warning(disable: 4702) // unreachable code in system header (xatomic.h(382))
#endif

#include <pybind11/iostream.h>
#include "pybind11_tests.h"
#include <atomic>
#include <iostream>
#include <mutex>
#include <string>
#include <thread>

void noisy_function(const std::string &msg, bool flush) {

    std::cout << msg;
    if (flush)
        std::cout << std::flush;
}

void noisy_funct_dual(const std::string &msg, const std::string &emsg) {
    std::cout << msg;
    std::cerr << emsg;
}

// object to manage C++ thread
// simply repeatedly write to std::cerr until stopped
// redirect is called at some point to test the safety of scoped_estream_redirect
struct TestThread {
    TestThread() : stop_{false} {
        auto thread_f = [this] {
            static std::mutex cout_mutex;
            while (!stop_) {
                {
                    // #HelpAppreciated: Work on iostream.h thread safety.
                    // Without this lock, the clang ThreadSanitizer (tsan) reliably reports a
                    // data race, and this test is predictably flakey on Windows.
                    // For more background see the discussion under
                    // https://github.com/pybind/pybind11/pull/2982 and
                    // https://github.com/pybind/pybind11/pull/2995.
                    const std::lock_guard<std::mutex> lock(cout_mutex);
                    std::cout << "x" << std::flush;
                }
                std::this_thread::sleep_for(std::chrono::microseconds(50));
            } };
        t_ = new std::thread(std::move(thread_f));
    }

    ~TestThread() {
        delete t_;
    }

    void stop() { stop_ = true; }

    void join() const {
        py::gil_scoped_release gil_lock;
        t_->join();
    }

    void sleep() {
        py::gil_scoped_release gil_lock;
        std::this_thread::sleep_for(std::chrono::milliseconds(50));
    }

    std::thread *t_{nullptr};
    std::atomic<bool> stop_;
};

TEST_SUBMODULE(iostream, m) {

    add_ostream_redirect(m);

    // test_evals

    m.def("captured_output_default", [](const std::string &msg) {
        py::scoped_ostream_redirect redir;
        std::cout << msg << std::flush;
    });

    m.def("captured_output", [](const std::string &msg) {
        py::scoped_ostream_redirect redir(std::cout, py::module_::import("sys").attr("stdout"));
        std::cout << msg << std::flush;
    });

    m.def("guard_output", &noisy_function,
            py::call_guard<py::scoped_ostream_redirect>(),
            py::arg("msg"), py::arg("flush")=true);

    m.def("captured_err", [](const std::string &msg) {
        py::scoped_ostream_redirect redir(std::cerr, py::module_::import("sys").attr("stderr"));
        std::cerr << msg << std::flush;
    });

    m.def("noisy_function", &noisy_function, py::arg("msg"), py::arg("flush") = true);

    m.def("dual_guard", &noisy_funct_dual,
            py::call_guard<py::scoped_ostream_redirect, py::scoped_estream_redirect>(),
            py::arg("msg"), py::arg("emsg"));

    m.def("raw_output", [](const std::string &msg) { std::cout << msg << std::flush; });

    m.def("raw_err", [](const std::string &msg) { std::cerr << msg << std::flush; });

    m.def("captured_dual", [](const std::string &msg, const std::string &emsg) {
        py::scoped_ostream_redirect redirout(std::cout, py::module_::import("sys").attr("stdout"));
        py::scoped_ostream_redirect redirerr(std::cerr, py::module_::import("sys").attr("stderr"));
        std::cout << msg << std::flush;
        std::cerr << emsg << std::flush;
    });

    py::class_<TestThread>(m, "TestThread")
        .def(py::init<>())
        .def("stop", &TestThread::stop)
        .def("join", &TestThread::join)
        .def("sleep", &TestThread::sleep);
}


text:
package org.spacehq.mc.protocol.packet.ingame.server;

import org.spacehq.mc.protocol.data.game.values.MagicValues;
import org.spacehq.mc.protocol.data.game.values.MessageType;
import org.spacehq.mc.protocol.data.message.Message;
import org.spacehq.packetlib.io.NetInput;
import org.spacehq.packetlib.io.NetOutput;
import org.spacehq.packetlib.packet.Packet;

import java.io.IOException;

public class ServerChatPacket implements Packet {

    private Message message;
    private MessageType type;

    @SuppressWarnings("unused")
    private ServerChatPacket() {
    }

    public ServerChatPacket(String text) {
        this(Message.fromString(text));
    }

    public ServerChatPacket(Message message) {
        this(message, MessageType.SYSTEM);
    }

    public ServerChatPacket(String text, MessageType type) {
        this(Message.fromString(text), type);
    }

    public ServerChatPacket(Message message, MessageType type) {
        this.message = message;
        this.type = type;
    }

    public Message getMessage() {
        return this.message;
    }

    public MessageType getType() {
        return this.type;
    }

    @Override
    public void read(NetInput in) throws IOException {
        this.message = Message.fromString(in.readString());
        this.type = MagicValues.key(MessageType.class, in.readByte());
    }

    @Override
    public void write(NetOutput out) throws IOException {
        out.writeString(this.message.toJsonString());
        out.writeByte(MagicValues.value(Integer.class, this.type));
    }

    @Override
    public boolean isPriority() {
        return false;
    }

}


text:
p:last-child { margin:0px; }

hr { display:none; }

/**
 * Toggleables ========================================================
 */
.toggleable { display:none; }

/**
 * Generic ============================================================
 */
.page-content dl dt {}
.page-content dl dd,
.page-content dl dl {
  margin-left:20px;
  margin-bottom:10px;
  }

/**
 * Console ============================================================
 */
div.messages {
  color:#036;
  background-color:#f8f8f8;
  border:1px solid #ccc;
  margin:0px 0px 10px;
  }

table tr.warning th,
div.warning {
  color:#a84;
  background-color:#fff4c0;
  }

table tr.error th,
div.error {
  color:#965;
  background-color:#ffe4e0;
  }

table tr.ok th,
table tr.info th,
div.status {
  color:#687;
  background-color:#ecf8f4;
  }

  div.error   { border-color:#ffd4d0; }
  div.warning { border-color:#ffe4b0; }
  div.status  { border-color:#dce8e4; }

/**
 * Pagers =============================================================
 */
.pager {
  font-weight:normal;
  font-size:11px;
  }

  .pager ul.pager-list { float:left; }
  .pager ul.pager-links { float:right; }

/**
 * Menus, lists =======================================================
 */
.admin-block-description,
.help-items ul li,
.confirmation ul li,
.item-list ul li,
.prose .item-list li,
.menu li {
  float:none;
  display:block;
  padding:5px 10px 4px;
  border-bottom:1px solid #f4f4f4;
  }

  .admin-block-description,
  .help-items ul li:last-child,
  .confirmation ul li:last-child,
  .item-list ul li:last-child,
  .prose .item-list li:last-child,
  .menu li:last-child {
    border-bottom:0px;
    padding-bottom:5px;
    }

.admin-panel h3 span.icon,
.admin-list li a span.icon {
  position:absolute;
  left:10px;
  top:10px;
  }

  .admin-list-compact li a span.icon { top:5px; }

.admin-panel h3,
.node-type-list li,
.admin-list li {
  position:relative;
  padding:10px 5px 9px 50px;
  margin:0px;
  min-height:30px;
  border-bottom:1px solid #e8e8e8;
  }

  .admin-panel h3 {
    background:#f4f4f4;
    line-height:30px;
    }

  .admin-list-compact li { min-height:20px; }

  .node-type-list li:last-child,
  .admin-list li:last-child { border:0px; }

/**
 * Tables =============================================================
 */
.tabledrag-toggle-weight-wrapper {
  float:right;
  font-size:11px;
  margin-bottom:-30px;
  height:20px;
  padding:5px;
  }

.tabledrag-toggle-weight-wrapper a {
  display:block;
  width:20px;
  height:20px;
  text-indent:-999px;
  overflow:hidden;
  background:url(images/bleeds.png) -40px -120px no-repeat;
  }

table {
  width:100%;
  margin:0px 0px 10px;
  background-color:#fff;

  border-collapse:collapse;
  border-color:#ddd;
  border-width:1px;
  border-style:solid;
  }

  .fieldset table { margin:0px; }

table td,
table th {
  vertical-align:top;
  border-width:1px 0px;
  border-style:solid;
  border-color:#ddd;
  padding:5px;
  }

table th {
  font-size:11px;
  text-align:left;
  font-weight:normal;
  color:#666;
  background:#eee;
  }

  table thead th { border-top-color:#ccc; }

table td.active { background:#e4f0f8; }
table tr.odd td.active { background:#ecf8fc; }

table tr.selected td.active,
table tr.selected td {
  background:#ffc;
  border-color:#eeb;
  }

/* Block administration */
table tr.region td { background:#f8f8f8; }

/* Hide tabledrag markers */
table tr.draggable span.tabledrag-changed { display:none; }

/* Stripe administrative tables */
.page-admin table tr.even, .page-admin table tr.even td {
  background: #f9f9f9;
}

/**
 * Forms ==============================================================
 */
.block,
.item-list,
.help-items ul,
.form-item,
.confirmation ul,
.admin-list,
.node-type-list,
.admin-panel {
  background:#fff;
  margin:0px 0px 10px;

  border-width:1px;
  border-style:solid;
  border-color:#ddd;
  }

  .form-item {
    position:relative;
    padding:9px;
    }

  .admin-list { margin:0px; }

table .form-item,
table .item-list,
.block .form-item,
.block .item-list,
.admin-panel .item-list,
.admin-panel .admin-list,
.fieldset .form-item,
.fieldset .form-type-radio,
.fieldset .form-type-checkbox,
.form-item .form-item,
.form-item .form-type-radio,
.form.item .form-type-checkbox,
.form-checkboxes .form-type-checkbox,
.text-format-wrapper .fieldset .form-item {
    background:transparent;
    padding:0px;
    border:0px;
    }

  table .form-item,
  table .item-list,
  .block .item-list,
  .admin-panel .item-list,
  .admin-panel .admin-list,
  .fieldset .form-type-radio,
  .fieldset .form-type-checkbox,
  .form-item .form-type-radio,
  .form.item .form-type-checkbox,
  .form-checkboxes .form-type-checkbox { margin-bottom:0px; }

.text-format-wrapper .form-item {
  background:#fff;
  margin:0px 0px 10px;

  border-width:1px;
  border-style:solid;
  border-color:#ddd;
  padding: 9px;
  }

.form-item label {
  margin:0px;
  padding:0px;
  color:#666;
  font-weight:bold;
  font-size:10px;
  text-transform:uppercase;
  }

  .form-item label.option {
    text-transform:none;
    font-size:11px;
    }

  .form-item label.option input { vertical-align:middle; }

.page-content .password-description,
.page-content .password-strength,
.page-content .description,
.page-content .form-item .description {
  line-height:15px;
  font-size:11px;
  white-space:normal;
  }

  .admin-panel p.description {
    background:#eee;
    border-top:1px solid #ddd;
    border-bottom:1px solid #fff;
    line-height:20px;
    font-size:11px;
    padding:4px 9px;
    margin:0px;
    }

.fieldset .description { margin:0px 0px 10px; }

.page-content .form-item .description {
  position:absolute;
  bottom:100%;
  right:-15px;
  z-index:5;

  color:#687;
  background:url(images/popup.png) 50% 100% no-repeat;
  border-top:1px solid #d8e4e0;

  width:240px;
  margin:0px 0px -15px;
  padding:9px 10px 20px;
  display:none;
  }

  .page-content .form-item:hover {
    z-index:1;
    height:auto; /* Fix for flicker in IE7 */
    }

  .page-content .form-item:hover > .description { display:block; }

input.teaser-button,
input.form-submit {
  cursor:pointer;
  padding:2px 10px;
  color:#333;

  text-align:center;

  font-weight:normal;
  border-width:1px;
  border-style:solid;
  border-color:#ddd #ddd #ccc;
  background:#fff url(images/buttons.png) -1px 50% no-repeat;
  }

  input.form-submit:hover {
    border-color:#ace;
    -webkit-box-shadow:#ace 0px 0px 5px;
    }

  input.form-submit:active {
    border-color:#666 #666 #555;
    background:#666 url(images/buttons.png) -401px 50% no-repeat;
    color:#222;
    text-shadow:#999 0px 1px 0px;
    }

  input.button-yes {
    background-position:-2401px 50%;
    padding-left:25px;
    }

  input.button-yes:active { background-position:-2801px 50%; }

  input.button-no {
    background-position:-3201px 50%;
    padding-left:25px;
    }

  input.button-no:active { background-position:-3601px 50%; }

input.form-autocomplete,
input.form-text,
textarea.form-textarea,
select.form-select {
  padding:3px;
  border-width:1px;
  border-style:solid;
  border-color:#ccc;
  background:#fff;
  color:#666;
  max-width:100%;
  }

  input.form-autocomplete:hover,
  input.form-text:hover,
  textarea.form-textarea:hover,
  select.form-select:hover,
  input.form-autocomplete:focus,
  input.form-text:focus,
  textarea.form-textarea:focus,
  select.form-select:focus {
    color:#333;
    border-color:#ace;
    -webkit-box-shadow:#ace 0px 0px 5px;
    }

  input.fluid {
    -moz-box-sizing:border-box;
    -webkit-box-sizing:border-box;
    width:100%;
    }

    table input.fluid { width:auto; }

  html.js input.form-autocomplete { background-position:100% 7px; }
  html.js input.throbbing { background-position:100% -13px; }

/* Fieldsets */
.fieldset,
.fieldset-title,
.fieldset-title a,
.fieldset-content { display:block; }

.fieldset {
  margin:0px 0px 10px;
  display:block;
  position:relative;
  min-height:28px;
  border: 1px solid #CCCCCC;
  }
fieldset legend {
  display: block;
  float: left;
  width: 100%;
}
body.page-admin div.vertical-tabs .vertical-tabs-panes .vertical-tabs-pane fieldset {
  padding:0;
}

.fieldset-legend {
  display:block;
  }

.container-inline .fieldset-legend .fieldset-content,
.fieldset.titled .fieldset-content {
  display:block;
  padding-top:40px;
  }

.item-list h3,
.block .block-title,
.fieldset-title,
.collapsible .fieldset-legend a {
  display:block;
  font-size:11px;
  margin:0px;
  padding:4px 9px 5px;
  color:#333;
  background:#f6f6f6;
  }

  .fieldset-legend,
  .collapsible .fieldset-legend a { padding-bottom:4px; }

  /* Explicit height for IE */
  .collapsible .fieldset-legend a { height:20px; }

  .collapsible .fieldset-legend span.icon {
    position:absolute;
    left:-20px;
    top:4px;
    background:url(images/bleeds.png) -20px -180px no-repeat;
    width:20px;
    height:20px;
    display:block;
    cursor:pointer;
    }

    html.js .collapsed .fieldset-legend span.icon { background-position:0px -180px; }

    .fieldset .collapsible .fieldset-legend span.icon { display:none; }

  .collapsed .fieldset-legend a {
    background:#eee;
    color:#484848;
    }

  .collapsed .fieldset-legend a:hover { color:#666; }

  .collapsible .fieldset-legend {
    padding:0px;
    background:transparent;
    }

  .collapsed .fieldset-legend a { padding-bottom:4px; }

.block .block-content,
.container-inline .fieldset-content,
.fieldset-content {
  padding:10px 9px 9px;
  background:#fff;
  }

  html.js .collapsed .fieldset-content { display:none; }

  .fieldset .fieldset .fieldset-content { background:#fff; }

/* Filter form */
.filter-wrapper {
  font-size:11px;
  margin-top:-10px;
  border-top:none;
  }

.filter-wrapper .fieldset-content,
.fieldset .fieldset.filter-wrapper .fieldset-content  {
  background:#f8f8f8;
  border-top:0px;
  height:20px;
  padding:5px 9px 4px;
  }

.filter-wrapper .form-type-select { padding:0px; }
.filter-wrapper .form-type-select * {
  float:left;
  margin-right:5px;
  }

.filter-wrapper select {
  padding:0px;
  font-size:11px;
  }

.filter-wrapper .filter-help {
  float:right;
  font-size:11px;
  padding:0px;
  }

/**
 * Form layout: Default ===============================================
 */
.form-layout-default { background:url(images/vrule.png) 65% 0% repeat-y; }

.column-main {
  float:left;
  width:65%;
  }

  .column-main .column-wrapper { padding-right:10px; }

.column-side {
  float:right;
  width:34.99%;
  }

  .column-side .column-wrapper { padding-left:10px; }

.column-footer { clear:both; }

form .form-actions {
  background:#eee;
  border:1px solid #ddd;
  padding:9px;
  }

  form .form-actions.container-inline {
    background:transparent;
    border:0px;
    padding:0px;
    }

  form .form-actions input.form-submit { margin-right:5px; }

  .form-layout-default .column-main .form-actions { display:none; }
  .form-layout-default .column-side .form-actions { margin:0px 0px 10px; }
  .form-layout-default .column-side .form-actions input.form-submit { margin:1px 5px 1px 0px; }

/**
 * "Boxes" aka generic wrappers =======================================
 */
.box-title {
  font-weight:normal;
  font-size:10px;
  text-transform:uppercase;

  background:#eee;
  border:1px solid #ddd;
  padding:4px 9px;
  margin:0px 0px 10px;
  }

/**
 * System =============================================================
 */
.admin .right {
  padding-left:5px;
  float:right;
  }

.admin .left {
  padding-right:5px;
  float:left;
  }

.admin .right,
.admin .left {
  box-sizing:border-box;
  -moz-box-sizing:border-box;
  -webkit-box-sizing:border-box;
  width:50%;
  margin:0px;
  }

/* admin/appearance */
.theme-selector {
  position:relative;
  padding:9px 9px 9px 139px;
  border:1px solid #ddd;
  margin:10px 0px;
  min-height:80px;
  text-shadow:#fff 0px 1px 0px;
  }

.theme-selector img {
  left:10px;
  top:10px;
  position:absolute;
  clip:rect(0px 120px 80px 0px); /* IE6, IE7 */
  clip:rect(0px,120px,80px,0px);
  }

.theme-selector .operations a { margin-right:20px; }

.system-themes-list-disabled .theme-selector {
  background:#eee;
  color:#676767;
  }

/* admin/content/node & admin/user/user */
.exposed-filters .form-item label {
  float:left;
  width:120px;
  }

.exposed-filters .additional-filters {
  padding:5px;
  font-size:11px;
  color:#666;
  }

/* update options */
.admin-options {
  background:#f8f8f8;
  line-height:30px;
  height:30px;
  padding:9px;
  border:1px solid #ddd;
  margin:0px 0px 10px;
  }

.admin-options label,
.admin-options .form-item {
  margin-right:10px;
  float:left;
  }

.admin-options .form-item {
  padding:0px;
  border:0px;
  }

/* dependency colors */
.admin-dependencies,
.admin-required { color: #666; }
.admin-disabled { color: #900; }
.admin-enabled { color: #099; }
.admin-missing { color: #c30; }

/* progressbar styles */
.progress .bar {
  -webkit-box-shadow:inset #ddd 0px 1px 3px;
  -moz-box-shadow:inset #ddd 0px 1px 3px;
  background:#eee;
  border:1px solid #ccc;
  }

.progress .filled { background:#666; }

/**
 * Help pages =========================================================
 */
.help-items { float:left; width:25%; }
.help-items ul { margin:10px 5px; }

/**
 * Admin toolbar ======================================================
 */
body.tao #admin-toolbar a.menu-hover span.menu-description { padding-left:50px; }

body.tao #admin-toolbar a.menu-hover span.menu-description span.icon {
  position:absolute;
  left:10px;
  top:0px;
  }

/**
 * Form description exceptions ========================================
 */

/**
 * Some form elements are either too weirdly positioned or really benefit
 * from persistent descriptions. Reset for all of these.
 */
.page-content .form-item-files-feeds,
.page-content .form-item-files-feeds .description,
.ctools-export-ui-row .form-item,
.ctools-export-ui-row .form-item .description,
.multiselect .form-item,
.multiselect .form-item .description,
.page-content table .form-item,
.page-content table .form-item .description,
.page-content .form-item .widget-edit .description,
#upload-attachments .description,
#views-ajax-pad .form-item,
#views-ajax-pad .form-item .description {
  width:auto;
  padding:0px;
  margin:0px;
  border:0px;
  background:transparent;
  position:static;
  display:block;
  }

.page-content .form-item-files-feeds:hover,
.ctools-export-ui-row .form-item:hover,
.multiselect .form-item:hover,
.page-content table .form-item:hover,
#views-ajax-pad .form-item:hover { position:static; }

.page-content .form-item-files-feeds .description,
.page-content table .form-item .description,
#upload-attachments .description,
#views-ajax-pad .form-item .description {
  padding:0px;
  color:#666;
  display:block;
  max-width:none;
  }

/**
 * Form containers ====================================================
 */
.container-inline div {
  display:inline;
  border:0px;
  padding:0px;
  background:transparent;
  }

.container-inline { margin:0px 0px 10px; }

/**
 * Vertical tabs=======================================================
 */
.vertical-tabs {
  background:#fff url(images/vtabs.png) 0px 0px repeat-y;
  border:1px solid #ddd;
  margin:0px 0px 10px;
  position:relative;
  }

.vertical-tabs .fieldset-content,
.vertical-tabs fieldset.titled .fieldset-content {
  border:0px;
  padding:10px;
  }
.vertical-tabs .fieldset-content .fieldset-content {
  margin-top: 20px;
}

.vertical-tabs-list li a {
  display:block;
  text-shadow:#fff 0px 1px 0px;
  padding:5px 10px 4px 10px;
  border-bottom:1px solid #ddd;
  color:#666;
  }

.vertical-tabs-list .selected a {
  background:#fff;
  color:#333;
  }

.vertical-tabs-list .summary { font-size:11px; }

/**
 * Action links =======================================================
 */
.action-links a {
  -moz-border-radius:5px;
  -webkit-border-radius:5px;
  border-radius:5px;

  margin:0px 5px 0px 0px;
  padding:0px 5px 0px 25px;
  background:#999 url(images/buttons.png) -800px 50% no-repeat;
  color:#fff;
  text-shadow:#666 0px 1px 0px;
  }

  .action-links a:active {
    color:#222;
    background-color:#666;
    background-position:-1200px 50%;
    text-shadow:#999 0px 1px 0px;
    }

/**
 * ORPHANED MARKUP ====================================================
 * The following selectors target markup generated by Drupal that have
 * exactly 1 or extremely few instances. It will make a great future
 * hitlist of markup to consolidate and generalize.
 */
.compact-link {
  font-size:11px;
  height:20px;
  margin:0px 0px 10px;
  }

.compact-link a {
  float:left;
  line-height:18px;
  padding:0px 9px;
  border:1px solid #ddd;
  color:#666;
  background:#fff;
  }


text:
package com.planet_ink.coffee_mud.Abilities.Paladin;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.StdAbility;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;

import java.util.*;

public class Paladin_HolyStrike extends StdAbility
{
	@Override
	public String ID()
	{
		return "Paladin_HolyStrike";
	}

	private final static String	localizedName	= CMLib.lang().L("Holy Strike");

	@Override
	public String name()
	{
		return localizedName;
	}

	private static final String[]	triggerStrings	= I(new String[] { "HOLYSTRIKE" });

	@Override
	public int abstractQuality()
	{
		return Ability.QUALITY_MALICIOUS;
	}

	@Override
	public String displayText()
	{
		return "";
	}

	@Override
	public String[] triggerStrings()
	{
		return triggerStrings;
	}

	@Override
	protected int canAffectCode()
	{
		return 0;
	}

	@Override
	protected int canTargetCode()
	{
		return Ability.CAN_MOBS;
	}

	@Override
	public int classificationCode()
	{
		return Ability.ACODE_SKILL | Ability.DOMAIN_MARTIALLORE;
	}

	@Override
	public int usageType()
	{
		return USAGE_MOVEMENT | USAGE_MANA;
	}

	@Override
	public void affectPhyStats(Physical affected, PhyStats affectableStats)
	{
		affectableStats.setArmor(affectableStats.armor()-200);
	}

	@Override
	public boolean okMessage(final Environmental myHost, final CMMsg msg)
	{
		if((affected==null)||(!(affected instanceof MOB)))
		   return super.okMessage(myHost,msg);
		final MOB mob=(MOB)affected;
		if(msg.amISource(invoker)
		&&(msg.amITarget(mob))
		&&(msg.targetMinor()==CMMsg.TYP_DAMAGE)
		&&(msg.tool()==invoker.fetchWieldedItem())
		&&(msg.value()>0))
		{
			if(mob.location()!=null)
				mob.location().show(msg.source(),msg.target(),CMMsg.MSG_OK_VISUAL, L("A blinding holy light from <O-NAME> comes down upon <T-NAME>!"));
			msg.setValue((msg.value()*2)+super.getXLEVELLevel(invoker));
			unInvoke();
		}
		return super.okMessage(myHost,msg);
	}

	protected boolean prereqs(MOB mob, boolean quiet)
	{
		if(mob.isInCombat()&&(mob.rangeToTarget()>0))
		{
			if(!quiet)
			mob.tell(L("You are too far away to do a holy strike!"));
			return false;
		}
		if(!(CMLib.flags().isGood(mob)))
		{
			mob.tell(L("Your alignment has alienated you from your god."));
			return false;
		}

		final Item w=mob.fetchWieldedItem();
		if((w==null)||(!(w instanceof Weapon))||(((Weapon)w).weaponClassification()!=Weapon.CLASS_SWORD))
		{
			if(!quiet)
				mob.tell(L("You need a sword to perform a holy strike!"));
			return false;
		}
		return true;
	}

	@Override
	public int castingQuality(MOB mob, Physical target)
	{
		if(mob!=null)
		{
			if(!prereqs(mob,true))
				return Ability.QUALITY_INDIFFERENT;
			if(!CMLib.flags().isEvil(target))
				return Ability.QUALITY_INDIFFERENT;
		}
		return super.castingQuality(mob,target);
	}

	@Override
	public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel)
	{
		if(!prereqs(mob,false))
			return false;

		MOB target=super.getTarget(mob, commands, givenTarget);
		if(target == null)
			return false;
		if(target.fetchEffect(ID())!=null)
		{
			mob.tell(L("@x1 already has a holy strike charged against @x2.",target.name(mob),target.charStats().himher()));
			return false;
		}
		if(!CMLib.flags().isEvil(target))
		{
			mob.tell(L("But @x1 is not evil!",target.name(mob)));
			return false;
		}

		if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
			return false;

		// now see if it worked
		final boolean success=proficiencyCheck(mob,0,auto);
		if(success)
		{
			final CMMsg msg=CMClass.getMsg(mob,target,this,(auto?CMMsg.MASK_ALWAYS:0)|CMMsg.MASK_MALICIOUS|CMMsg.MSG_NOISYMOVEMENT,L("^F^<FIGHT^><S-NAME> call(s) down a holy strike against <T-NAME>!^</FIGHT^>^?"));
			CMLib.color().fixSourceFightColor(msg);
			if(mob.location().okMessage(mob,msg))
			{
				mob.location().send(mob,msg);
				invoker=mob;
				Ability A=maliciousAffect(mob,target,asLevel,2,-1);
				target.recoverPhyStats();
				CMLib.combat().postAttack(mob, target, mob.fetchWieldedItem());
				if(A!=null)
					A.unInvoke();
				target.recoverPhyStats();
			}
		}
		else
			return maliciousFizzle(mob,null,L("<S-NAME> call(s) a holy strike against , but fail(s) <S-HIS-HER> attack."));

		// return whether it worked
		return success;
	}
}


text:
<?php

if ( ! class_exists( 'AWPCP_AjaxHandler' ) ) {

function awpcp_ajax_response() {
    return new AWPCP_AjaxResponse();
}

/**
 * @since 3.2.2
 */
class AWPCP_AjaxResponse {

    /**
     * @since 3.2.2
     */
    public function set_content_type( $content_type ) {
        header( sprintf( "Content-Type: %s", $content_type ) );
    }

    /**
     * @since 3.2.2
     */
    public function write( $content ) {
        echo $content;
    }

    /**
     * TODO: use wp_die instead of die()
     * @since 3.2.2
     */
    public function close() {
        die();
    }
}

/**
 * @since 3.2.2
 */
abstract class AWPCP_AjaxHandler {

    private $response;

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

    /**
     * @since 3.2.2
     */
    public abstract function ajax();

    /**
     * @since 3.2.2
     */
    protected function success( $params = array() ) {
        return $this->flush( array_merge( array( 'status' => 'ok' ), $params ) );
    }

    /**
     * @since 3.2.2
     */
    protected function error( $params = array() ) {
        return $this->flush( array_merge( array( 'status' => 'error' ), $params ) );
    }

    /**
     * @since 3.2.2
     */
    protected function progress_response( $records_count, $records_left ) {
        return $this->success( array( 'recordsCount' => $records_count, 'recordsLeft' => $records_left ) );
    }

    /**
     * @since 3.2.2
     */
    protected function response( $records_count, $records_left ) {
        _deprecated_function( __FUNCTION__, '3.2.2', 'AWPCP_AjaxHandler::progress_response' );
        return $this->progress_response( $records_count, $records_left );
    }

    /**
     * @since 3.2.2
     */
    protected function error_response( $error_message ) {
        return $this->error( array( 'error' => $error_message ) );
    }

    /**
     * @since 3.2.2
     */
    protected function multiple_errors_response( $errors ) {
        return $this->error( array( 'errors' => (array) $errors ) );
    }

    /**
     * @since 3.2.2
     */
    protected function flush( $array_response ) {
        $this->response->set_content_type( 'application/json' );
        $this->response->write( json_encode( $array_response ) );
        $this->response->close();
    }
}

}


text:
local writer = require "log.writer.list".new(
  -- write to console from main thread
  require "log.writer.console.color".new(),
  -- write to file from separate thread
  -- require "log.writer.async.udp".new('127.0.0.1', 5555,
  require "log.writer.async.zmq".new('inproc://async.logger',
    "return require 'log.writer.file.by_day'.new('./logs', 'events.log', 5000)"
  )
)

local LOG = require"log".new(writer)

LOG.fatal("can not allocate memory")
LOG.error("file not found")
LOG.warning("cache server is not started")
LOG.info("new message is received")
LOG.notice("message has 2 file")

print("Press enter ...") io.flush() io.read()


text:
#include <QtCharts/QBarCategoryAxis>
#include <private/qbarcategoryaxis_p.h>
#include <private/chartbarcategoryaxisx_p.h>
#include <private/chartbarcategoryaxisy_p.h>
#include <private/abstractdomain_p.h>
#include <QtCharts/QChart>
#include <QtCore/QtMath>

QT_CHARTS_BEGIN_NAMESPACE
/*!
    \class QBarCategoryAxis
    \inmodule Qt Charts
    \brief The QBarCategoryAxis class adds categories to a chart's axes.

    QBarCategoryAxis can be set up to show an axis line with tick marks, grid lines, and shades.
    Categories are drawn between the ticks. It can be used also with a line series, as demonstrated
    by the \l {Line and BarChart Example} {Line and BarChart Example}.

    The following code illustrates how to use QBarCategoryAxis:
    \code
    QChartView *chartView = new QChartView;
    QBarSeries *series = new QBarSeries;
    // ...
    chartView->chart()->addSeries(series);
    chartView->chart()->createDefaultAxes();

    QBarCategoryAxis *axisX = new QBarCategoryAxis;
    QStringList categories;
    categories << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun";
    axisX->append(categories);
    axisX->setRange("Feb", "May");
    chartView->chart()->setAxisX(axisX, series);
    \endcode
*/

/*!
    \qmltype BarCategoryAxis
    \instantiates QBarCategoryAxis
    \inqmlmodule QtCharts

    \inherits AbstractAxis

    \brief Adds categories to a chart's axes.

    The BarCategoryAxis type can be set up to show an axis line with tick marks, grid lines, and
    shades. Categories are drawn between the ticks. It can be used also with a line series.

    The following QML snippet illustrates how to use BarCategoryAxis:
    \code
        ChartView {
            BarCategoryAxis {
                id: categoryAxis
                categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun" ]
            }
        // Add a few series...
        }
    \endcode
*/

/*!
  \property QBarCategoryAxis::categories
  \brief The categories of an axis.
*/
/*!
  \qmlproperty QStringList BarCategoryAxis::categories
  The categories of an axis.
*/

/*!
  \property QBarCategoryAxis::min
  \brief The minimum value on the axis.
*/
/*!
  \qmlproperty string BarCategoryAxis::min
  The minimum value on the axis.
*/

/*!
  \property QBarCategoryAxis::max
  \brief The maximum value on the axis.
*/
/*!
  \qmlproperty string BarCategoryAxis::max
  The maximum value on the axis.
*/

/*!
  \property QBarCategoryAxis::count
  \brief The number of categories of an axis.
*/
/*!
  \qmlproperty int BarCategoryAxis::count
  The number of categories of an axis.
*/

/*!
  \fn void QBarCategoryAxis::categoriesChanged()
  This signal is emitted when the categories of the axis change.
*/

/*!
  \fn void QBarCategoryAxis::minChanged(const QString &min)
  This signal is emitted when the \a min value of the axis changes.
*/

/*!
  \fn void QBarCategoryAxis::maxChanged(const QString &max)
  This signal is emitted when the \a max value of the axis changes.
*/

/*!
  \fn void QBarCategoryAxis::countChanged()
  This signal is emitted when the number of categories of an axis changes.
*/

/*!
  \fn void QBarCategoryAxis::rangeChanged(const QString &min, const QString &max)
  This signal is emitted when \a min or \a max value of the axis changes.
*/

/*!
  \qmlsignal BarCategoryAxis::rangeChanged(string min, string max)
  This signal is emitted when \a min or \a max value of the axis changes.

  The corresponding signal handler is \c onRangeChanged.
*/

/*!
  \qmlmethod void BarCategoryAxis::clear()
  Removes all categories. Sets the maximum and minimum values of the axis range to QString::null.
*/

/*!
    Constructs an axis object that is the child of \a parent.
*/
QBarCategoryAxis::QBarCategoryAxis(QObject *parent):
    QAbstractAxis(*new QBarCategoryAxisPrivate(this), parent)
{
}

/*!
    Destroys the axis object.
*/
QBarCategoryAxis::~QBarCategoryAxis()
{
    Q_D(QBarCategoryAxis);
    if (d->m_chart)
        d->m_chart->removeAxis(this);
}

/*!
    \internal
*/
QBarCategoryAxis::QBarCategoryAxis(QBarCategoryAxisPrivate &d, QObject *parent)
    : QAbstractAxis(d, parent)
{

}

/*!
    Appends \a categories to an axis. The maximum value on the axis will be changed
    to match the last category in \a categories. If no categories were previously defined,
    the minimum value on the axis will also be changed to match the first category in
    \a categories.

    A category has to be a valid QString and it cannot be duplicated. Duplicated
    categories will not be appended.
*/
void QBarCategoryAxis::append(const QStringList &categories)
{
    if (categories.isEmpty())
        return;

    Q_D(QBarCategoryAxis);

    int count = d->m_categories.count();

    foreach(QString category, categories) {
        if (!d->m_categories.contains(category) && !category.isNull()) {
            d->m_categories.append(category);
        }
    }

    if (d->m_categories.count() == count)
        return;

    if (count == 0)
        setRange(d->m_categories.first(), d->m_categories.last());
    else
        setRange(d->m_minCategory, d->m_categories.last());

    emit categoriesChanged();
    emit countChanged();
}

/*!
    Appends \a category to an axis. The maximum value on the axis will be changed
    to match the last \a  category. If no categories were previously defined, the minimum
    value on the axis will also be changed to match \a category.

    A category has to be a valid QString and it cannot be duplicated. Duplicated
    categories will not be appended.
*/
void QBarCategoryAxis::append(const QString &category)
{
    Q_D(QBarCategoryAxis);

    int count = d->m_categories.count();

    if (!d->m_categories.contains(category) && !category.isNull())
        d->m_categories.append(category);

    if (d->m_categories.count() == count)
        return;

    if (count == 0)
        setRange(d->m_categories.last(), d->m_categories.last());
    else
        setRange(d->m_minCategory, d->m_categories.last());

    emit categoriesChanged();
    emit countChanged();
}

/*!
    Removes \a category from the axis. Removing a category that currently sets the
    maximum or minimum value on the axis will affect the axis range.
*/
void QBarCategoryAxis::remove(const QString &category)
{
    Q_D(QBarCategoryAxis);

    if (d->m_categories.contains(category)) {
        d->m_categories.removeAt(d->m_categories.indexOf(category));
        if (!d->m_categories.isEmpty()) {
            if (d->m_minCategory == category) {
                setRange(d->m_categories.first(), d->m_maxCategory);
            } else if (d->m_maxCategory == category) {
                setRange(d->m_minCategory, d->m_categories.last());
            } else {
                d->updateCategoryDomain();
            }
        } else {
            setRange(QString::null, QString::null);
        }
        emit categoriesChanged();
        emit countChanged();
    }
}

/*!
    Inserts \a category to the axis at \a index. \a category has to be a valid QString
    and it cannot be duplicated. If \a category is prepended or appended to other
    categories, the minimum and maximum values on the axis are updated accordingly.
*/
void QBarCategoryAxis::insert(int index, const QString &category)
{
    Q_D(QBarCategoryAxis);

    int count = d->m_categories.count();

    if (!d->m_categories.contains(category) && !category.isNull())
        d->m_categories.insert(index, category);

    if (d->m_categories.count() == count)
        return;

    if (count == 0) {
        setRange(d->m_categories.first(), d->m_categories.first());
    } else if (index == 0) {
        setRange(d->m_categories.first(), d->m_maxCategory);
    } else if (index == count) {
        setRange(d->m_minCategory, d->m_categories.last());
    } else {
        d->updateCategoryDomain();
    }

    emit categoriesChanged();
    emit countChanged();
}

/*!
    Replaces \a oldCategory with \a newCategory. If \a oldCategory does not exist on the axis,
    nothing is done. \a newCategory has to be a valid QString and it cannot be duplicated. If
    the minimum or maximum category is replaced, the minimum and maximum values on the axis are
    updated accordingly.
*/
void QBarCategoryAxis::replace(const QString &oldCategory, const QString &newCategory)
{
    Q_D(QBarCategoryAxis);

    int pos = d->m_categories.indexOf(oldCategory);

    if (pos != -1 && !d->m_categories.contains(newCategory) && !newCategory.isNull()) {
        d->m_categories.replace(pos, newCategory);
        if (d->m_minCategory == oldCategory)
            setRange(newCategory, d->m_maxCategory);
        else if (d->m_maxCategory == oldCategory)
            setRange(d->m_minCategory, newCategory);

        emit categoriesChanged();
        emit countChanged();
    }
}

/*!
    Removes all categories. Sets the maximum and minimum values of the axis range to QString::null.
 */
void QBarCategoryAxis::clear()
{
    Q_D(QBarCategoryAxis);
    d->m_categories.clear();
    setRange(QString::null, QString::null);
    emit categoriesChanged();
    emit countChanged();
}

/*!
    Sets \a categories and discards the old ones. The axis range is adjusted to match the
    first and last category in \a categories.

    A category has to be a valid QString and it cannot be duplicated.
*/
void QBarCategoryAxis::setCategories(const QStringList &categories)
{
    Q_D(QBarCategoryAxis);
    d->m_categories.clear();
    d->m_minCategory = QString::null;
    d->m_maxCategory = QString::null;
    d->m_min = 0;
    d->m_max = 0;
    d->m_count = 0;
    append(categories);
}

/*!
    Returns categories.
*/
QStringList QBarCategoryAxis::categories()
{
    Q_D(QBarCategoryAxis);
    return d->m_categories;
}

void QBarCategoryAxis::setTickCount(int count)
{
    Q_D(QBarCategoryAxis);
    if (d->m_tickCount != count && count >= 2) {
        d->m_tickCount = count;
        //emit tickCountChanged(count);
    }
}

int QBarCategoryAxis::tickCount() const
{
    Q_D(const QBarCategoryAxis);
    return d->m_tickCount;
}

/*!
    Returns the number of categories.
 */
int QBarCategoryAxis::count() const
{
    Q_D(const QBarCategoryAxis);
    return d->m_categories.count();
}

/*!
    Returns the category at \a index. The index must be valid.
*/
QString QBarCategoryAxis::at(int index) const
{
    Q_D(const QBarCategoryAxis);
    return d->m_categories.at(index);
}

/*!
    Sets the minimum category to \a min.
*/
void QBarCategoryAxis::setMin(const QString &min)
{
    Q_D(QBarCategoryAxis);
    d->setRange(min, d->m_maxCategory);
}

/*!
    Returns the minimum category.
*/
QString QBarCategoryAxis::min() const
{
    Q_D(const QBarCategoryAxis);
    return d->m_minCategory;
}

/*!
    Sets the maximum category to \a max.
*/
void QBarCategoryAxis::setMax(const QString &max)
{
    Q_D(QBarCategoryAxis);
    d->setRange(d->m_minCategory, max);
}

/*!
    Returns the maximum category.
*/
QString QBarCategoryAxis::max() const
{
    Q_D(const QBarCategoryAxis);
    return d->m_maxCategory;
}

/*!
    Sets the axis range from \a minCategory to \a maxCategory.
*/
void QBarCategoryAxis::setRange(const QString &minCategory, const QString &maxCategory)
{
    Q_D(QBarCategoryAxis);
    d->setRange(minCategory,maxCategory);
}

/*!
    Returns the type of the axis.
*/
QAbstractAxis::AxisType QBarCategoryAxis::type() const
{
    return AxisTypeBarCategory;
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

QBarCategoryAxisPrivate::QBarCategoryAxisPrivate(QBarCategoryAxis *q)
    : QAbstractAxisPrivate(q),
      m_min(0.0),
      m_max(0.0),
      m_count(0)
{

}

QBarCategoryAxisPrivate::~QBarCategoryAxisPrivate()
{

}

void QBarCategoryAxisPrivate::setMin(const QVariant &min)
{
    setRange(min, m_maxCategory);
}

void QBarCategoryAxisPrivate::setMax(const QVariant &max)
{
    setRange(m_minCategory, max);
}

void QBarCategoryAxisPrivate::setRange(const QVariant &min, const QVariant &max)
{
    QString value1 = min.toString();
    QString value2 = max.toString();
    setRange(value1, value2);
}

void QBarCategoryAxisPrivate::setRange(qreal min, qreal max)
{
    Q_Q(QBarCategoryAxis);

    bool categoryChanged = false;
    bool changed = false;

    if (min > max)
        return;

    if (!qFuzzyIsNull(m_min - min)) {
        m_min = min;
        changed = true;

        int imin = m_min + 0.5;
        if (imin >= 0 && imin < m_categories.count()) {
            QString minCategory = m_categories.at(imin);
            if (m_minCategory != minCategory && !minCategory.isEmpty()) {
                m_minCategory = minCategory;
                categoryChanged = true;
                emit q->minChanged(minCategory);
            }
        }

    }

    if (!qFuzzyIsNull(m_max - max)) {
        m_max = max;
        changed = true;

        int imax = m_max - 0.5;
        if (imax >= 0 && imax < m_categories.count()) {
            QString maxCategory = m_categories.at(imax);
            if (m_maxCategory != maxCategory && !maxCategory.isEmpty()) {
                m_maxCategory = maxCategory;
                categoryChanged = true;
                emit q->maxChanged(maxCategory);
            }
        }
    }

    if (categoryChanged){
        emit q->rangeChanged(m_minCategory, m_maxCategory);
    }

    if (changed) {
        emit rangeChanged(m_min,m_max);
    }
}

void  QBarCategoryAxisPrivate::setRange(const QString &minCategory, const QString &maxCategory)
{
	Q_Q(QBarCategoryAxis);
    bool changed = false;

    //special case in case or clearing all categories
    if (minCategory.isNull() && maxCategory.isNull()) {
        m_minCategory = minCategory;
        m_maxCategory = maxCategory;
        m_min = 0;
        m_max = 0;
        m_count = 0;
        emit q->minChanged(minCategory);
        emit q->maxChanged(maxCategory);
        emit q->rangeChanged(m_minCategory, m_maxCategory);
        emit rangeChanged(m_min,m_max);
        return;
    }

    if (m_categories.indexOf(maxCategory) < m_categories.indexOf(minCategory))
        return;

    if (!minCategory.isNull() && (m_minCategory != minCategory || m_minCategory.isNull())
            && m_categories.contains(minCategory)) {
        m_minCategory = minCategory;
        m_min = m_categories.indexOf(m_minCategory) - 0.5;
        changed = true;
        emit q->minChanged(minCategory);
    }

    if (!maxCategory.isNull() && (m_maxCategory != maxCategory || m_maxCategory.isNull())
            && m_categories.contains(maxCategory)) {
        m_maxCategory = maxCategory;
        m_max = m_categories.indexOf(m_maxCategory) + 0.5;
        changed = true;
        emit q->maxChanged(maxCategory);
    }

    if (changed) {
        m_count = m_max - m_min;
        emit q->rangeChanged(m_minCategory, m_maxCategory);
        emit rangeChanged(m_min,m_max);
    }
}

void QBarCategoryAxisPrivate::initializeGraphics(QGraphicsItem* parent)
{
    Q_Q(QBarCategoryAxis);
    ChartAxisElement* axis(0);
    if (orientation() == Qt::Vertical)
        axis = new ChartBarCategoryAxisY(q,parent);
    if (orientation() == Qt::Horizontal)
        axis = new ChartBarCategoryAxisX(q,parent);

    m_item.reset(axis);
    QAbstractAxisPrivate::initializeGraphics(parent);
}

void QBarCategoryAxisPrivate::updateCategoryDomain()
{
    bool changed = false;

    qreal tmpMin = m_categories.indexOf(m_minCategory) - 0.5;
    if (!qFuzzyIsNull(m_min - tmpMin)) {
        m_min = tmpMin;
        changed = true;
    }
    qreal tmpMax = m_categories.indexOf(m_maxCategory) + 0.5;
    if (!qFuzzyIsNull(m_max - tmpMax)) {
        m_max = tmpMax;
        changed = true;
    }
    m_count = m_max - m_min;

    if (changed)
        emit rangeChanged(m_min,m_max);
}

void QBarCategoryAxisPrivate::initializeDomain(AbstractDomain *domain)
{
    Q_Q(QBarCategoryAxis);
    if (m_max == m_min) {
        int min;
        int max;
        if (orientation() == Qt::Vertical) {
            min = domain->minY() + 0.5;
            max = domain->maxY() - 0.5;
        } else {
            min = domain->minX() + 0.5;
            max = domain->maxX() - 0.5;
        }

        if (min > 0 && min < m_categories.count() && max > 0 && max < m_categories.count())
            q->setRange(m_categories.at(min), m_categories.at(max));
    } else {
        if (orientation() == Qt::Vertical)
            domain->setRangeY(m_min, m_max);
        else
            domain->setRangeX(m_min, m_max);
    }
}

#include "moc_qbarcategoryaxis.cpp"
#include "moc_qbarcategoryaxis_p.cpp"

QT_CHARTS_END_NAMESPACE


text:
#ifndef _LINUX_REGULATOR_PROXY_CONSUMER_H_
#define _LINUX_REGULATOR_PROXY_CONSUMER_H_

#include <linux/device.h>
#include <linux/of.h>

struct proxy_consumer;

#ifdef CONFIG_REGULATOR_PROXY_CONSUMER

struct proxy_consumer *regulator_proxy_consumer_register(struct device *reg_dev,
			struct device_node *reg_node);

int regulator_proxy_consumer_unregister(struct proxy_consumer *consumer);

#else

static inline struct proxy_consumer *regulator_proxy_consumer_register(
			struct device *reg_dev, struct device_node *reg_node)
{ return NULL; }

static inline int regulator_proxy_consumer_unregister(
			struct proxy_consumer *consumer)
{ return 0; }

#endif

#endif


text:
package org.elasticsearch.ingest.core;

import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Streamable;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;

import java.io.IOException;

public class ProcessorInfo implements Writeable<ProcessorInfo>, ToXContent, Comparable<ProcessorInfo> {

    private final String type;

    public ProcessorInfo(StreamInput input) throws IOException {
        type = input.readString();
    }

    public ProcessorInfo(String type) {
        this.type = type;
    }

    /**
     * @return The unique processor type
     */
    public String getType() {
        return type;
    }

    @Override
    public ProcessorInfo readFrom(StreamInput in) throws IOException {
        return new ProcessorInfo(in);
    }

    @Override
    public void writeTo(StreamOutput out) throws IOException {
        out.writeString(this.type);
    }

    @Override
    public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
        builder.startObject();
        builder.field("type", type);
        builder.endObject();
        return null;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ProcessorInfo that = (ProcessorInfo) o;

        return type.equals(that.type);

    }

    @Override
    public int hashCode() {
        return type.hashCode();
    }

    @Override
    public int compareTo(ProcessorInfo o) {
        return type.compareTo(o.type);
    }
}


text:
Inserts P3P headers to allow cookies to be utilized in iframe scenarios with IE.

## Installation

Add this line to your application's Gemfile:

    gem 'p3p'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install p3p

## Usage

### Configuration
You can customize the P3P header text, if you so desire.

```ruby
P3P.configure do |config|
  config.header = 'CP="CAO PSA OUR"'
end

# Default Header: 'CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'
```

### Rails

Just add the gem into your Gemfile and bundle! That's it!

### Rack

  ```ruby
  require 'p3p'
  use P3P::Middleware
  ```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/carrot/p3p/trend.png)](https://bitdeli.com/free "Bitdeli Badge")


text:
import * as nodeOps from 'web/runtime/node-ops'
import { createPatchFunction } from 'core/vdom/patch'
import baseModules from 'core/vdom/modules/index'
import platformModules from 'web/runtime/modules/index'

// the directive module should be applied last, after all
// built-in modules have been applied.
const modules = platformModules.concat(baseModules)

export const patch: Function = createPatchFunction({ nodeOps, modules })


text:
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title>MesInfos Semsearch</title>
    <link rel="stylesheet" href="stylesheets/app.css">
  </head>
  <body>Chargement ...</body>
  <script src="javascripts/vendor.js"></script>
  <script src="javascripts/app.js"></script>
  <script>require('application');</script>
</html>