text:
package org.pipservices.commons.errors;

import org.pipservices.commons.data.*;

import com.fasterxml.jackson.annotation.*;

public class ApplicationException extends Exception {
	private static final long serialVersionUID = -5846403471784245155L;

	private String _message;
	private String _category;
	private int _status = 500;
	private String _code = "UNKNOWN";
	private StringValueMap _details;
	private String _correlationId;
	private String _stackTrace;
	private String _cause;

	public ApplicationException() {
		this(ErrorCategory.Unknown, null, null, null);
	}

	public ApplicationException(String category, String correlationId, String code, String message) {
		super(message != null ? message : "Unknown error");
		_message = message != null ? message : "Unknown error";
		_correlationId = correlationId;
		_code = code != null ? code : "UNKNOWN";
		_category = category != null ? category : ErrorCategory.Unknown;
	}

    @JsonProperty("message")
    @Override
    public String getMessage() { return _message; }
    public void setMessage(String value) { _message = value; }

	@JsonProperty("category")
	public String getCategory() { return _category; }
	public void setCategory(String value) { _category = value; }

    @JsonProperty("code")
	public String getCode() { return _code; }
    public void setCode(String value) { _code = value; }

    @JsonProperty("status")
	public int getStatus() { return _status; }
    public void setStatus(int value) { _status = value; }

    @JsonProperty("details")
    public StringValueMap getDetails() { return _details; }
    public void setDetails(StringValueMap value) { _details = value; }

    @JsonProperty("correlation_id")
    public String getCorrelationId() { return _correlationId; }
    public void setCorrelationId(String value) { _correlationId = value; }

    @JsonProperty("cause")
    public String getCauseString() {
    	if (super.getCause() != null)
    		return super.getCause().getMessage();
		return _cause;
    }
    public void setCauseString(String value) {
    	_cause = value;
    }

    @JsonProperty("stack_trace")
    public String getStackTraceString() {
    	if (_stackTrace != null)
    		return _stackTrace;

    	StackTraceElement[] ste = getStackTrace();
    	StringBuilder builder = new StringBuilder();
    	if (ste != null) {
    		for (int i = 0; i < ste.length; i++) {
    			if (builder.length() > 0)
    				builder.append(" ");
				builder.append(ste[i].toString());
    		}
    	}
    	return builder.toString();
    }
    public void setStackTraceString(String value) {
    	_stackTrace = value;
    }

	public ApplicationException withCode(String code) {
		_code = code != null ? code : "UNKNOWN";
		return this;
	}

	public ApplicationException withStatus(int status) {
		_status = status;
		return this;
	}

	public ApplicationException withDetails(String key, Object value) {
		_details = _details != null ? _details : new StringValueMap();
		_details.setAsObject(key, value);
		return this;
	}

	public ApplicationException withCause(Throwable cause) {
		super.initCause(cause);
		return this;
	}

	public ApplicationException withCorrelationId(String correlationId) {
		_correlationId = correlationId;
		return this;
	}

	public ApplicationException wrap(Throwable cause) {
		if (cause instanceof ApplicationException)
			return (ApplicationException)cause;

		this.withCause(cause);
		return this;
	}

	public static ApplicationException wrapException(
		ApplicationException error, Throwable cause) {

		if (cause instanceof ApplicationException)
			return (ApplicationException)cause;

		error.withCause(cause);
		return error;
	}

}


text:
:root {
  --container-width: 834px;
  --gap: 30px;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--background);
  top: 0;
}

p {
  margin-top: 10px;
}

.group-container {
  width: var(--container-width);
  margin: 60px auto;
}

.group-content {
  position: relative;
  margin-left: auto;
  margin-right: auto;
  width: 50%;
}

/* Sidebar and Navbar */
.sidebar {
  display: flex;
  flex-direction: column;
  float: right;
  margin-right: 7%;
  position: relative;
}

.navbar {
  display: flex;
  flex-direction: row;
  position: absolute;
  right: 0;
  top: 0;
}

.navbar #logout-btn {
  height: 30px;
  width: 30px;
}

.profile-btn-blank {
  background-color: var(--orange);
  border-radius: 50%;
  height: 35px;
  margin: 0 1em;
  width: 35px;
}

.profile-btn-img {
  border-radius: 50%;
  height: 35px;
  width: 35px;
  background-size: cover;
  background-color: #FFFFFF;
  background-position: center;
}

/* Group Header */
.group-header {
  border-radius: 10px;
  width: 100%;
  height: 200px;
  background: var(--light-green);
  margin-bottom: var(--gap);
}

.group-name-banner {
  background: var(--dark-green);
  display: flex;
  height: 50px;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
}

#group-name {
  color: var(--background);
  text-align: center;
  font-family: "Roboto";
  font-style: normal;
  font-weight: normal;
  font-size: 20px;
  width: 100%;
}

/* Post */
.create-post {
  display: block;
  background: var(--near-white);
  border-radius: 10px;
  height: 120px;
  width: 100%;
  margin-bottom: var(--gap);
  position: relative;
}

.user-img-blank {
  height: 60px;
  width: 60px;
  border-radius: 50%;
  background-color: var(--orange);
  align-content: left;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 20px;
  position: absolute;
}

.user-img {
  height: 60px;
  width: 60px;
  border-radius: 50%;
  align-content: left;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
  background-size: cover;
  background-color: #FFFFFF;
  background-position: center;
}

#post-input {
  background-color: var(--placeholder-gray);
  border-radius: 10px;
  align-content: left;
  margin-left: 100px;
  height: 40px;
  width: 70%;
  color: #8a8686;
  font-family: "Roboto";
  font-style: normal;
  font-weight: normal;
  font-size: 15px;
  text-indent: 1em;
  outline: none;
  border: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.camera-btn {
  background: none;
  border: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  right: 0px;
  margin-right: 80px;
  outline: none;
}

.post-btn {
  background: none;
  border: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0px;
  margin-right: 15px;
  outline: none;
}

#fileid {
  display: none;
}

.medium-icon {
  height: 30px;
}

.post-feed {
  position: relative;
  display: block;
  width: 100%;
}

.post-div {
  background: #fcfcfc;
  margin-top: 30px;
  padding-top: 20px;
  position: relative;
  border-radius: 10px;
}

.post-img-div {
  height: 60px;
  width: 60px;
  border-radius: 50%;
  background-color: var(--orange);
  align-content: left;
  position: flex;
  margin-left: 20px;
}

.post-img {
  height: 60px;
  width: 60px;
  margin-bottom: 10px;
  border-radius: 50%;
  background-size: cover;
  background-color: #FFFFFF;
  background-position: center;
}

.post-author {
  text-align: left;
  margin-left: 20px;
  font-family: "Roboto";
  font-style: normal;
  font-weight: bold;
  font-size: 24px;
  line-height: 28px;
  position: flex;
}

.post-content {
  text-align: left;
  font-family: "Roboto";
  font-style: normal;
  font-weight: normal;
  font-size: 24px;
  line-height: 28px;
  margin: 20px;
}

.img-div {
  width: 80%;
  margin-top: 30px;
  margin-bottom: 30px;
  position: relative;
  max-height: 600px;
}

.uploadedImage {
  position: relative;
  margin-right: 20px;
  margin-left: 20px;
  max-width: 100%;
  max-height: 600px;
}

.likes-div {
  width: 100%;
  margin-top: 30px;
  margin-bottom: 20px;
  position: relative;
}

/* heart styling */
.liked {
  animation: like 0.5s 1;
  fill: red;
  stroke: none;
  font-size: 30px;
  margin-left: 90%;
  align-content: left;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
}
.unliked {
  fill: transparent;
  stroke: black;
  stroke-width: 30;
  transition: all 0.5s;
  font-size: 30px;
  margin-left: 90%;
  align-content: left;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
}

.likes-label {
  align-content: left;
  font-family: "Roboto";
  font-style: normal;
  font-weight: normal;
  font-size: 15px;
  color: var(--text-gray);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding-inline-start: 50px;
  margin-block-end: 0;
  margin-block-start: 0;
}

.comment-input {
  background-color: #eeeeee;
  border-radius: 10px;
  height: 50px;
  width: 100%;
  color: var(--text-gray);
  font-family: "Roboto";
  font-style: normal;
  font-weight: normal;
  font-size: 15px;
  outline: none;
  border: none;
  text-indent: 1em;
  bottom: 0;
  left: 0;
  padding-right: 50px;
  box-sizing: border-box;
  position: absolute;
}

.comment-box-div {
  width: 100%;
  bottom: 0;
  left: 0;
  height: 50px;
  position: relative;
}

.small-icon {
  height: 20px;
}

.comments-content {
  margin-top: 50px;
  margin-bottom: 20px;
}

.comment-content {
  list-style-type: none;
  width: 100%;
  position: relative;
  margin-bottom: 10px;
}

.comment-user {
  height: 60px;
  width: 60px;
  border-radius: 50%;
  background-color: var(--light-pink);
  align-content: left;
}

.comment-user-img {
  height: 60px;
  width: 60px;
  border-radius: 50%;
  background-size: cover;
  background-color: #FFFFFF;
  background-position: center;
}

.comment-text-div {
  margin-left: 20px;
  background-color: var(--placeholder-gray);
  border-radius: 10px;
  width: 85%;
  position: relative;
  display: inline-block;
}

.comment-text {
  text-align: left;
  font: normal normal "Roboto" 24px;
  line-height: 28px;
  padding: 10px 15px;
  margin-block-end: 0;
  margin-block-start: 0;
}

#comment-input {
  background-color: var(--placeholder-gray);
  border-radius: 10px;
  align-content: left;
  margin-left: 100px;
  height: 40px;
  width: 70%;
  color: var(--text-gray);
  font: normal normal "Roboto" 15px;
  line-height: 28px;
  padding-left: 8px;
  outline: none;
}
.align-vertical {
  display: inline-block;
  vertical-align: middle;
}

/* Challenge */
.challenge-container {
  background: var(--near-white);
  border-radius: 10px;
  width: 100%;
  padding: 40px;
  margin-bottom: var(--gap);
  box-sizing: border-box;
}

#due-date {
  color: var(--text-gray);
  font-size: 13px;
}

.mark-completed {
  float: right;
  margin-right: 40px;
}

#mark-completed-text {
  position: relative;
  bottom: 25px;
}

/* Central Group Locations */
#group-locations-container {
  background: var(--near-white);
  border-radius: 10px;
  width: 100%;
  padding: 40px;
  box-sizing: border-box;
}

.location-name {
  font-size: 24px;
  margin-block-end: 0.3em;
  margin-block-start: 1em;
}

.location-detail {
  font-size: 20px;
  color: var(--text-gray);
  margin-block-start: 0.2em;
  margin-block-end: 0.2em;
}

.scrollbox-locations {
  margin-top: 15px;
  overflow: auto;
  max-height: 400px;
}

#map {
  margin-top: 20px;
  height: 500px;
  width: 100%;
}

.marker-text {
  font-size: 10px;
}

/* Poll */
.poll-container {
  background: var(--near-white);
  border-radius: 10px;
  width: 100%;
  padding: 40px 0;
  margin-bottom: var(--gap);
}

.inner-poll-container {
  margin: 0px 40px 80px 40px;
}

.section-text {
  font-size: 36px;
  font-weight: bold;
}

h2 {
  font-size: 36px;
  font-weight: bold;
  margin-top: 0;
}

p {
  font-size: 24px;
}

#options-container {
  width: 720px;
}

.poll-rect {
  fill: rgb(232, 238, 209);
}

.poll-inner-rect {
  fill: rgb(115, 197, 134);
}

#input-box {
  width: 710px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background-color: #eeeeee;
  padding-left: 20px;
  font-size: 15px;
  outline: none;
  margin: 0 40px;
}

.votes-label {
  position: relative;
  float: right;
  right: 27px;
  font-size: 24px;
  color: var(--text-gray);
}

input[type="checkbox"] {
  display: none;
}

.check-container {
  position: relative;
  bottom: 30px;
  left: 10px;
}

input[type="checkbox"] + label {
  z-index: 15;
  position: absolute;
  left: 0;
  top: -1px;
  bottom: 10px;
  right: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
  width: 20px;
  border: 4px solid #444;
  height: 20px;
}

.tag {
  margin-left: 40px;
}

input[type="checkbox"]:checked + label {
  z-index: 15;
  display: inline-block;
  transform: rotate(-50deg) translate(5px, -9px);
  transition: all 0.2s ease;
  width: 20px;
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: var(--dark-green);
  border-left-color: transparent;
  height: 20px;
}

input[type="checkbox"]:checked + label:before {
  content: "";
  position: absolute;
  right: 0;
  bottom: -3px;
  width: 100%;
  height: 15px;
  border-left: 4px solid var(--dark-green);
}

#join-group-modal {
  position: fixed; /* Sit on top of the page content */
  display: none; /* Hidden by default */
  width: 100%; /* Full width (cover the whole page) */
  height: 100%; /* Full height (cover the whole page) */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  z-index: 100; /* Specify a stack order to be on top */
  cursor: pointer; /* Add a pointer on hover */
}

#join-group-text {
  position: absolute;
  top: 40%;
  left: 50%;
  font-size: 36px;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
}

#go-to-profile {
  position: absolute;
  top: 60%;
  left: 50%;
  font-size: 24px;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  color: var(--dark-green);
  text-decoration: none;
}

#join-group-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 24px;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  background: var(--dark-green);
  color: white;
  text-decoration: none;
  padding: 15px 20px;
  outline: none;
  border: none;
  border-radius: 10px;
}

@media (max-width: 1600px) {
  .group-container {
    margin-left: auto;
    margin-right: 30%;
  }

  .sidebar {
    margin-right: 3%;
  }
}

redpajama_set_name: RedPajamaGithub


text:
struct _Mix_Music;
struct Mix_Chunk;

class j1Audio : public j1Module
{
public:

	j1Audio();

	// Destructor
	virtual ~j1Audio();

	// Called before render is available
	bool Awake(pugi::xml_node&);

	// Called before quitting
	bool CleanUp();

	bool Update(float dt);

	// Play a music file
	bool PlayMusic(const char* path, float fade_time = DEFAULT_MUSIC_FADE_TIME);

	// Load a WAV in memory
	unsigned int LoadFx(const char* path);

	// Play a previously loaded WAV
	bool PlayFx(unsigned int fx, int repeat = 0);

	//Load the configuration
	bool Save(pugi::xml_node&)const;

	//Save the configuration
	bool Load(const pugi::xml_node&);

public:

	int					fx_volume;
	int					music_volume;

private:

	_Mix_Music*			music;
	p2List<Mix_Chunk*>	fx;

};

#endif // __j1AUDIO_H__


text:
#ifndef MEGAMOLCORE_MMSPDFRAMEDATA_H_INCLUDED
#define MEGAMOLCORE_MMSPDFRAMEDATA_H_INCLUDED
#if (defined(_MSC_VER) && (_MSC_VER > 1000))
#pragma once
#endif /* (defined(_MSC_VER) && (_MSC_VER > 1000)) */

#include "vislib/Array.h"
//#include "vislib/Cuboid.h"
#include "vislib/RawStorage.h"
#include "vislib/memutils.h"
#include "vislib/types.h"

namespace megamol {
namespace moldyn {
namespace io {

/**
 * MMSPD file frame data
 */
class MMSPDFrameData {
public:
    /**
     * Class holding all particles of one type
     *
     * NOTE: NO Double supported! Doubles will be converted to floats!
     */
    class Particles {
    public:
        /**
         * Ctor
         */
        Particles(void);

        /**
         * Dtor
         */
        ~Particles(void);

        /**
         * Allocates the field map overwriting any previously stored field map
         *
         * @param size The size of the new field map in entries
         */
        inline void AllocateFieldMap(SIZE_T size) {
            delete[] this->fieldMap;
            this->fieldMap = new unsigned int[size];
            ZeroMemory(this->fieldMap, sizeof(unsigned int) * size);
        }

        /**
         * Gets the number of particles
         *
         * @return The number of particles
         */
        inline UINT64 Count(void) const {
            return this->count;
        }

        /**
         * Accesses the particle data
         *
         * @return The particle data
         */
        inline vislib::RawStorage& Data(void) {
            return this->data;
        }

        /**
         * Accesses the field map of the particle data
         *
         * @return The field map of the particle data
         */
        inline unsigned int* FieldMap(void) {
            return this->fieldMap;
        }

        /**
         * Answer the field map of the particle data
         *
         * @return The field map of the particle data
         */
        inline const unsigned int* const FieldMap(void) const {
            return this->fieldMap;
        }

        /**
         * Gets the particle data
         *
         * @return The particle data
         */
        inline const vislib::RawStorage& GetData(void) const {
            return this->data;
        }

        /**
         * Sets the number of particles
         *
         * @param cnt The number of particles
         */
        inline void SetCount(UINT64 cnt) {
            this->count = cnt;
        }

        /**
         * Test for equality
         *
         * @param rhs The right-hand side operand
         *
         * @return True if 'this' and 'rhs' are equal
         */
        bool operator==(const Particles& rhs);

    private:
        /** The number of particles */
        UINT64 count;

#ifdef _WIN32
#pragma warning(disable : 4251)
#endif /* _WIN32 */
        /**
         * The particle data
         *
         * This is the raw data following the variable fields defined by
         * the particle type. (never storing the type id field!)
         *
         * NOTE: NO Double supported! Doubles will be converted to floats!
         */
        vislib::RawStorage data;
#ifdef _WIN32
#pragma warning(default : 4251)
#endif /* _WIN32 */

        /**
         * Mapping field indices of the header to storage positions.
         *
         * This is used to reorder the fields to group fields in memory
         * for optimal use for visualizaion.
         */
        unsigned int* fieldMap;
    };

    /**
     * Ctor
     *
     * @param owner The owning data module
     */
    MMSPDFrameData(void);

    /**
     * Dtor
     */
    virtual ~MMSPDFrameData(void);

    /**
     * Accesses the particle data
     *
     * @return The particle data
     */
    inline vislib::Array<Particles>& Data(void) {
        return this->data;
    }

    /**
     * Gets the particle data
     *
     * @return The particle data
     */
    inline const vislib::Array<Particles>& GetData(void) const {
        return this->data;
    }

    /**
     * Accesses the particle index reconstruction data
     *
     * @return The particle index reconstruction data
     */
    inline vislib::RawStorage& IndexReconstructionData(void) {
        return this->idxRec;
    }

    /**
     * Gets the particle index reconstruction data
     *
     * @return The particle index reconstruction data
     */
    inline const vislib::RawStorage& GetIndexReconstructionData(void) const {
        return this->idxRec;
    }

private:
#ifdef _WIN32
#pragma warning(disable : 4251)
#endif /* _WIN32 */
    /**
     * The particle data
     *
     * For each particle type (array index) the list of particles is stored
     * with their raw data corresponding to the field of the particle type
     * definition (optionally including UINT64 index; but never including
     * the type).
     */
    vislib::Array<Particles> data;
#ifdef _WIN32
#pragma warning(default : 4251)
#endif /* _WIN32 */

#ifdef _WIN32
#pragma warning(disable : 4251)
#endif /* _WIN32 */
    /**
     * The particle index reconstruction data
     *
     * If loaded, this memory contains the blocks from the different arrays
     * of 'data' in the order they were stored in the data file. The first
     * integer defines the type index and the second integer defines the
     * number of particles.
     * All integers are RLE-Bit-Encoded.
     * (worst case 2 byte per particle)
     */
    vislib::RawStorage idxRec;
#ifdef _WIN32
#pragma warning(default : 4251)
#endif /* _WIN32 */
};

} /* end namespace io */
} /* end namespace moldyn */
} /* end namespace megamol */

#endif /* MEGAMOLCORE_MMSPDFRAMEDATA_H_INCLUDED */


text:
import CodeNode from './CodeNode.js';

class ConstNode extends CodeNode {

	constructor( code = '', type = '', name = '' ) {

		super( code, type );

		this.includes = [];

		this.name = name;

	}

	generate( builder, output ) {

		const code = super.generate( builder );

		const type = this.getType( builder );
		const nodeCode = builder.getCodeFromNode( this, type );

		if ( this.name !== '' ) {

			// use a custom property name

			nodeCode.name = this.name;

		}

		const propertyName = builder.getPropertyName( nodeCode );

		nodeCode.code = `#define ${propertyName} ${code}`;

		return builder.format( propertyName, type, output );

	}

}

export default ConstNode;


text:
package org.apache.zeppelin.cassandra;

import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.CqlSessionBuilder;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
import com.datastax.oss.driver.api.core.config.DriverConfigLoader;
import com.datastax.oss.driver.api.core.config.ProgrammaticDriverConfigLoaderBuilder;
import com.datastax.oss.driver.internal.core.loadbalancing.DcInferringLoadBalancingPolicy;
import com.datastax.oss.driver.shaded.guava.common.net.InetAddresses;
import org.apache.commons.lang3.StringUtils;
import org.apache.zeppelin.interpreter.Interpreter;
import org.apache.zeppelin.interpreter.InterpreterContext;
import org.apache.zeppelin.interpreter.InterpreterResult;
import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
import org.apache.zeppelin.scheduler.Scheduler;
import org.apache.zeppelin.scheduler.SchedulerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
import java.io.InputStream;
import java.net.InetSocketAddress;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.KeyStore;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Properties;

import static java.lang.Integer.parseInt;

/**
 * Interpreter for Apache Cassandra CQL query language.
 */
public class CassandraInterpreter extends Interpreter {

  private static final Logger LOGGER = LoggerFactory.getLogger(CassandraInterpreter.class);

  public static final String CASSANDRA_INTERPRETER_PARALLELISM =
          "cassandra.interpreter.parallelism";
  public static final String CASSANDRA_HOSTS = "cassandra.hosts";
  public static final String CASSANDRA_PORT = "cassandra.native.port";
  public static final String CASSANDRA_PROTOCOL_VERSION = "cassandra.protocol.version";
  public static final String CASSANDRA_CLUSTER_NAME = "cassandra.cluster";
  public static final String CASSANDRA_KEYSPACE_NAME = "cassandra.keyspace";
  public static final String CASSANDRA_COMPRESSION_PROTOCOL = "cassandra.compression.protocol";
  public static final String CASSANDRA_CREDENTIALS_USERNAME = "cassandra.credentials.username";
  public static final String CASSANDRA_CREDENTIALS_PASSWORD = "cassandra.credentials.password";
  public static final String CASSANDRA_LOAD_BALANCING_POLICY = "cassandra.load.balancing.policy";
  public static final String CASSANDRA_RETRY_POLICY = "cassandra.retry.policy";
  public static final String CASSANDRA_RECONNECTION_POLICY = "cassandra.reconnection.policy";
  public static final String CASSANDRA_SPECULATIVE_EXECUTION_POLICY =
          "cassandra.speculative.execution.policy";
  public static final String CASSANDRA_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS =
          "cassandra.max.schema.agreement.wait.second";
  public static final String CASSANDRA_POOLING_CONNECTION_PER_HOST_LOCAL =
          "cassandra.pooling.connection.per.host.local";
  public static final String CASSANDRA_POOLING_CONNECTION_PER_HOST_REMOTE =
          "cassandra.pooling.connection.per.host.remote";
  public static final String CASSANDRA_POOLING_MAX_REQUESTS_PER_CONNECTION =
          "cassandra.pooling.max.request.per.connection";
  public static final String CASSANDRA_POOLING_POOL_TIMEOUT_MILLIS =
          "cassandra.pooling.pool.timeout.millisecs";
  public static final String CASSANDRA_POOLING_HEARTBEAT_INTERVAL_SECONDS =
          "cassandra.pooling.heartbeat.interval.seconds";
  public static final String CASSANDRA_QUERY_DEFAULT_CONSISTENCY =
          "cassandra.query.default.consistency";
  public static final String CASSANDRA_QUERY_DEFAULT_SERIAL_CONSISTENCY =
          "cassandra.query.default.serial.consistency";
  public static final String CASSANDRA_QUERY_DEFAULT_FETCH_SIZE =
          "cassandra.query.default.fetchSize";
  public static final String CASSANDRA_QUERY_DEFAULT_IDEMPOTENCE =
          "cassandra.query.default.idempotence";
  public static final String CASSANDRA_SOCKET_CONNECTION_TIMEOUT_MILLIS =
          "cassandra.socket.connection.timeout.millisecs";
  public static final String CASSANDRA_SOCKET_KEEP_ALIVE =
          "cassandra.socket.keep.alive";
  public static final String CASSANDRA_SOCKET_READ_TIMEOUT_MILLIS =
          "cassandra.socket.read.timeout.millisecs";
  public static final String CASSANDRA_SOCKET_RECEIVED_BUFFER_SIZE_BYTES =
          "cassandra.socket.received.buffer.size.bytes";
  public static final String CASSANDRA_SOCKET_REUSE_ADDRESS =
          "cassandra.socket.reuse.address";
  public static final String CASSANDRA_SOCKET_SEND_BUFFER_SIZE_BYTES =
          "cassandra.socket.send.buffer.size.bytes";
  public static final String CASSANDRA_SOCKET_SO_LINGER =
          "cassandra.socket.soLinger";
  public static final String CASSANDRA_SOCKET_TCP_NO_DELAY =
          "cassandra.socket.tcp.no_delay";
  public static final String CASSANDRA_WITH_SSL =
          "cassandra.ssl.enabled";
  public static final String CASSANDRA_TRUSTSTORE_PATH =
          "cassandra.ssl.truststore.path";
  public static final String CASSANDRA_TRUSTSTORE_PASSWORD =
          "cassandra.ssl.truststore.password";

  public static final String DEFAULT_HOST = "127.0.0.1";
  public static final String DEFAULT_PORT = "9042";
  public static final String DEFAULT_KEYSPACE = "system";
  public static final String DEFAULT_PROTOCOL_VERSION = "DEFAULT";
  public static final String DEFAULT_COMPRESSION = "none";
  public static final String DEFAULT_CONNECTIONS_PER_HOST = "1";
  public static final String DEFAULT_MAX_REQUEST_PER_CONNECTION = "1024";
  public static final String DEFAULT_POLICY = "DEFAULT";
  public static final String DEFAULT_PARALLELISM = "10";
  public static final String DEFAULT_POOL_TIMEOUT = "5000";
  public static final String DEFAULT_HEARTBEAT_INTERVAL = "30";
  public static final String DEFAULT_CONSISTENCY = "ONE";
  public static final String DEFAULT_SERIAL_CONSISTENCY = "SERIAL";
  public static final String DEFAULT_FETCH_SIZE = "5000";
  public static final String DEFAULT_CONNECTION_TIMEOUT = "5000";
  public static final String DEFAULT_READ_TIMEOUT = "12000";
  public static final String DEFAULT_TCP_NO_DELAY = "true";
  public static final String DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS = "12";

  static final List NO_COMPLETION = new ArrayList<>();

  InterpreterLogic helper;
  CqlSession session;
  private JavaDriverConfig driverConfig = new JavaDriverConfig();

  public CassandraInterpreter(Properties properties) {
    super(properties);
  }

  @Override
  public void open() {

    final String[] addresses = getProperty(CASSANDRA_HOSTS, DEFAULT_HOST).split(",");
    final int port = parseInt(getProperty(CASSANDRA_PORT, DEFAULT_PORT));
    Collection<InetSocketAddress> hosts = new ArrayList<>();
    for (String address : addresses) {
      if (InetAddresses.isInetAddress(address)) {
        hosts.add(new InetSocketAddress(address, port));
      } else {
        // TODO(alex): maybe it won't be necessary in 4.4
        hosts.add(InetSocketAddress.createUnresolved(address, port));
      }
    }

    LOGGER.info("Bootstrapping Cassandra Java Driver to connect to " +
            getProperty(CASSANDRA_HOSTS) + "on port " + port);

    // start generation of the config
    ProgrammaticDriverConfigLoaderBuilder configBuilder = DriverConfigLoader.programmaticBuilder();

    driverConfig.setCompressionProtocol(this, configBuilder);
    driverConfig.setPoolingOptions(this, configBuilder);
    driverConfig.setProtocolVersion(this, configBuilder);
    driverConfig.setQueryOptions(this, configBuilder);
    driverConfig.setReconnectionPolicy(this, configBuilder);
    driverConfig.setRetryPolicy(this, configBuilder);
    driverConfig.setSocketOptions(this, configBuilder);
    driverConfig.setSpeculativeExecutionPolicy(this, configBuilder);

    //
    configBuilder.withClass(DefaultDriverOption.LOAD_BALANCING_POLICY_CLASS,
            DcInferringLoadBalancingPolicy.class);
    configBuilder.withBoolean(DefaultDriverOption.RESOLVE_CONTACT_POINTS, false);

    configBuilder.withInt(DefaultDriverOption.CONTROL_CONNECTION_AGREEMENT_TIMEOUT,
            parseInt(getProperty(CASSANDRA_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS,
                    DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS)));

    DriverConfigLoader loader = configBuilder.endProfile().build();
    // TODO(alex): think how to dump built configuration...
    logger.debug(loader.toString());
    // end generation of config

    CqlSessionBuilder clusterBuilder = CqlSession.builder()
            .addContactPoints(hosts)
            .withAuthCredentials(getProperty(CASSANDRA_CREDENTIALS_USERNAME),
                    getProperty(CASSANDRA_CREDENTIALS_PASSWORD))
            .withApplicationName("")
            .withApplicationVersion("");

    String keyspace = getProperty(CASSANDRA_KEYSPACE_NAME, DEFAULT_KEYSPACE);
    if (StringUtils.isNotBlank(keyspace) && !DEFAULT_KEYSPACE.equalsIgnoreCase(keyspace)) {
      clusterBuilder.withKeyspace(keyspace);
    }

    final String runWithSSL = getProperty(CASSANDRA_WITH_SSL);
    if (runWithSSL != null && runWithSSL.equals("true")) {
      LOGGER.debug("Cassandra Interpreter: Using SSL");

      try {
        final SSLContext sslContext;
        {
          final KeyStore trustStore = KeyStore.getInstance("JKS");
          final InputStream stream = Files.newInputStream(Paths.get(
                  getProperty(CASSANDRA_TRUSTSTORE_PATH)));
          trustStore.load(stream, getProperty(CASSANDRA_TRUSTSTORE_PASSWORD).toCharArray());

          final TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(
                  TrustManagerFactory.getDefaultAlgorithm());
          trustManagerFactory.init(trustStore);

          sslContext = SSLContext.getInstance("TLS");
          sslContext.init(null, trustManagerFactory.getTrustManagers(), null);
        }
        clusterBuilder = clusterBuilder.withSslContext(sslContext);
      } catch (Exception e) {
        LOGGER.error(e.toString());
      }
    } else {
      LOGGER.debug("Cassandra Interpreter: Not using SSL");
    }

    session = clusterBuilder.withConfigLoader(loader).build();
    helper = new InterpreterLogic(session);
  }

  @Override
  public void close() {
    session.close();
  }

  @Override
  public InterpreterResult interpret(String st, InterpreterContext context) {
    return helper.interpret(session, st, context);
  }

  @Override
  public void cancel(InterpreterContext context) {
  }

  @Override
  public FormType getFormType() {
    return FormType.SIMPLE;
  }

  @Override
  public int getProgress(InterpreterContext context) {
    return 0;
  }

  @Override
  public List<InterpreterCompletion> completion(String buf, int cursor,
      InterpreterContext interpreterContext) {
    return NO_COMPLETION;
  }

  @Override
  public Scheduler getScheduler() {
    return SchedulerFactory.singleton()
            .createOrGetParallelScheduler(CassandraInterpreter.class.getName() + this.hashCode(),
                    parseInt(getProperty(CASSANDRA_INTERPRETER_PARALLELISM, DEFAULT_PARALLELISM)));
  }
}


text: time since manchester united won a trophy


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

using System;
using AppGeo.Clients;
using AppGeo.Clients.ArcIms.ArcXml;

namespace AppGeo.Clients.ArcIms
{
  public class ArcImsLegendClass : CommonLegendClass
  {
    private TocClass _tocClass = null;

    public ArcImsLegendClass(TocClass tocClass)
    {
      ImageIsTransparent = tocClass.ImageIsTransparent;
      Label = tocClass.Label;

      _tocClass = tocClass;
    }

    public override byte[] Image
    {
      get
      {
        return _tocClass.Image;
      }
    }

    public TocClass TocClass
    {
      get
      {
        return _tocClass;
      }
    }
  }
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using XSocketsClient.Common.Interfaces;

namespace XSocketsClient.Wrapper
{
    public class SocketWrapper2 : ISocketWrapper
    {
        private HttpClient _client;

        public string RemoteIpAddress { get; private set; }
        public Stream ReadStream { get; private set; }
        public Stream WriteStream { get; private set; }
        public async Task SendAsync(byte[] buffer)
        {
            try
            {
                await WriteStream.WriteAsync(buffer, 0, buffer.Length).ConfigureAwait(false);
            }
            catch (IOException)
            {
               // _tokenSource.Cancel();
            }
        }

        public Task<int> ReceiveAsync(byte[] buffer, int offset = 0)
        {
            return ReadStream.ReadAsync(buffer, offset, buffer.Length - offset);
        }

        public void Dispose()
        {
            Close();
        }

        public void Close()
        {
            if (ReadStream != null)
                ReadStream.Dispose();

            _client.CancelPendingRequests();
        }

        public async Task ConnectAsync(Uri host, string origin, string protocol)
        {
            var builder = new UriBuilder(host);

            // translate scheme to http(s)
            if ("wss".Equals(host.Scheme, StringComparison.OrdinalIgnoreCase))
            {
                builder.Scheme = "https";
            }
            else
            {
                builder.Scheme = "http";
            }

            //_client = new HttpClient();

            //var requestMessage = new HttpRequestMessage(HttpMethod.Get, builder.ToString());

            //////Set Headers for WS
            //requestMessage.Headers.Upgrade.Add(new ProductHeaderValue("websocket"));
            //requestMessage.Headers.Connection.Add("Upgrade");
            //requestMessage.Headers.TryAddWithoutValidation("Origin", origin);
            //requestMessage.Headers.TryAddWithoutValidation("Sec-WebSocket-Protocol", protocol);
            //requestMessage.Headers.TryAddWithoutValidation("Sec-WebSocket-Key", key);
            //requestMessage.Headers.TryAddWithoutValidation("Sec-WebSocket-Version", "13");

            //var resp = await _client.SendAsync(requestMessage, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false);

            // //check the headers to validate response
            //var stream = await resp.Content.ReadAsStreamAsync().ConfigureAwait(false);

            ReadStream = stream;
            WriteStream = stream;
        }

        private string GenerateKey()
        {
            var bytes = new byte[16];
            var random = new Random();
            for (var index = 0; index < bytes.Length; index++)
            {
                bytes[index] = (byte)random.Next(0, 255);
            }
            return Convert.ToBase64String(bytes);
        }

    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Vest. Moskov. gos. Univ. 2: 51 (1972)

#### Original name
Gloeosporium hymenocrateris Annal.

### Remarks
null


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;

namespace WpfDataUiCore.Decorators
{
// from
// https://stackoverflow.com/questions/4854079/make-wpf-sl-grid-ignore-a-child-element-when-determining-size#:~:text=Create%20a%20decorator%20that%20will%20ask%20for%200,%280%2C0%29%29%3B%20return%20new%20Size%20%280%2C%200%29%3B%20%7D%20%7D
    public class NoSizeDecorator : Decorator
    {
        protected override Size MeasureOverride(Size constraint)
        {
            // Ask for no space
            Child.Measure(new Size(0, 0));
            return new Size(0, 0);
        }
    }
}


text:
using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Classification;

namespace Microsoft.PythonTools.Repl {
    /// <summary>
    /// Classifies regions for REPL error output spans.  These are always classified as errors.
    /// </summary>
    class ReplOutputClassifier : IClassifier {
        private readonly ReplOutputClassifierProvider _provider;
        internal static object ColorKey = new object();
        private readonly ITextBuffer _buffer;

        public ReplOutputClassifier(ReplOutputClassifierProvider provider, ITextBuffer buffer) {
            _provider = provider;
            _buffer = buffer;
            _buffer.Changed += _buffer_Changed;
        }

        private void _buffer_Changed(object sender, TextContentChangedEventArgs e) {
            if (e.After.Length == 0) {
                // screen was cleared, remove color mappings...
                _buffer.Properties[ColorKey] = new List<ColoredSpan>();
            }
        }

        #region IClassifier Members

        public event EventHandler<ClassificationChangedEventArgs> ClassificationChanged {
            add { }
            remove { }
        }

        public IList<ClassificationSpan> GetClassificationSpans(SnapshotSpan span) {
            List<ColoredSpan> coloredSpans;
            if (!_buffer.Properties.TryGetProperty(ColorKey, out coloredSpans)) {
                return new ClassificationSpan[0];
            }

            List<ClassificationSpan> classifications = new List<ClassificationSpan>();

            int startIndex = coloredSpans.BinarySearch(new ColoredSpan(span, ConsoleColor.White), SpanStartComparer.Instance);
            if (startIndex < 0) {
                startIndex = ~startIndex - 1;
                if (startIndex < 0) {
                    startIndex = 0;
                }
            }

            int spanEnd = span.End.Position;
            for (int i = startIndex; i < coloredSpans.Count && coloredSpans[i].Span.Start < spanEnd; i++) {
                IClassificationType type;
                if (coloredSpans[i].Color != null &&
                    _provider._classTypes.TryGetValue(coloredSpans[i].Color.Value, out type)) {
                    var overlap = span.Overlap(coloredSpans[i].Span);
                    if (overlap != null) {
                        classifications.Add(new ClassificationSpan(overlap.Value, type));
                    }
                }
            }

            return classifications;
        }

        private sealed class SpanStartComparer : IComparer<ColoredSpan> {
            internal static SpanStartComparer Instance = new SpanStartComparer();

            public int Compare(ColoredSpan x, ColoredSpan y) {
                return x.Span.Start - y.Span.Start;
            }
        }

        #endregion
    }

    internal sealed class ColoredSpan {
        public readonly Span Span;
        public readonly ConsoleColor? Color;

        public ColoredSpan(Span span, ConsoleColor? color) {
            Span = span;
            Color = color;
        }
    }
}


text:
package io.skysail.server.um.db.authorization;

import io.skysail.api.um.*;
import io.skysail.server.um.security.shiro.SkysailHashedCredentialsMatcher;

import java.util.Set;

import lombok.extern.slf4j.Slf4j;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.restlet.data.ClientInfo;
import org.restlet.security.*;

@Slf4j
public class DbAuthorizationService implements AuthorizationService, Enroler {

    private DbAuthorizingRealm authorizingRealm;
//    private FileBasedUserManagementProvider userManagementProvider;

    public DbAuthorizationService(UserManagementProvider dbBasedUserManagementProvider) {
        SkysailHashedCredentialsMatcher hashedCredetialsMatcher = new SkysailHashedCredentialsMatcher();
        authorizingRealm = new DbAuthorizingRealm(hashedCredetialsMatcher, null);//simpleUserManagementProvider);
    }
//    public DbAuthorizationService(FileBasedUserManagementProvider simpleUserManagementProvider) {
//        this.userManagementProvider = simpleUserManagementProvider;
//        SkysailHashedCredentialsMatcher hashedCredetialsMatcher = new SkysailHashedCredentialsMatcher();
//
//        hashedCredetialsMatcher.setCacheManager(simpleUserManagementProvider.getCacheManager());
//        authorizingRealm = new DbAuthorizingRealm(hashedCredetialsMatcher,
//                simpleUserManagementProvider);
//    }

    @Override
    public Set<Role> getRolesFor(String principal) {
//        SkysailUser user = userManagementProvider.getByPrincipal(principal);
//        Set<SkysailRole> roles = user.getRoles();
//        if (roles == null) {
//            log.warn("User '" + principal + "' could not be found in the Repository");
//            return Collections.emptySet();
//        }
        return null;// roles.stream().map(r -> getOrCreateRole(r)).collect(Collectors.toSet());
    }

    @Override
    public void enrole(ClientInfo clientInfo) {
        Subject subject = SecurityUtils.getSubject();
        if (subject == null) {
            return;
        }
        // Find all the inherited groups of this user
        // Set<Group> userGroups = findGroups(user);

        // Add roles specific to this user
        Set<Role> userRoles = findRoles(subject);

        for (Role role : userRoles) {
            clientInfo.getRoles().add(role);
        }

        // Add roles common to group members
        // Set<Role> groupRoles = findRoles(userGroups);

        // for (Role role : groupRoles) {
        // clientInfo.getRoles().add(role);
        // }

    }

    private Set<Role> findRoles(Subject subject) {
        return getRolesFor((String) subject.getPrincipal());
    }

    public Realm getRealm() {
        return null;//authorizingRealm;
    }
//
//    private Role getOrCreateRole(SkysailRole r) {
//        RestletRolesProvider restletRolesProvider = userManagementProvider.getRestletRolesProvider();
//        Role role = restletRolesProvider.getRole(r.getName());
//        if (role != null) {
//            return role;
//        }
//        Role newRole = new Role(r.getName());
//        restletRolesProvider.getRoles().add(newRole);
//        return newRole;
//    }

}


text:
require 'spec_helper'

class Hasher
  include Controll::Helper::HashAccess

  attr_reader :params

  def initialize params = nil
    @params = params || {name: 'kris'}
  end
end

describe Controll::Helper::HashAccess do

  subject { clazz.new }
  let(:clazz) { Hasher }

  describe '.hash_access_methods *args' do
    before :all do
      clazz.hash_access_methods :name, hash: :params
    end

    specify { subject.name.should == 'kris' }
  end
end


text:
module.exports = {
  'authorizationPath' : '/oauth/authorize',
  'tokenPath' : '/oauth/token',
  'revocationPath' : '/oauth/revoke',
  'clientID': null,
  'clientSecret': null,
  'site': null,
  'useBasicAuthorizationHeader': true,
  'clientSecretParameterName': 'client_secret'
}


text:
from django.conf.urls import patterns, include, url

import server_status
from server_status.views import ServerStatusDashboard

server_status.autodiscover()

urlpatterns = patterns('',
    url(r'^$', ServerStatusDashboard.as_view(), name='server-status-dashboard'),
)


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/bootstrap-theme.min.css" rel="stylesheet">
    <link href="css/mystyles.css" rel="stylesheet">
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <link href="css/bootstrap-social.css" rel="stylesheet">

    <title>Ristorante Con Fusion</title>

              <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                  Toggle navigation

              </button>

 Home

 About

                       Menu

Appetizers

Main Courses

Desserts

Drinks

Specials

Lunch Buffet

Weekend Brunch

                   Contact

                  Login

               <button type="button" class="close" data-dismiss="modal">×</button>

Login

             <form	class="form-inline">

                  Email	address
                  <input	type="email"	class="form-control"	id="email"	placeholder="Email">

                  Password
                  <input	type="password"	class="form-control"	id="password"	placeholder="Password">

                  	<input	type="checkbox"> Remember	me

               <button	type="submit"	class="btn	btn-info btn-sm">Sign	in</button>
               <button type="button" class="btn btn-default btn-sm"  data-dismiss="modal">Cancel</button>
             </form>

Ristorante con Fusion

We take inspiration from the World's best cuisines, and create a unique fusion experience. Our lipsmacking creations will tickle your culinary senses!

                Reserve Table

               <button type="button" class="close" data-dismiss="modal">×</button>

Reserve Table

                  <form class="form-horizontal" role="form">

                         Number of Guests

                                <input type="radio" id="radio1" name="radio" value="1">1

                                <input type="radio" id="radio2" name="radio" value="2">2

                                <input type="radio" id="radio3" name="radio" value="3">3

                                <input type="radio" id="radio4" name="radio" value="4">4

                                <input type="radio" id="radio5" name="radio" value="5">5

                                <input type="radio" id="radio6" name="radio" value="6">6

                       Section

                            <input type="radio" name="options" id="option1"> Non-Smoking

                            <input type="radio" name="options" id="option2"> Smoking

                        Date and Time

                          <input type="text" class="form-control" id="date" name="date" placeholder="Date">

                          <input type="text" class="form-control" id="time" name="time" placeholder="Time">

                           <button type="submit" class="btn btn-primary btn-md">Reserve</button>

                         <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>

                   </form>

                           ×
                           Warning!: Please call us to reserve for more than six guests.

Uthappizza  Hot $4.99

A unique combination of Indian Uthappam (pancake) and
                          Italian pizza, topped with Cerignola olives, ripe vine
                          cherry tomatoes, Vidalia onion, Guntur chillies and
                          Buffalo Paneer.

More »

Weekend Grand Buffet New

Featuring mouthwatering combinations with a choice of five different salads, six enticing appetizers, six main entrees and five choicest desserts. Free flowing bubbly and soft drinks. All for just $19.99 per person

More »

Alberto Somayya

Award winning three-star Michelin chef with wide
                           International experience having worked closely with
                           whos-who in the culinary world, he specializes in
                            creating mouthwatering Indo-Italian fusion experiences.

More »

                  Previous

                  Next

Our Lipsmacking Culinary Creations

Uthappizza Hot $4.99

A unique combination of Indian Uthappam (pancake) and
                       Italian pizza, topped with Cerignola olives, ripe vine
                       cherry tomatoes, Vidalia onion, Guntur chillies and
                       Buffalo Paneer.

More »

This Month's Promotions

Weekend Grand Buffet
                    New

Featuring mouthwatering combinations with a choice of five different salads, six enticing appetizers, six main entrees and five choicest desserts. Free flowing bubbly and soft drinks. All for just $19.99 per person

More »

Meet our Culinary Specialists

Alberto Somayya

Executive Chef

Award winning three-star Michelin chef with wide
                        International experience having worked closely with
                        whos-who in the culinary world, he specializes in
                         creating mouthwatering Indo-Italian fusion experiences.

More »

Links

Home

About

Menu

Contact

Our Address

                    <address>
		              121, Clear Water Bay Road

		              Clear Water Bay, Kowloon

		              HONG KONG

                  : +852 1234 5678

                  : +852 8765 4321

                  :
                  confusion@food.net
		           </address>

© Copyright 2015 Ristorante Con Fusion


text:
layout: page
weight: 0
title: Group Unsubscribes
group: tracking
seo:
  title: Group Unsubscribes
  description: Allow recipients to unsubscribe from specific types of email you send, rather than everything you send, and stay out of the spam folder.
  keywords: Group suppressions, Group unsubscribes, Group email unsubscribe, Group email suppression
navigation:
  show: true
---

A group unsubscribe happens when a recipient indicates that they would like to opt out from a specific type of email that you send via the [Unsubscribe Groups link](#group-unsubscribe-substitution-tag) from within your email. The list provided here can be filtered by email address or date.

<academy-link img="/img/email-scream750.png" courselink="https://rise.articulate.com/share/Kn6WQo6h1CNmMo9L5RhTnHoPls3sMcxr#/">

#### Offer Unsubscribe Options (and avoid the Spam folder)

Making it easy for contacts to opt out of content you're sending isn't just the right to do, it's the smart thing to do. Enroll in this [Academy Course](https://rise.articulate.com/share/Kn6WQo6h1CNmMo9L5RhTnHoPls3sMcxr#/) to learn more.

</academy-link>

## 	Searching Group Unsubscribes by Date

In the top right corner, you will see a calendar icon. Click this and choose the unsubscribe dates you would like to search between. Your recipient list will refresh, showing the recipients who unsubscribed between these dates.

## 	Download Group Unsubscribes as CSV

*To download your Group Unsubscribe list as a CSV:*

1. Navigate to the Unsubscribe Groups page and locate the list you want to download.
1. Click the action menu next to the list.
1. Select **Export**. The file will download in your browser right away.

## 	Removing Recipients From The List

When you select the checkboxes next to the recipient names or select all, using the checkbox next to the search box, you will see a new button at the top of the page. From this list, you can choose to remove the selected recipients from the list.

 ### 	Group Unsubscribe Substitution Tag

When you add the `<%asm_group_unsubscribe_url%>` tag to your email, we will replace that tag with the text "Unsubscribe From This List", wherever the tag is found in your email. This link will allow your recipients to unsubscribe from the unsubscribe group that you attached to this email.

Alternatively, you can use the `<%asm_group_unsubscribe_raw_url%>` tag which will be replaced with only the group unsubscribe URL without the hyperlinked text "Unsubscribe From This List".

<call-out>

When using our ASM Global or Group Unsubscribe tags, you must pass an unsubscribe group in your API or X-SMTPAPI request for the unsubscribe link to populate.

</call-out>

## 	Using the API

You can manage your Global Unsubscribes via the [Group Suppressions API]({{root_url}}/API_Reference/Web_API_v3/Suppression_Management/groups.html).

## 	Additional Resources

- [Global unsubscribes vs. Group Unsubscribes]({{root_url}}/ui/sending-email/index-suppressions/#suppressions-vs-unsubscribes)
- [Global Unsubscribes]({{root_url}}/ui/sending-email/global-unsubscribes/)
- [Invalid Emails]({{root_url}}/ui/sending-email/invalid-emails/)


text:
<?php

namespace Application\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;

/**
 * Auto-generated Migration: Please modify to your needs!
 */
class Version20150528180307 extends AbstractMigration
{
    public function up(Schema $schema)
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql", "Migration can only be executed safely on 'mysql'.");

//        $this->addSql("CREATE TABLE turno_unidad_educativa (id INT AUTO_INCREMENT NOT NULL, unidad_educativa_id INT DEFAULT NULL, turno_id INT DEFAULT NULL, INDEX IDX_167633EABF20CF2F (unidad_educativa_id), INDEX IDX_167633EA69C5211E (turno_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
//        $this->addSql("ALTER TABLE turno_unidad_educativa ADD CONSTRAINT FK_167633EABF20CF2F FOREIGN KEY (unidad_educativa_id) REFERENCES unidad_educativa (id)");
//        $this->addSql("ALTER TABLE turno_unidad_educativa ADD CONSTRAINT FK_167633EA69C5211E FOREIGN KEY (turno_id) REFERENCES turno (id)");
        $this->addSql("ALTER TABLE establecimiento CHANGE fecha_creacion fecha_creacion VARCHAR(10) DEFAULT NULL");
    }

    public function down(Schema $schema)
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql", "Migration can only be executed safely on 'mysql'.");

//        $this->addSql("DROP TABLE turno_unidad_educativa");
        $this->addSql("ALTER TABLE establecimiento CHANGE fecha_creacion fecha_creacion DATETIME DEFAULT NULL");
    }
}


text:
using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.Xna.Framework.GamerServices
{
    public static class GamerServicesDispatcher
    {

        public static event EventHandler<EventArgs> InstallingTitleUpdate;

        public static void Initialize(IServiceProvider serviceProvider)
        {
            throw new NotImplementedException();
        }

        public static void Update()
        {
            throw new NotImplementedException();
        }

        public static bool IsInitialized
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public static IntPtr WindowHandle
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }
    }
}


text:
{{ site.title }}

{{ site.description }}

          {% if site.show_blog %}

Blog

          {% endif %}

            {% if site.author.facebook_username %}

                  Facebook

            {% endif %}

            {% if site.author.linkedin_username %}

                  LinkedIn

            {% endif %}

            {% if site.author.twitter_username %}

                  Twitter

            {% endif %}

            {% if site.author.github_username %}

                  GitHub

            {% endif %}

			{% if site.author.googleplus_username %}

                  Google+

            {% endif %}

			{% if site.author.instagram_username %}

                  Instagram

            {% endif %}

			{% if site.author.pinterest_username %}

                  Pinterest

            {% endif %}

			{% if site.author.reddit_username %}

                  Reddit

            {% endif %}

			{% if site.author.vimeo_username %}

                  Vimeo

            {% endif %}

			{% if site.author.yelp_username %}

                  Yelp

            {% endif %}

			{% if site.author.youtube_username %}

                  Youtube

            {% endif %}

            {% if site.author.email %}

                  Email

            {% endif %}

            {% if site.show_blog %}

                RSS

            {% endif %}


text:
layout: default
title: Quill - Your powerful, rich text editor
bodyClass: 'home'
redirect_from: /latest/
---

<link href="{{site.katex}}/katex.min.css" rel="stylesheet">
<link href="{{site.highlightjs}}/styles/monokai-sublime.min.css" rel="stylesheet">
<link href="{{ site.cdn }}{{ site.version }}/quill.bubble.css" rel="stylesheet">
<link href="{{ site.cdn }}{{ site.version }}/quill.snow.css" rel="stylesheet">

        <button class="prev">

        </button>
        Switch Examples
        <button class="next">

        </button>

Your powerful, rich text editor.

Trusted by:

                  <select class="ql-header">
                    <option value="1">Heading</option>
                    <option value="2">Subheading</option>
                    <option selected>Normal</option>
                  </select>
                  <select class="ql-font">
                    <option selected>Sailec Light</option>
                    <option value="sofia">Sofia Pro</option>
                    <option value="slabo">Slabo 27px</option>
                    <option value="roboto">Roboto Slab</option>
                    <option value="inconsolata">Inconsolata</option>
                    <option value="ubuntu">Ubuntu Mono</option>
                  </select>

                  <button class="ql-bold"></button>
                  <button class="ql-italic"></button>
                  <button class="ql-underline"></button>

                  <button class="ql-list" value="ordered"></button>
                  <button class="ql-list" value="bullet"></button>
                  <select class="ql-align">
                    <option selected></option>
                    <option value="center"></option>
                    <option value="right"></option>
                    <option value="justify"></option>
                  </select>

                  <button class="ql-link"></button>
                  <button class="ql-image"></button>
                  <button class="ql-video"></button>

                  <button class="ql-formula"></button>
                  <button class="ql-code-block"></button>

                  <button class="ql-clean"></button>

Quill Rich Text Editor

Quill is a free, open source WYSIWYG editor built for the modern web. With its modular architecture and expressive API, it is completely customizable to fit any need.

Getting Started is Easy

// <link href="https://cdn.quilljs.com/1.2.6/quill.snow.css" rel="stylesheet">
// <script src="https://cdn.quilljs.com/1.2.6/quill.min.js"></script>

var quill = new Quill('#editor', {
  modules: {
    toolbar: '#toolbar'
  },
  theme: 'snow'
});

// Open your browser's developer console to try out the API!

Built with

    Download Now

An API Driven Rich Text Editor

Built for Developers

          Granular access to the editor's content, changes and events through a simple API. Works consistently and deterministically with JSON as both input and output.
          View documentation

Cross Platform

          Supports all modern browsers on desktops, tablets and phones. Experience the same consistent behavior and produced HTML across platforms.
          See the Chart

        {% include github.html %}

Fits Like a Glove

        Used in small projects and giant Fortune 500s alike. Start simple with the Quill core then easily customize or add your own extensions later if your product needs grow.
        Learn More


text:
package stork.module.ftp;

import java.net.*;
import java.util.*;
import java.io.*;

import stork.util.*;

// A utility for parsing PASV and EPSV replies.

public class FTPHostPort {
  public byte[] bytes;  // Only the first four bytes of this are used.
  public int port;

  public FTPHostPort(FTPChannel.Reply reply) {
    this(reply.message().split("[()]")[1]);
  }

  public FTPHostPort(String csv) {
    try {
      bytes = new byte[6];
      int i = 0;
      for (String s : csv.split(","))
        bytes[i++] = (byte) Short.parseShort(s);
      if (i != 6)
        throw null;
      port = ((bytes[4]&0xFF)<<8) + (bytes[5]&0xFF);
    } catch (Exception e) {
      throw new RuntimeException("Malformed PASV reply.", e);
    }
  }

  // Get the host/port as a socket address.
  public SocketAddress getAddr() {
    try {
      byte[] b = { bytes[0], bytes[1], bytes[2], bytes[3] };
      InetAddress ia = InetAddress.getByAddress(b);
      return new InetSocketAddress(ia, port & 0xFFFF);
    } catch (UnknownHostException e) {
      throw new RuntimeException(e);
    }
  }

  // Get the IP as a string.
  public String getHost() {
    return (bytes[0]&0xFF)+"."+(bytes[1]&0xFF)+"."+
           (bytes[2]&0xFF)+"."+(bytes[3]&0xFF);
  }

  // Get the port.
  public int getPort() {
    return port & 0xFFFF;
  }

  // Return a comma-separated byte representation.
  public String toString() {
    return (bytes[0]&0xFF)+","+(bytes[1]&0xFF)+
      ","+(bytes[2]&0xFF)+","+(bytes[3]&0xFF)+
      ","+((port&0xFF00)>>8)+","+(port&0xFF);
  }

  private void subnetHack(byte[] b) {
    // Make sure the first three octets are the same as the control channel IP.
    // If they're different, assume the server is a LIAR. We should try
    // connecting to the control channel IP. If only the last octet is
    // different, then don't worry, it probably knows what it's talking about.
    // This is to fix issues with servers telling us their local IPs and then
    // us trying to connect to it and waiting forever. This is just a hack and
    // should be replaced with something more accurate, or, better yet, test if
    // we can act as a passive mode client and have them connect to us, since
    // that would be better and assumably we have control over that.
    if (b[0] == bytes[0])
    if (b[1] == bytes[1])
    if (b[2] == bytes[2])
      return;
    bytes = b;
    Log.fine("Adjusting server IP to: ", getHost());
  }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Anal. Mus. nac. B. Aires, Ser. 2 6: 290 (1899)

#### Original name
Nectria tropicalis Speg.

### Remarks
null


text:
package influx_test

import (
	"encoding/json"
	"fmt"
	"os"
	"testing"
	"time"

	"github.com/spf13/viper"

	"github.com/nanopack/pulse/influx"
	"github.com/nanopack/pulse/plexer"
)

func TestMain(m *testing.M) {
	// start influx

	// configure influx to connect to (DO NOT TEST ON PRODUCTION)
	// viper.SetDefault("influx-address", "http://localhost:8086")
	viper.SetDefault("influx-address", "http://172.28.128.4:8086")
	viper.SetDefault("aggregate-interval", 1)

	// initialize influx
	queries := []string{
		// clean influx to test with (DO NOT RUN ON PRODUCTION)
		"DROP   DATABASE statistics",
		"CREATE DATABASE statistics",
		`CREATE RETENTION POLICY one_day ON statistics DURATION 2d REPLICATION 1 DEFAULT`,
		`CREATE RETENTION POLICY one_week ON statistics DURATION 1w REPLICATION 1`,
	}
	for _, query := range queries {
		_, err := influx.Query(query)
		if err != nil {
			fmt.Printf("Failed to QUERY/INITIALIZE - '%s' skipping tests\n", err)
			os.Exit(0)
		}
	}

	rtn := m.Run()

	_, err := influx.Query("DROP DATABASE statistics")
	if err != nil {
		fmt.Println("Failed to CLEANUP - ", err)
		os.Exit(1)
	}

	os.Exit(rtn)
}
func TestInsert(t *testing.T) {
	// define fake messages
	msg1 := plexer.Message{ID: "cpu_used", Tags: []string{"cpu_not_free"}, Data: "0.34"}
	msg2 := plexer.Message{ID: "ram_used", Tags: []string{"ram_not_free"}, Data: "0.43"}
	messages := plexer.MessageSet{Tags: []string{"host:tester", "test0"}, Messages: []plexer.Message{msg1, msg2}}

	// test inserting into influx
	if err := influx.Insert(messages); err != nil {
		t.Error("Failed to INSERT messages - ", err)
	}
}

func TestQuery(t *testing.T) {
	// ensure insert worked
	response, err := influx.Query(`Select * from one_day./.*/`)
	if err != nil || len(response.Results) < 1 {
		t.Error("Failed to QUERY influx - ", err)
		t.FailNow()
	}

	cpu_used := response.Results[0].Series[0].Values[0][1]

	if cpu_used != json.Number("0.34") {
		t.Error("Failed to QUERY influx - ( BAD INSERT: expected: 0.34, got: ", cpu_used, ")")
	}
}

func TestContinuousQuery(t *testing.T) {
	// start cq checker
	go influx.KeepContinuousQueriesUpToDate()

	// give it a second to update
	time.Sleep(time.Second)

	// ensure insert worked
	response, err := influx.Query(`SHOW CONTINUOUS QUERIES`)
	if err != nil {
		t.Error("Failed to QUERY influx - ", err)
		t.FailNow()
	}

	cq := response.Results[0].Series[1].Values[0][1]
	if cq != "CREATE CONTINUOUS QUERY aggregate ON statistics BEGIN SELECT mean(cpu_used) AS cpu_used, mean(ram_used) AS ram_used INTO statistics.one_week.aggregate FROM statistics.one_day./.*/ GROUP BY time(1m), host END" {
		t.Error("Failed to UPDATE CONTINUOUS QUERY influx - mismatched create statement")
		fmt.Printf("%+q\n", cq)
	}
}


text:
package ca.uhn.fhir.jpa.config;

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster;
import ca.uhn.fhir.interceptor.api.IInterceptorService;
import ca.uhn.fhir.interceptor.executor.InterceptorService;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.jpa.api.dao.IDao;
import ca.uhn.fhir.jpa.api.model.ExpungeOptions;
import ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc;
import ca.uhn.fhir.jpa.batch.BatchJobsConfig;
import ca.uhn.fhir.jpa.batch.config.BatchConstants;
import ca.uhn.fhir.jpa.batch.job.PartitionedUrlValidator;
import ca.uhn.fhir.jpa.batch.mdm.MdmClearJobSubmitterImpl;
import ca.uhn.fhir.jpa.batch.reader.BatchResourceSearcher;
import ca.uhn.fhir.jpa.binstore.BinaryAccessProvider;
import ca.uhn.fhir.jpa.binstore.BinaryStorageInterceptor;
import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportSvc;
import ca.uhn.fhir.jpa.bulk.export.provider.BulkDataExportProvider;
import ca.uhn.fhir.jpa.bulk.export.svc.BulkDataExportSvcImpl;
import ca.uhn.fhir.jpa.bulk.imprt.api.IBulkDataImportSvc;
import ca.uhn.fhir.jpa.bulk.imprt.svc.BulkDataImportSvcImpl;
import ca.uhn.fhir.jpa.cache.IResourceVersionSvc;
import ca.uhn.fhir.jpa.cache.ResourceVersionSvcDaoImpl;
import ca.uhn.fhir.jpa.dao.DaoSearchParamProvider;
import ca.uhn.fhir.jpa.dao.HistoryBuilder;
import ca.uhn.fhir.jpa.dao.HistoryBuilderFactory;
import ca.uhn.fhir.jpa.dao.ISearchBuilder;
import ca.uhn.fhir.jpa.dao.LegacySearchBuilder;
import ca.uhn.fhir.jpa.dao.MatchResourceUrlService;
import ca.uhn.fhir.jpa.dao.SearchBuilderFactory;
import ca.uhn.fhir.jpa.dao.TransactionProcessor;
import ca.uhn.fhir.jpa.dao.expunge.ExpungeEverythingService;
import ca.uhn.fhir.jpa.dao.expunge.ExpungeOperation;
import ca.uhn.fhir.jpa.dao.expunge.ExpungeService;
import ca.uhn.fhir.jpa.dao.expunge.IResourceExpungeService;
import ca.uhn.fhir.jpa.dao.expunge.ResourceExpungeService;
import ca.uhn.fhir.jpa.dao.expunge.ResourceTableFKProvider;
import ca.uhn.fhir.jpa.dao.index.DaoResourceLinkResolver;
import ca.uhn.fhir.jpa.dao.index.DaoSearchParamSynchronizer;
import ca.uhn.fhir.jpa.dao.index.IdHelperService;
import ca.uhn.fhir.jpa.dao.index.SearchParamWithInlineReferencesExtractor;
import ca.uhn.fhir.jpa.dao.mdm.MdmLinkExpandSvc;
import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilder;
import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderCoords;
import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderDate;
import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderFactory;
import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderNumber;
import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderQuantity;
import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderReference;
import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderResourceId;
import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderString;
import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderTag;
import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderToken;
import ca.uhn.fhir.jpa.dao.predicate.PredicateBuilderUri;
import ca.uhn.fhir.jpa.dao.tx.HapiTransactionService;
import ca.uhn.fhir.jpa.delete.DeleteConflictFinderService;
import ca.uhn.fhir.jpa.delete.DeleteConflictService;
import ca.uhn.fhir.jpa.delete.DeleteExpungeJobSubmitterImpl;
import ca.uhn.fhir.jpa.entity.Search;
import ca.uhn.fhir.jpa.graphql.DaoRegistryGraphQLStorageServices;
import ca.uhn.fhir.jpa.interceptor.CascadingDeleteInterceptor;
import ca.uhn.fhir.jpa.interceptor.JpaConsentContextServices;
import ca.uhn.fhir.jpa.interceptor.OverridePathBasedReferentialIntegrityForDeletesInterceptor;
import ca.uhn.fhir.jpa.interceptor.validation.RepositoryValidatingRuleBuilder;
import ca.uhn.fhir.jpa.model.sched.ISchedulerService;
import ca.uhn.fhir.jpa.packages.IHapiPackageCacheManager;
import ca.uhn.fhir.jpa.packages.IPackageInstallerSvc;
import ca.uhn.fhir.jpa.packages.JpaPackageCache;
import ca.uhn.fhir.jpa.packages.NpmJpaValidationSupport;
import ca.uhn.fhir.jpa.packages.PackageInstallerSvcImpl;
import ca.uhn.fhir.jpa.partition.IPartitionLookupSvc;
import ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc;
import ca.uhn.fhir.jpa.partition.PartitionLookupSvcImpl;
import ca.uhn.fhir.jpa.partition.PartitionManagementProvider;
import ca.uhn.fhir.jpa.partition.RequestPartitionHelperSvc;
import ca.uhn.fhir.jpa.provider.DiffProvider;
import ca.uhn.fhir.jpa.provider.SubscriptionTriggeringProvider;
import ca.uhn.fhir.jpa.provider.TerminologyUploaderProvider;
import ca.uhn.fhir.jpa.provider.ValueSetOperationProvider;
import ca.uhn.fhir.jpa.provider.r4.MemberMatcherR4Helper;
import ca.uhn.fhir.jpa.reindex.ReindexJobSubmitterImpl;
import ca.uhn.fhir.jpa.sched.AutowiringSpringBeanJobFactory;
import ca.uhn.fhir.jpa.sched.HapiSchedulerServiceImpl;
import ca.uhn.fhir.jpa.search.PersistedJpaBundleProvider;
import ca.uhn.fhir.jpa.search.PersistedJpaBundleProviderFactory;
import ca.uhn.fhir.jpa.search.PersistedJpaSearchFirstPageBundleProvider;
import ca.uhn.fhir.jpa.search.SearchCoordinatorSvcImpl;
import ca.uhn.fhir.jpa.search.builder.QueryStack;
import ca.uhn.fhir.jpa.search.builder.SearchBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.ComboNonUniqueSearchParameterPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.ComboUniqueSearchParameterPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.CoordsPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.DatePredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.ForcedIdPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.NumberPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.QuantityNormalizedPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.QuantityPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.ResourceIdPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.ResourceLinkPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.ResourceTablePredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.SearchParamPresentPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.SourcePredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.StringPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.TagPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.TokenPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.predicate.UriPredicateBuilder;
import ca.uhn.fhir.jpa.search.builder.sql.GeneratedSql;
import ca.uhn.fhir.jpa.search.builder.sql.SearchQueryBuilder;
import ca.uhn.fhir.jpa.search.builder.sql.SearchQueryExecutor;
import ca.uhn.fhir.jpa.search.builder.sql.SqlObjectFactory;
import ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl;
import ca.uhn.fhir.jpa.search.cache.DatabaseSearchResultCacheSvcImpl;
import ca.uhn.fhir.jpa.search.cache.ISearchCacheSvc;
import ca.uhn.fhir.jpa.search.cache.ISearchResultCacheSvc;
import ca.uhn.fhir.jpa.search.elastic.IndexNamePrefixLayoutStrategy;
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
import ca.uhn.fhir.jpa.search.reindex.ResourceReindexer;
import ca.uhn.fhir.jpa.search.reindex.ResourceReindexingSvcImpl;
import ca.uhn.fhir.jpa.search.warm.CacheWarmingSvcImpl;
import ca.uhn.fhir.jpa.search.warm.ICacheWarmingSvc;
import ca.uhn.fhir.jpa.searchparam.config.SearchParamConfig;
import ca.uhn.fhir.jpa.searchparam.extractor.IResourceLinkResolver;
import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamProvider;
import ca.uhn.fhir.jpa.sp.ISearchParamPresenceSvc;
import ca.uhn.fhir.jpa.sp.SearchParamPresenceSvcImpl;
import ca.uhn.fhir.jpa.term.TermConceptMappingSvcImpl;
import ca.uhn.fhir.jpa.term.api.ITermConceptMappingSvc;
import ca.uhn.fhir.jpa.util.MemoryCacheService;
import ca.uhn.fhir.jpa.validation.JpaResourceLoader;
import ca.uhn.fhir.jpa.validation.ValidationSettings;
import ca.uhn.fhir.mdm.api.IMdmClearJobSubmitter;
import ca.uhn.fhir.rest.api.server.RequestDetails;
import ca.uhn.fhir.rest.api.server.storage.IDeleteExpungeJobSubmitter;
import ca.uhn.fhir.rest.api.server.storage.IReindexJobSubmitter;
import ca.uhn.fhir.rest.server.interceptor.ResponseTerminologyTranslationInterceptor;
import ca.uhn.fhir.rest.server.interceptor.consent.IConsentContextServices;
import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInterceptor;
import ca.uhn.fhir.rest.server.provider.DeleteExpungeProvider;
import ca.uhn.fhir.rest.server.provider.ReindexProvider;
import ca.uhn.fhir.util.ThreadPoolUtil;
import org.hl7.fhir.common.hapi.validation.support.UnknownCodeSystemWarningValidationSupport;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.utilities.graphql.IGraphQLStorageServices;
import org.hl7.fhir.utilities.npm.PackageClient;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Scope;
import org.springframework.core.task.AsyncTaskExecutor;
import org.springframework.core.task.TaskExecutor;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.concurrent.ConcurrentTaskScheduler;
import org.springframework.scheduling.concurrent.ScheduledExecutorFactoryBean;

import javax.annotation.Nullable;
import java.util.Date;

@Configuration
@EnableJpaRepositories(basePackages = "ca.uhn.fhir.jpa.dao.data")
@Import({
	BeanPostProcessorConfig.class,
	BatchJobsConfig.class,
	SearchParamConfig.class,
	ValidationSupportConfig.class
})
public class JpaConfig {
	public static final String JPA_VALIDATION_SUPPORT_CHAIN = "myJpaValidationSupportChain";
	public static final String JPA_VALIDATION_SUPPORT = "myJpaValidationSupport";
	public static final String TASK_EXECUTOR_NAME = "hapiJpaTaskExecutor";
	public static final String GRAPHQL_PROVIDER_NAME = "myGraphQLProvider";
	public static final String PERSISTED_JPA_BUNDLE_PROVIDER = "PersistedJpaBundleProvider";
	public static final String PERSISTED_JPA_BUNDLE_PROVIDER_BY_SEARCH = "PersistedJpaBundleProvider_BySearch";
	public static final String PERSISTED_JPA_SEARCH_FIRST_PAGE_BUNDLE_PROVIDER = "PersistedJpaSearchFirstPageBundleProvider";
	public static final String SEARCH_BUILDER = "SearchBuilder";
	public static final String HISTORY_BUILDER = "HistoryBuilder";
	private static final String HAPI_DEFAULT_SCHEDULER_GROUP = "HAPI";

	@Bean("myDaoRegistry")
	public DaoRegistry daoRegistry() {
		return new DaoRegistry();
	}

	@Lazy
	@Bean
	public CascadingDeleteInterceptor cascadingDeleteInterceptor(FhirContext theFhirContext, DaoRegistry theDaoRegistry, IInterceptorBroadcaster theInterceptorBroadcaster) {
		return new CascadingDeleteInterceptor(theFhirContext, theDaoRegistry, theInterceptorBroadcaster);
	}

	@Lazy
	@Bean
	public ResponseTerminologyTranslationInterceptor responseTerminologyTranslationInterceptor(IValidationSupport theValidationSupport) {
		return new ResponseTerminologyTranslationInterceptor(theValidationSupport);
	}

	@Bean
	@Lazy
	public IGraphQLStorageServices graphqlStorageServices() {
		return new DaoRegistryGraphQLStorageServices();
	}

	@Bean
	public ScheduledExecutorFactoryBean scheduledExecutorService() {
		ScheduledExecutorFactoryBean b = new ScheduledExecutorFactoryBean();
		b.setPoolSize(5);
		b.afterPropertiesSet();
		return b;
	}

	@Bean(name = "mySubscriptionTriggeringProvider")
	@Lazy
	public SubscriptionTriggeringProvider subscriptionTriggeringProvider() {
		return new SubscriptionTriggeringProvider();
	}

	@Bean
	@Lazy
	public ValueSetOperationProvider valueSetOperationProvider() {
		return new ValueSetOperationProvider();
	}

	@Bean
	public TransactionProcessor transactionProcessor() {
		return new TransactionProcessor();
	}

	@Bean(name = "myAttachmentBinaryAccessProvider")
	@Lazy
	public BinaryAccessProvider binaryAccessProvider() {
		return new BinaryAccessProvider();
	}

	@Bean(name = "myBinaryStorageInterceptor")
	@Lazy
	public BinaryStorageInterceptor binaryStorageInterceptor() {
		return new BinaryStorageInterceptor();
	}

	@Bean
	public MemoryCacheService memoryCacheService() {
		return new MemoryCacheService();
	}

	@Bean
	@Primary
	public IResourceLinkResolver daoResourceLinkResolver() {
		return new DaoResourceLinkResolver();
	}

	@Bean
	public IHapiPackageCacheManager packageCacheManager() {
		JpaPackageCache retVal = new JpaPackageCache();
		retVal.getPackageServers().clear();
		retVal.getPackageServers().add(PackageClient.PRIMARY_SERVER);
		retVal.getPackageServers().add(PackageClient.SECONDARY_SERVER);
		return retVal;
	}

	@Bean
	public NpmJpaValidationSupport npmJpaValidationSupport() {
		return new NpmJpaValidationSupport();
	}

	@Bean
	public ValidationSettings validationSettings() {
		return new ValidationSettings();
	}

	@Bean
	public ISearchCacheSvc searchCacheSvc() {
		return new DatabaseSearchCacheSvcImpl();
	}

	@Bean
	public ISearchResultCacheSvc searchResultCacheSvc() {
		return new DatabaseSearchResultCacheSvcImpl();
	}

	@Bean
	public ITermConceptMappingSvc termConceptMappingSvc() {
		return new TermConceptMappingSvcImpl();
	}

	@Bean
	public TaskScheduler taskScheduler() {
		ConcurrentTaskScheduler retVal = new ConcurrentTaskScheduler();
		retVal.setConcurrentExecutor(scheduledExecutorService().getObject());
		retVal.setScheduledExecutor(scheduledExecutorService().getObject());
		return retVal;
	}

	@Bean(name = TASK_EXECUTOR_NAME)
	public AsyncTaskExecutor taskExecutor() {
		ConcurrentTaskScheduler retVal = new ConcurrentTaskScheduler();
		retVal.setConcurrentExecutor(scheduledExecutorService().getObject());
		retVal.setScheduledExecutor(scheduledExecutorService().getObject());
		return retVal;
	}

	@Bean(name = BatchConstants.JOB_LAUNCHING_TASK_EXECUTOR)
	public TaskExecutor jobLaunchingTaskExecutor() {
		return ThreadPoolUtil.newThreadPool(0, 10, "job-launcher-");
	}

	@Bean
	public IResourceReindexingSvc resourceReindexingSvc() {
		return new ResourceReindexingSvcImpl();
	}

	@Bean
	public ResourceReindexer resourceReindexer(FhirContext theFhirContext) {
		return new ResourceReindexer(theFhirContext);
	}

	@Bean
	public BatchResourceSearcher myBatchResourceSearcher() {
		return new BatchResourceSearcher();
	}

	@Bean
	public HapiFhirHibernateJpaDialect hibernateJpaDialect(FhirContext theFhirContext) {
		return new HapiFhirHibernateJpaDialect(theFhirContext.getLocalizer());
	}

	@Bean
	@Lazy
	public OverridePathBasedReferentialIntegrityForDeletesInterceptor overridePathBasedReferentialIntegrityForDeletesInterceptor() {
		return new OverridePathBasedReferentialIntegrityForDeletesInterceptor();
	}

	@Bean
	public IRequestPartitionHelperSvc requestPartitionHelperService() {
		return new RequestPartitionHelperSvc();
	}

	@Bean
	public HapiTransactionService hapiTransactionService() {
		return new HapiTransactionService();
	}

	@Bean
	public IInterceptorService jpaInterceptorService() {
		return new InterceptorService("JPA");
	}

	@Bean
	public IPackageInstallerSvc npmInstallerSvc() {
		return new PackageInstallerSvcImpl();
	}

	@Bean
	public IConsentContextServices consentContextServices() {
		return new JpaConsentContextServices();
	}

	@Bean
	@Lazy
	public DiffProvider diffProvider() {
		return new DiffProvider();
	}

	@Bean
	@Lazy
	public IPartitionLookupSvc partitionConfigSvc() {
		return new PartitionLookupSvcImpl();
	}

	@Bean
	@Lazy
	public PartitionManagementProvider partitionManagementProvider() {
		return new PartitionManagementProvider();
	}

	@Bean
	@Lazy
	public RequestTenantPartitionInterceptor requestTenantPartitionInterceptor() {
		return new RequestTenantPartitionInterceptor();
	}

	@Bean
	public MdmLinkExpandSvc mdmLinkExpandSvc() {
		return new MdmLinkExpandSvc();
	}

	@Bean
	IMdmClearJobSubmitter mdmClearJobSubmitter() {
		return new MdmClearJobSubmitterImpl();
	}

	@Bean
	@Lazy
	public TerminologyUploaderProvider terminologyUploaderProvider() {
		return new TerminologyUploaderProvider();
	}

	@Bean
	public ISchedulerService schedulerService() {
		return new HapiSchedulerServiceImpl().setDefaultGroup(HAPI_DEFAULT_SCHEDULER_GROUP);
	}

	@Bean
	public AutowiringSpringBeanJobFactory schedulerJobFactory() {
		return new AutowiringSpringBeanJobFactory();
	}

	@Bean
	@Lazy
	public IBulkDataExportSvc bulkDataExportSvc() {
		return new BulkDataExportSvcImpl();
	}

	@Bean
	@Lazy
	public BulkDataExportProvider bulkDataExportProvider() {
		return new BulkDataExportProvider();
	}

	@Bean
	@Lazy
	public IDeleteExpungeJobSubmitter deleteExpungeJobSubmitter() {
		return new DeleteExpungeJobSubmitterImpl();
	}

	@Bean
	@Lazy
	public PartitionedUrlValidator partitionedUrlValidator() {
		return new PartitionedUrlValidator();
	}

	@Bean
	@Lazy
	public IReindexJobSubmitter myReindexJobSubmitter() {
		return new ReindexJobSubmitterImpl();
	}

	@Bean
	@Lazy
	public DeleteExpungeProvider deleteExpungeProvider(FhirContext theFhirContext, IDeleteExpungeJobSubmitter theDeleteExpungeJobSubmitter) {
		return new DeleteExpungeProvider(theFhirContext, theDeleteExpungeJobSubmitter);
	}

	@Bean
	@Lazy
	public ReindexProvider reindexProvider(FhirContext theFhirContext, IReindexJobSubmitter theReindexJobSubmitter) {
		return new ReindexProvider(theFhirContext, theReindexJobSubmitter);
	}

	@Bean
	@Lazy
	public IBulkDataImportSvc bulkDataImportSvc() {
		return new BulkDataImportSvcImpl();
	}

	@Bean
	public PersistedJpaBundleProviderFactory persistedJpaBundleProviderFactory() {
		return new PersistedJpaBundleProviderFactory();
	}

	@Bean
	public SearchBuilderFactory searchBuilderFactory() {
		return new SearchBuilderFactory();
	}

	@Bean
	public SqlObjectFactory sqlBuilderFactory() {
		return new SqlObjectFactory();
	}

	@Bean
	public HibernatePropertiesProvider HibernatePropertiesProvider() {
		return new HibernatePropertiesProvider();
	}

	@Bean
	public HistoryBuilderFactory historyBuilderFactory() {
		return new HistoryBuilderFactory();
	}

	@Bean
	public IResourceVersionSvc resourceVersionSvc() {
		return new ResourceVersionSvcDaoImpl();
	}

	/* **************************************************************** *
	 * Prototype Beans Below                                            *
	 * **************************************************************** */

	@Bean(name = PERSISTED_JPA_BUNDLE_PROVIDER)
	@Scope("prototype")
	public PersistedJpaBundleProvider newPersistedJpaBundleProvider(RequestDetails theRequest, String theUuid) {
		return new PersistedJpaBundleProvider(theRequest, theUuid);
	}

	@Bean(name = PERSISTED_JPA_BUNDLE_PROVIDER_BY_SEARCH)
	@Scope("prototype")
	public PersistedJpaBundleProvider newPersistedJpaBundleProvider(RequestDetails theRequest, Search theSearch) {
		return new PersistedJpaBundleProvider(theRequest, theSearch);
	}

	@Bean(name = PERSISTED_JPA_SEARCH_FIRST_PAGE_BUNDLE_PROVIDER)
	@Scope("prototype")
	public PersistedJpaSearchFirstPageBundleProvider newPersistedJpaSearchFirstPageBundleProvider(RequestDetails theRequest, Search theSearch, SearchCoordinatorSvcImpl.SearchTask theSearchTask, ISearchBuilder theSearchBuilder) {
		return new PersistedJpaSearchFirstPageBundleProvider(theSearch, theSearchTask, theSearchBuilder, theRequest);
	}

	@Bean(name = RepositoryValidatingRuleBuilder.REPOSITORY_VALIDATING_RULE_BUILDER)
	@Scope("prototype")
	public RepositoryValidatingRuleBuilder repositoryValidatingRuleBuilder() {
		return new RepositoryValidatingRuleBuilder();
	}

	@Bean
	@Scope("prototype")
	public ComboUniqueSearchParameterPredicateBuilder newComboUniqueSearchParameterPredicateBuilder(SearchQueryBuilder theSearchSqlBuilder) {
		return new ComboUniqueSearchParameterPredicateBuilder(theSearchSqlBuilder);
	}

	@Bean
	@Scope("prototype")
	public ComboNonUniqueSearchParameterPredicateBuilder newComboNonUniqueSearchParameterPredicateBuilder(SearchQueryBuilder theSearchSqlBuilder) {
		return new ComboNonUniqueSearchParameterPredicateBuilder(theSearchSqlBuilder);
	}

	@Bean
	@Scope("prototype")
	public CoordsPredicateBuilder newCoordsPredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new CoordsPredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public DatePredicateBuilder newDatePredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new DatePredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public ForcedIdPredicateBuilder newForcedIdPredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new ForcedIdPredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public NumberPredicateBuilder newNumberPredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new NumberPredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public QuantityPredicateBuilder newQuantityPredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new QuantityPredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public QuantityNormalizedPredicateBuilder newQuantityNormalizedPredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new QuantityNormalizedPredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public ResourceLinkPredicateBuilder newResourceLinkPredicateBuilder(QueryStack theQueryStack, SearchQueryBuilder theSearchBuilder, boolean theReversed) {
		return new ResourceLinkPredicateBuilder(theQueryStack, theSearchBuilder, theReversed);
	}

	@Bean
	@Scope("prototype")
	public ResourceTablePredicateBuilder newResourceTablePredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new ResourceTablePredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public TagPredicateBuilder newTagPredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new TagPredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public ResourceIdPredicateBuilder newResourceIdPredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new ResourceIdPredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public SearchParamPresentPredicateBuilder newSearchParamPresentPredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new SearchParamPresentPredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public StringPredicateBuilder newStringPredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new StringPredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public TokenPredicateBuilder newTokenPredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new TokenPredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public SourcePredicateBuilder newSourcePredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new SourcePredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public UriPredicateBuilder newUriPredicateBuilder(SearchQueryBuilder theSearchBuilder) {
		return new UriPredicateBuilder(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public PredicateBuilderCoords newPredicateBuilderCoords(LegacySearchBuilder theSearchBuilder) {
		return new PredicateBuilderCoords(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public PredicateBuilderDate newPredicateBuilderDate(LegacySearchBuilder theSearchBuilder) {
		return new PredicateBuilderDate(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public PredicateBuilderNumber newPredicateBuilderNumber(LegacySearchBuilder theSearchBuilder) {
		return new PredicateBuilderNumber(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public PredicateBuilderQuantity newPredicateBuilderQuantity(LegacySearchBuilder theSearchBuilder) {
		return new PredicateBuilderQuantity(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public PredicateBuilderReference newPredicateBuilderReference(LegacySearchBuilder theSearchBuilder, PredicateBuilder thePredicateBuilder) {
		return new PredicateBuilderReference(theSearchBuilder, thePredicateBuilder);
	}

	@Bean
	@Scope("prototype")
	public PredicateBuilderResourceId newPredicateBuilderResourceId(LegacySearchBuilder theSearchBuilder) {
		return new PredicateBuilderResourceId(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public PredicateBuilderString newPredicateBuilderString(LegacySearchBuilder theSearchBuilder) {
		return new PredicateBuilderString(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public PredicateBuilderTag newPredicateBuilderTag(LegacySearchBuilder theSearchBuilder) {
		return new PredicateBuilderTag(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public PredicateBuilderToken newPredicateBuilderToken(LegacySearchBuilder theSearchBuilder, PredicateBuilder thePredicateBuilder) {
		return new PredicateBuilderToken(theSearchBuilder, thePredicateBuilder);
	}

	@Bean
	@Scope("prototype")
	public PredicateBuilderUri newPredicateBuilderUri(LegacySearchBuilder theSearchBuilder) {
		return new PredicateBuilderUri(theSearchBuilder);
	}

	@Bean
	@Scope("prototype")
	public SearchQueryExecutor newSearchQueryExecutor(GeneratedSql theGeneratedSql, Integer theMaxResultsToFetch) {
		return new SearchQueryExecutor(theGeneratedSql, theMaxResultsToFetch);
	}

	@Bean(name = SEARCH_BUILDER)
	@Scope("prototype")
	public ISearchBuilder newSearchBuilder(IDao theDao, String theResourceName, Class<? extends IBaseResource> theResourceType, DaoConfig theDaoConfig) {
		if (theDaoConfig.isUseLegacySearchBuilder()) {
			return new LegacySearchBuilder(theDao, theResourceName, theResourceType);
		}
		return new SearchBuilder(theDao, theResourceName, theResourceType);
	}

	@Bean(name = HISTORY_BUILDER)
	@Scope("prototype")
	public HistoryBuilder newPersistedJpaSearchFirstPageBundleProvider(@Nullable String theResourceType, @Nullable Long theResourceId, @Nullable Date theRangeStartInclusive, @Nullable Date theRangeEndInclusive) {
		return new HistoryBuilder(theResourceType, theResourceId, theRangeStartInclusive, theRangeEndInclusive);
	}

	@Bean
	@Primary
	public ISearchParamProvider searchParamProvider() {
		return new DaoSearchParamProvider();
	}

	@Bean
	public IdHelperService idHelperService() {
		return new IdHelperService();
	}

	@Bean
	public ISearchCoordinatorSvc searchCoordinatorSvc() {
		return new SearchCoordinatorSvcImpl();
	}

	@Bean
	public DeleteConflictService deleteConflictService() {
		return new DeleteConflictService();
	}

	@Bean
	public DeleteConflictFinderService deleteConflictFinderService() {
		return new DeleteConflictFinderService();
	}

	@Bean
	public ExpungeService expungeService() {
		return new ExpungeService();
	}

	@Bean
	@Scope("prototype")
	public ExpungeOperation expungeOperation(String theResourceName, Long theResourceId, Long theVersion, ExpungeOptions theExpungeOptions, RequestDetails theRequestDetails) {
		return new ExpungeOperation(theResourceName, theResourceId, theVersion, theExpungeOptions, theRequestDetails);
	}

	@Bean
	public ExpungeEverythingService expungeEverythingService() {
		return new ExpungeEverythingService();
	}

	@Bean
	public IResourceExpungeService resourceExpungeService() {
		return new ResourceExpungeService();
	}

	@Bean
	public ISearchParamPresenceSvc searchParamPresenceService() {
		return new SearchParamPresenceSvcImpl();
	}

	@Bean
	public SearchParamWithInlineReferencesExtractor searchParamWithInlineReferencesExtractor() {
		return new SearchParamWithInlineReferencesExtractor();
	}

	@Bean
	public MatchResourceUrlService matchResourceUrlService() {
		return new MatchResourceUrlService();
	}

	@Bean
	public DaoSearchParamSynchronizer daoSearchParamSynchronizer() {
		return new DaoSearchParamSynchronizer();
	}

	@Bean
	public ResourceTableFKProvider resourceTableFKProvider() {
		return new ResourceTableFKProvider();
	}

	@Bean
	public ICacheWarmingSvc cacheWarmingSvc() {
		return new CacheWarmingSvcImpl();
	}

	@Bean
	public PredicateBuilderFactory predicateBuilderFactory(ApplicationContext theApplicationContext) {
		return new PredicateBuilderFactory(theApplicationContext);
	}

	@Bean
	public IndexNamePrefixLayoutStrategy indexLayoutStrategy() {
		return new IndexNamePrefixLayoutStrategy();
	}

	@Bean
	public JpaResourceLoader jpaResourceLoader() {
		return new JpaResourceLoader();
	}

	@Bean
	public UnknownCodeSystemWarningValidationSupport unknownCodeSystemWarningValidationSupport(FhirContext theFhirContext) {
		return new UnknownCodeSystemWarningValidationSupport(theFhirContext);
	}

	@Lazy
	@Bean
	public MemberMatcherR4Helper memberMatcherR4Helper(FhirContext theFhirContext) {
		return new MemberMatcherR4Helper(theFhirContext);
	}
}