text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <ImageView
        android:layout_width="65dp"
        android:layout_height="45dp"
        android:layout_marginRight="10dp"
        android:layout_marginTop="10dp"
        android:id="@+id/ivAvatar"/>
    <LinearLayout
        android:layout_weight="0.7"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:orientation="vertical">
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/tvTweetUserName"
                android:layout_marginBottom="10dp"
                android:text="Bitdull"/>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:id="@+id/tvTimestamp"/>
        </RelativeLayout>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/tvTweetContent"
            android:maxLines="5"
            android:autoLink="web"
            android:text="Have a nice day"/>
    </LinearLayout>
</LinearLayout>


text:
package flex.management.runtime.messaging;

import flex.management.BaseControl;
import flex.management.runtime.AdminConsoleDisplayRegistrar;
import flex.management.runtime.AdminConsoleTypes;
import flex.messaging.MessageBroker;
import flex.messaging.endpoints.AMFEndpoint;
import flex.messaging.endpoints.AbstractEndpoint;
import flex.messaging.endpoints.Endpoint;
import flex.messaging.endpoints.HTTPEndpoint;
import flex.messaging.endpoints.StreamingAMFEndpoint;
import flex.messaging.endpoints.StreamingHTTPEndpoint;

import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;

import javax.management.ObjectName;

/**
 * The MessageBrokerControl class is the MBean implemenation for monitoring
 * and managing a MessageBroker at runtime.
 *
 * @author shodgson
 * @author majacobs
 */
public class MessageBrokerControl extends BaseControl implements MessageBrokerControlMBean
{
    private static final Object classMutex = new Object();
    private static final String TYPE = "MessageBroker";
    private static int instanceCount = 0;
    private String id;
    private MessageBroker broker;
    private List endpointNames;
    private List amfEndpoints;
    private List httpEndpoints;
    private List enterpriseEndpoints;
    private List streamingAmfEndpoints;
    private List streamingHttpEndpoints;
    private List services;

    /**
     * Constructs a new MessageBrokerControl instance, assigning its
     * backing MessageBroker.
     *
     * @param broker The MessageBroker managed by this MBean.
     */
    public MessageBrokerControl(MessageBroker broker)
    {
        super(null);
        this.broker = broker;
        endpointNames = new ArrayList();
        amfEndpoints = new ArrayList();
        httpEndpoints = new ArrayList();
        enterpriseEndpoints = new ArrayList();
        streamingAmfEndpoints = new ArrayList();
        streamingHttpEndpoints = new ArrayList();
        services = new ArrayList();
        synchronized (classMutex)
        {
            id = TYPE + ++instanceCount;
        }

        setRegistrar(new AdminConsoleDisplayRegistrar(this));
    }

    protected void onRegistrationComplete()
    {
        String name = this.getObjectName().getCanonicalName();
        getRegistrar().registerObject(AdminConsoleTypes.GENERAL_POLLABLE, name, "FlexSessionCount");
        getRegistrar().registerObjects(new int[] {AdminConsoleTypes.GENERAL_POLLABLE, AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL },
                name, new String[] {"AMFThroughput", "HTTPThroughput", "EnterpriseThroughput"});

        getRegistrar().registerObject(AdminConsoleTypes.GENERAL_SERVER, name, "MaxFlexSessionsInCurrentHour");
    }

    /*
     *  (non-Javadoc)
     * @see flex.management.BaseControlMBean#getId()
     */
    public String getId()
    {
        return id;
    }

    /*
     *  (non-Javadoc)
     * @see flex.management.BaseControlMBean#getType()
     */
    public String getType()
    {
        return TYPE;
    }

    /*
     *  (non-Javadoc)
     * @see flex.management.runtime.MessageBrokerControlMBean#isRunning()
     */
    public Boolean isRunning()
    {
        return Boolean.valueOf(broker.isStarted());
    }

    /*
     *  (non-Javadoc)
     * @see flex.management.runtime.MessageBrokerControlMBean#getStartTimestamp()
     */
    public Date getStartTimestamp()
    {
        return startTimestamp;
    }

    /*
     *  (non-Javadoc)
     * @see flex.management.runtime.MessageBrokerControlMBean#getEndpoints()
     */
    public ObjectName[] getEndpoints() throws IOException
    {
        int size = endpointNames.size();
        ObjectName[] endpointNameObjects = new ObjectName[size];
        for (int i = 0; i < size; ++i)
        {
            endpointNameObjects[i] = (ObjectName)endpointNames.get(i);
        }
        return endpointNameObjects;
    }

    /**
     * Adds an Endpoint for an endpoint registered with the backing MessageBroker.
     *
     * @param value The endpoint Endpoint.
     */
    public void addEndpoint(Endpoint value)
    {
        if (value instanceof AMFEndpoint)
            amfEndpoints.add(value);
        else if (value instanceof HTTPEndpoint)
            httpEndpoints.add(value);
        else if (value instanceof StreamingAMFEndpoint)
            streamingAmfEndpoints.add(value);
        else if (value instanceof StreamingHTTPEndpoint)
            streamingHttpEndpoints.add(value);
        else
            enterpriseEndpoints.add(value);

        endpointNames.add(value.getControl().getObjectName());
    }

    /**
     * Removes an ObjectName for an endpoint registered with the backing MessageBroker.
     *
     * @param value The endpoint ObjectName.
     */
    public void removeEndpoint(ObjectName value)
    {
        endpointNames.remove(value);
    }

    /*
     *  (non-Javadoc)
     * @see flex.management.runtime.MessageBrokerControlMBean#getServices()
     */
    public ObjectName[] getServices() throws IOException
    {
        int size = services.size();
        ObjectName[] serviceNames = new ObjectName[size];
        for (int i = 0; i < size; ++i)
        {
            serviceNames[i] = (ObjectName)services.get(i);
        }
        return serviceNames;
    }

    /**
     * Adds an ObjectName for a service registered with the backing MessageBroker.
     *
     * @param value The service ObjectName.
     */
    public void addService(ObjectName value)
    {
        services.add(value);
    }

    /**
     * Removes an ObjectName for a service registered with the backing MessageBroker.
     *
     * @param value The service ObjectName.
     */
    public void removeService(ObjectName value)
    {
        services.remove(value);
    }

    /*
     *  (non-Javadoc)
     * @see flex.management.runtime.MessageBrokerControlMBean#getFlexSessionCount()
     */
    public Integer getFlexSessionCount()
    {
        return broker.getFlexSessionManager().getFlexSessionCount();
    }

    /*
     *  (non-Javadoc)
     * @see flex.management.runtime.MessageBrokerControlMBean#getMaxFlexSessionsInCurrentHour()
     */
    public Integer getMaxFlexSessionsInCurrentHour()
    {
        return broker.getFlexSessionManager().getMaxFlexSessionsInCurrentHour();
    }

    /* (non-Javadoc)
     * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getRTMPConnectionCount()
     */
    public Integer getEnterpriseConnectionCount() throws IOException
    {
        int connections = 0;
    /*
        for (int i = 0; i < rtmpEndpoints.size(); i++)
        {
            connections += (((RTMPEndpoint)rtmpEndpoints.get(i)).getConnectionCount());
        }
    */
        return new Integer(connections);
    }

    /* (non-Javadoc)
     * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getAMFThroughput()
     */
    public Long getAMFThroughput() throws IOException
    {
        return new Long(calculateEndpointThroughput(amfEndpoints));
    }

    /* (non-Javadoc)
     * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getHTTPThroughput()
     */
    public Long getHTTPThroughput() throws IOException
    {
        return new Long(calculateEndpointThroughput(httpEndpoints));
    }

    /* (non-Javadoc)
     * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getRTMPThroughput()
     */
    public Long getEnterpriseThroughput() throws IOException
    {
        return new Long(calculateEndpointThroughput(enterpriseEndpoints));
    }

    /* (non-Javadoc)
     * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getStreamingAMFThroughput()
     */
    public Long getStreamingAMFThroughput() throws IOException
    {
        return new Long(calculateEndpointThroughput(streamingAmfEndpoints));
    }

    /* (non-Javadoc)
     * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getStreamingHTTPThroughput()
     */
    public Long getStreamingHTTPThroughput() throws IOException
    {
        return new Long(calculateEndpointThroughput(streamingHttpEndpoints));
    }

    private long calculateEndpointThroughput(List endpoints)
    {
        long throughput = 0;

        for (int i = 0; i < endpoints.size(); i++)
        {
            // This method shouldn't be used with Lists containing objects that are not AbstractEndpoints
            if (endpoints.get(i) instanceof AbstractEndpoint)
                throughput += ((AbstractEndpoint)endpoints.get(i)).getThroughput();
        }

        return throughput;
    }
}

redpajama_set_name: RedPajamaGithub


text:
#include <syslog.h>

#include <cassert>
#include <cstdlib>
#include <string>

#include "logger_syslog.hpp"

namespace processwarp {
namespace Logger {
/**
 * Initialize for syslog.
 * @param type_ Source program type for log.
 */
void Syslog::initialize(const std::string& type_) {
  type = type_;
#ifdef NDEBUG
  openlog("processwarp", LOG_PID, LOG_USER);
#else
  openlog("processwarp.develop", LOG_PID, LOG_USER);
#endif
  std::atexit(Syslog::on_exit);
}

/**
 * Output log to syslog.
 * Convert log level for syslog, concat values and output.
 * @param lv Log level.
 * @param file File name that output log from.
 * @param line Line number at file.
 * @param mid Log message-id.
 * @param message Log output message string.
 */
void Syslog::output(Level lv, const std::string& file, unsigned int line,
                    Message::Type mid, const std::string& message) {
  int priority;
  switch (lv) {
    case Level::ERROR: priority = LOG_ERR;     break;
    case Level::WARN:  priority = LOG_WARNING; break;
    case Level::INFO:  priority = LOG_INFO;    break;
    case Level::DEBUG: priority = LOG_DEBUG;   break;
    default:
      assert(false);
      return;
  }

#ifdef NDEBUG
  syslog(priority, "lv=%s type=%s class=%s mid=%s message=%s",
         get_level_string(lv), type.c_str(), file.c_str(), mid.c_str(), message.c_str());
#else
  syslog(priority, "lv=%s type=%s class=%s line=%d mid=%s message=%s",
         get_level_string(lv), type.c_str(), file.c_str(), line,
         mid.c_str(), message.c_str());
#endif
}

/**
 * When exit program close syslog.
 */
void Syslog::on_exit() {
  closelog();
}
}  // namespace Logger
}  // namespace processwarp


text:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using KGP.Direct3D11.Textures;
using KGP.Frames;
using KGP.Direct3D11.Buffers;
using KGP;

namespace KDP.Direct3D11.Tests.Textures
{
    [TestClass]
    public class BodyCameraPositionBufferTests : IDisposable
    {
        private SharpDX.Direct3D11.Device device;

        public BodyCameraPositionBufferTests()
        {
            device = new SharpDX.Direct3D11.Device(SharpDX.Direct3D.DriverType.Reference);
        }

        [TestMethod]
        public void TestCreate()
        {
            using (BodyCameraPositionBuffer buffer = new BodyCameraPositionBuffer(device))
            {
                Assert.AreNotEqual(buffer.ShaderView.NativePointer, IntPtr.Zero);
            }
        }

        [TestMethod]
        public void TestUploadEmpty()
        {
            using (BodyCameraPositionBuffer buffer = new BodyCameraPositionBuffer(device))
            {
                KinectBody[] empty = new KinectBody[0];
                buffer.Copy(device.ImmediateContext, empty);
            }
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        public void TestNullDevice()
        {
            using (BodyCameraPositionBuffer texture = new BodyCameraPositionBuffer(null))
            {
            }
        }

        public void Dispose()
        {
            device.Dispose();
        }
    }
}


text:
#include "platform/audio/EqualPowerPanner.h"
#include "platform/audio/HRTFPanner.h"
#include "platform/audio/Panner.h"
#include "wtf/PtrUtil.h"
#include <memory>

namespace blink {

std::unique_ptr<Panner> Panner::create(PanningModel model,
                                       float sampleRate,
                                       HRTFDatabaseLoader* databaseLoader) {
  switch (model) {
    case PanningModelEqualPower:
      return WTF::makeUnique<EqualPowerPanner>(sampleRate);

    case PanningModelHRTF:
      return WTF::makeUnique<HRTFPanner>(sampleRate, databaseLoader);

    default:
      NOTREACHED();
      return nullptr;
  }
}

}  // namespace blink


text:
#include <babylon/materialslibrary/water/water_material.h>

#include <nlohmann/json.hpp>

#include <babylon/babylon_stl_util.h>
#include <babylon/cameras/camera.h>
#include <babylon/core/random.h>
#include <babylon/engines/engine.h>
#include <babylon/engines/scene.h>
#include <babylon/materials/effect.h>
#include <babylon/materials/effect_fallbacks.h>
#include <babylon/materials/ieffect_creation_options.h>
#include <babylon/materials/image_processing_configuration.h>
#include <babylon/materials/material_flags.h>
#include <babylon/materials/material_helper.h>
#include <babylon/materials/textures/render_target_texture.h>
#include <babylon/materialslibrary/water/water_fragment_fx.h>
#include <babylon/materialslibrary/water/water_vertex_fx.h>
#include <babylon/meshes/abstract_mesh.h>
#include <babylon/meshes/mesh.h>
#include <babylon/meshes/sub_mesh.h>
#include <babylon/meshes/vertex_buffer.h>

namespace BABYLON {
namespace MaterialsLibrary {

WaterMaterial::WaterMaterial(const std::string& iName, Scene* scene,
                             const Vector2& renderTargetSize)
    : PushMaterial{iName, scene}
    , bumpTexture{this, &WaterMaterial::get_bumpTexture, &WaterMaterial::set_bumpTexture}
    , diffuseColor{Color3(1.f, 1.f, 1.f)}
    , specularColor{Color3(0.f, 0.f, 0.f)}
    , specularPower{64.f}
    , disableLighting{this, &WaterMaterial::get_disableLighting,
                      &WaterMaterial::set_disableLighting}
    , maxSimultaneousLights{this, &WaterMaterial::get_maxSimultaneousLights,
                            &WaterMaterial::set_maxSimultaneousLights}
    , windForce{6.f}
    , windDirection{Vector2(0.f, 1.f)}
    , waveHeight{0.4f}
    , bumpHeight{0.4f}
    , bumpSuperimpose{this, &WaterMaterial::get_bumpSuperimpose,
                      &WaterMaterial::set_bumpSuperimpose}
    , fresnelSeparate{this, &WaterMaterial::get_fresnelSeparate,
                      &WaterMaterial::set_fresnelSeparate}
    , bumpAffectsReflection{this, &WaterMaterial::get_bumpAffectsReflection,
                            &WaterMaterial::set_bumpAffectsReflection}
    , waterColor{Color3(0.1f, 0.1f, 0.6f)}
    , colorBlendFactor{0.2f}
    , waterColor2{Color3(0.1f, 0.1f, 0.6f)}
    , colorBlendFactor2{0.2f}
    , waveLength{0.1f}
    , waveSpeed{1.f}
    , waveCount{20.f}
    , disableClipPlane{false}
    , refractionTexture{this, &WaterMaterial::get_refractionTexture}
    , reflectionTexture{this, &WaterMaterial::get_reflectionTexture}
    , renderTargetsEnabled{this, &WaterMaterial::get_renderTargetsEnabled}
    , lastTime{this, &WaterMaterial::get_lastTime}
    , _bumpTexture{nullptr}
    , _disableLighting{false}
    , _maxSimultaneousLights{4}
    , _bumpSuperimpose{false}
    , _fresnelSeparate{false}
    , _bumpAffectsReflection{false}
    , _mesh{nullptr}
    , _refractionRTT{nullptr}
    , _reflectionRTT{nullptr}
    , _reflectionTransform{Matrix::Zero()}
    , _lastTime{0.f}
    , _lastDeltaTime{0.f}
    , _isVisible{false}
    , _clipPlane{std::nullopt}
    , _savedViewMatrix{Matrix::Zero()}
    , _mirrorMatrix{Matrix::Zero()}
    , _useLogarithmicDepth{false}
    , _imageProcessingConfiguration{nullptr}
    , _imageProcessingObserver{nullptr}
{
  // Vertex shader
  Effect::ShadersStore()["waterVertexShader"] = waterVertexShader;

  // Fragment shader
  Effect::ShadersStore()["waterPixelShader"] = waterPixelShader;

  // Create render targets
  _createRenderTargets(scene, renderTargetSize);

  getRenderTargetTextures = [this]() -> std::vector<RenderTargetTexturePtr> {
    _renderTargets.clear();
    _renderTargets.emplace_back(_reflectionRTT);
    _renderTargets.emplace_back(_refractionRTT);

    return _renderTargets;
  };

  _imageProcessingConfiguration = scene->imageProcessingConfiguration();
  if (_imageProcessingConfiguration) {
    _imageProcessingObserver = _imageProcessingConfiguration->onUpdateParameters.add(
      [this](ImageProcessingConfiguration* /*ic*/, EventState & /*es*/) -> void {
        _markAllSubMeshesAsImageProcessingDirty();
      });
  }
}

WaterMaterial::~WaterMaterial() = default;

BaseTexturePtr& WaterMaterial::get_bumpTexture()
{
  return _bumpTexture;
}

void WaterMaterial::set_bumpTexture(const BaseTexturePtr& value)
{
  if (_bumpTexture != value) {
    _bumpTexture = value;
    _markAllSubMeshesAsLightsDirty();
  }
}

bool WaterMaterial::get_disableLighting() const
{
  return _disableLighting;
}

void WaterMaterial::set_disableLighting(bool value)
{
  if (_disableLighting != value) {
    _disableLighting = value;
    _markAllSubMeshesAsLightsDirty();
  }
}

unsigned int WaterMaterial::get_maxSimultaneousLights() const
{
  return _maxSimultaneousLights;
}

void WaterMaterial::set_maxSimultaneousLights(unsigned int value)
{
  if (_maxSimultaneousLights != value) {
    _maxSimultaneousLights = value;
    _markAllSubMeshesAsLightsDirty();
  }
}

bool WaterMaterial::get_bumpSuperimpose() const
{
  return _bumpSuperimpose;
}

void WaterMaterial::set_bumpSuperimpose(bool value)
{
  if (_bumpSuperimpose != value) {
    _bumpSuperimpose = value;
    _markAllSubMeshesAsLightsDirty();
  }
}

bool WaterMaterial::get_fresnelSeparate() const
{
  return _fresnelSeparate;
}

void WaterMaterial::set_fresnelSeparate(bool value)
{
  if (_fresnelSeparate != value) {
    _fresnelSeparate = value;
    _markAllSubMeshesAsLightsDirty();
  }
}

bool WaterMaterial::get_bumpAffectsReflection() const
{
  return _bumpAffectsReflection;
}

void WaterMaterial::set_bumpAffectsReflection(bool value)
{
  if (_bumpAffectsReflection != value) {
    _bumpAffectsReflection = value;
    _markAllSubMeshesAsLightsDirty();
  }
}

bool WaterMaterial::get_useLogarithmicDepth() const
{
  return _useLogarithmicDepth;
}

void WaterMaterial::set_useLogarithmicDepth(bool value)
{
  _useLogarithmicDepth = value && getScene()->getEngine()->getCaps().fragmentDepthSupported;
  _markAllSubMeshesAsMiscDirty();
}

bool WaterMaterial::get_hasRenderTargetTextures() const
{
  return true;
}

RenderTargetTexturePtr& WaterMaterial::get_refractionTexture()
{
  return _refractionRTT;
}

RenderTargetTexturePtr& WaterMaterial::get_reflectionTexture()
{
  return _reflectionRTT;
}

void WaterMaterial::addToRenderList(const AbstractMeshPtr& node)
{
  if (_refractionRTT) {
    _refractionRTT->renderList().emplace_back(node.get());
  }

  if (_reflectionRTT) {
    _reflectionRTT->renderList().emplace_back(node.get());
  }
}

void WaterMaterial::enableRenderTargets(bool enable)
{
  int refreshRate = enable ? 1 : 0;

  if (_refractionRTT) {
    _refractionRTT->refreshRate = refreshRate;
  }

  if (_reflectionRTT) {
    _reflectionRTT->refreshRate = refreshRate;
  }
}

std::vector<AbstractMesh*>& WaterMaterial::getRenderList()
{
  return _refractionRTT->renderList();
}

bool WaterMaterial::get_renderTargetsEnabled() const
{
  return !(_refractionRTT && _refractionRTT->refreshRate() == 0);
}

float WaterMaterial::get_lastTime() const
{
  return _lastTime;
}

bool WaterMaterial::needAlphaBlending() const
{
  return (alpha < 1.f);
}

bool WaterMaterial::needAlphaTesting() const
{
  return false;
}

BaseTexturePtr WaterMaterial::getAlphaTestTexture()
{
  return nullptr;
}

bool WaterMaterial::isReadyForSubMesh(AbstractMesh* mesh, SubMesh* subMesh, bool useInstances)
{
  if (isFrozen()) {
    if (subMesh->effect() && subMesh->effect()->_wasPreviouslyReady) {
      return true;
    }
  }

  if (!subMesh->_materialDefines) {
    subMesh->_materialDefines = std::make_shared<WaterMaterialDefines>();
  }

  auto definesPtr = std::static_pointer_cast<WaterMaterialDefines>(subMesh->_materialDefines);
  auto& defines   = *definesPtr.get();
  auto scene      = getScene();

  if (_isReadyForSubMesh(subMesh)) {
    return true;
  }

  auto engine = scene->getEngine();

  // Textures
  if (defines._areTexturesDirty) {
    defines._needUVs = false;
    if (scene->texturesEnabled()) {
      if (_bumpTexture && MaterialFlags::BumpTextureEnabled()) {
        if (!_bumpTexture->isReady()) {
          return false;
        }
        else {
          defines._needUVs        = true;
          defines.boolDef["BUMP"] = true;
        }
      }

      if (MaterialFlags::ReflectionTextureEnabled()) {
        defines.boolDef["REFLECTION"] = true;
      }
    }
  }

  MaterialHelper::PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances);

  MaterialHelper::PrepareDefinesForMisc(mesh, scene, _useLogarithmicDepth, pointsCloud(),
                                        fogEnabled(), _shouldTurnAlphaTestOn(mesh), defines);

  if (defines._areMiscDirty) {
    if (_fresnelSeparate) {
      defines.boolDef["FRESNELSEPARATE"] = true;
    }

    if (_bumpSuperimpose) {
      defines.boolDef["BUMPSUPERIMPOSE"] = true;
    }

    if (_bumpAffectsReflection) {
      defines.boolDef["BUMPAFFECTSREFLECTION"] = true;
    }
  }

  // Lights
  defines._needNormals = MaterialHelper::PrepareDefinesForLights(
    scene, mesh, defines, true, _maxSimultaneousLights, _disableLighting);

  // Image processing
  if (defines._areImageProcessingDirty && _imageProcessingConfiguration) {
    if (!_imageProcessingConfiguration->isReady()) {
      return false;
    }

    _imageProcessingConfiguration->prepareDefines(defines);

    defines.boolDef["IS_REFLECTION_LINEAR"]
      = (reflectionTexture() != nullptr && !reflectionTexture()->gammaSpace);
    defines.boolDef["IS_REFRACTION_LINEAR"]
      = (refractionTexture() != nullptr && !refractionTexture()->gammaSpace);
  }

  // Attribs
  MaterialHelper::PrepareDefinesForAttributes(mesh, defines, true, true);

  // Configure this
  _mesh = mesh;

  // Get correct effect
  if (defines.isDirty()) {
    defines.markAsProcessed();
    scene->resetCachedMaterial();

    // Fallbacks
    auto fallbacks = std::make_unique<EffectFallbacks>();
    if (defines["FOG"]) {
      fallbacks->addFallback(1, "FOG");
    }

    if (defines["LOGARITHMICDEPTH"]) {
      fallbacks->addFallback(0, "LOGARITHMICDEPTH");
    }

    MaterialHelper::HandleFallbacksForShadows(defines, *fallbacks, maxSimultaneousLights());

    if (defines.intDef["NUM_BONE_INFLUENCERS"] > 0) {
      fallbacks->addCPUSkinningFallback(0, mesh);
    }

    // Attributes
    std::vector<std::string> attribs = {VertexBuffer::PositionKind};

    if (defines["NORMAL"]) {
      attribs.emplace_back(VertexBuffer::NormalKind);
    }

    if (defines["UV1"]) {
      attribs.emplace_back(VertexBuffer::UVKind);
    }

    if (defines["UV2"]) {
      attribs.emplace_back(VertexBuffer::UV2Kind);
    }

    if (defines["VERTEXCOLOR"]) {
      attribs.emplace_back(VertexBuffer::ColorKind);
    }

    MaterialHelper::PrepareAttributesForBones(attribs, mesh, defines, *fallbacks);
    MaterialHelper::PrepareAttributesForInstances(attribs, defines);

    // Legacy browser patch
    const std::string shaderName{"water"};
    auto join = defines.toString();

    std::vector<std::string> uniforms{
      "world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor",
      "vSpecularColor", "vFogInfos", "vFogColor", "pointSize", "vNormalInfos", "mBones",
      "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6",
      "normalMatrix", "logarithmicDepthConstant",
      // Water
      "worldReflectionViewProjection", "windDirection", "waveLength", "time", "windForce",
      "cameraPosition", "bumpHeight", "waveHeight", "waterColor", "waterColor2", "colorBlendFactor",
      "colorBlendFactor2", "waveSpeed", "waveCount"};

    std::vector<std::string> samplers{"normalSampler",
                                      // Water
                                      "refractionSampler", "reflectionSampler"};
    const std::vector<std::string> uniformBuffers{};

    {
      ImageProcessingConfiguration::PrepareUniforms(uniforms, defines);
      ImageProcessingConfiguration::PrepareSamplers(samplers, defines);
    }

    IEffectCreationOptions options;
    options.attributes            = std::move(attribs);
    options.uniformsNames         = std::move(uniforms);
    options.uniformBuffersNames   = std::move(uniformBuffers);
    options.samplers              = std::move(samplers);
    options.materialDefines       = &defines;
    options.defines               = std::move(join);
    options.maxSimultaneousLights = _maxSimultaneousLights;
    options.fallbacks             = std::move(fallbacks);
    options.onCompiled            = onCompiled;
    options.onError               = onError;
    options.indexParameters       = {{"maxSimultaneousLights", _maxSimultaneousLights}};

    MaterialHelper::PrepareUniformsAndSamplersList(options);
    subMesh->setEffect(scene->getEngine()->createEffect(shaderName, options, engine), definesPtr);
  }

  if (!subMesh->effect() || !subMesh->effect()->isReady()) {
    return false;
  }

  defines._renderId                      = scene->getRenderId();
  subMesh->effect()->_wasPreviouslyReady = true;

  return true;
}

void WaterMaterial::bindForSubMesh(Matrix& world, Mesh* mesh, SubMesh* subMesh)
{
  auto scene = getScene();

  auto _defines = static_cast<WaterMaterialDefines*>(subMesh->_materialDefines.get());
  if (!_defines) {
    return;
  }
  auto defines = *_defines;

  auto effect = subMesh->effect();
  if (!effect || !_mesh) {
    return;
  }
  _activeEffect = effect;

  // Matrices
  bindOnlyWorldMatrix(world);
  _activeEffect->setMatrix("viewProjection", scene->getTransformMatrix());

  // Bones
  MaterialHelper::BindBonesParameters(mesh, _activeEffect.get());

  if (_mustRebind(scene, effect)) {
    // Textures
    if (_bumpTexture && MaterialFlags::BumpTextureEnabled()) {
      _activeEffect->setTexture("normalSampler", _bumpTexture);

      _activeEffect->setFloat2("vNormalInfos", static_cast<float>(_bumpTexture->coordinatesIndex),
                               _bumpTexture->level);
      _activeEffect->setMatrix("normalMatrix", *_bumpTexture->getTextureMatrix());
    }
    // Clip plane
    MaterialHelper::BindClipPlane(_activeEffect, scene);

    // Point size
    if (pointsCloud()) {
      _activeEffect->setFloat("pointSize", pointSize);
    }

    MaterialHelper::BindEyePosition(effect.get(), scene);
  }

  _activeEffect->setColor4("vDiffuseColor", diffuseColor, alpha * mesh->visibility);

  if (defines["SPECULARTERM"]) {
    _activeEffect->setColor4("vSpecularColor", specularColor, specularPower);
  }

  if (scene->lightsEnabled() && !_disableLighting) {
    MaterialHelper::BindLights(scene, mesh, _activeEffect.get(), defines, maxSimultaneousLights());
  }

  // View
  if (scene->fogEnabled() && mesh->applyFog() && scene->fogMode() != Scene::FOGMODE_NONE) {
    _activeEffect->setMatrix("view", scene->getViewMatrix());
  }

  // Fog
  MaterialHelper::BindFogParameters(scene, mesh, _activeEffect);

  // Log. depth
  MaterialHelper::BindLogDepth(defines, _activeEffect.get(), scene);

  // Water
  if (MaterialFlags::ReflectionTextureEnabled()) {
    _activeEffect->setTexture("refractionSampler", _refractionRTT);
    _activeEffect->setTexture("reflectionSampler", _reflectionRTT);
  }

  auto wrvp
    = _mesh->getWorldMatrix().multiply(_reflectionTransform).multiply(scene->getProjectionMatrix());

  // Add delta time. Prevent adding delta time if it hasn't changed.
  auto deltaTime = scene->getEngine()->getDeltaTime();
  if (!stl_util::almost_equal(deltaTime, _lastDeltaTime)) {
    _lastDeltaTime = deltaTime;
    _lastTime += _lastDeltaTime;
  }

  _activeEffect->setMatrix("worldReflectionViewProjection", wrvp);
  _activeEffect->setVector2("windDirection", windDirection);
  _activeEffect->setFloat("waveLength", waveLength);
  _activeEffect->setFloat("time", _lastTime / 100000.f);
  _activeEffect->setFloat("windForce", windForce);
  _activeEffect->setFloat("waveHeight", waveHeight);
  _activeEffect->setFloat("bumpHeight", bumpHeight);
  _activeEffect->setColor4("waterColor", waterColor, 1.0);
  _activeEffect->setFloat("colorBlendFactor", colorBlendFactor);
  _activeEffect->setColor4("waterColor2", waterColor2, 1.0);
  _activeEffect->setFloat("colorBlendFactor2", colorBlendFactor2);
  _activeEffect->setFloat("waveSpeed", waveSpeed);
  _activeEffect->setFloat("waveCount", waveCount);

  // image processing
  if (_imageProcessingConfiguration && !_imageProcessingConfiguration->applyByPostProcess()) {
    _imageProcessingConfiguration->bind(_activeEffect.get());
  }

  _afterBind(mesh, _activeEffect);
}

void WaterMaterial::_createRenderTargets(Scene* scene, const Vector2& renderTargetSize)
{
  auto renderTargetSizeX = static_cast<int>(renderTargetSize.x);
  auto renderTargetSizeY = static_cast<int>(renderTargetSize.y);

  // Render targets
  _refractionRTT = RenderTargetTexture::New(
    name + "_refraction", RenderTargetSize{renderTargetSizeX, renderTargetSizeY}, scene, false,
    true, Constants::TEXTURETYPE_UNSIGNED_INT, false, TextureConstants::TRILINEAR_SAMPLINGMODE,
    true, false);
  _refractionRTT->wrapU                = Constants::TEXTURE_MIRROR_ADDRESSMODE;
  _refractionRTT->wrapV                = Constants::TEXTURE_MIRROR_ADDRESSMODE;
  _refractionRTT->ignoreCameraViewport = true;

  _reflectionRTT = RenderTargetTexture::New(
    name + "_reflection", RenderTargetSize{renderTargetSizeX, renderTargetSizeY}, scene, false,
    true, Constants::TEXTURETYPE_UNSIGNED_INT, false, TextureConstants::TRILINEAR_SAMPLINGMODE,
    true, false);
  _reflectionRTT->wrapU                = Constants::TEXTURE_MIRROR_ADDRESSMODE;
  _reflectionRTT->wrapV                = Constants::TEXTURE_MIRROR_ADDRESSMODE;
  _reflectionRTT->ignoreCameraViewport = true;

  _refractionRTT->onBeforeRender = [this](int* /*faceIndex*/, EventState& /*es*/) {
    if (_mesh) {
      _isVisible       = _mesh->isVisible;
      _mesh->isVisible = false;
    }
    // Clip plane
    if (!disableClipPlane) {
      _clipPlane = getScene()->clipPlane;

      auto positiony        = _mesh ? _mesh->position().y : 0.f;
      getScene()->clipPlane = Plane::FromPositionAndNormal(Vector3(0.f, positiony + 0.05f, 0.f),
                                                           Vector3(0.f, 1.f, 0.f));
    }
  };

  _refractionRTT->onAfterRender = [this](int* /*faceIndex*/, EventState& /*es*/) {
    if (_mesh) {
      _mesh->isVisible = _isVisible;
    }

    // Clip plane
    if (!disableClipPlane) {
      getScene()->clipPlane = _clipPlane;
    }
  };

  _reflectionRTT->onBeforeRender = [this](int* /*faceIndex*/, EventState& /*es*/) {
    if (_mesh) {
      _isVisible       = _mesh->isVisible;
      _mesh->isVisible = false;
    }

    auto scene = getScene();

    // Clip plane
    if (!disableClipPlane) {
      _clipPlane = scene->clipPlane;

      float positiony  = _mesh ? _mesh->position().y : 0.f;
      scene->clipPlane = Plane::FromPositionAndNormal(Vector3(0.f, positiony - 0.05f, 0.f),
                                                      Vector3(0.f, -1.f, 0.f));

      Matrix::ReflectionToRef(*scene->clipPlane, _mirrorMatrix);
    }

    // Transform
    _savedViewMatrix = scene->getViewMatrix();

    _mirrorMatrix.multiplyToRef(_savedViewMatrix, _reflectionTransform);
    Matrix projectionMatrix = scene->getProjectionMatrix();
    scene->setTransformMatrix(_reflectionTransform, projectionMatrix);
    scene->getEngine()->cullBackFaces = false;
    scene->setMirroredCameraPosition(
      Vector3::TransformCoordinates(scene->activeCamera()->position, _mirrorMatrix));
  };

  _reflectionRTT->onAfterRender = [this](int* /*faceIndex*/, EventState& /*es*/) {
    if (_mesh) {
      _mesh->isVisible = _isVisible;
    }

    auto scene = getScene();

    // Clip plane
    scene->clipPlane = _clipPlane;

    // Transform
    auto projectionMatrix = scene->getProjectionMatrix();
    scene->setTransformMatrix(_savedViewMatrix, projectionMatrix);
    scene->getEngine()->cullBackFaces = true;
    scene->_mirroredCameraPosition    = nullptr;
  };
}

std::vector<IAnimatablePtr> WaterMaterial::getAnimatables()
{
  std::vector<IAnimatablePtr> results;

  if (_bumpTexture && _bumpTexture->animations.size() > 0) {
    results.emplace_back(_bumpTexture);
  }
  if (_reflectionRTT && _reflectionRTT->animations.size() > 0) {
    results.emplace_back(_reflectionRTT);
  }
  if (_refractionRTT && _refractionRTT->animations.size() > 0) {
    results.emplace_back(_refractionRTT);
  }

  return results;
}

std::vector<BaseTexturePtr> WaterMaterial::getActiveTextures() const
{
  auto activeTextures = PushMaterial::getActiveTextures();

  if (_bumpTexture) {
    activeTextures.emplace_back(_bumpTexture);
  }

  return activeTextures;
}

bool WaterMaterial::hasTexture(const BaseTexturePtr& texture) const
{
  if (PushMaterial::hasTexture(texture)) {
    return true;
  }

  if (_bumpTexture == texture) {
    return true;
  }

  return false;
}

void WaterMaterial::dispose(bool forceDisposeEffect, bool forceDisposeTextures,
                            bool /*notBoundToMesh*/)
{
  if (_bumpTexture) {
    _bumpTexture->dispose();
  }

  getScene()->customRenderTargets.erase(std::remove(getScene()->customRenderTargets.begin(),
                                                    getScene()->customRenderTargets.end(),
                                                    _refractionRTT),
                                        getScene()->customRenderTargets.end());

  getScene()->customRenderTargets.erase(std::remove(getScene()->customRenderTargets.begin(),
                                                    getScene()->customRenderTargets.end(),
                                                    _reflectionRTT),
                                        getScene()->customRenderTargets.end());

  if (_reflectionRTT) {
    _reflectionRTT->dispose();
    _reflectionRTT = nullptr;
  }
  if (_refractionRTT) {
    _refractionRTT->dispose();
    _refractionRTT = nullptr;
  }

  // Remove image-processing observer
  if (_imageProcessingConfiguration && _imageProcessingObserver) {
    _imageProcessingConfiguration->onUpdateParameters.remove(_imageProcessingObserver);
  }

  PushMaterial::dispose(forceDisposeEffect, forceDisposeTextures);
}

MaterialPtr WaterMaterial::clone(const std::string& /*name*/, bool /*cloneChildren*/) const
{
  return nullptr;
}

json WaterMaterial::serialize() const
{
  return nullptr;
}

std::string WaterMaterial::getClassName() const
{
  return "WaterMaterial";
}

WaterMaterial* WaterMaterial::Parse(const json& /*source*/, Scene* /*scene*/,
                                    const std::string& /*rootUrl*/)
{
  return nullptr;
}

MeshPtr WaterMaterial::CreateDefaultMesh(const std::string& iName, Scene* scene)
{
  auto mesh = Mesh::CreateGround(iName, 512, 512, 32, scene, false);
  return mesh;
}

} // end of namespace MaterialsLibrary
} // end of namespace BABYLON


text:
echo "start - cleanup"
rm -rf /tmp/*
rm -f /var/log/wtmp
rm -f /var/log/btmp
yum clean all
history -c
echo "end - cleanup"


text:
Deploy
======

```
  ;; Clone the repo
  $ git clone https://github.com/HeinrichHartmann/LiveGovWP1.git

  ;; Checkout the right branch
  $ git checkout -b nodeInspection

  ;; Install dependencies
  $ cd server/NodeInspectionFrontEnd && npm install

  ;; Edit the config.js to use your database information.
  $ $EDITOR config.js

  ;; Run the server
  $ node app.js

  ;; Or use pm2
  $ pm2 stopAll
  $ pm2 start app.js -i max

```


text:
Template.ah_post_title_and_content.helpers({
  getBodyTemplateName: function() {
    // Return the full body if we're on a post detail page, and a teaser
    // otherwise.
    if (_.contains(["post_page"], Router.current().route.getName())) {
      return "post_body";
    }
    return "ah_post_teaser";
  },
  can_edit: function() {
    return Users.can.edit(Meteor.user(), this);
  }
});


text:
using Microsoft.Extensions.DependencyInjection;
using QIP.Public.IRepositories;

namespace QIP.Repositories.Extensions.DependencyInjection {
    public static class RepositoriesExtensions {
        public static IServiceCollection AddRepositories(this IServiceCollection services) {
            //Scoped lifetime services are created once per request.
            //Sem estado mas sem razão para criar uma instancia por utilização
            services.AddScoped<SqlServerTemplate>();

            services.AddScoped<IFigureIdRepository, FigureIdRepository>();
            services.AddScoped<IPreferencesRepository, PreferencesRepository>();
            services.AddScoped<IBoardRepository, BoardRepository>();
            services.AddScoped<IImageRepository, ImageRepository>();
            services.AddScoped<ILineRepository, LineRepository>();
            services.AddScoped<ILineStyleRepository, LineStyleRepository>();
            services.AddScoped<IUsersBoardsRepository, UsersBoardsRepository>();
            services.AddScoped<IAuth0ManagementRepository, Auth0ManagementRepository>();
            services.AddScoped<IFiguresRepository, FiguresRepository>();

            return services;
        }
    }
}


text:
package com.eharmony.aloha.io.multiple

import com.eharmony.aloha.io.NonFileReadable
import com.eharmony.aloha.io.sources.{ReaderReadableSource, InputStreamReadableSource, StringReadableSource, NonFileReadableLikeSource}

/** Allows us to read in bulk from non-file-oriented resources by delegating to
  * [[com.eharmony.aloha.io.NonFileReadable]].
  *
  * @tparam A the readable sources.  This allows objects that mix in only a subset of Readable interfaces to have type
  *           safety when trying to parse multiple sources.  This allows the programmer to use the type system instead
  *           of needing to deal with cases that shouldn't exists.  For instance, imagine implementing just
  *           NonFileReadable.  Then, we shouldn't have to test for cases where the readable source refers to a File.
  *           The type hierarchy of ReadableSource allows this.
  */
trait MultipleNonFileReadable[A] extends MultipleReadable[NonFileReadableLikeSource, A] { self: NonFileReadable[A] =>
    val mapper = (_: NonFileReadableLikeSource) match {
        case StringReadableSource(s) => fromString(s)
        case InputStreamReadableSource(is) => fromInputStream(is)
        case ReaderReadableSource(r) => fromReader(r)
    }
}


text:
from __future__ import unicode_literals
import codecs
import fnmatch
import os

__author__ = 'flanker'

def render_directory_html(self, node, directory, root, options):
    filenames = os.listdir(directory)
    cls = ''
    if node['options'].get('class'):
        cls = ' class="%s"' % node['options']['class']
    glob_txt = node['options'].get('glob')
    regexp = node['options'].get('regexp')
    desc_ext = node['options'].get('desc_ext')
    content = "
" % cls
    for filename in filenames:
        if glob_txt and not fnmatch.fnmatch(filename, glob_txt):
            continue
        if regexp and not regexp.match(filename):
            continue
        fullpath = os.path.join(directory, filename)
        if not os.path.isfile(fullpath):
            continue
        if filename.startswith('.'):
            continue
        relpath = os.path.relpath(fullpath, root)
        ext = os.path.splitext(relpath)[1]
        if ext == desc_ext:
            continue
        link = "%s" % (relpath, filename)
        if desc_ext:
            desc_path = fullpath + desc_ext
            if os.path.isfile(desc_path):
                with codecs.open(desc_path, 'r', encoding='utf-8') as desc_fd:
                    link += "%s" % desc_fd.read()
        content += "
%s
\n" % (ext, link)
    content += "
"

    self.body.append(content)

def visit_folder_node(self, node):
    render_directory_html(self, node, node['directory'], node['root'], node['options'])

def depart_folder_node(self, node):
    return


text:
import type {
  Disposable,
  Scheduler,
} from '../../Rx';

import * as Disposables from '../../Disposables';

export const schedule = function(
  action: () => ?Disposable,
  delay?: number,
): Disposable {
  (this: Scheduler);

  return this.schedule(
    action,
    (scheduler, state) => state() || Disposables.empty,
  );
};


text:
<?php

/**
 * Subclass for performing query and update operations on the 'sf_spy_event' table.
 *
 *
 *
 * @package plugins.sfSpyPlugin.lib.model
 */
class sfSpyEventPeer extends BasesfSpyEventPeer
{
  const PAGE_TYPE   = 'page';
  const RELOAD_TYPE = 'reload';
  const POST_TYPE   = 'post';
}


text:
<?php
if($this->campaign_data){

	$campaigns = array_reverse($this->campaign_data, true);
	$deleted = 0;

	foreach($campaigns as $id => $data){
		$campaign = get_post($id);
		if(!$campaign){
			$deleted++;
			continue;
		}
?>

<?php echo $campaign->post_title?> <a href="post.php?post=<?php echo $campaign->ID ?>&action=edit">view

<?php _e('sent', 'mymail') ?>	<?php _e('opened', 'mymail') ?>	<?php _e('first click', 'mymail') ?>	<?php _e('clicks', 'mymail') ?>	<?php _e('unique clicks', 'mymail') ?>

		<?php echo isset($this->campaign_data[$id]['sent']) ? date(get_option('date_format').' '.get_option('time_format'), $this->campaign_data[$id]['timestamp']) : _e('not yet', 'mymail') ?>
		<?php echo isset($this->campaign_data[$id]['open']) ? date(get_option('date_format').' '.get_option('time_format'), $this->campaign_data[$id]['open']) : _e('not yet', 'mymail') ?>
		<?php echo isset($this->campaign_data[$id]['firstclick']) ? date(get_option('date_format').' '.get_option('time_format'), $this->campaign_data[$id]['firstclick']) : _e('never', 'mymail') ?>
		<?php echo isset($this->campaign_data[$id]['totalclicks']) ? $this->campaign_data[$id]['totalclicks'] : '-' ?>
		<?php echo isset($this->campaign_data[$id]['totaluniqueclicks']) ? $this->campaign_data[$id]['totaluniqueclicks'] : '-' ?>

			<?php _e('Clicks', 'mymail') ?>

			<?php if(isset($this->campaign_data[$id]['clicks'])){?>

			<?php
			foreach($this->campaign_data[$id]['clicks'] as $uri => $count){
				echo '
'.$uri.' ('.$count.')
';
			}
			?>

			<?php

			}else{ _e('No clicks yet', 'mymail');}?>

<?php
	}
	if($deleted) echo '
'.sprintf (_n('%d campaign was deleted', '%d campaigns where deleted', $deleted, 'mymail'), $deleted).'
';
?>
<?php
}else{
?>

<?php _e('This subscriber has never recieved any newsletter', 'mymail') ?>

<?php
}
?>


text:
package org.immutables.mongo.types;

import java.util.Arrays;
import javax.annotation.concurrent.Immutable;
import org.bson.types.ObjectId;

/**
 * Represents ObjectId type from MongoDB. Usually when modelling documents there's no
 * much need to use special {@link Id} type, other types will perfectly work. But to easily bind to
 * {@code ObjectID} when you need it, just use this class.
 *

 *
 * Internal data structure will be changed for version 3.x of Mongo Java Driver to adhere to
 * specification.
 * Use this class as opaque storage, i.e. not for reading and manipulation with individual
 * components.
 * In this version of class there are no separate fields, just a byte array, to further guarantee
 * this.
 *
 */
@Immutable
public final class Id {
  private final byte[] data;

  private Id(byte[] data) {
    this.data = data;
  }

  /**
   * Construct {@link Id} instance by parsing supplied string. {@link #toString()} Could then
   * convert back to string representation.
   * @param string hexadecimal formatted string
   * @return id object that corresponds to
   */
  public static Id fromString(String string) {
    return from(new ObjectId(string));
  }

  public static Id from(byte[] data) {
    return new Id(data.clone());
  }

  private static Id from(ObjectId objectId) {
    return new Id(objectId.toByteArray());
  }

  public byte[] value() {
    return data.clone();
  }

  /**
   * Generate new Id, based on machine/process, current seconds and inrementing counter.
   * Should be treated as opaque holder though.
   * @return the id
   */
  public static Id generate() {
    return from(ObjectId.get());
  }

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

  @Override
  public boolean equals(Object other) {
    if (this == other) {
      return true;
    }
    if (other instanceof Id) {
      Id id = (Id) other;
      return Arrays.equals(data, id.data);
    }
    return false;
  }

  /**
   * Returns {@link #fromString(String) parsable} representation of Id.
   * @return hexadecimal formatted string.
   */
  @Override
  public String toString() {
    return new ObjectId(data).toString();
  }
}


text:
define(["jquery", "backbone", "models/HomeModel", "text!templates/Home.html"],

    function($, Backbone, Model, template){

        var HomeView = Backbone.View.extend({

            // The DOM Element associated with this view
            el: ".magic",

            // View constructor
            initialize: function() {

                // Calls the view's render method
                this.render();

            },

            // View Event Handlers
            events: {

            },

            // Renders the view's template to the UI
            render: function() {

                // Setting the view's template property using the Underscore template method
                this.template = _.template(template, {});

                // Dynamically updates the UI with the view's template
                this.$el.html(this.template);

                // Maintains chainability
                return this;

            }

        });

        // Returns the View class
        return HomeView;

    }

);

// var data = [4, 8, 15, 16, 23, 42];

// d3.select(".chart")
//   .selectAll("div")
//     .data(data)
//   .enter().append("div")
//     .style("width", function(d) { return d * 20 + "px"; })
//     .text(function(d) { return d; });


text:
/**
 * Internal dependencies
 */
import './style.scss';


text:
package io.github.lionell.formulas;

import io.github.lionell.containers.Sequence;
import io.github.lionell.miscellaneous.LogicalValue;

import java.util.Set;

/**
 * Created by lionell on 08.12.2015.
 *
 * @author Ruslan Sakevych
 */
public abstract class Formula {
    protected LogicalValue value = LogicalValue.UNKNOWN;

    public abstract boolean isAtomic();

    public abstract boolean isSimple();

    public abstract Sequence[] expand(Sequence sigma);

    public abstract void rename(String from, String to);

    public abstract Set<String> getFreeVariableNames();

    public abstract Set<String> getVariableNames();

    public abstract Formula clone();

    public LogicalValue getValue() {
        return value;
    }

    public void setValue(LogicalValue value) {
        this.value = value;
    }

    public boolean isEvaluated() {
        return value != LogicalValue.UNKNOWN;
    }
}


text:
EasyWiki - Wiki Read Mode (Name Changed)
==============

**Code Name: `EW`**

**Chrome Extension** to make **wikipedia or any wiki template** based website user firendly and more accessible.

**Current Status: `beta version released`**

**Latest Available verion: `0.4.1`**

**Installation URL:** [Chrome store](https://chrome.google.com/webstore/detail/wikipedia-read-mode/icnpgdbaooggmkndmiaogcokgmpdfdmc), [Not officialy released, but anyone with link can try]

**Project URL:** [Cistoner - projects](http://cistoner.org/projects/easywiki)

![Banner](https://raw.githubusercontent.com/mebjas/Wiki-Read-Mode/master/graphics/facebook%20publicity%20main.jpg)
How to use or contribute
==========
1. Simply install from [Chrome store](https://chrome.google.com/webstore/detail/wikipedia-read-mode/icnpgdbaooggmkndmiaogcokgmpdfdmc).

###OR

1. Clone this repo
2. compress the folder to a zip
3. Open `chrome://extensions` & `enable developer mode`
4. Load Unpacked Extensions, and select the zip! you are ready to use this

Features:
==========
- [x] User can switch **read mode** `ON` or `OFF`
- [x] Change the settings from dock.
- [x] Chage font or font size of text in wiki.
- [x] Search for any other content wiki directly from any page.
- [x] Get quick information about any topic using instant search feature
- [x] Drag and move instant search dialog
- [x] Enable/Disable readmode using shortcut `Shift + R`.
- [x] Hides the left sidebar (basically useless) while in readmode.
- [x] Inpage menu show / hides depending on scroll (similar to search bar in google now).
- [x] Show / Hide links in the article. (@todo: add a shortcut for this)
- [x] Show / Hide references in the article. (@todo: add a shortcut for this)
- [ ] Set any page to `Never Modify this page` Mode

Screenshots:
============
![Screenshot 1](https://raw.githubusercontent.com/mebjas/Wiki-Read-Mode/master/graphics/1280x800_i2.jpg)
![Screenshot 2](https://raw.githubusercontent.com/mebjas/Wiki-Read-Mode/master/graphics/1280x800_i1.jpg)
![Screenshot 3](https://raw.githubusercontent.com/mebjas/Wiki-Read-Mode/master/graphics/1280x800_i3.jpg)
![Screenshot 4](https://raw.githubusercontent.com/mebjas/Wiki-Read-Mode/master/graphics/1280x800_i4.jpg)


text:
<?php

/**
 * Description of EmployeeAttachmentTypeValue
 *
 * @author ben.dokter
 */
require_once('application/model/value/BaseDatabaseValue.class.php');

class EmployeeAttachmentTypeValue extends BaseDatabaseValue
{
    const NORMAL                = 1;
    const ASSESSMENT_EVALUATION = 2;

    static function values()
    {
        return array(
            EmployeeAttachmentTypeValue::NORMAL,
            EmployeeAttachmentTypeValue::ASSESSMENT_EVALUATION
            );
    }

    static function isValidValue($value)
    {
        return self::isAllowedValue($value, self::values(), BaseDatabaseValue::VALUE_REQUIRED);
    }
}
?>


text:
package com.serfshack.jobwrangler.core.concurrencypolicy;

import com.serfshack.jobwrangler.core.Dependable;
import com.serfshack.jobwrangler.core.Job;

/**
 * Ensures only one Job with this policy runs at a time. Can be combined with a start delay to implement
 * throttling/debouncing strategies.
 *
 * If an existing job matches, the existing job's assimilate() is called with the candidate and the
 * candidate job is canceled.
 */
public class SingletonPolicyKeepExisting extends AbstractConcurrencyPolicy {

    public SingletonPolicyKeepExisting(Object... key) {
        super(key);
    }

    @Override
    public void onCollision(Job existing, Job candidate) {
        if (existing == candidate || existing.getId().equals(candidate.getId()))
            return;

        if (existing.assimilate(candidate))
            candidate.setAssimilatedBy(existing);
        else
            candidate.addDepended(existing, Dependable.DependencyFailureStrategy.IGNORE_FAILURE);
    }
}


text:
package org.apache.cassandra.db.compaction;

import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.util.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.apache.cassandra.utils.Clock.Global.nanoTime;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import org.apache.cassandra.SchemaLoader;
import org.apache.cassandra.Util;
import org.apache.cassandra.cache.ChunkCache;
import org.apache.cassandra.config.*;
import org.apache.cassandra.db.*;
import org.apache.cassandra.db.marshal.LongType;
import org.apache.cassandra.exceptions.ConfigurationException;
import org.apache.cassandra.io.sstable.format.SSTableReader;
import org.apache.cassandra.io.util.File;
import org.apache.cassandra.io.util.FileUtils;
import org.apache.cassandra.schema.*;

import static org.junit.Assert.assertTrue;

public class CorruptedSSTablesCompactionsTest
{
    private static final Logger logger = LoggerFactory.getLogger(CorruptedSSTablesCompactionsTest.class);

    private static Random random;

    private static final String KEYSPACE1 = "CorruptedSSTablesCompactionsTest";
    private static final String STANDARD_STCS = "Standard_STCS";
    private static final String STANDARD_LCS = "Standard_LCS";
    private static int maxValueSize;

    @After
    public void leakDetect() throws InterruptedException
    {
        System.gc();
        System.gc();
        System.gc();
        Thread.sleep(10);
    }

    @BeforeClass
    public static void defineSchema() throws ConfigurationException
    {
        long seed = nanoTime();

        //long seed = 754271160974509L; // CASSANDRA-9530: use this seed to reproduce compaction failures if reading empty rows
        //long seed = 2080431860597L; // CASSANDRA-12359: use this seed to reproduce undetected corruptions
        //long seed = 9823169134884L; // CASSANDRA-15879: use this seed to reproduce duplicate clusterings

        logger.info("Seed {}", seed);
        random = new Random(seed);

        SchemaLoader.prepareServer();
        SchemaLoader.createKeyspace(KEYSPACE1,
                                    KeyspaceParams.simple(1),
                                    makeTable(STANDARD_STCS).compaction(CompactionParams.DEFAULT),
                                    makeTable(STANDARD_LCS).compaction(CompactionParams.lcs(Collections.emptyMap())));

        maxValueSize = DatabaseDescriptor.getMaxValueSize();
        DatabaseDescriptor.setMaxValueSize(1024 * 1024);
        closeStdErr();
    }

    /**
     * Return a table metadata, we use types with fixed size to increase the chance of detecting corrupt data
     */
    private static TableMetadata.Builder makeTable(String tableName)
    {
        return SchemaLoader.standardCFMD(KEYSPACE1, tableName, 1, LongType.instance, LongType.instance, LongType.instance);
    }

    @AfterClass
    public static void tearDown()
    {
        DatabaseDescriptor.setMaxValueSize(maxValueSize);
    }

    public static void closeStdErr()
    {
        // These tests generate an error message per CorruptSSTableException since it goes through
        // ExecutorPlus, which will log it in afterExecute.  We could stop that by
        // creating custom CompactionStrategy and CompactionTask classes, but that's kind of a
        // ridiculous amount of effort, especially since those aren't really intended to be wrapped
        // like that.
        System.err.close();
    }

    @Test
    public void testCorruptedSSTablesWithSizeTieredCompactionStrategy() throws Exception
    {
        testCorruptedSSTables(STANDARD_STCS);
    }

    @Test
    public void testCorruptedSSTablesWithLeveledCompactionStrategy() throws Exception
    {
        testCorruptedSSTables(STANDARD_LCS);
    }

    public void testCorruptedSSTables(String tableName) throws Exception
    {
        // this test does enough rows to force multiple block indexes to be used
        Keyspace keyspace = Keyspace.open(KEYSPACE1);
        final ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(tableName);

        final int ROWS_PER_SSTABLE = 10;
        final int SSTABLES = cfs.metadata().params.minIndexInterval * 2 / ROWS_PER_SSTABLE;
        final int SSTABLES_TO_CORRUPT = 8;

        assertTrue(String.format("Not enough sstables (%d), expected at least %d sstables to corrupt", SSTABLES, SSTABLES_TO_CORRUPT),
                   SSTABLES > SSTABLES_TO_CORRUPT);

        // disable compaction while flushing
        cfs.disableAutoCompaction();
        //test index corruption
        //now create a few new SSTables
        long maxTimestampExpected = Long.MIN_VALUE;
        Set<DecoratedKey> inserted = new HashSet<>();

        for (int j = 0; j < SSTABLES; j++)
        {
            for (int i = 0; i < ROWS_PER_SSTABLE; i++)
            {
                DecoratedKey key = Util.dk(String.valueOf(i), LongType.instance);
                long timestamp = j * ROWS_PER_SSTABLE + i;
                new RowUpdateBuilder(cfs.metadata(), timestamp, key.getKey())
                        .clustering(Long.valueOf(i))
                        .add("val", Long.valueOf(i))
                        .build()
                        .applyUnsafe();
                maxTimestampExpected = Math.max(timestamp, maxTimestampExpected);
                inserted.add(key);
            }
            Util.flush(cfs);
            CompactionsTest.assertMaxTimestamp(cfs, maxTimestampExpected);
            assertEquals(inserted.toString(), inserted.size(), Util.getAll(Util.cmd(cfs).build()).size());
        }

        Collection<SSTableReader> sstables = cfs.getLiveSSTables();
        int currentSSTable = 0;

        // corrupt first 'sstablesToCorrupt' SSTables
        for (SSTableReader sstable : sstables)
        {
            if (currentSSTable + 1 > SSTABLES_TO_CORRUPT)
                break;

            FileChannel fc = null;

            try
            {
                int corruptionSize = 100;
                fc = new File(sstable.getFilename()).newReadWriteChannel();
                assertNotNull(fc);
                assertTrue(fc.size() > corruptionSize);
                long pos = random.nextInt((int)(fc.size() - corruptionSize));
                logger.info("Corrupting sstable {} [{}] at pos {} / {}", currentSSTable, sstable.getFilename(), pos, fc.size());
                fc.position(pos);
                // We want to write something large enough that the corruption cannot get undetected
                // (even without compression)
                byte[] corruption = new byte[corruptionSize];
                random.nextBytes(corruption);
                fc.write(ByteBuffer.wrap(corruption));
                if (ChunkCache.instance != null)
                    ChunkCache.instance.invalidateFile(sstable.getFilename());

            }
            finally
            {
                FileUtils.closeQuietly(fc);
            }

            currentSSTable++;
        }

        int failures = 0;

        // in case something will go wrong we don't want to loop forever using for (;;)
        for (int i = 0; i < sstables.size(); i++)
        {
            try
            {
                cfs.forceMajorCompaction();
            }
            catch (Exception e)
            {
                // kind of a hack since we're not specifying just CorruptSSTableExceptions, or (what we actually expect)
                // an ExecutionException wrapping a CSSTE.  This is probably Good Enough though, since if there are
                // other errors in compaction presumably the other tests would bring that to light.
                failures++;
                continue;
            }
            break;
        }

        cfs.truncateBlocking();
        assertEquals(SSTABLES_TO_CORRUPT, failures);
    }
}


text:
require 'rqrcode'
require 'qrcoder/size_calculator.rb'
require 'qrcoder/renderers/svg.rb'
require 'mini_magick'

module QRCoder
  extend SizeCalculator

  class QRCodeError < StandardError; end

  class QRCode
    IMAGE_FORMATS = [:jpg , :png, :gif, :tif, :bmp]

    class << self

      #
      # Create qr image or images
      #
      # == Parameters
      #
      # * text    <tt>String</tt> -- String for qrcode
      # * output  <tt>String</tt> -- String for path where to save files
      # * options <tt>Hash</tt>   -- Hash with options
      #
      # === Options
      #
      # * :format   - Array or symbol. Allowed formats are :png, :bmp, :svg, :jpg, :gif and :tif
      # * :filename - String for filename without extension. Extension will be added automaticly.
      # * :size     - This controls how big the QR Code will be. Smallest size will be chosen by default. Set to maintain consistent size.
      # * :level    - The error correction level, can be:
      #   * Level :l 7%  of code can be restored
      #   * Level :m 15% of code can be restored
      #   * Level :q 25% of code can be restored
      #   * Level :h 30% of code can be restored (default :h)
      # * :offset - Padding around the QR Code (e.g. 10)
      # * :unit   - How many pixels per module (e.g. 11)
      # * :fill   - Background color (e.g "ffffff" or :white)
      # * :color  - Foreground color for the code (e.g. "000000" or :black)
      #
      # === Example
      #
      #  QRCode.image("some text", "/home/user/", :format => [:png, :svg], :filename => "simple_test"
      #  QRCode.image("some text", "/home/user/", :format => :png, :filename => "simple_test" , :unit => 12
      #
      def image text, output, options
        formats = []
        if options[:format].kind_of? Array
          formats = options[:format]
        else
          formats << options[:format] || :png
        end
        filename = options[:filename] || text
        svg      = self.svg(text, options)

        err_f = formats - IMAGE_FORMATS - [:svg]
        raise QRCodeError.new("#{err_f.join(', ')} is not supported file formats") unless(err_f.empty?)

        begin
          formats.each do |format|
            if IMAGE_FORMATS.include?(format)
              image = MiniMagick::Image.read(svg) { |i| i.format "svg" }
              image.format format.to_s
              image.write "#{output}/#{filename}.#{format}"
            else
              data = svg
              file = File.new("#{output}/#{filename}.#{format}", "w")
              file.write(data)
              file.close
            end
          end
        rescue
          raise QRCodeError.new "File saving error"
        end
      end

      # Create qr code svg output response
      # * text    <tt>String</tt> -- String for qrcode
      # * options <tt>Hash</tt>   -- Hash with options
      #
      # === Options
      #
      # * :format   - Array or symbol. Allowed formats are :png, :bmp, :svg, :jpg, :gif and :tif
      # * :filename - String for filename without extension. Extension will be added automaticly.
      # * :size     - This controls how big the QR Code will be. Smallest size will be chosen by default. Set to maintain consistent size.
      # * :level    - The error correction level, can be:
      #   * Level :l 7%  of code can be restored
      #   * Level :m 15% of code can be restored
      #   * Level :q 25% of code can be restored
      #   * Level :h 30% of code can be restored (default :h)
      # * :offset - Padding around the QR Code (e.g. 10)
      # * :unit   - How many pixels per module (e.g. 11)
      # * :fill   - Background color (e.g "ffffff" or :white)
      # * :color  - Foreground color for the code (e.g. "000000" or :black)
      #
      def svg text, options ={}
        size   = options[:size]  || QRCoder.minimum_qr_size_from_string(text)
        level  = options[:level] || :h
        qrcode = RQRCode::QRCode.new(text, :size => size, :level => level)
        QRCoder::Renderers::SVG::render(qrcode, options)
      end

      IMAGE_FORMATS.each do |format|
        define_method format.to_s do |text, output, options|
          options[:format] = [format]
          self.image text, output, options
        end
      end
    end
  end

end


text:
<!doctype html><title>WebGL Meeting</title>

<base target='_blank'/>

	WebGL Meeting - Chat with friends in 3D

	Video conference with WebRTC

	3D with three.js thru
	tQuery API
	-
	WebRTC with WebRTC.io library

		<form action="javascript:void(0)" id='newRoomForm'>
			<input type='text' placeholder='New Room'/>
		</form>

		Waiting for someone to join: n/a


text:
Changelog
=========

Release v0.2.2
--------------------
* Caching bucket objects at Connection layer rather than Document layer
* Auto ``'full_set': True`` feature with ``@register_view`` decorator
* Implemented missing ``__ne__`` comparison magic function for Document and CustomField
* Minor email validation fix from Django 1.5.1

Release v0.2.1
--------------------
* Urgent CustomField and Document __eq__ fix (sorry for that)

Release v0.2.0
--------------------
* ``@register_view`` decorator (instead of __view_name__ document property) to use CouchBase views easier
* EmailField.is_valid(email) is implemented and does work
* ViewSync.download() now downloads within their bucket folder and supports spatial views too
* ViewSync.upload() is implemented and does work
* CustomField abstract class can hold any type of value including dictionary
* doc.delete() method that is equal to doc.bucket.delete(doc.doc_id, doc.cas_value)
* Removed CredentialsNotSetError and using RuntimeError instead on connection
* Fixed dependency errors on installation

Release v0.1.2
--------------------
* Include .rst files to prevent setup fail
* Fix None value skipping in retrieved documents
* Unicode encoding of CustomField values

Release v0.1.1
--------------------
* Fix timezone aware datetime/time bug for free list fields
* Fix model document validation bugs
* Removed pragmatic document relations due to complexity
* Exception single/double quote swap
* ChoiceField.iteritems() now returns ChoiceField.CHOICES.iteritems()
* Respect lazy translations in ChoiceField


text:
layout: post
title: Os energúmenos do Portal das Finanças – PARTE II… e também Aldrabões.
date: 2014-05-01 15:33:38.000000000 +01:00
type: post
published: true
status: publish
categories: []
tags: []
meta:
  _rest_api_published: '1'
  _rest_api_client_id: "-1"
  _wpas_facebook_publicize_failure: 'O:13:"Keyring_Error":2:{s:6:"errors";a:1:{s:21:"keyring-request-error";a:1:{i:0;a:5:{s:7:"headers";a:11:{s:16:"www-authenticate";s:158:"OAuth
    "Facebook Platform" "invalid_token" "Error validating access token: Session has
    expired on Sep 13, 2012 4:03pm. The current time is May 1, 2014 7:33am."";s:12:"content-type";s:31:"application/json;
    charset=UTF-8";s:6:"pragma";s:8:"no-cache";s:27:"access-control-allow-origin";s:1:"*";s:8:"x-fb-rev";s:7:"1228717";s:13:"cache-control";s:8:"no-store";s:7:"expires";s:29:"Sat,
    01 Jan 2000 00:00:00 GMT";s:10:"x-fb-debug";s:44:"S3NloScTLGw4oBGqOeUUqCvlXD6dpfi+PRDteLteGG0=";s:4:"date";s:29:"Thu,
    01 May 2014 14:33:40 GMT";s:10:"connection";s:5:"close";s:14:"content-length";s:3:"193";}s:4:"body";s:193:"{"error":{"message":"Error
    validating access token: Session has expired on Sep 13, 2012 4:03pm. The current
    time is May 1, 2014 7:33am.","type":"OAuthException","code":190,"error_subcode":463}}";s:8:"response";a:2:{s:4:"code";i:401;s:7:"message";s:12:"Unauthorized";}s:7:"cookies";a:0:{}s:8:"filename";N;}}}s:10:"error_data";a:0:{}}'
  publicize_facebook_url: https://facebook.com/
  _edit_last: '17187315'
  _wpas_skip_536170: '1'
  _oembed_05c888707a2d8bed2ecae3226148e226: "{{unknown}}"
author:
  login: fmcarvalho
  email: mcarvalho@cc.isel.ipl.pt
  display_name: fmcarvalho
  first_name: ''
  last_name: ''
---

Nunca me regi pelo politicamente correcto e apesar de não ter muito tempo disponível nesta altura, não posso deixar passar mais esta demonstração de incompetência. Em 2011 escrevi este post: http://fmcarvalho.wordpress.com/2011/04/03/energumenos_da_dgci_portal_finanas/

Agora segue-se a 2ª parte. Como desleixado que sou, só ontem, dia 30 de Abril fiz o download da aplicação da DGCI ou ATD para submissão do IRS. Ontem devido a congestionamentos e falta de serviço do portal das finanças não consegui submeter o IRS. Tranquilo, porque já sabia que com isso eles teriam que prorrogar o prazo. O que confirmei hoje: << DESPACHO N.º 160/2014-XIX, DE 30/04 DO SEAF, Prorrogado o prazo para entrega da declaração de rendimentos de IRS (Modelo 3 - rendimentos do trabalho e/ou pensões), até ao dia 2 de maio de 2014.>>

Já com a minha declaração de IRS preenchida, passo à submissão e obtenho a mensagem:

Então mas eu fiz download da aplicação ainda ontem e hoje já têm uma nova versão 2.0??? Vamos lá confirmar, vou novamente à página de download da aplicação do IRS e o que lá encontro:

Data de 29 de Abril. Grandes aldrabões!!!!


text:
var _ = require('lodash');
var ObjectId = require('mongoose').Types.ObjectId;
var async = require('async');
var passport = require('passport');
var crypto = require('crypto');
var https = require('https');
var url = require('url');
var Hashids = require("hashids");

var utils = require("../utils");

var User = require('../models/user');

var hashids = new Hashids("tokenegneratorsalt", 4, "1234567890abcdefghijklmnopqrstuvwxyz");

exports.logout = function (req, res, next) {
    req.logout();
    req.session.destroy(function (err) {
        if (err) { return next(err); }
        return res.status(401).send("logged out");
    });
};

exports.removeFacebook = function(req, res){
    removeProvider(req, res, 'facebook');
};

exports.removeTwitter = function(req, res){
    removeProvider(req, res, 'twitter');
};

exports.removeGoogle = function(req, res){
    removeProvider(req, res, 'google');
};

var removeProvider = function(req, res, provider){

    req.user[provider] = undefined;

    req.user.save(function(err){
        if(err){
            res.status(400);
            res.end();
        }else{
            res.end();
        }
    });
};


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

		<item value="203" key="DIALOG_X_ORIGIN"/>
		<item value="8" key="DIALOG_Y_ORIGIN"/>

		<item value="525" key="dialogHeight"/>
		<item value="768" key="dialogWidth"/>
		<list key="textEntries">
		</list>
		<list key="orderedElements">
		</list>
		<list key="orderedProviders">
		</list>
		<list key="textArray">
		</list>

		<item value="org.eclipse.jdt.ui.wizards.NewClassCreationWizard" key="NewWizardSelectionPage.STORE_SELECTED_ID"/>
		<list key="NewWizardSelectionPage.STORE_EXPANDED_CATEGORIES_ID">
			<item value="org.eclipse.jdt.ui.java"/>
		</list>

		<item value="org.eclipse.jdt.internal.ui.javadocexport.JavadocWizard" key="ImportExportPage.STORE_SELECTED_EXPORT_WIZARD_ID"/>
		<item value="org.eclipse.ui.wizards.import.ExternalProject" key="ImportExportPage.STORE_SELECTED_IMPORT_WIZARD_ID"/>
		<list key="ImportExportPage.STORE_EXPANDED_IMPORT_CATEGORIES">
			<item value="org.eclipse.ui.Basic"/>
		</list>
		<list key="ImportExportPage.STORE_EXPANDED_EXPORT_CATEGORIES">
			<item value="org.eclipse.jdt.ui.Java"/>
		</list>

		<item value="311" key="DIALOG_WIDTH"/>
		<item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/>
		<item value="439" key="DIALOG_HEIGHT"/>
		<item value="365" key="DIALOG_X_ORIGIN"/>
		<item value="80" key="DIALOG_Y_ORIGIN"/>


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.zygon.htm.motor.sensor;

/**
 *
 * @author zygon
 */
public class ReaderPrinter {

}


text:
<?php

namespace Black\Component\Page\Infrastructure\Service;

use Black\Component\Page\Domain\Model\WebPage;
use Black\Component\Page\Domain\Model\WebPageId;
use Black\Component\Page\Domain\Model\WebPageWriteRepository;
use Cocur\Slugify\Slugify;

class WebPageWriteService
{
    /**
     * @var WebPageWriteRepository
     */
    protected $repository;

    /**
     * @var
     */
    protected $class;

    /**
     * @param WebPageWriteRepository $repository
     */
    public function __construct(WebPageWriteRepository $repository)
    {
        $this->repository = $repository;
        $this->class = $repository->getClassName();
    }

    /**
     * @param WebPageId $webPageId
     * @param $author
     * @param $name
     * @return mixed
     */
    public function create(WebPageId $webPageId, $author, $name)
    {
        $slug = (new Slugify())->slugify($name);
        $webPage = new $this->class($webPageId, $author, $name, $slug);

        $this->repository->add($webPage);

        return $webPage;
    }

    /**
     * @param WebPage $webPage
     * @param $headline
     * @param $about
     * @param $text
     * @return WebPage
     */
    public function write(WebPage $webPage, $headline, $about, $text)
    {
        $webPage->write($headline, $about, $text);
        $this->repository->add($webPage);

        return $webPage;
    }

    /**
     * @param WebPage $webPage
     * @param string $dateTime
     * @return WebPage
     */
    public function publish(WebPage $webPage, $dateTime = 'now')
    {
        if ('now' === $dateTime) {
            $dateTime = new \DateTime();
        }

        $webPage->publish($dateTime);
        $this->repository->add($webPage);

        return $webPage;
    }

    /**
     * @param WebPage $webPage
     * @return WebPage
     */
    public function depublish(WebPage $webPage)
    {
        $webPage->depublish();
        $this->repository->add($webPage);

        return $webPage;
    }

    /**
     * @param WebPage $webPage
     * @return WebPage
     */
    public function remove(WebPage $webPage)
    {
        $this->repository->remove($webPage);

        return $webPage;
    }
}


text:
cd "$DOTFILES_PATH" \
  && source "$DOTFILES_PATH/src/os/helpers.sh"

#------------------------------------------------------------------------------#

printf "\n"
print_title "UX/UI preferences"

execute "sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string 'Arbor' \
      && sudo scutil --set ComputerName 'Banff' \
      && sudo scutil --set HostName 'Banff' \
      && sudo scutil --set LocalHostName 'Banff'" \
  "Set computer name"

execute "sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText 'Property of Peter McWilliams. Contact 612-203-1226 if found.'" \
  "Login Screen Note"

execute "defaults write com.apple.menuextra.battery ShowPercent -string 'NO'" \
  "Hide battery percentage from the menu bar"

execute "defaults write com.apple.CrashReporter UseUNC 1" \
  "Make crash reports appear as notifications"

execute "defaults write com.apple.LaunchServices LSQuarantine -bool false" \
  "Disable 'Are you sure you want to open this application?' dialog"

execute "defaults write com.apple.print.PrintingPrefs 'Quit When Finished' -bool true" \
  "Automatically quit the printer app once the print jobs are completed"

execute "defaults write com.apple.screencapture disable-shadow -bool true" \
  "Disable shadow in screenshots"

execute "defaults write com.apple.screencapture location -string '$HOME/Desktop'" \
  "Save screenshots to the Desktop"

execute "defaults write com.apple.screencapture type -string 'png'" \
  "Save screenshots as PNGs"

execute "defaults write com.apple.screensaver askForPassword -int 1 \
      && defaults write com.apple.screensaver askForPasswordDelay -int 0"\
  "Require password immediately after into sleep or screen saver mode"

execute "defaults write -g AppleFontSmoothing -int 2" \
  "Enable subpixel font rendering on non-Apple LCDs"

execute "sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true" \
  "Enable HiDPI display modes (requires restart)"

execute "defaults write -g AppleShowScrollBars -string 'Always'" \
  "Always show scrollbars"

execute "defaults write -g NSDisableAutomaticTermination -bool true" \
  "Disable automatic termination of inactive apps"

execute "defaults write -g NSNavPanelExpandedStateForSaveMode -bool true" \
  "Expand save panel by default"

execute "defaults write -g NSTableViewDefaultSizeMode -int 2" \
  "Set sidebar icon size to medium"

execute "defaults write -g NSUseAnimatedFocusRing -bool false" \
  "Disable the over-the-top focus ring animation"

execute "defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false" \
  "Disable resume system-wide"

execute "defaults write -g PMPrintingExpandedStateForPrint -bool true" \
  "Expand print panel by default"

execute "sudo systemsetup -setrestartfreeze on" \
  "Restart automatically if the computer freezes"

execute "sudo pmset -a standbydelay 86400" \
  "Standby delay set to 24 hours"

execute "defaults write NSGlobalDomain NSWindowResizeTime -float 0.001" \
  "Increase window resize speed for Cocoa applications"

execute "sudo systemsetup -setcomputersleep Off &> /dev/null" \
  "Never go into computer sleep mode"

execute "defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false \
      && defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add 'automaticQuoteSubstitutionEnabled' -bool false" \
  "Disable smart quotes"

execute "defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false" \
  "Disable smart dashes"

execute "defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true" \
  "Display ASCII control characters using caret notation"

execute "defaults write com.apple.helpviewer DevMode -bool true" \
  "Set Help Viewer windows to non-floating mode"

execute "defaults write NSGlobalDomain AppleHighlightColor -string '1.000000 0.749020 0.823529'" \
  "Set highlight color to red"

execute "defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true" \
  "Prevent Time Machine from prompting to use new hard drives as backup volume"

# Dock is the parent process of Dashboard
killall "SystemUIServer" &>/dev/null


text:
FROM busybox
ENV ZOLA_VERSION=0.8.0
RUN wget -O- https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar xz

FROM gcr.io/distroless/cc
ENTRYPOINT ["/zola"]
COPY --from=0 /zola /


text:
import unittest
import db
import ppygis
from datetime import datetime, timedelta
from tracktotrip import Segment, Track, Point, Location

schema = open('./schema.sql', 'r').read()
drop = open('./drop.sql', 'r').read()

class TestDB(unittest.TestCase):
    def setUp(self):
        # A and B are similar
        Aps = [[0.5, 0.5], [1, 1.5], [2, 2.5], [3.5, 3.5], [5.2, 4.5], [7.5, 6.5], [7.9, 8]]
        Bps = [[0.6, 0.5], [1.05, 1.45], [2.1, 2.4], [2.8, 4], [3.5, 5.5], [5, 5.7], [7.8, 5.7], [8.1, 6.5], [8.1, 8]]
        # C intersects B sligthly
        Cps = [[7.8, 6.1], [8.5, 5.5], [9.1, 4.5], [9.5, 3.3], [9.8, 1.7]]
        # D's bounding box doesn't intersect
        Dps = [[11, 1], [11, 2], [11, 3], [10.5, 4.5], [10, 5], [10.5, 5.5], [11, 6]]

        time = datetime.now()
        dt = timedelta(1000)

        def pt_arr_to_track(pts):
            seg = Segment(map(lambda p: Point(None, p[0], p[1], time + dt), pts))
            return Track(name="TripA", segments=[seg])

        self.tripA = pt_arr_to_track(Aps)
        self.tripA.toTrip(name="A")

        self.tripB = pt_arr_to_track(Bps)
        self.tripB.toTrip(name="B")

        self.tripC = pt_arr_to_track(Cps)
        self.tripC.toTrip(name="C")

        self.tripD = pt_arr_to_track(Dps)
        self.tripD.toTrip(name="D")

        conn = db.connectDB()
        cur = conn.cursor()

        cur.execute(drop)
        cur.execute(schema)
        conn.commit()

        self.conn = conn
        self.cur = cur

    def tearDown(self):
        self.cur.execute(drop)
        self.conn.commit()
        self.cur.close()
        self.conn.close()

    def test_insert_new_location(self):
        self.cur.execute("SELECT COUNT(label) FROM locations")
        result = self.cur.fetchone()
        self.assertEqual(result[0], 0)

        p = self.tripA.segments[0].points[0]
        db.insertLocation(self.cur, 'PlaceA', p)

        self.cur.execute("SELECT COUNT(label) FROM locations")
        result = self.cur.fetchone()
        self.assertEqual(result[0], 1)

        self.cur.execute("SELECT label, centroid, point_cluster FROM locations")
        label, centroid, point_cluster = self.cur.fetchone()
        centroid = ppygis.Geometry.read_ewkb(centroid)
        point_cluster = ppygis.Geometry.read_ewkb(point_cluster)

        self.assertEqual(label, "PlaceA")

        self.assertEqual(centroid.x, p.lat)
        self.assertEqual(centroid.y, p.lon)

        self.assertEqual(len(point_cluster.points), 1)
        self.assertEqual(point_cluster.points[0].x, p.lat)
        self.assertEqual(point_cluster.points[0].y, p.lon)

        self.conn.commit()

    def test_insert_existing_location(self):
        self.cur.execute("SELECT COUNT(label) FROM locations")
        result = self.cur.fetchone()
        self.assertEqual(result[0], 0)

        p1 = self.tripA.segments[0].points[0]
        p2 = self.tripA.segments[0].points[1]
        db.insertLocation(self.cur, 'PlaceA', p1)
        db.insertLocation(self.cur, 'PlaceA', p2)

        self.cur.execute("SELECT COUNT(label) FROM locations")
        result = self.cur.fetchone()
        self.assertEqual(result[0], 1)

        self.cur.execute("SELECT label, centroid, point_cluster FROM locations")
        label, centroid, point_cluster = self.cur.fetchone()
        centroid = ppygis.Geometry.read_ewkb(centroid)
        point_cluster = ppygis.Geometry.read_ewkb(point_cluster)

        self.assertEqual(label, "PlaceA")

        self.assertEqual(centroid.x, p1.lat)
        self.assertEqual(centroid.y, p1.lon)

        self.assertEqual(len(point_cluster.points), 2)
        self.assertEqual(point_cluster.points[0].x, p1.lat)
        self.assertEqual(point_cluster.points[0].y, p1.lon)

        self.assertEqual(point_cluster.points[1].x, p2.lat)
        self.assertEqual(point_cluster.points[1].y, p2.lon)

        self.conn.commit()

    def test_insert_transportation_mode(self):
        db.insertLocation(self.cur, "Home", self.tripA.segments[0].points[0])
        db.insertLocation(self.cur, "Work", self.tripA.segments[0].points[-1])

        self.cur.execute("""
                INSERT INTO trips (start_location, end_location, start_date, end_date, bounds, points, timestamps)
                VALUES (%s, %s, %s, %s, %s, %s, %s)
                RETURNING trip_id
                """,
                (   "Home",
                    "Work",
                    self.tripA.segments[0].points[0].time,
                    self.tripA.segments[0].points[-1].time,
                    db.dbBounds(self.tripA.getBounds()),
                    db.dbPoints(self.tripA.segments[0].points),
                    []
                    ))
        trip_id = self.cur.fetchone()
        trip_id = trip_id[0]

        self.cur.execute("SELECT COUNT(mode_id) FROM trips_transportation_modes")
        result = self.cur.fetchone()
        self.assertEqual(result[0], 0)

        tmode = {
                'from': 2,
                'to': 4,
                'label': "Walk"
                }
        self.conn.commit()
        db.insertTransportationMode(self.cur, tmode, trip_id, self.tripA.segments[0])

        self.cur.execute("SELECT COUNT(mode_id) FROM trips_transportation_modes")
        result = self.cur.fetchone()
        self.assertEqual(result[0], 1)

        self.cur.execute("SELECT mode_id, trip_id, label, start_date, end_date, start_index, end_index, bounds FROM trips_transportation_modes")
        mode_id, trip_id, label, start_date, end_date, start_index, end_index, bounds = self.cur.fetchone()
        self.assertEqual(mode_id, trip_id)
        self.assertEqual(label, tmode['label'])
        self.assertEqual(start_index, tmode['from'])
        self.assertEqual(end_index, tmode['to'])
        self.assertEqual(start_date, self.tripA.segments[0].points[tmode['from']].time)
        self.assertEqual(end_date, self.tripA.segments[0].points[tmode['to']].time)
        # TODO assert bounds

        self.conn.commit()

    def assert_bounds(self, postgis_bounds, tt_bounds):
        postgis_bounds = ppygis.Geometry.read_ewkb(postgis_bounds)
        postgis_bounds = postgis_bounds.rings[0].points
        self.assertEquals(postgis_bounds[0].x, tt_bounds[0])
        self.assertEquals(postgis_bounds[0].y, tt_bounds[1])
        self.assertEquals(postgis_bounds[3].x, tt_bounds[2])
        self.assertEquals(postgis_bounds[3].y, tt_bounds[3])

    def assert_points(self, postgis_points, tt_points, timestamps=None):
        postgis_points = ppygis.Geometry.read_ewkb(postgis_points).points
        for i, point in enumerate(postgis_points):
            self.assertEquals(point.x, tt_points[i].lat)
            self.assertEquals(point.y, tt_points[i].lon)
            if timestamps is not None:
                self.assertEquals(timestamps[i], tt_points[i].time)

    def test_insert_segment(self):

        self.tripA.segments[0].location_from = Location.Location("Home", self.tripA.segments[0].points[0])
        self.tripA.segments[0].location_to = Location.Location("Gym", self.tripA.segments[0].points[-1])

        self.tripA.segments[0].transportationModes = [
                {
                    'from': 0,
                    'to': len(self.tripA.segments[0].points) / 2,
                    'label': "Walk" },
                {
                    'from': len(self.tripA.segments[0].points) / 2,
                    'to': len(self.tripA.segments[0].points),
                    'label': "Vehicle" }
                ]

        self.cur.execute("SELECT COUNT(trip_id) FROM trips")
        result = self.cur.fetchone()
        self.assertEqual(result[0], 0)

        self.conn.commit()
        db.insertSegment(self.tripA.segments[0])

        self.cur.execute("SELECT COUNT(trip_id) FROM trips")
        result = self.cur.fetchone()

        self.assertEqual(result[0], 1)

        self.cur.execute("SELECT trip_id, start_location, end_location, start_date, end_date, bounds, points, timestamps FROM trips")

        _, start_location, end_location, start_date, end_date, bounds, points, timestamps = self.cur.fetchone()
        tp = self.tripA.segments[0].points
        self.assertEquals(start_location, "Home")
        self.assertEquals(end_location, "Gym")
        self.assertEquals(start_date, tp[0].time)
        self.assertEquals(end_date, tp[-1].time)
        self.assert_points(points, tp, timestamps=timestamps)
        self.assert_bounds(bounds, self.tripA.getBounds())

        # TODO: assert transp mode insertion & location insertion

        self.conn.commit()

    def test_insert_canonical_trip(self):
        self.tripA.segments[0].location_from = Location.Location("Home", self.tripA.segments[0].points[0])
        self.tripA.segments[0].location_to = Location.Location("Work", self.tripA.segments[0].points[-1])

        db.insertLocation(self.cur, "Home", self.tripA.segments[0].points[0])
        db.insertLocation(self.cur, "Work", self.tripA.segments[0].points[-1])

        self.cur.execute("""
                INSERT INTO trips (start_location, end_location, start_date, end_date, bounds, points, timestamps)
                VALUES (%s, %s, %s, %s, %s, %s, %s)
                RETURNING trip_id
                """,
                (   "Home",
                    "Work",
                    self.tripA.segments[0].points[0].time,
                    self.tripA.segments[0].points[-1].time,
                    db.dbBounds(self.tripA.getBounds()),
                    db.dbPoints(self.tripA.segments[0].points),
                    []
                    ))
        trip_id = self.cur.fetchone()
        trip_id = trip_id[0]

        self.cur.execute("SELECT COUNT(canonical_id) FROM canonical_trips")
        result = self.cur.fetchone()
        self.assertEqual(result[0], 0)

        self.cur.execute("SELECT COUNT(*) FROM canonical_trips_relations")
        result = self.cur.fetchone()
        self.assertEqual(result[0], 0)

        self.conn.commit()
        db.insertCanonicalTrip(self.tripA.segments[0], trip_id)

        self.cur.execute("SELECT COUNT(canonical_id) FROM canonical_trips")
        result = self.cur.fetchone()
        self.assertEqual(result[0], 1)

        self.cur.execute("""
            SELECT canonical_id, start_location, end_location, bounds, points
            FROM canonical_trips
            """)
        canonical_id, start_location, end_location, bounds, points = self.cur.fetchone()
        self.assertEqual(start_location, "Home")
        self.assertEqual(end_location, "Work")
        self.assert_bounds(bounds, self.tripA.segments[0].getBounds())
        self.assert_points(points, self.tripA.segments[0].points)

        self.cur.execute("SELECT canonical_trip, trip FROM canonical_trips_relations")
        r_can_trip, r_trip = self.cur.fetchone()
        self.assertEqual(r_can_trip, canonical_id)
        self.assertEqual(r_trip, trip_id)

        self.conn.commit()

    def test_update_canonical_trip(self):
        self.tripA.segments[0].location_from = Location.Location("Home", self.tripA.segments[0].points[0])
        self.tripA.segments[0].location_to = Location.Location("Work", self.tripA.segments[0].points[-1])
        tripA_id = db.insertSegment(self.tripA.segments[0])

        self.tripB.segments[0].location_from = Location.Location("Home", self.tripB.segments[0].points[0])
        self.tripB.segments[0].location_to = Location.Location("Work", self.tripB.segments[0].points[-1])
        tripB_id = db.insertSegment(self.tripB.segments[0])

        can_id = db.insertCanonicalTrip(self.tripA.segments[0], tripA_id)

        self.conn.commit()
        db.updateCanonicalTrip(can_id, self.tripB.segments[0], tripB_id)

        self.cur.execute("""
            SELECT start_location, end_location, bounds, points
            FROM canonical_trips
            WHERE canonical_id=%s
            """, (can_id, ))
        start_location, end_location, bounds, points = self.cur.fetchone()
        self.assertEqual(start_location, "Home")
        self.assertEqual(end_location, "Work")
        self.assert_bounds(bounds, self.tripB.segments[0].getBounds())
        self.assert_points(points, self.tripB.segments[0].points)

        self.cur.execute("""
            SELECT trip
            FROM canonical_trips_relations
            WHERE canonical_trip=%s
            """, (can_id, ))
        results = self.cur.fetchall()
        results = map(lambda r: r[0], results)
        self.assertEqual(len(results), 2)
        self.assertTrue(tripA_id in results)
        self.assertTrue(tripB_id in results)

    def test_match_canonical_trip(self):
        self.tripA.segments[0].location_from = Location.Location("Home", self.tripA.segments[0].points[0])
        self.tripA.segments[0].location_to = Location.Location("Work", self.tripA.segments[0].points[-1])
        tripA_id = db.insertSegment(self.tripA.segments[0])

        self.tripB.segments[0].location_from = Location.Location("Home", self.tripB.segments[0].points[0])
        self.tripB.segments[0].location_to = Location.Location("Work", self.tripB.segments[0].points[-1])
        tripB_id = db.insertSegment(self.tripB.segments[0])

        db.insertCanonicalTrip(self.tripA.segments[0], tripA_id)

        # Exact match
        results = db.matchCanonicalTrip(self.tripA.segments[0])
        self.assertEqual(len(results), 1)
        self.assertEqual(results[0][0], tripA_id)

        # Similar match
        results = db.matchCanonicalTrip(self.tripB.segments[0])
        self.assertEqual(len(results), 1)
        self.assertEqual(results[0][0], tripA_id)

        db.insertCanonicalTrip(self.tripB.segments[0], tripB_id)

        # Match two
        results = db.matchCanonicalTrip(self.tripB.segments[0])
        matched_ids = map(lambda r: r[0], results)
        self.assertEqual(len(results), 2)
        self.assertTrue(tripA_id in matched_ids)
        self.assertTrue(tripB_id in matched_ids)

        # Partial match on B
        results = db.matchCanonicalTrip(self.tripC.segments[0])
        matched_ids = map(lambda r: r[0], results)
        self.assertEqual(len(results), 1)
        self.assertTrue(tripB_id in matched_ids)

        # No match
        results = db.matchCanonicalTrip(self.tripD.segments[0])
        matched_ids = map(lambda r: r[0], results)
        self.assertEqual(len(results), 0)

        results = db

if __name__ == '__main__':
    unittest.main()


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.07.28 at 08:54:27 PM EDT
//

package com.tremolosecurity.scale.config.xml;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

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

 * <complexType name="ScalePasswordResetConfigType">
 *   <complexContent>
 *     <extension base="{http://www.tremolosecurity.com/scale}ScaleCommonConfigType">
 *       <sequence>
 *         <element name="frontPage" type="{http://www.tremolosecurity.com/scale}PwdResetFrontPageType"/>
 *         <element name="attributes" type="{http://www.tremolosecurity.com/scale}UserAttributesConfigType"/>
 *         <element name="passwordValidation" type="{http://www.tremolosecurity.com/scale}PwdResetValidation"/>
 *         <element name="workflowName" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ScalePasswordResetConfigType", propOrder = {
    "frontPage",
    "attributes",
    "passwordValidation",
    "workflowName"
})
public class ScalePasswordResetConfigType
    extends ScaleCommonConfigType
{

    @XmlElement(required = true)
    protected PwdResetFrontPageType frontPage;
    @XmlElement(required = true)
    protected UserAttributesConfigType attributes;
    @XmlElement(required = true)
    protected PwdResetValidation passwordValidation;
    @XmlElement(required = true)
    protected String workflowName;

    /**
     * Gets the value of the frontPage property.
     *
     * @return
     *     possible object is
     *     {@link PwdResetFrontPageType }
     *
     */
    public PwdResetFrontPageType getFrontPage() {
        return frontPage;
    }

    /**
     * Sets the value of the frontPage property.
     *
     * @param value
     *     allowed object is
     *     {@link PwdResetFrontPageType }
     *
     */
    public void setFrontPage(PwdResetFrontPageType value) {
        this.frontPage = value;
    }

    /**
     * Gets the value of the attributes property.
     *
     * @return
     *     possible object is
     *     {@link UserAttributesConfigType }
     *
     */
    public UserAttributesConfigType getAttributes() {
        return attributes;
    }

    /**
     * Sets the value of the attributes property.
     *
     * @param value
     *     allowed object is
     *     {@link UserAttributesConfigType }
     *
     */
    public void setAttributes(UserAttributesConfigType value) {
        this.attributes = value;
    }

    /**
     * Gets the value of the passwordValidation property.
     *
     * @return
     *     possible object is
     *     {@link PwdResetValidation }
     *
     */
    public PwdResetValidation getPasswordValidation() {
        return passwordValidation;
    }

    /**
     * Sets the value of the passwordValidation property.
     *
     * @param value
     *     allowed object is
     *     {@link PwdResetValidation }
     *
     */
    public void setPasswordValidation(PwdResetValidation value) {
        this.passwordValidation = value;
    }

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

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

}