text:
package com.asakusafw.lang.compiler.analyzer.builtin;

import static com.asakusafw.lang.compiler.model.description.Descriptions.*;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;

import org.junit.Test;

import com.asakusafw.lang.compiler.model.graph.OperatorGraph;
import com.asakusafw.lang.compiler.model.testing.MockOperators;
import com.asakusafw.lang.compiler.model.testing.OperatorExtractor;
import com.asakusafw.lang.compiler.optimizer.OperatorRewriter;
import com.asakusafw.lang.compiler.optimizer.OptimizerContext;
import com.asakusafw.vocabulary.operator.MasterBranch;
import com.asakusafw.vocabulary.operator.MasterJoinUpdate;
import com.asakusafw.vocabulary.operator.MasterSelection;

/**
 * Test for {@link EmptyMasterJoinRemover}.
 */
public class EmptyMasterJoinRemoverTest extends BuiltInOptimizerTestRoot {

    private final OperatorRewriter optimizer = new EmptyMasterJoinRemover();

    /**
     * connected.
     */
    @Test
    public void connected() {
        OperatorGraph graph = join().toGraph();
        apply(context(), optimizer, graph);
        assertThat(graph, hasOperator("join"));
    }

    /**
     * w/ empty master.
     */
    @Test
    public void empty_master() {
        MockOperators mock = join();
        mock.getInput("join.master").disconnectAll();
        OperatorGraph graph = mock.toGraph();
        apply(context(), optimizer, graph);
        assertThat(graph, not(hasOperator("join")));

        mock.assertConnected("transaction", "missed");
        assertThat(mock.getInput("joined").hasOpposites(), is(false));
    }

    /**
     * w/ empty tx.
     */
    @Test
    public void empty_tx() {
        MockOperators mock = join();
        mock.getInput("join.transaction").disconnectAll();
        OperatorGraph graph = mock.toGraph();
        apply(context(), optimizer, graph);
        assertThat(graph, not(hasOperator("join")));

        assertThat(mock.getInput("joined").hasOpposites(), is(false));
        assertThat(mock.getInput("missed").hasOpposites(), is(false));
    }

    /**
     * w/ empty both.
     */
    @Test
    public void empty_both() {
        MockOperators mock = join();
        mock.getInput("join.master").disconnectAll();
        mock.getInput("join.transaction").disconnectAll();
        OperatorGraph graph = mock.toGraph();
        apply(context(), optimizer, graph);
        assertThat(graph, not(hasOperator("join")));

        assertThat(mock.getInput("joined").hasOpposites(), is(false));
        assertThat(mock.getInput("missed").hasOpposites(), is(false));
    }

    /**
     * w/ empty master for branch.
     */
    @Test
    public void branch_empty_master() {
        MockOperators mock = branch();
        mock.getInput("join.master").disconnectAll();
        OperatorGraph graph = mock.toGraph();
        apply(context(), optimizer, graph);
        assertThat(graph, hasOperator("branch"));
    }

    /**
     * w/ empty tx for branch.
     */
    @Test
    public void branch_empty_tx() {
        MockOperators mock = branch();
        mock.getInput("join.transaction").disconnectAll();
        OperatorGraph graph = mock.toGraph();
        apply(context(), optimizer, graph);
        assertThat(graph, not(hasOperator("branch")));

        assertThat(mock.getInput("joined").hasOpposites(), is(false));
        assertThat(mock.getInput("missed").hasOpposites(), is(false));
    }

    /**
     * w/ empty both for branch.
     */
    @Test
    public void branch_empty_both() {
        MockOperators mock = branch();
        mock.getInput("join.master").disconnectAll();
        mock.getInput("join.transaction").disconnectAll();
        OperatorGraph graph = mock.toGraph();
        apply(context(), optimizer, graph);
        assertThat(graph, not(hasOperator("branch")));

        assertThat(mock.getInput("joined").hasOpposites(), is(false));
        assertThat(mock.getInput("missed").hasOpposites(), is(false));
    }

    /**
     * w/ empty master for selection.
     */
    @Test
    public void selection_empty_master() {
        MockOperators mock = selection();
        mock.getInput("join.master").disconnectAll();
        OperatorGraph graph = mock.toGraph();
        apply(context(), optimizer, graph);
        assertThat(graph, hasOperator("selection"));
    }

    /**
     * w/ empty tx for selection.
     */
    @Test
    public void selection_empty_tx() {
        MockOperators mock = selection();
        mock.getInput("join.transaction").disconnectAll();
        OperatorGraph graph = mock.toGraph();
        apply(context(), optimizer, graph);
        assertThat(graph, not(hasOperator("selection")));

        assertThat(mock.getInput("joined").hasOpposites(), is(false));
        assertThat(mock.getInput("missed").hasOpposites(), is(false));
    }

    /**
     * w/ empty both for selection.
     */
    @Test
    public void selection_empty_both() {
        MockOperators mock = selection();
        mock.getInput("join.master").disconnectAll();
        mock.getInput("join.transaction").disconnectAll();
        OperatorGraph graph = mock.toGraph();
        apply(context(), optimizer, graph);
        assertThat(graph, not(hasOperator("selection")));

        assertThat(mock.getInput("joined").hasOpposites(), is(false));
        assertThat(mock.getInput("missed").hasOpposites(), is(false));
    }

    private OptimizerContext context() {
        return context(new String[] {
                EmptyMasterJoinRemover.KEY_REMOVE_EMPTY_MASTER, "true",
                EmptyMasterJoinRemover.KEY_REMOVE_EMPTY_TRANACTION, "true",
        });
    }

    private MockOperators join() {
        return new MockOperators()
                .marker("master")
                .marker("transaction")
                .bless("join", OperatorExtractor.extract(MasterJoinUpdate.class, Ops.class, "join")
                        .input("master", typeOf(String.class))
                        .input("transaction", typeOf(String.class))
                        .output("updated", typeOf(String.class))
                        .output("missed", typeOf(String.class)))
                .marker("joined")
                .marker("missed")
                .connect("master", "join.master")
                .connect("transaction", "join.transaction")
                .connect("join.updated", "joined")
                .connect("join.missed", "missed");
    }

    private MockOperators branch() {
        return new MockOperators()
                .marker("master")
                .marker("transaction")
                .bless("join", OperatorExtractor.extract(MasterBranch.class, Ops.class, "branch")
                        .input("master", typeOf(String.class))
                        .input("transaction", typeOf(String.class))
                        .output("updated", typeOf(String.class))
                        .output("missed", typeOf(String.class)))
                .marker("joined")
                .marker("missed")
                .connect("master", "join.master")
                .connect("transaction", "join.transaction")
                .connect("join.updated", "joined")
                .connect("join.missed", "missed");
    }

    private MockOperators selection() {
        return new MockOperators()
                .marker("master")
                .marker("transaction")
                .bless("join", OperatorExtractor.extract(MasterJoinUpdate.class, Ops.class, "selection")
                        .input("master", typeOf(String.class))
                        .input("transaction", typeOf(String.class))
                        .output("updated", typeOf(String.class))
                        .output("missed", typeOf(String.class)))
                .marker("joined")
                .marker("missed")
                .connect("master", "join.master")
                .connect("transaction", "join.transaction")
                .connect("join.updated", "joined")
                .connect("join.missed", "missed");
    }

    @SuppressWarnings("javadoc")
    public abstract static class Ops {

        @MasterJoinUpdate
        public abstract void join();

        @MasterBranch
        public abstract void branch();

        @MasterJoinUpdate(selection = "selector")
        public abstract void selection();

        @MasterSelection
        public abstract void selector();
    }
}


text:
#include <mrpt/opengl.h>  // Precompiled header

#include <mrpt/opengl/CRenderizable.h>		// Include these before windows.h!!
#include <mrpt/synch.h>
#include <mrpt/utils/CStringList.h>
#include <mrpt/math/utils.h>
#include <mrpt/poses/CPoint3D.h>
#include <mrpt/poses/CPoint2D.h>
#include <mrpt/poses/CPose3D.h>

#include "opengl_internals.h"

#include <mrpt/utils/CStartUpClassesRegister.h>

using namespace std;
using namespace mrpt;
using namespace mrpt::opengl;
using namespace mrpt::utils;
using namespace mrpt::synch;

IMPLEMENTS_VIRTUAL_SERIALIZABLE( CRenderizable, CSerializable, mrpt::opengl )

extern CStartUpClassesRegister  mrpt_opengl_class_reg;
const int dumm = mrpt_opengl_class_reg.do_nothing(); // Avoid compiler removing this class in static linking

#define MAX_GL_TEXTURE_IDS       0x10000
#define MAX_GL_TEXTURE_IDS_MASK  0x0FFFF

struct TOpenGLNameBooker
{
private:
	TOpenGLNameBooker() :
		freeTextureNames(MAX_GL_TEXTURE_IDS,false),
		next_free_texture(1),   // 0 is a reserved number!!
		cs()
	{
	}

public:
	std::vector<bool>		freeTextureNames;
	unsigned int			next_free_texture;
	synch::CCriticalSection	cs;

	static TOpenGLNameBooker & instance()
	{
		static TOpenGLNameBooker dat;
		return dat;
	}
};

// Default constructor:
CRenderizable::CRenderizable() :
	m_name(),
	m_show_name(false),
	m_color(255,255,255,255),
	m_pose(),
	m_scale_x(1), m_scale_y(1), m_scale_z(1),
	m_visible(true)
{
}

// Destructor:
CRenderizable::~CRenderizable()
{
}

/** Returns the lowest, free texture name.
  */
unsigned int CRenderizable::getNewTextureNumber()
{
	MRPT_START

	TOpenGLNameBooker &booker = TOpenGLNameBooker::instance();

	CCriticalSectionLocker lock ( &booker.cs );

	unsigned int ret = booker.next_free_texture;
	unsigned int tries = 0;
	while (ret!=0 && booker.freeTextureNames[ret])
	{
		ret++;
		ret = ret % MAX_GL_TEXTURE_IDS_MASK;

		if (++tries>=MAX_GL_TEXTURE_IDS)
			THROW_EXCEPTION_CUSTOM_MSG1("Maximum number of textures (%u) excedeed! (are you deleting them?)", (unsigned int)MAX_GL_TEXTURE_IDS);
	}

	booker.freeTextureNames[ret] = true; // mark as used.
	booker.next_free_texture = ret+1;
	return ret;
	MRPT_END
}

void CRenderizable::releaseTextureName(unsigned int i)
{
	TOpenGLNameBooker &booker = TOpenGLNameBooker::instance();
	CCriticalSectionLocker lock ( &booker.cs );
	booker.freeTextureNames[i] = false;
	if (i<booker.next_free_texture) booker.next_free_texture = i;  // try to reuse texture numbers.
	// "glDeleteTextures" seems not to be neeeded, since we do the reservation of texture names by our own.
}

void  CRenderizable::writeToStreamRender(CStream &out) const
{
	// MRPT 0.9.5 svn 2774 (Dec 14th 2011):
	// Added support of versioning at this level of serialization too.
	// Should have been done from the beginning, terrible mistake on my part.
	// Now, the only solution is something as ugly as this:
	//
	// For reference: In the past this started as:
	// out << m_name << (float)(m_color.R) << (float)(m_color.G) << (float)(m_color.B) << (float)(m_color.A);
	// ...

	const uint8_t serialization_version = 0;   // can't be >31 (but it would be mad geting to that situation!)

	const bool all_scales_equal = (m_scale_x==m_scale_y && m_scale_z==m_scale_x);
	const bool all_scales_unity = (all_scales_equal && m_scale_x==1.0f);

	const uint8_t magic_signature[2] = {
		0xFF,
		// bit7: fixed to 1 to mark this new header format
		// bit6: whether the 3 scale{x,y,z} are equal to 1.0
		// bit5: whether the 3 scale{x,y,z} are equal to each other
		static_cast<uint8_t>( serialization_version | (all_scales_unity ? 0xC0 : (all_scales_equal ? 0xA0 : 0x80) ) )
	};

	out << magic_signature[0] << magic_signature[1];

	// "m_name"
	const uint16_t nameLen = static_cast<uint16_t>(m_name.size());
	out << nameLen;
	if (nameLen) out.WriteBuffer(m_name.c_str(),m_name.size());

	// Color, as u8:
	out << m_color.R << m_color.G << m_color.B << m_color.A;

	// the rest of fields:
	out << (float)m_pose.x() << (float)m_pose.y() << (float)m_pose.z()
		<< (float)m_pose.yaw() << (float)m_pose.pitch() << (float)m_pose.roll();

	if (!all_scales_unity)
	{
		if (all_scales_equal)
				out << m_scale_x;
		else	out << m_scale_x << m_scale_y << m_scale_z;
	}

	out  << m_show_name
		 << m_visible;
}

void  CRenderizable::readFromStreamRender(CStream &in)
{
	// MRPT 0.9.5 svn 2774 (Dec 14th 2011):
	// See comments in CRenderizable::writeToStreamRender() for the employed serialization mechanism.
	//

	// Read signature:
	union {
		uint8_t  magic_signature[2+2];  // (the extra 4 bytes will be used only for the old format)
		uint32_t magic_signature_uint32;  // So we can interpret the 4bytes above as a 32bit number cleanly.
	};

	in >> magic_signature[0] >> magic_signature[1];

	const bool is_new_format = (magic_signature[0]==0xFF) && ((magic_signature[1]&0x80)!=0);

	if (is_new_format)
	{
		// NEW FORMAT:
		uint8_t serialization_version = (magic_signature[1] & 0x1F);
		const bool all_scales_unity = ((magic_signature[1]&0x40)!=0);
		const bool all_scales_equal_but_not_unity = ((magic_signature[1]&0x20)!=0);

		switch(serialization_version)
		{
		case 0:
			{
			// "m_name"
			uint16_t nameLen;
			in >> nameLen;
			m_name.resize(nameLen);
			if (nameLen) in.ReadBuffer((void*)(&m_name[0]),m_name.size());

			// Color, as u8:
			in >> m_color.R >> m_color.G >> m_color.B >> m_color.A;

			// the rest of fields:
			float x,y,z,yaw,pitch,roll;
			in >> x >> y >> z >> yaw >> pitch >> roll;
			m_pose.x(x); m_pose.y(y); m_pose.z(z);
			m_pose.setYawPitchRoll( yaw,pitch,roll );

			if (all_scales_unity)
					m_scale_x=m_scale_y=m_scale_z=1;
			else {
				if (all_scales_equal_but_not_unity)
				{
					in >> m_scale_x;
					m_scale_y = m_scale_z = m_scale_x;
				}
				else in >> m_scale_x >> m_scale_y >> m_scale_z;
			}

			in >> m_show_name
			   >> m_visible;
			}
			break;
		default:
			THROW_EXCEPTION_CUSTOM_MSG1("Can't parse CRenderizable standard data field: corrupt data stream or format in a newer MRPT format? (serialization version=%u)",static_cast<unsigned int>(serialization_version))
		};
	}
	else
	{
		// OLD FORMAT:
		//Was: in >> m_name;
		// We already read 2 bytes from the string uint32_t length:
		in >> magic_signature[2] >> magic_signature[3];
		{
			const uint32_t nameLen = magic_signature_uint32;  // *reinterpret_cast<const uint32_t*>(&magic_signature[0]);
			m_name.resize(nameLen);
			if (nameLen)
				in.ReadBuffer((void*)(&m_name[0]),m_name.size());
		}

		float f;
		float yaw_deg,pitch_deg,roll_deg;

		mrpt::utils::TColorf col;
		in >> col.R >> col.G >> col.B >> col.A;
		m_color = mrpt::utils::TColor(col.R/255,col.G/255,col.B/255,col.A/255);  // For some stupid reason, colors were saved multiplied by 255... (facepalm)

		in >> f; m_pose.x(f);
		in >> f; m_pose.y(f);
		in >> f; m_pose.z(f);
		in >> yaw_deg;
		in >> pitch_deg;
		in >> f; roll_deg = f;
		// Version 2: Add scale vars:
		//  JL: Yes, this is a crappy hack since I forgot to enable versions here...what? :-P
		if (f!=16.0f && f!=17.0f)
		{
			// Old version:
			// "roll_deg" is the actual roll.
			in >> m_show_name;
			m_scale_x=m_scale_y=m_scale_z=1;	// Default values
		}
		else
		{
			// New version >=v2:
			in >> roll_deg;
			in >> m_show_name;

			// Scale data:
			in >> m_scale_x >> m_scale_y >> m_scale_z;

			if (f==17.0f)  // version>=v3
				in >>m_visible;
			else
				m_visible = true; // Default
		}

		m_pose.setYawPitchRoll( DEG2RAD(yaw_deg),DEG2RAD(pitch_deg),DEG2RAD(roll_deg) );
	}
}

void  CRenderizable::checkOpenGLError()
{
	mrpt::opengl::gl_utils::checkOpenGLError();
}

/*--------------------------------------------------------------
					setPose
  ---------------------------------------------------------------*/
CRenderizable& CRenderizable::setPose( const mrpt::poses::CPose3D &o )
{
	m_pose = o;
	return *this;
}

/*--------------------------------------------------------------
					setPose
  ---------------------------------------------------------------*/
CRenderizable& CRenderizable::setPose( const mrpt::math::TPose3D &o )
{
	m_pose = CPose3D(o);
	return *this;
}

/*--------------------------------------------------------------
					setPose
  ---------------------------------------------------------------*/
CRenderizable& CRenderizable::setPose( const mrpt::poses::CPoint3D &o )	//!< Set the 3D pose from a mrpt::poses::CPose3D object
{
	m_pose.setFromValues(o.x(), o.y(), o.z(),  0,0,0 );
	return *this;
}

/*--------------------------------------------------------------
					setPose
  ---------------------------------------------------------------*/
CRenderizable& CRenderizable::setPose( const mrpt::poses::CPoint2D &o )	//!< Set the 3D pose from a mrpt::poses::CPose3D object
{
	m_pose.setFromValues(o.x(), o.y(),0,  0,0,0 );
	return *this;
}

/*--------------------------------------------------------------
					getPose
  ---------------------------------------------------------------*/
mrpt::math::TPose3D CRenderizable::getPose() const
{
	return mrpt::math::TPose3D(m_pose);
}

/*--------------------------------------------------------------
					traceRay
  ---------------------------------------------------------------*/
bool CRenderizable::traceRay(const mrpt::poses::CPose3D &o,double &dist) const	{
	return false;
}

CRenderizablePtr &mrpt::opengl::operator<<(CRenderizablePtr &r,const CPose3D &p)	{
	r->setPose(p+r->getPose());
	return r;
}

CRenderizable& CRenderizable::setColor_u8( const mrpt::utils::TColor &c)
{
	m_color.R = c.R;
	m_color.G = c.G;
	m_color.B = c.B;
	m_color.A = c.A;
	return *this;
}

/** This method is safe for calling from within ::render() methods \sa renderTextBitmap */
void CRenderizable::renderTextBitmap( const char *str, void *fontStyle )
{
	gl_utils::renderTextBitmap(str,fontStyle);
}

/** Return the exact width in pixels for a given string, as will be rendered by renderTextBitmap().
  * \sa renderTextBitmap
  */
int CRenderizable::textBitmapWidth(
	const std::string &str,
	mrpt::opengl::TOpenGLFont font )
{
	return gl_utils::textBitmapWidth(str,font);
}

redpajama_set_name: RedPajamaGithub


text:
package jp.ac.hiroshima_u.fu_midori.SSH2017.DroneSimulator.plugins.tactics.util.calling;

import javafx.geometry.Point2D;
import jp.ac.hiroshima_u.fu_midori.SSH2017.DroneSimulator.drone.Drone;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.IntStream;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.*;

/**
 * CallingACertainNumberOfDronesのテスト
 *
 * @author 遠藤拓斗 on 2017/06/10.
 */
public class CallingNearestDronesTest {
    private CallingNearestDrones sut;
    private List<Drone> drones = new ArrayList<>();
    private final int NUM_DRONE = 10;
    private final int CERTAIN_NUMBER = 3;
    private FiltersManagement fm = spy(new FiltersManagement());
    private ICaller caller = mock(ICaller.class);

    @Before
    public void setUp() throws Exception {
        for (int i = 0; i < NUM_DRONE; i++) {
            Drone drone = mock(Drone.class);
            when(drone.getPoint()).thenReturn(new Point2D(i * 10, i * 10));
            drones.add(drone);
        }
        sut = new CallingNearestDrones(drones, caller, CERTAIN_NUMBER, fm);
    }

    @Test
    public void informするとfmのinformCallingとinformBeingCalledとcallerのcallを呼ぶ() throws Exception {
        ArgumentCaptor<int[]> captor = ArgumentCaptor.forClass(int[].class);
        sut.inform(0, 1);
        verify(fm).informCalling(0);
        verify(fm).informBeingCalled(0);
        verify(fm).informBeingCalled(1);
        verify(fm).informBeingCalled(2);
        for (int i = 4; i < NUM_DRONE; i++) {
            verify(fm, never()).informBeingCalled(i);
        }
        verify(caller).call(anyInt(), captor.capture());
        assertThat(captor.getValue().length, is(CERTAIN_NUMBER));
        int[] expected = {2, 1, 0};//遠いほうから順番に
        assertThat(captor.getValue(), is(expected));
    }

    @Test
    public void filterではじく() throws Exception {
        ArgumentCaptor<int[]> captor = ArgumentCaptor.forClass(int[].class);
        when(fm.filter(anyInt(), any())).thenReturn(IntStream.of(0, 2, 4, 6, 8));
        sut.inform(0, 1);
        verify(fm).informCalling(0);
        verify(fm).informBeingCalled(0);
        verify(fm).informBeingCalled(2);
        verify(fm).informBeingCalled(4);
        for (int i = 1; i < NUM_DRONE; i += 2) {
            verify(fm, never()).informBeingCalled(i);
        }
        verify(caller).call(anyInt(), captor.capture());
        assertThat(captor.getValue().length, is(CERTAIN_NUMBER));
        int[] expected = {4, 2, 0};//遠いほうから順番に自身も含む
        assertThat(captor.getValue(), is(expected));
    }

    @Test
    public void beforeでfmのbeforeを呼ぶ() throws Exception {
        sut.before();
        verify(fm).before();
    }

    @Test
    public void afterでfmのafterを呼ぶ() throws Exception {
        sut.after();
        verify(fm).after();
    }

}


text:
package storage_test

import (
	"errors"
	"testing"
	"time"

	"github.com/cockroachdb/cockroach/roachpb"
	"github.com/cockroachdb/cockroach/storage"
	"github.com/cockroachdb/cockroach/testutils"
	"github.com/cockroachdb/cockroach/testutils/storageutils"
	"github.com/cockroachdb/cockroach/util"
	"github.com/cockroachdb/cockroach/util/leaktest"
)

// TestReplicaGCQueueDropReplica verifies that a removed replica is
// immediately cleaned up.
func TestReplicaGCQueueDropReplicaDirect(t *testing.T) {
	defer leaktest.AfterTest(t)()
	mtc := &multiTestContext{}
	const numStores = 3
	rangeID := roachpb.RangeID(1)

	// In this test, the Replica on the second Node is removed, and the test
	// verifies that that Node adds this Replica to its RangeGCQueue. However,
	// the queue does a consistent lookup which will usually be read from
	// Node 1. Hence, if Node 1 hasn't processed the removal when Node 2 has,
	// no GC will take place since the consistent RangeLookup hits the first
	// Node. We use the TestingCommandFilter to make sure that the second Node
	// waits for the first.
	ctx := storage.TestStoreContext()
	mtc.storeContext = &ctx
	mtc.storeContext.TestingKnobs.TestingCommandFilter =
		func(filterArgs storageutils.FilterArgs) error {
			et, ok := filterArgs.Req.(*roachpb.EndTransactionRequest)
			if !ok || filterArgs.Sid != 2 {
				return nil
			}
			rct := et.InternalCommitTrigger.GetChangeReplicasTrigger()
			if rct == nil || rct.ChangeType != roachpb.REMOVE_REPLICA {
				return nil
			}
			util.SucceedsSoon(t, func() error {
				r, err := mtc.stores[0].GetReplica(rangeID)
				if err != nil {
					return err
				}
				if i, _ := r.Desc().FindReplica(2); i >= 0 {
					return errors.New("expected second node gone from first node's known replicas")
				}
				return nil
			})
			return nil
		}

	mtc.Start(t, numStores)
	defer mtc.Stop()

	mtc.replicateRange(rangeID, 1, 2)
	mtc.unreplicateRange(rangeID, 1)

	// Make sure the range is removed from the store.
	util.SucceedsSoon(t, func() error {
		if _, err := mtc.stores[1].GetReplica(rangeID); !testutils.IsError(err, "range .* was not found") {
			return util.Errorf("expected range removal")
		}
		return nil
	})
}

// TestReplicaGCQueueDropReplicaOnScan verifies that the range GC queue
// removes a range from a store that no longer should have a replica.
func TestReplicaGCQueueDropReplicaGCOnScan(t *testing.T) {
	defer leaktest.AfterTest(t)()

	mtc := startMultiTestContext(t, 3)
	defer mtc.Stop()
	// Disable the replica gc queue to prevent direct removal of replica.
	mtc.stores[1].DisableReplicaGCQueue(true)

	rangeID := roachpb.RangeID(1)
	mtc.replicateRange(rangeID, 1, 2)
	mtc.unreplicateRange(rangeID, 1)

	// Wait long enough for the direct replica GC to have had a chance and been
	// discarded because the queue is disabled.
	time.Sleep(10 * time.Millisecond)
	if _, err := mtc.stores[1].GetReplica(rangeID); err != nil {
		t.Error("unexpected range removal")
	}

	// Enable the queue.
	mtc.stores[1].DisableReplicaGCQueue(false)

	// Increment the clock's timestamp to make the replica GC queue process the range.
	mtc.manualClock.Increment(int64(storage.ReplicaGCQueueInactivityThreshold+
		storage.DefaultLeaderLeaseDuration) + 1)

	// Make sure the range is removed from the store.
	util.SucceedsSoon(t, func() error {
		store := mtc.stores[1]
		store.ForceReplicaGCScanAndProcess()
		if _, err := store.GetReplica(rangeID); !testutils.IsError(err, "range .* was not found") {
			return util.Errorf("expected range removal: %s", err)
		}
		return nil
	})
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
	xmlns:util="http://www.springframework.org/schema/util" xmlns:mockito="http://www.mockito.org/spring/mockito"
	xsi:schemaLocation="
	    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

	<bean
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="location" value="classpath:project.properties" />
	</bean>

	<bean id="redisShardingManager"
		class="com.flipkart.portkey.redis.persistence.RedisShardingManager">
		<property name="host">
			<value>${REDIS.1.HOST}</value>
		</property>
		<property name="port">
			<value>${REDIS.1.PORT}</value>
		</property>
		<property name="database">
			<value>${REDIS.1.DATABASE}</value>
		</property>
		<property name="password">
			<value>${REDIS.1.PASSWORD}</value>
		</property>
		<property name="poolConfig" ref="jedisPoolConfig" />
	</bean>

	<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
		<property name="blockWhenExhausted">
			<value>${REDIS_POOL_CONFIG.BLOCK_WHEN_EXHAUSTED}</value>
		</property>
		<property name="jmxEnabled">
			<value>${REDIS_POOL_CONFIG.JMX_ENABLED}</value>
		</property>
		<property name="jmxNamePrefix">
			<value>${REDIS_POOL_CONFIG.JMX_PREFIX}</value>
		</property>
		<property name="maxIdle">
			<value>${REDIS_POOL_CONFIG.MAX_IDLE}</value>
		</property>
		<property name="maxTotal">
			<value>${REDIS_POOL_CONFIG.MAX_TOTAL}</value>
		</property>
		<property name="maxWaitMillis">
			<value>${REDIS_POOL_CONFIG.MAX_WAIT_MILLS}</value>
		</property>
		<property name="minEvictableIdleTimeMillis">
			<value>${REDIS_POOL_CONFIG.MIN_EVICTABLE_IDLE_TIME_MILLS}</value>
		</property>
		<property name="minIdle">
			<value>${REDIS_POOL_CONFIG.MIN_IDLE}</value>
		</property>
		<property name="testOnBorrow">
			<value>${REDIS_POOL_CONFIG.TEST_ON_BORROW}</value>
		</property>
		<property name="testOnReturn">
			<value>${REDIS_POOL_CONFIG.TEST_ON_RETURN}</value>
		</property>
		<property name="timeBetweenEvictionRunsMillis">
			<value>${REDIS_POOL_CONFIG.TIME_BETWEEN_EVICTION_RUNS_MILLS}</value>
		</property>
	</bean>
</beans>


text:
package mb.p_raffrayi.impl.confirm;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.function.Supplier;

import org.metaborg.util.collection.CapsuleUtil;
import org.metaborg.util.future.AggregateFuture;
import org.metaborg.util.future.CompletableFuture;
import org.metaborg.util.future.Futures;
import org.metaborg.util.future.ICompletableFuture;
import org.metaborg.util.future.IFuture;
import org.metaborg.util.log.ILogger;
import org.metaborg.util.log.LoggerUtils;
import org.metaborg.util.tuple.Tuple2;

import io.usethesource.capsule.Set;

import org.metaborg.util.future.AggregateFuture.SC;

import mb.p_raffrayi.IRecordedQuery;
import mb.p_raffrayi.impl.envdiff.AddedEdge;
import mb.p_raffrayi.impl.envdiff.RemovedEdge;
import mb.p_raffrayi.nameresolution.DataWf;
import mb.scopegraph.ecoop21.LabelWf;
import mb.scopegraph.patching.IPatchCollection;
import mb.scopegraph.patching.PatchCollection;

abstract class BaseConfirmation<S, L, D> implements IConfirmation<S, L, D> {

    private static final ILogger logger = LoggerUtils.logger(BaseConfirmation.class);

    protected final IConfirmationContext<S, L, D> context;

    protected BaseConfirmation(IConfirmationContext<S, L, D> context) {
        this.context = context;
    }

    private final SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>> DENY = SC.shortCircuit(ConfirmResult.deny());
    private final SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>> ACC_NO_PATCHES = SC.of(ConfirmResult.confirm());

    @Override public IFuture<ConfirmResult<S, L, D>> confirm(IRecordedQuery<S, L, D> query) {
        logger.debug("Confirming {}.", query);
        CompletableFuture<ConfirmResult<S, L, D>> result = new CompletableFuture<>();
        confirm(query.source(), query.labelWf(), query.dataWf(), query.empty()).whenComplete((r, ex) -> {
            if(ex != null) {
                result.completeExceptionally(ex);
                return;
            }
            r.visit(() -> result.complete(r), (addedQueries, removedQueries, resultPatches, globalPatches) -> {
                Futures.<S, IPatchCollection.Immutable<S>>reduce(PatchCollection.Immutable.of(), query.datumScopes(),
                        (acc, scope) -> {
                            return context.match(scope).thenApply(newScopeOpt -> {
                                final S newScope = newScopeOpt.orElseThrow(() -> new IllegalStateException(
                                        "Cannot have a missing datum scope match when all edge are confirmed."));
                                return acc.put(newScope, scope);
                            });
                        }).whenComplete((datumPatches, ex2) -> {
                            if(ex2 != null) {
                                result.completeExceptionally(ex2);
                            } else if(query.includePatches()) {
                                result.complete(ConfirmResult.confirm(addedQueries, removedQueries,
                                        resultPatches.putAll(datumPatches), globalPatches));
                            } else {
                                result.complete(ConfirmResult.confirm(addedQueries, removedQueries, resultPatches,
                                        globalPatches.putAll(datumPatches)));
                            }
                        });
            });
        });

        return result;
    }

    @Override public IFuture<ConfirmResult<S, L, D>> confirm(S scope, LabelWf<L> labelWF, DataWf<S, L, D> dataWF,
            boolean prevEnvEmpty) {
        return context.externalConfirm(scope, labelWF, dataWF, prevEnvEmpty).thenCompose(conf -> {
            return conf.map(CompletableFuture::completedFuture)
                    .orElseGet(() -> localConfirm(scope, labelWF, dataWF, prevEnvEmpty));
        });
    }

    private IFuture<ConfirmResult<S, L, D>> localConfirm(S scope, LabelWf<L> labelWf, DataWf<S, L, D> dataWf,
            boolean prevEnvEmpty) {
        final ICompletableFuture<ConfirmResult<S, L, D>> result = new CompletableFuture<>();
        context.envDiff(scope, labelWf).whenComplete((envDiff, ex) -> {
            if(ex != null) {
                logger.error("Environment diff for {}/{} failed.", scope, labelWf, ex);
                result.completeExceptionally(ex);
            } else {
                logger.debug("Environment diff for {}/{} completed.", scope, labelWf, ex);
                logger.trace("value: {}.", envDiff);
                final ArrayList<IFuture<SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>>>> futures =
                        new ArrayList<>();

                // Include patches of path into patch set
                futures.add(CompletableFuture.completedFuture(
                        SC.of(ConfirmResult.confirm(PatchCollection.Immutable.of(envDiff.patches())))));
                final LazyFuture<Optional<DataWf<S, L, D>>> patchedDataWf = new LazyFuture<>(() -> patchDataWf(dataWf));

                // Verify each added/removed edge.
                envDiff.changes().forEach(diff -> {
                    // @formatter:off
                    futures.add(diff.<IFuture<SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>>>>match(
                        addedEdge -> handleAddedEdge(addedEdge, patchedDataWf),
                        removedEdge -> handleRemovedEdge(removedEdge, dataWf, prevEnvEmpty)
                    ));
                    // @formatter:on
                });

                AggregateFuture.ofShortCircuitable(this::merge, futures).whenComplete(result::complete);
            }
        });

        return result.whenComplete((res, ex) -> {
            logger.debug("Environment diff completed: {}.", res);
        });
    }

    protected abstract IFuture<SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>>>
            handleAddedEdge(AddedEdge<S, L, D> addedEdge, LazyFuture<Optional<DataWf<S, L, D>>> dataWf);

    protected abstract IFuture<SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>>>
            handleRemovedEdge(RemovedEdge<S, L, D> removedEdge, DataWf<S, L, D> dataWf, boolean prevEnvEnpty);

    protected SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>> deny() {
        return DENY;
    }

    protected SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>> acceptAdded(
            java.util.Set<IRecordedQuery<S, L, D>> transitiveQueries,
            java.util.Set<IRecordedQuery<S, L, D>> predicateQueries) {
        if(transitiveQueries.isEmpty() && predicateQueries.isEmpty()) {
            return ACC_NO_PATCHES;
        }
        final Set.Transient<IRecordedQuery<S, L, D>> addedQueries = CapsuleUtil.transientSet();
        addedQueries.__insertAll(transitiveQueries);
        addedQueries.__insertAll(predicateQueries);
        return SC.of(ConfirmResult.confirm(addedQueries.freeze(), CapsuleUtil.immutableSet(),
                PatchCollection.Immutable.of()));
    }

    protected SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>> acceptRemoved(
            java.util.Set<IRecordedQuery<S, L, D>> transitiveQueries,
            java.util.Set<IRecordedQuery<S, L, D>> predicateQueries) {
        if(transitiveQueries.isEmpty() && predicateQueries.isEmpty()) {
            return ACC_NO_PATCHES;
        }
        final Set.Transient<IRecordedQuery<S, L, D>> removedQueries = CapsuleUtil.transientSet();
        removedQueries.__insertAll(transitiveQueries);
        removedQueries.__insertAll(predicateQueries);
        return SC.of(ConfirmResult.confirm(CapsuleUtil.immutableSet(), removedQueries.freeze(),
                PatchCollection.Immutable.of()));
    }

    protected IFuture<SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>>> denyFuture() {
        return CompletableFuture.completedFuture(DENY);
    }

    protected IFuture<SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>>> acceptFuture() {
        return CompletableFuture.completedFuture(ACC_NO_PATCHES);
    }

    protected IFuture<SC<IPatchCollection.Immutable<S>, ConfirmResult<S, L, D>>>
            accept(IPatchCollection.Immutable<S> patches) {
        return CompletableFuture.completedFuture(SC.of(patches));
    }

    protected ConfirmResult<S, L, D> merge(List<ConfirmResult<S, L, D>> confirmResults) {
        // Patch sets should be build from matches by scope differ, so just adding them is safe.
        return confirmResults.stream().reduce(ConfirmResult.confirm(), ConfirmResult::add);
    }

    private SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>> toSC(ConfirmResult<S, L, D> intermediate) {
        return intermediate.match(() -> SC.shortCircuit(intermediate),
                (addQ, remQ, resP, globP) -> SC.of(intermediate));
    }

    protected IFuture<SC<ConfirmResult<S, L, D>, ConfirmResult<S, L, D>>>
            toSCFuture(IFuture<ConfirmResult<S, L, D>> intermediateFuture) {
        return intermediateFuture.thenApply(this::toSC);
    }

    private IFuture<Optional<DataWf<S, L, D>>> patchDataWf(DataWf<S, L, D> dataWf) {
        final Set.Immutable<S> scopes = dataWf.scopes();
        if(scopes.isEmpty()) {
            return CompletableFuture.completedFuture(Optional.of(dataWf));
        }

        final List<IFuture<SC<Tuple2<S, S>, Optional<DataWf<S, L, D>>>>> futures = new ArrayList<>();
        for(S scope : scopes) {
            // @formatter:off
            futures.add(context.match(scope)
                .<SC<Tuple2<S, S>, Optional<DataWf<S, L, D>>>>thenApply(match -> match
                    .map(m -> SC.<Tuple2<S, S>, Optional<DataWf<S, L, D>>>of(Tuple2.of(scope, m)))
                    .orElse(SC.shortCircuit(Optional.empty()))
                ));
            // @formatter:on
        }

        return AggregateFuture.<Tuple2<S, S>, Optional<DataWf<S, L, D>>>ofShortCircuitable(patches -> {
            return Optional.of(dataWf.patch(PatchCollection.Immutable.<S>of().putAll(patches)));
        }, futures);
    }

    class LazyFuture<T> {

        private Supplier<IFuture<T>> supplier;

        private IFuture<T> value;

        public LazyFuture(Supplier<IFuture<T>> supplier) {
            this.supplier = supplier;
        }

        public IFuture<T> get() {
            if(value == null) {
                value = supplier.get();
                supplier = null;
            }
            return value;
        }

    }

}


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information

namespace DotNetNuke.Web.Api
{
    using System;
    using System.Web.Http;

    using DotNetNuke.Entities.Modules;
    using DotNetNuke.Entities.Portals;
    using DotNetNuke.Entities.Users;

    [DnnExceptionFilter]
    public abstract class DnnApiController : ApiController
    {
        private readonly Lazy<ModuleInfo> _activeModule;

        protected DnnApiController()
        {
            this._activeModule = new Lazy<ModuleInfo>(this.InitModuleInfo);
        }

        /// <summary>
        /// Gets portalSettings for the current portal.
        /// </summary>
        public PortalSettings PortalSettings
        {
            get
            {
                return PortalController.Instance.GetCurrentPortalSettings();
            }
        }

        /// <summary>
        /// Gets userInfo for the current user.
        /// </summary>
        public UserInfo UserInfo
        {
            get { return this.PortalSettings.UserInfo; }
        }

        /// <summary>
        /// Gets moduleInfo for the current module.
        /// <remarks>Will be null unless a valid pair of module and tab ids were provided in the request</remarks>
        /// </summary>
        public ModuleInfo ActiveModule
        {
            get { return this._activeModule.Value; }
        }

        private ModuleInfo InitModuleInfo()
        {
            return this.Request.FindModuleInfo();
        }
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Cetraria islandica var. subtubulosa Fr.

### Remarks
null


text:
__author__ = 'Keiran'
from model.contact import Contact
import pytest

def test_contact_compare(app, orm):
    with pytest.allure.step('Given a sorted contact list from DB'):
        contacts_from_db = orm.get_contact_list()
        sorted_contacts_from_db = list(sorted(contacts_from_db, key=Contact.id_or_max))
    with pytest.allure.step('Given a sorted contact list from home page'):
        contacts_from_home_page = app.contact.get_contact_list()
        sorted_contacts_from_home_page = list(sorted(contacts_from_home_page, key=Contact.id_or_max))
    with pytest.allure.step('Then I compare this lists'):
        for index in range(len(sorted_contacts_from_db)):
            assert sorted_contacts_from_db[index] == sorted_contacts_from_home_page[index]
            assert sorted_contacts_from_db[index].join_mails() == sorted_contacts_from_home_page[index].all_mails
            assert sorted_contacts_from_db[index].join_phones() == sorted_contacts_from_home_page[index].all_phones


text:
package org.apache.cordova.test;

public class ErrorUrlTest extends BaseCordovaIntegrationTest {
    private static final String START_URL = "file:///android_asset/www/htmlnotfound/index.html";
    private static final String ERROR_URL = "file:///android_asset/www/htmlnotfound/error.html";
    private static final String INVALID_URL = "file:///android_asset/www/index.html";

    protected void setUp() throws Exception {
        super.setUp();
        // INVALID_URL tests that errorUrl and url are *not* settable via the intent.
        setUpWithStartUrl(START_URL, "testErrorUrl", ERROR_URL, "errorurl", INVALID_URL, "url", INVALID_URL);
    }

    public void testUrl() throws Throwable {
        assertEquals(START_URL, testActivity.onPageFinishedUrl.take());
        assertEquals(ERROR_URL, testActivity.onPageFinishedUrl.take());
        runTestOnUiThread(new Runnable() {
            public void run() {
                assertEquals(ERROR_URL, testActivity.getCordovaWebView().getUrl());
            }
        });
    }
}


text:
<!doctype html>

        <title>Schiffeversenken</title>

        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <link href="https://fonts.googleapis.com/css?family=Oxygen" rel="stylesheet">

        <link rel="stylesheet" href="css/bootstrap.min.css">

        <link rel="stylesheet" href="css/font.css">

        <link rel="stylesheet" href="css/main.css">

                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                    ×
                </button>

DEIN NAME

Warten auf Gegner Name

            <button type="button" class="btn btn-primary" onclick="openPlayerNameModal()" id="changePlayername">Spielername ändern</button>
            <button type="button" class="btn btn-primary">Highscore</button>
            <button type="button" class="btn btn-primary" onclick="resetTheGame()" id="resetGame" style="visibility:hidden">Neustart</button>

Spielername

                        <form>

                                Dein Name:
                                <input type="text" class="form-control" id="myNameInput" autofocus/>

                        </form>

                        <button type="button" class="btn btn-primary" onclick="setPlayerName()">Weiter</button>


text:
var __extends = this.__extends || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();
};
var Player = (function (_super) {
    __extends(Player, _super);
    function Player(position, size) {
        _super.call(this, position, size);
        this.onWall = false;
        this.wallDirection = 0;
        this.grabRange = ppm * 5;
        this.jumpDown = false;
        this.moveDirection = 0;
        this.speed = new vec2([8, -8]);
        this.pushSpeed = new vec2([4, -7]);
        this.turnSpeed = 3;
        this.maxWallSpeed = new vec2([0, 1.8]);
        this.maxHp = 100;
        this.hp = this.maxHp;
        this.nextFrame = 0;
        this.currentAnimation = 0;
        this.currentFrame = 0;
        this.coordWidth = 1;
        this.coordHeight = 1;
        this.frameTime = [[1]];
        this.animationData = [1];
        this.animate = false;
    }
    Player.prototype.startAnimation = function (id) {
        this.currentAnimation = id;
        this.currentFrame = 0;
        this.animate = true;
    };
    Player.prototype.stopAnimation = function () {
        this.animate = false;
    };
    Player.prototype.update = function (time, dt) {
        if (time > this.nextFrame && this.animate) {
            this.currentFrame++;
            if (this.currentFrame >= this.animationData[this.currentAnimation])
                this.currentFrame = 0;
            this.nextFrame = time + this.frameTime[this.currentAnimation][this.currentFrame];
        }
        this.sprite.texCoords = new vec4([
            this.coordWidth * this.currentFrame,
            this.coordHeight * this.currentAnimation,
            this.coordWidth,
            this.coordHeight
        ]);
    };
    Player.prototype.updateInput = function () {
        this.moveDirection = 0;
        if (keyboard.isDown(65)) {
            this.moveDirection = -1;
            this.sprite.flip = this.onWall ? false : true;
        }
        else if (keyboard.isDown(68)) {
            this.moveDirection = 1;
            this.sprite.flip = this.onWall ? true : false;
        }
        if (Math.abs(this.velocity.x) >= Math.abs(this.velocity.y)) {
            if (this.currentAnimation != 1)
                this.startAnimation(1);
            if (Math.abs(this.velocity.x) < 0.2)
                this.startAnimation(0);
        }
        else {
            if (!this.onGround && this.currentAnimation != 3)
                this.startAnimation(3);
            if (this.onGround) {
                this.startAnimation(0);
            }
        }
        this.jumpDown = keyboard.isDown(87) || keyboard.isDown(32);
        if (this.jumpDown) {
            this.startAnimation(3);
        }
    };
    Player.prototype.walk = function (dt) {
        if (this.moveDirection != 0) {
            var currrentDirection = ((this.velocity.x > 0) ? 1 : (this.velocity.x < 0 ? -1 : 0));
            var speed = this.speed.x;
            if (currrentDirection != 0 && this.moveDirection != currrentDirection) {
                speed *= this.turnSpeed;
            }
            this.velocity.x += speed * this.moveDirection * dt;
            return true;
        }
        return false;
    };
    Player.prototype.groundUpdate = function (dt) {
        if (this.jumpDown)
            this.velocity.y = this.speed.y;
        else
            this.velocity.y = 0;
        if (!this.walk(dt))
            this.velocity.x *= 0.80;
    };
    Player.prototype.wallUpdate = function (dt) {
        if (this.jumpDown && this.velocity.y > 0) {
            this.velocity.y = this.pushSpeed.y;
            this.velocity.x = this.pushSpeed.x * -this.wallDirection;
        }
        else {
            if (this.velocity.y > this.maxWallSpeed.y)
                this.velocity.y = this.maxWallSpeed.y;
        }
        if (this.walk(dt))
            this.velocity.x *= 1.50;
    };
    Player.prototype.airUpdate = function (dt) {
        if (this.velocity.y < 0 && !this.jumpDown)
            this.velocity.y *= 0.95;
        if (!this.walk(dt))
            this.velocity.x *= 0.99;
    };
    return Player;
})(GameObject);
//# sourceMappingURL=player.js.map


text:
/*
 * ImageReaderProgressDialog.java
 *
 * Created on May 18, 2005, 10:41 PM
 */

package ika.gui;

import javax.swing.*;

/**
 *
 * @author  jenny
 */
public class ImageReaderProgressDialog extends javax.swing.JDialog
        implements javax.imageio.event.IIOReadProgressListener{

    private boolean cancel = false;

    /**
     * Creates new form ImageReaderProgressDialog
     */
    public ImageReaderProgressDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        outterPanel = new javax.swing.JPanel();
        cancelButton = new javax.swing.JButton();
        progressBar = new javax.swing.JProgressBar();
        label = new javax.swing.JLabel();

        getContentPane().setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 35, 16));

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("Reading Image");
        setModal(true);
        setName("progressDialog");
        setResizable(false);
        outterPanel.setLayout(new java.awt.GridBagLayout());

        cancelButton.setText("Cancel");
        cancelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelButtonActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        outterPanel.add(cancelButton, gridBagConstraints);

        progressBar.setPreferredSize(new java.awt.Dimension(250, 20));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 20);
        outterPanel.add(progressBar, gridBagConstraints);

        label.setText("Reading the image. Please wait...");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);
        outterPanel.add(label, gridBagConstraints);

        getContentPane().add(outterPanel);

        pack();
    }
    // </editor-fold>//GEN-END:initComponents

    private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
        this.cancel = true;
    }//GEN-LAST:event_cancelButtonActionPerformed

    public void disableCancel() {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                cancelButton.setEnabled(false);
                cancelButton.setFocusable(false);
            }
        });
    }

    public void finish() {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                dispose();
            }
        });
    }

    public void showProgressDialog() {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                // center progress dialog in primary screen
                java.awt.Dimension screen = getToolkit().getScreenSize();
                java.awt.Dimension dialog = getSize();
                setLocation( (screen.width - dialog.width) / 2,
                        (screen.height - dialog.height) / 2 );

                show();
                if (progressBar != null)
                    progressBar.setEnabled(true);
            }
        });
    }

    public boolean isCanceled() {
        return cancel;
    }

    public void imageStarted(javax.imageio.ImageReader imageReader, int param) {
        showProgressDialog();
        this.cancel = false;
    }

    public void imageComplete(javax.imageio.ImageReader source) {
    }

    public void imageProgress(javax.imageio.ImageReader imageReader,
            final float percentage) {
        if (this.cancel) {
            imageReader.abort();
            this.cancel = false;
        } else {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    if (progressBar != null)
                        progressBar.setValue((int)percentage);
                }
            });
        }
    }

    public void readAborted(javax.imageio.ImageReader source) {
        this.cancel = true;
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                dispose();
            }
        });
    }

    public void sequenceComplete(javax.imageio.ImageReader source) {
    }

    public void sequenceStarted(javax.imageio.ImageReader imageReader, int param) {
    }

    public void thumbnailComplete(javax.imageio.ImageReader source) {
    }

    public void thumbnailProgress(javax.imageio.ImageReader imageReader, float param) {
    }

    public void thumbnailStarted(javax.imageio.ImageReader imageReader, int param, int param2) {
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton cancelButton;
    private javax.swing.JLabel label;
    private javax.swing.JPanel outterPanel;
    private javax.swing.JProgressBar progressBar;
    // End of variables declaration//GEN-END:variables

}


text:
function getTwitterHandle() {
  var handle, attr;
  var el = document.querySelector('meta[name="twitter:site"]');
  if(el) {
    attr = el.attributes.getNamedItem('content') || el.attributes.getNamedItem('value');
    handle = attr.value;
    handle = handle.replace('@','');
  }
  return handle;
}

function openTweet(url) {
  var handle = getTwitterHandle();
  if(handle) {
    url += "&via="+handle;
  }

  var height = 400;
  if(url.match(/imgurl=/)) height = 675;

  window.open(url, "savedyouaclick-tweet", "width=520,height="+height);
}


text:
import {ClusterProfile, ElasticAgentProfile, ElasticAgentProfiles} from "models/elastic_profiles/types";
import {Configuration, Configurations} from "models/shared/configuration";
import {EncryptedValue, PlainTextValue} from "models/shared/config_value";

describe("Types", () => {
  describe("Elastic Agent Profiles", () => {
    describe("Validation", () => {
      it("should validate elastic agent profile", () => {
        const elasticProfile = new ElasticAgentProfile("", "", "", true, new Configurations([]));
        expect(elasticProfile.isValid()).toBe(false);
        expect(elasticProfile.errors().count()).toBe(3);
        expect(elasticProfile.errors().keys().sort()).toEqual(["clusterProfileId", "id", "pluginId"]);
      });

      it("should validate elastic agent profile id format", () => {
        const elasticProfile = new ElasticAgentProfile("invalid id", "pluginId", "foo", true, new Configurations([]));
        expect(elasticProfile.isValid()).toBe(false);
        expect(elasticProfile.errors().count()).toBe(1);
        expect(elasticProfile.errors().keys()).toEqual(["id"]);
        expect(elasticProfile.errors().errors("id"))
          .toEqual(["Invalid Id. This must be alphanumeric and can contain underscores and periods (however, it cannot start with a period)."]);
      });

      it("should validate existence of cluster profile id", () => {
        const elasticProfile = new ElasticAgentProfile("id", "pluginId", undefined, true, new Configurations([]));
        expect(elasticProfile.isValid()).toBe(false);
        expect(elasticProfile.errors().count()).toBe(1);
        expect(elasticProfile.errors().keys()).toEqual(["clusterProfileId"]);
        expect(elasticProfile.errors().errors("clusterProfileId"))
          .toEqual(["Cluster profile id must be present"]);
      });
    });

    describe("Serialization and Deserialization", () => {
      it("should serialize elastic agent profile", () => {
        const elasticProfile = new ElasticAgentProfile(
          "docker1",
          "cd.go.docker",
          "prod-cluster",
          true,
          new Configurations([
                               new Configuration("image", new PlainTextValue("gocd/server")),
                               new Configuration("secret", new EncryptedValue("alskdad"))
                             ]));

        expect(JSON.parse(JSON.stringify(elasticProfile.toJSON()))).toEqual({
                                                                              id: "docker1",
                                                                              plugin_id: "cd.go.docker",
                                                                              cluster_profile_id: "prod-cluster",
                                                                              properties: [{
                                                                                key: "image",
                                                                                value: "gocd/server"
                                                                              },
                                                                                {
                                                                                key: "secret",
                                                                                encrypted_value: "alskdad"
                                                                                }
                                                                              ]
                                                                            });
      });

      it("should deserialize elastic agent profile", () => {
        const elasticProfile = ElasticAgentProfile.fromJSON({
                                                              id: "docker1",
                                                              plugin_id: "cd.go.docker",
                                                              cluster_profile_id: "prod-cluster",
                                                              can_administer: true,
                                                              properties: [{
                                                                key: "image",
                                                                value: "gocd/server",
                                                                encrypted_value: null
                                                              },
                                                                {
                                                                  key: "memory",
                                                                  value: "10M",
                                                                  encrypted_value: null
                                                                }
                                                              ]
                                                            });

        expect(elasticProfile.id()).toEqual("docker1");
        expect(elasticProfile.pluginId()).toEqual("cd.go.docker");
        expect(elasticProfile.clusterProfileId()).toEqual("prod-cluster");
        expect(elasticProfile.properties()!.count()).toBe(2);
        expect(elasticProfile.properties()!.valueFor("image")).toEqual("gocd/server");
        expect(elasticProfile.properties()!.valueFor("memory")).toEqual("10M");
      });

      it("should serialize encrypted value as value when updated", () => {
        const elasticProfile = new ElasticAgentProfile(
          "docker1",
          "cd.go.docker",
          "prod-cluster",
          true,
          new Configurations([
                               new Configuration("image", new PlainTextValue("gocd/server")),
                               new Configuration("secret", new EncryptedValue("alskdad"))
                             ]));

        elasticProfile.properties()!.setConfiguration("secret", "foo");

        expect(JSON.parse(JSON.stringify(elasticProfile.toJSON()))).toEqual({
                                                                              id: "docker1",
                                                                              plugin_id: "cd.go.docker",
                                                                              cluster_profile_id: "prod-cluster",
                                                                              properties: [{
                                                                                key: "image",
                                                                                value: "gocd/server"
                                                                              },
                                                                                {
                                                                                key: "secret",
                                                                                value: "foo"
                                                                                }
                                                                              ]
                                                                            });

      });

      it("should filter the elastic agent profiles by cluster profile", () => {
        const elasticAgentProfiles = new ElasticAgentProfiles([new ElasticAgentProfile("profile_1",
                                                                                "plugin_id",
                                                                                "cluster1")]);
        expect(elasticAgentProfiles.filterByClusterProfile("cluster1").length).toEqual(1);
        expect(elasticAgentProfiles.filterByClusterProfile("cluster2").length).toEqual(0);
      });
    });
  });

  describe("Cluster Profiles", () => {
    describe("Validation", () => {
      it("should validate cluster profile", () => {
        const clusterProfile = new ClusterProfile("", "", true, new Configurations([]));
        expect(clusterProfile.isValid()).toBe(false);
        expect(clusterProfile.errors().count()).toBe(2);
        expect(clusterProfile.errors().keys().sort()).toEqual(["id", "pluginId"]);
      });

      it("should validate cluster profile id format", () => {
        const clusterProfile = new ClusterProfile("invalid id", "pluginId", true, new Configurations([]));
        expect(clusterProfile.isValid()).toBe(false);
        expect(clusterProfile.errors().count()).toBe(1);
        expect(clusterProfile.errors().keys()).toEqual(["id"]);
        expect(clusterProfile.errors().errors("id"))
          .toEqual(["Invalid Id. This must be alphanumeric and can contain underscores and periods (however, it cannot start with a period)."]);
      });
    });

    describe("Serialization and Deserialization", () => {
      it("should serialize cluster profile", () => {
        const clusterProfile = new ClusterProfile(
          "docker1",
          "cd.go.docker",
          true,
          new Configurations([
                               new Configuration("image", new PlainTextValue("gocd/server")),
                               new Configuration("secret", new EncryptedValue("alskdad"))
                             ]));

        expect(JSON.parse(JSON.stringify(clusterProfile.toJSON()))).toEqual({
                                                                              id: "docker1",
                                                                              plugin_id: "cd.go.docker",
                                                                              properties: [{
                                                                                key: "image",
                                                                                value: "gocd/server"
                                                                              },
                                                                                {
                                                                                key: "secret",
                                                                                encrypted_value: "alskdad"
                                                                                }
                                                                              ]
                                                                            });
      });

      it("should deserialize cluster profile", () => {
        const clusterProfile = ClusterProfile.fromJSON({
                                                         id: "docker1",
                                                         plugin_id: "cd.go.docker",
                                                         can_administer: true,
                                                         properties: [{
                                                           key: "image",
                                                           value: "gocd/server",
                                                           encrypted_value: null
                                                         },
                                                           {
                                                             key: "memory",
                                                             value: "10M",
                                                             encrypted_value: null
                                                           }
                                                         ]
                                                       });

        expect(clusterProfile.id()).toEqual("docker1");
        expect(clusterProfile.pluginId()).toEqual("cd.go.docker");
        expect(clusterProfile.properties()!.count()).toBe(2);
        expect(clusterProfile.properties()!.valueFor("image")).toEqual("gocd/server");
        expect(clusterProfile.properties()!.valueFor("memory")).toEqual("10M");
      });

      it("should serialize encrypted value as value when updated", () => {
        const clusterProfile = new ClusterProfile(
          "docker1",
          "cd.go.docker",
          true,
          new Configurations([
                               new Configuration("image", new PlainTextValue("gocd/server")),
                               new Configuration("secret", new EncryptedValue("alskdad"))
                             ]));

        clusterProfile.properties()!.setConfiguration("secret", "foo");

        expect(JSON.parse(JSON.stringify(clusterProfile.toJSON()))).toEqual({
                                                                              id: "docker1",
                                                                              plugin_id: "cd.go.docker",
                                                                              properties: [{
                                                                                key: "image",
                                                                                value: "gocd/server"
                                                                              },
                                                                                {
                                                                                key: "secret",
                                                                                value: "foo"
                                                                                }
                                                                              ]
                                                                            });

      });
    });
  });
});


text:
nginx Cookbook CHANGELOG
========================
This file is used to list changes made in each version of the nginx cookbook.

et-v6.1.1 (2019-02-06)
----------------------

* added $request_time to nginx log format

et-v6.1.0 (2017-08-06)
----------------------

* Switch to installing nginx-extras instead of nginx-full to get access to Lua extensions

et-v6.0.4 (2017-08-01)
----------------------

* Pin nginx package so that it is not auto-updated by "unattended-updates"
* Bump nginx package to latest for 16.04

et-v6.0.3 (2017-07-20)
----------------------

* Specify both nginx-full and nginx-common packages so that Evertrue-specific version numbers get used to install both

et-v6.0.2 (2017-05-31)
----------------------

* Grab different custom nginx packages on different versions of Ubuntu

et-v6.0.1 (2016-12-19)
----------------------

* Add original client IPs, precision timestamps, application keys, and authorization headers to nginx access logs

et-v6.0.0 (2016-09-22)
----------------------

* **BREAKING** Bump Ohai version to 4.0
* Stop checksumming GeoIP databases (seriously?)
* Merge branch '2.7.x' of github.com:miketheman/nginx into integration (not directly, but that's not important right now)
* Test exclusively on EC2

et-v5.1.0 (2016-04-27)
----------------------

* Make it possible for the default server to return a response code instead of a page
* Make it possible to configure the hostname for the default server

et-v5.0.0 (2015-09-28)
----------------------

* Prune a bunch of stuff that we don't use at EverTrue
    - Remove support for source install
    - Drop support for platforms that are not Debian/Ubuntu
    - Drop support for init styles other than Upstart
    - Drop passenger support
* Fix some minor errors in the ServerSpec tests
* Provide a default socketproxy app for testing
* Switch to custom build of the nginx package (called `nginx-full`) to get [upstream check module](https://github.com/yaoweibin/nginx_upstream_check_module) support
    - Use version when installing nginx package
* Remove spec test to verify nginx start (which we no longer do)
* Fix remaining incorrect namespacing (s/nginx/et_nginx/g) mostly in spec tests
* Remove orphaned object package_install_opts from package recipe
* Update the documentation to be more EverTrue specific
    - Do not attempt to document every single attribute in the metadata
* Update nginx Ohai plugin to new format
* Add socketproxy to modules test
* Renamed/moved recipes and templates to distinguish compile-time modules from other stuff
* Stop populating the `node['nginx']['version']` field with Ohai (it creates confusion)
* Move the package name to be installed to its own attributes file
* Modernize kitchen yaml
* Remove "which nginx" not_if from nginx package install
* Update the kitchen cloud ami (to: `ubuntu-trusty-14.04-amd64-server-20150810`)

et-v4.0.0 (2015-04-08)
----------------------

* Switch to using regular expressions for location matching on socketproxy (POTENTIALLY BREAKING)

et-v3.0.1 (2015-01-16)
----------------------

* Use compile-time "unless" instead of not_if to decide whether or not to make a symlink for the log directory

et-v3.0.0 (2015-01-16)
----------------------

* *BREAKING:* Use access_log_options attribute to set options for socketproxy access log (instead of assuming "main") - Fixes #308
* Add a policy-rc.d file on Debian systems to prevent the nginx service from starting when the package installs
* Lets only test on the system we actually use here at ET: amazon with ubuntu-1404
* Use et_nginx as the cookbook name in kitchen YAML instead of nginx
* Move log directory creation to before package install (and add user ourselves to support it instead of waiting for the package to add it)
* Stop deleting incorrect nginx log directory
* Serverspec tests should check for port 8080 (not 80)
* nginx user should use nologin binary instead of `/bin/false`

et-v2.0.6 (2014-10-06)
----------------------
-- Add actual Serverspec tests
-- Clean up Gemfile
-- Add additional guard to removal of `/var/log/nginx` to avoid failures due to `et_rails_app::default` installing a symlink at that path

v2.7.6 / 2015-03-17
==================

  * Bugfix sites do not need a .conf suffix anymore, [#338][] [@runningman84][]

v2.7.5 (2015-03-17)
-------------------
**NOTE** As of this release, this cookbook in its current format is deprecated,
and only critical bugs and fixes will be added.
A complete rewrite is in progress, so we appreciate your patience while we sort things out.
The amount of change included here

* Fix nginx 1.4.4 archive checksum to prevent redownload, [#305][] [@irontoby][]
* Allow setting an empty string to prevent additional repos, [#243][] [@miketheman][]
* Use correct `mime.types` for javascript, [#259][] [@dwradcliffe][]
* Fix `headers_more` module for source installs, [#279][], [@josh-padnick][] & [@miketheman][]
* Remove `libtool` from `geoip` and update download paths & checksums, [@miketheman][]
* Fix unquoted URL with params failing geoip module build (and tests!), [#294][] [@karsten-bruckmann][] & [@miketheman][]
* Fix typo in `source.rb`, [#205][] [@gregkare][]
* Test updates: ChefSpec, test-kitchen. Lots of help by [@jujugrrr][]
* Toolchain updates for testing
* Adds support for `tcp_nopush`, `tcp_nodelay` [@shtouff][]

After merging a ton of pull requests, here's a brief changelog. Click each to read more.

* Merge pull request [#335][] from [@stevenolen][]
* Merge pull request [#332][] from [@monsterstrike][]
* Merge pull request [#331][] from [@jalberto][]
* Merge pull request [#327][] from [@nkadel-skyhook][]
* Merge pull request [#326][] from [@bchrobot][]
* Merge pull request [#325][] from [@CanOfSpam3bug324][]
* Merge pull request [#321][] from [@jalberto][]
* Merge pull request [#318][] from [@evertrue][]
* Merge pull request [#314][] from [@bkw][]
* Merge pull request [#312][] from [@thomasmeeus][]
* Merge pull request [#310][] from [@morr][]
* Merge pull request [#305][] from [@irontoby][]
* Merge pull request [#302][] from [@auth0][]
* Merge pull request [#298][] from [@Mytho][]
* Merge pull request [#269][] from [@yveslaroche][]
* Merge pull request [#259][] from [@dwradcliffe][]
* Merge pull request [#254][] from [@evertrue][]
* Merge pull request [#252][] from [@gkra][]
* Merge pull request [#249][] from [@whatcould][]
* Merge pull request [#240][] from [@jcoleman][]
* Merge pull request [#236][] from [@adepue][]
* Merge pull request [#230][] from [@n1koo][]
* Merge pull request [#225][] from [@thommay][]
* Merge pull request [#223][] from [@firmhouse][]
* Merge pull request [#220][] from [@evertrue][]
* Merge pull request [#219][] from [@evertrue][]
* Merge pull request [#204][] from [@usertesting][]
* Merge pull request [#200][] from [@ffuenf][]
* Merge pull request [#188][] from [@larkin][]
* Merge pull request [#184][] from [@tvdinner][]
* Merge pull request [#183][] from [@jenssegers][]
* Merge pull request [#174][] from [@9minutesnooze][]

https://github.com/miketheman/nginx/compare/v2.7.4...v2.7.5

v2.7.4 (2014-06-06)
-------------------
* [COOK-4703] Default openssl version to 1.0.1h to address CVE-2014-0224

v2.7.2 (2014-05-27)
-------------------

- [COOK-4658] - Nginx::socketproxy if the context is blank or nonexistent, the location in the config file has a double slash at the beginning
- [COOK-4644] - add support to nginx::repo for Amazon Linux
- Allow .kitchen.cloud.yml to use an environment variable for the EC2 Availability Zone

v2.7.0 (2014-05-15)
-------------------
- [COOK-4643] - Update metadata lock on ohai
- [COOK-4588] - Give more love to FreeBSD
- [COOK-4601] - Add proxy type: Socket

v2.6.2 (2014-04-09)
-------------------
[COOK-4527] - set default openssl source version to 1.0.1g to address CVE-2014-0160 aka Heartbleed

v2.6.0 (2014-04-08)
-------------------
- Reverting COOK-4323

v2.5.0 (2014-03-27)
-------------------
- [COOK-4323] - Need a resource to easily configure available sites (vhosts)

v2.4.4 (2014-03-13)
-------------------
- Updating for build-essential 2.0

v2.4.2 (2014-02-28)
-------------------
Fixing bad commit from COOK-4330

v2.4.1 (2014-02-27)
-------------------
- [COOK-4345] - nginx default recipe include install type recipe directly

v2.4.0 (2014-02-27)
-------------------
- [COOK-4380] - kitchen.yml platform listings for ubuntu-10.04 and ubuntu-12.04 are missing the dot
- [COOK-4330] - Bump nginx version for security issues (CVE-2013-0337, CVE-2013-4547)

v2.3.0 (2014-02-25)
-------------------
- **[COOK-4293](https://tickets.chef.io/browse/COOK-4293)** - Update testing Gems in nginx and fix a rubocop warnings
- **[COOK-4237] - Nginx version incorrectly parsed on Ubuntu 13
- **[COOK-3866] - Nginx default site folder

v2.2.2 (2014-01-23)
-------------------
[COOK-3672] - Add gzip_static option

v2.2.0
------
No changes. Version bump for toolchain

v2.1.0
------
[COOK-3923] - Enable the list of packages installed by nginx::passenger to be configurable
[COOK-3672] - Nginx should support the gzip_static option
Updating for yum ~> 3.0
Fixing up style for rubocop
Updating test-kitchen harness

v2.0.8
------
fixing metadata version error. locking to 3.0

v2.0.6
------
Locking yum dependency to '< 3'

v2.0.4
------
### Bug
- **[COOK-3808](https://tickets.chef.io/browse/COOK-3808)** - nginx::passenger run fails because of broken installation of package dependencies
- **[COOK-3779](https://tickets.chef.io/browse/COOK-3779)** - Build in master fails due to rubocop error

v2.0.2
------
### Bug
- **[COOK-3808](https://tickets.chef.io/browse/COOK-3808)** - nginx::passenger run fails because of broken installation of package dependencies
- **[COOK-3779](https://tickets.chef.io/browse/COOK-3779)** - Build in master fails due to rubocop error

v2.0.0
------
### Improvement
- **[COOK-3733](https://tickets.chef.io/browse/COOK-3733)** - Add RPM key names and GPG checking
- **[COOK-3687](https://tickets.chef.io/browse/COOK-3687)** - Add support for `http_perl`
- **[COOK-3603](https://tickets.chef.io/browse/COOK-3603)** - Add a recipe for using custom openssl
- **[COOK-3602](https://tickets.chef.io/browse/COOK-3602)** - Use an attribute for the status module port
- **[COOK-3549](https://tickets.chef.io/browse/COOK-3549)** - Refactor custom modules support
- **[COOK-3521](https://tickets.chef.io/browse/COOK-3521)** - Add support for `http_auth_request`
- **[COOK-3520](https://tickets.chef.io/browse/COOK-3520)** - Add support for `spdy`
- **[COOK-3185](https://tickets.chef.io/browse/COOK-3185)** - Add `gzip_*` attributes
- **[COOK-2712](https://tickets.chef.io/browse/COOK-2712)** - Update `upload_progress` version to 0.9.0

### Bug
- **[COOK-3686](https://tickets.chef.io/browse/COOK-3686)** - Remove deprecated 'passenger_use_global_queue' directive
- **[COOK-3626](https://tickets.chef.io/browse/COOK-3626)** - Parameterize hardcoded path to helper scripts
- **[COOK-3571](https://tickets.chef.io/browse/COOK-3571)** - Reloda ohai plugin after installation
- **[COOK-3428](https://tickets.chef.io/browse/COOK-3428)** - Fix an issue where access logs are not disabled when the `disable_access_log` attribute is set to `true`
- **[COOK-3322](https://tickets.chef.io/browse/COOK-3322)** - Fix an issue where `nginx::ohai_plugin` fails when using source recipe
- **[COOK-3241](https://tickets.chef.io/browse/COOK-3241)** - Fix an issue where`nginx::ohai_plugin` fails unless using source recipe

### New Feature
- **[COOK-3605](https://tickets.chef.io/browse/COOK-3605)** - Add Lua module

v1.8.0
------
### Bug
- **[COOK-3397](https://tickets.chef.io/browse/COOK-3397)** - Fix user from nginx package on Gentoo
- **[COOK-2968](https://tickets.chef.io/browse/COOK-2968)** - Fix foodcritic failure
- **[COOK-2723](https://tickets.chef.io/browse/COOK-2723)** - Remove duplicate  passenger `max_pool_size`

### Improvement
- **[COOK-3186](https://tickets.chef.io/browse/COOK-3186)** - Add `client_body_buffer_size` and `server_tokens attributes`
- **[COOK-3080](https://tickets.chef.io/browse/COOK-3080)** - Add rate-limiting support
- **[COOK-2927](https://tickets.chef.io/browse/COOK-2927)** - Add support for `real_ip_recursive` directive
- **[COOK-2925](https://tickets.chef.io/browse/COOK-2925)** - Fix ChefSpec converge
- **[COOK-2724](https://tickets.chef.io/browse/COOK-2724)** - Automatically create directory for PID file
- **[COOK-2472](https://tickets.chef.io/browse/COOK-2472)** - Bump nginx version to 1.2.9
- **[COOK-2312](https://tickets.chef.io/browse/COOK-2312)** - Add additional `mine_types` to the `gzip_types` value

### New Feature
- **[COOK-3183](https://tickets.chef.io/browse/COOK-3183)** - Allow inclusion in extra-cookbook modules

v1.7.0
------
### Improvement
- [COOK-3030]: The repo_source attribute should allow you to not add any additional repositories to your node

### Sub-task
- [COOK-2738]: move nginx::passenger attributes to `nginx/attributes/passenger.rb`

v1.6.0
------
### Task
- [COOK-2409]: update nginx::source recipe for new `runit_service` resource
- [COOK-2877]: update nginx cookbook test-kitchen support to 1.0 (alpha)

### Improvement
- [COOK-1976]: nginx source should be able to configure binary path
- [COOK-2622]: nginx: add upstart support
- [COOK-2725]: add "configtest" subcommand in initscript

### Bug
- [COOK-2398]: nginx_site definition cannot be used to manage the default site
- [COOK-2493]: Resources in nginx::source recipe always use 1.2.6 version, even overriding version attribute
- [COOK-2531]: Remove usage of non-existant attribute "description" for `apt_repository`
- [COOK-2665]: nginx::source install with custom sbin_path breaks ohai data

v1.4.0
------
- [COOK-2183] - Install nginx package from nginxyum repo
- [COOK-2311] - headers-more should be updated to the latest version
- [COOK-2455] - Support sendfile option (nginx.conf)

v1.3.0
------
- [COOK-1979] - Passenger module requires curl-dev(el)
- [COOK-2219] - Support `proxy_read_timeout` (in nginx.conf)
- [COOK-2220] - Support `client_max_body_size` (in nginx.conf)
- [COOK-2280] - Allow custom timing of nginx_site's reload notification
- [COOK-2304] - nginx cookbook should install 1.2.6 not 1.2.3 for source installs
- [COOK-2309] - checksums for geoip files need to be updated in nginx
- [COOK-2310] - Checksum in the `nginx::upload_progress` recipe is not correct
- [COOK-2314] - nginx::passenger: Install the latest version of passenger
- [COOK-2327] - nginx: passenger recipe should find ruby via Ohai
- [COOK-2328] - nginx: Update mime.types file to the latest
- [COOK-2329] - nginx: Update naxsi rules to the current

v1.2.0
------
- [COOK-1752] - Add headers more module to the nginx cookbook
- [COOK-2209] - nginx source recipe should create web user before creating directories
- [COOK-2221] - make nginx::source compatible with gentoo
- [COOK-2267] - add version for runit recommends

v1.1.4
------
- [COOK-2168] - specify package name as an attribute

v1.1.2
------
- [COOK-1766] - Nginx Source Recipe Rebuilding Source at Every Run
- [COOK-1910] - Add IPv6 module
- [COOK-1966] - nginx cookbook should let you set `gzip_vary` and `gzip_buffers` in  nginx.conf
- [COOK-1969]- - nginx::passenger module not included due to use of symbolized `:nginx_configure_flags`
- [COOK-1971] - Template passenger.conf.erb configures key `passenger_max_pool_size` 2 times
- [COOK-1972] - nginx::source compile_nginx_source reports success in spite of failed compilation
- [COOK-1975] - nginx::passenger requires rake gem
- [COOK-1979] - Passenger module requires curl-dev(el)
- [COOK-2080] - Restart nginx on source compilation

v1.1.0
------
- [COOK-1263] - Nginx log (and possibly other) directory creations should be recursive
- [COOK-1515] - move creation of `node['nginx']['dir']` out of commons.rb
- [COOK-1523] - nginx `http_geoip_module` requires libtoolize
- [COOK-1524] - nginx checksums are md5
- [COOK-1641] - add "use", "`multi_accept`" and "`worker_rlimit_nofile`" to nginx cookbook
- [COOK-1683] - Nginx fails Windows nodes just by being required in metadata
- [COOK-1735] - Support Amazon Linux in nginx::source recipe
- [COOK-1753] - Add ability for nginx::passenger recipe to configure more Passenger global settings
- [COOK-1754] - Allow group to be set in nginx.conf file
- [COOK-1770] - nginx cookbook fails on servers that don't have a "cpu" attribute
- [COOK-1781] - Use 'sv' to reload nginx when using runit
- [COOK-1789] - stop depending on bluepill, runit and yum. they are not required by nginx cookbook
- [COOK-1791] - add name attribute to metadata
- [COOK-1837] - nginx::passenger doesn't work on debian family
- [COOK-1956] - update naxsi version due to incompatibility with newer nginx

v1.0.2
------
- [COOK-1636] - relax the version constraint on ohai

v1.0.0
------
- [COOK-913] - defaults for gzip cause warning on service restart
- [COOK-1020] - duplicate MIME type
- [COOK-1269] - add passenger module support through new recipe
- [COOK-1306] - increment nginx version to 1.2 (now 1.2.3)
- [COOK-1316] - default site should not always be enabled
- [COOK-1417] - resolve errors preventing build from source
- [COOK-1483] - source prefix attribute has no effect
- [COOK-1484] - source relies on /etc/sysconfig
- [COOK-1511] - add support for naxsi module
- [COOK-1525] - nginx source is downloaded every time
- [COOK-1526] - nginx_site does not remove sites
- [COOK-1527] - add `http_echo_module` recipe

v0.101.6
--------
Erroneous cookbook upload due to timeout.

Version #'s are cheap.

v0.101.4
--------
- [COOK-1280] - Improve RHEL family support and fix ohai_plugins recipe bug
- [COOK-1194] - allow installation method via attribute
- [COOK-458] - fix duplicate nginx processes

v0.101.2
--------
* [COOK-1211] - include the default attributes explicitly so version is available.

v0.101.0
--------
**Attribute Change**: `node['nginx']['url']` -> `node['nginx']['source']['url']`; see the README.md.

- [COOK-1115] - daemonize when using init script
- [COOK-477] - module compilation support in nginx::source

v0.100.4
--------
- [COOK-1126] - source version bump to 1.0.14

v0.100.2
--------
- [COOK-1053] - Add :url attribute to nginx cookbook

v0.100.0
--------
- [COOK-818] - add "application/json" per RFC.
- [COOK-870] - bluepill init style support
- [COOK-957] - Compress application/javascript.
- [COOK-981] - Add reload support to NGINX service

v0.99.2
-------
- [COOK-809] - attribute to disable access logging
- [COOK-772] - update nginx download source location

<!--- The following link definition list is generated by PimpMyChangelog --->
[#174]: https://github.com/miketheman/nginx/issues/174
[#183]: https://github.com/miketheman/nginx/issues/183
[#184]: https://github.com/miketheman/nginx/issues/184
[#188]: https://github.com/miketheman/nginx/issues/188
[#200]: https://github.com/miketheman/nginx/issues/200
[#204]: https://github.com/miketheman/nginx/issues/204
[#205]: https://github.com/miketheman/nginx/issues/205
[#219]: https://github.com/miketheman/nginx/issues/219
[#220]: https://github.com/miketheman/nginx/issues/220
[#223]: https://github.com/miketheman/nginx/issues/223
[#225]: https://github.com/miketheman/nginx/issues/225
[#230]: https://github.com/miketheman/nginx/issues/230
[#236]: https://github.com/miketheman/nginx/issues/236
[#240]: https://github.com/miketheman/nginx/issues/240
[#243]: https://github.com/miketheman/nginx/issues/243
[#249]: https://github.com/miketheman/nginx/issues/249
[#252]: https://github.com/miketheman/nginx/issues/252
[#254]: https://github.com/miketheman/nginx/issues/254
[#259]: https://github.com/miketheman/nginx/issues/259
[#269]: https://github.com/miketheman/nginx/issues/269
[#279]: https://github.com/miketheman/nginx/issues/279
[#294]: https://github.com/miketheman/nginx/issues/294
[#298]: https://github.com/miketheman/nginx/issues/298
[#302]: https://github.com/miketheman/nginx/issues/302
[#305]: https://github.com/miketheman/nginx/issues/305
[#310]: https://github.com/miketheman/nginx/issues/310
[#312]: https://github.com/miketheman/nginx/issues/312
[#314]: https://github.com/miketheman/nginx/issues/314
[#318]: https://github.com/miketheman/nginx/issues/318
[#321]: https://github.com/miketheman/nginx/issues/321
[#325]: https://github.com/miketheman/nginx/issues/325
[#326]: https://github.com/miketheman/nginx/issues/326
[#327]: https://github.com/miketheman/nginx/issues/327
[#331]: https://github.com/miketheman/nginx/issues/331
[#332]: https://github.com/miketheman/nginx/issues/332
[#335]: https://github.com/miketheman/nginx/issues/335
[#338]: https://github.com/miketheman/nginx/issues/338
[@9minutesnooze]: https://github.com/9minutesnooze
[@CanOfSpam3bug324]: https://github.com/CanOfSpam3bug324
[@Mytho]: https://github.com/Mytho
[@adepue]: https://github.com/adepue
[@auth0]: https://github.com/auth0
[@bchrobot]: https://github.com/bchrobot
[@bkw]: https://github.com/bkw
[@dwradcliffe]: https://github.com/dwradcliffe
[@evertrue]: https://github.com/evertrue
[@ffuenf]: https://github.com/ffuenf
[@firmhouse]: https://github.com/firmhouse
[@gkra]: https://github.com/gkra
[@gregkare]: https://github.com/gregkare
[@irontoby]: https://github.com/irontoby
[@jalberto]: https://github.com/jalberto
[@jcoleman]: https://github.com/jcoleman
[@jenssegers]: https://github.com/jenssegers
[@josh-padnick]: https://github.com/josh-padnick
[@jujugrrr]: https://github.com/jujugrrr
[@karsten-bruckmann]: https://github.com/karsten-bruckmann
[@larkin]: https://github.com/larkin
[@miketheman]: https://github.com/miketheman
[@monsterstrike]: https://github.com/monsterstrike
[@morr]: https://github.com/morr
[@n1koo]: https://github.com/n1koo
[@nkadel-skyhook]: https://github.com/nkadel-skyhook
[@runningman84]: https://github.com/runningman84
[@shtouff]: https://github.com/shtouff
[@stevenolen]: https://github.com/stevenolen
[@thomasmeeus]: https://github.com/thomasmeeus
[@thommay]: https://github.com/thommay
[@tvdinner]: https://github.com/tvdinner
[@usertesting]: https://github.com/usertesting
[@whatcould]: https://github.com/whatcould
[@yveslaroche]: https://github.com/yveslaroche


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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>BadgerDB: badgerdb::BufDesc Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

BadgerDB

Main Page

Namespaces

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

badgerdb

BufDesc

Friends |
List of all members

badgerdb::BufDesc Class Reference

Class for maintaining information about buffer pool frames.
 More...

#include <buffer.h>

Friends

class 	BufMgr

Detailed Description

Class for maintaining information about buffer pool frames.

Definition at line 24 of file buffer.h.

The documentation for this class was generated from the following file:

/afs/cs.wisc.edu/u/c/o/cordell/Desktop/Databases/DBProject3/src/buffer.h

<address class="footer">
Generated by

 1.8.11
</address>


text:
Spree Waiting List
================
[![Build Status](https://travis-ci.org/DynamoMTL/spree_waiting_list.svg?branch=master)](https://travis-ci.org/DynamoMTL/spree_waiting_list) [![Code Climate](https://codeclimate.com/github/DynamoMTL/spree_waiting_list/badges/gpa.svg)](https://codeclimate.com/github/DynamoMTL/spree_waiting_list) [![Test Coverage](https://codeclimate.com/github/DynamoMTL/spree_waiting_list/badges/coverage.svg)](https://codeclimate.com/github/DynamoMTL/spree_waiting_list) [![Gem Version](https://badge.fury.io/rb/spree_waiting_list.svg)](http://badge.fury.io/rb/spree_waiting_list)

A waiting list extension for Spree.

Users and guests can request to be notified via email when a product/variant comes back in stock.

Installation
------------

Add spree_waiting_list to your Gemfile:

```ruby
gem 'spree_waiting_list'
```

Bundle your dependencies and run the installation generator:

```shell
bundle
bundle exec rails g spree_waiting_list:install
```

Testing
-------

First bundle your dependencies, then run `rake`. `rake` will default to building the dummy app if it does not exist, then it will run specs. The dummy app should be regenerated by using `rake test_app`.

```shell
bundle
bundle exec rake test_app
bundle exec rspec spec
```

When testing your applications integration with this extension you may use it's factories.
Simply add this require statement to your spec_helper:

```ruby
require 'spree_waiting_list/factories'
```

Copyright (c) 2015 Joshua Nussbaum, released under the New BSD License


text:
(function(_, angular, Global) {
  function GenericController(requester, notifier) {
    this.construct(requester, notifier);
  }

  var fn = GenericController.prototype,
      app = angular.module('global/generic_controller', [
        'global/generic_requester', 'global/notifier'
      ]);

  fn.construct = function(requester, notifier) {
    this.requester = requester;
    this.notifier = notifier;

    _.bindAll(this, '_setData');
    this.request();
  };

  fn.request = function() {
    promise = this.requester.request();
    promise.then(this._setData);
  };

  fn._setData = function(response) {
    this.data = response.data;
  }

  app.controller('Global.GenericController', [
    'generic_requester', 'notifier',
    GenericController
  ]);

  Global.GenericController = GenericController;
}(window._, window.angular, window.Global));


text:
import { Route, Switch } from 'react-router-dom';

import SetupInternalAccountContainer from '../containers/SetupInternalAccountContainer';
import MainContainer from './MainContainer';

const SetupMainContainer = () => {
    return (
        <Switch>
            <Route path="/setup-internal-address">
                <SetupInternalAccountContainer />
            </Route>
            <Route path="*">
                <MainContainer />
            </Route>
        </Switch>
    );
};

export default SetupMainContainer;


text:
const resources = {
  PieLegend: {
    'Legend page {{page}} of {{totalPages}}': 'Legendenseite {{page}} von {{totalPages}}'
  },
  PieLegendControls: {
    'Next page': 'Nächste Seite',
    'Previous page': 'Vorherige Seite'
  },
  XYTooltip: {
    'Points sized by': 'Punktgröße nach'
  }
};
export const deDE = {
  locale: 'de-DE',
  resources: {
    'de-DE': resources
  }
};
//# sourceMappingURL=de-DE.js.map


text:
package gov.nih.nci.cabig.caaers.web.ae;

import static org.easymock.EasyMock.expect;
import gov.nih.nci.cabig.caaers.dao.AdverseEventReportingPeriodDao;
import gov.nih.nci.cabig.caaers.dao.ExpeditedAdverseEventReportDao;
import gov.nih.nci.cabig.caaers.dao.StudyDao;
import gov.nih.nci.cabig.caaers.dao.StudyParticipantAssignmentDao;
import gov.nih.nci.cabig.caaers.dao.report.ReportDao;
import gov.nih.nci.cabig.caaers.dao.report.ReportDefinitionDao;
import gov.nih.nci.cabig.caaers.domain.ExpeditedAdverseEventReport;
import gov.nih.nci.cabig.caaers.domain.Fixtures;
import gov.nih.nci.cabig.caaers.domain.ReportStatus;
import gov.nih.nci.cabig.caaers.domain.Study;
import gov.nih.nci.cabig.caaers.domain.expeditedfields.ExpeditedReportTree;
import gov.nih.nci.cabig.caaers.domain.report.Report;
import gov.nih.nci.cabig.caaers.domain.report.ReportVersion;
import gov.nih.nci.cabig.caaers.domain.repository.AdverseEventRoutingAndReviewRepository;
import gov.nih.nci.cabig.caaers.domain.repository.ReportRepository;
import gov.nih.nci.cabig.caaers.web.DwrFacadeTestCase;
import gov.nih.nci.cabig.caaers.web.RenderDecisionManager;
import gov.nih.nci.cabig.caaers.web.dwr.AjaxOutput;

/**
 * This class tests the class - SubmitReportAjaxFacade
 * @author Sameer Sawant
 */
public class SubmitReportAjaxFacadeTest extends DwrFacadeTestCase{

	private SubmitReportAjaxFacade facade;
    private StudyDao studyDao;
	private ExpeditedAdverseEventReportDao aeReportDao;
	private ReportDefinitionDao reportDefinitionDao;
	private StudyParticipantAssignmentDao assignmentDao;
	private AdverseEventReportingPeriodDao reportingPeriodDao;
	private ExpeditedReportTree expeditedReportTree;
	private RenderDecisionManager renderDecisionManager;
	private ReportRepository reportRepository;
	private AdverseEventRoutingAndReviewRepository adverseEventRoutingAndReviewRepository;
    private Report report;
    private ReportDao reportDao;

	@Override
	protected void setUp() throws Exception {
		super.setUp();
		aeReportDao = registerDaoMockFor(ExpeditedAdverseEventReportDao.class);
		reportDefinitionDao = registerDaoMockFor(ReportDefinitionDao.class);
		assignmentDao = registerDaoMockFor(StudyParticipantAssignmentDao.class);
		reportingPeriodDao = registerDaoMockFor(AdverseEventReportingPeriodDao.class);
		expeditedReportTree = registerMockFor(ExpeditedReportTree.class);
		renderDecisionManager = registerMockFor(RenderDecisionManager.class);
		reportRepository = registerMockFor(ReportRepository.class);
        studyDao = registerDaoMockFor(StudyDao.class);
		adverseEventRoutingAndReviewRepository = registerMockFor(AdverseEventRoutingAndReviewRepository.class);
	    reportDao = registerDaoMockFor(ReportDao.class);
		facade = new SubmitReportAjaxFacade();
	}

	public void testFetchReportSubmissionStatus() throws Exception{
		ExpeditedAdverseEventReport aeReport = new ExpeditedAdverseEventReport();
		aeReport.setId(1);
		report = new Report();
		ReportVersion reportVersion =  report.getLastVersion();
		reportVersion.setReportStatus(ReportStatus.COMPLETED);
		aeReport.addReport(report);
		SubmitReportAjaxFacade facadeMock = registerMockFor(SubmitReportAjaxFacade.class);
		expect(facadeMock.getWebContext()).andReturn(webContext).anyTimes();
		facade.setAeReportDao(aeReportDao);
        facade.setReportDao(reportDao);
        expect(reportDao.getById(1)).andReturn(report).anyTimes();
		expect(webContext.getCurrentPage()).andReturn("/pages/ae/submitReport");
        expect(webContext.forwardToString("/pages/ae/submitReport?reportId=1&aeReport=1&subview=reportSubmissionStatus")).andReturn("The HTML");
        replayMocks();
        AjaxOutput output = facade.fetchReportSubmissionStatus("1", "1");
        verifyMocks();
        assertEquals("Incorrect object set in ajaxOutput when the ReportStatus was COMPLETE", "COMPLETED", output.getObjectContent());
	}

}


text:
<?xml version="1.0"?>
<package>
  <name>gazebo_grasp_plugin</name>
  <version>1.0.1</version>
  <description>
        Gazebo Model plugin(s) which handle/help grasping in Gazebo.
  </description>

  <!-- One maintainer tag required, multiple allowed, one person per tag -->
  <maintainer email="jennifer.e.buehler@gmail.com">Jennifer Buehler</maintainer>

  <!-- One license tag required, multiple allowed, one license per tag -->
  <!-- Commonly used license strings: -->
  <!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
  <license>GPLv3</license>

  <!-- Url tags are optional, but mutiple are allowed, one per tag -->
  <!-- Optional attribute type can be: website, bugtracker, or repository -->
  <!-- Example: -->
  <!-- <url type="website">http://wiki.ros.org/gazebo_grasp_plugin</url> -->

  <!-- Author tags are optional, mutiple are allowed, one per tag -->
  <!-- Authors do not have to be maintianers, but could be -->
  <author email="jennifer.e.buehler@gmail.com">Jennifer Buehler</author>

  <!-- The *_depend tags are used to specify dependencies -->
  <!-- Dependencies can be catkin packages or system dependencies -->
  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>gazebo_ros</build_depend>
  <build_depend>gazebo</build_depend>
  <build_depend>geometry_msgs</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>std_msgs</build_depend>
  <run_depend>gazebo_ros</run_depend>
  <run_depend>gazebo</run_depend>
  <run_depend>geometry_msgs</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>std_msgs</run_depend>

  <!-- The export tag contains other, unspecified, tags -->
  <export>
    <!-- You can specify that this package is a metapackage here: -->
    <!-- <metapackage/> -->
    <!-- Other tools can request additional information be placed here -->
  </export>
</package>