text:
package fixtures.header;

import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceException;
import retrofit.Call;
import com.squareup.okhttp.ResponseBody;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import com.microsoft.rest.DateTimeRfc1123;
import org.joda.time.Period;
import org.apache.commons.codec.binary.Base64;
import fixtures.header.models.GreyscaleColors;
import retrofit.http.POST;
import retrofit.http.Header;

/**
 * An instance of this class provides access to all the operations defined
 * in HeaderOperations.
 */
public interface HeaderOperations {
    /**
     * The interface defining all the services for HeaderOperations to be
     * used by Retrofit to perform actually REST calls.
     */
    interface HeaderService {
        @POST("/header/param/existingkey")
        Call<ResponseBody> paramExistingKey(@Header("User-Agent") String userAgent);

        @POST("/header/response/existingkey")
        Call<ResponseBody> responseExistingKey();

        @POST("/header/param/protectedkey")
        Call<ResponseBody> paramProtectedKey(@Header("Content-Type") String contentType);

        @POST("/header/response/protectedkey")
        Call<ResponseBody> responseProtectedKey();

        @POST("/header/param/prim/integer")
        Call<ResponseBody> paramInteger(@Header("scenario") String scenario, @Header("value") int value);

        @POST("/header/response/prim/integer")
        Call<ResponseBody> responseInteger(@Header("scenario") String scenario);

        @POST("/header/param/prim/long")
        Call<ResponseBody> paramLong(@Header("scenario") String scenario, @Header("value") long value);

        @POST("/header/response/prim/long")
        Call<ResponseBody> responseLong(@Header("scenario") String scenario);

        @POST("/header/param/prim/float")
        Call<ResponseBody> paramFloat(@Header("scenario") String scenario, @Header("value") double value);

        @POST("/header/response/prim/float")
        Call<ResponseBody> responseFloat(@Header("scenario") String scenario);

        @POST("/header/param/prim/double")
        Call<ResponseBody> paramDouble(@Header("scenario") String scenario, @Header("value") double value);

        @POST("/header/response/prim/double")
        Call<ResponseBody> responseDouble(@Header("scenario") String scenario);

        @POST("/header/param/prim/bool")
        Call<ResponseBody> paramBool(@Header("scenario") String scenario, @Header("value") boolean value);

        @POST("/header/response/prim/bool")
        Call<ResponseBody> responseBool(@Header("scenario") String scenario);

        @POST("/header/param/prim/string")
        Call<ResponseBody> paramString(@Header("scenario") String scenario, @Header("value") String value);

        @POST("/header/response/prim/string")
        Call<ResponseBody> responseString(@Header("scenario") String scenario);

        @POST("/header/param/prim/date")
        Call<ResponseBody> paramDate(@Header("scenario") String scenario, @Header("value") String value);

        @POST("/header/response/prim/date")
        Call<ResponseBody> responseDate(@Header("scenario") String scenario);

        @POST("/header/param/prim/datetime")
        Call<ResponseBody> paramDatetime(@Header("scenario") String scenario, @Header("value") String value);

        @POST("/header/response/prim/datetime")
        Call<ResponseBody> responseDatetime(@Header("scenario") String scenario);

        @POST("/header/param/prim/datetimerfc1123")
        Call<ResponseBody> paramDatetimeRfc1123(@Header("scenario") String scenario, @Header("value") DateTimeRfc1123 value);

        @POST("/header/response/prim/datetimerfc1123")
        Call<ResponseBody> responseDatetimeRfc1123(@Header("scenario") String scenario);

        @POST("/header/param/prim/duration")
        Call<ResponseBody> paramDuration(@Header("scenario") String scenario, @Header("value") Period value);

        @POST("/header/response/prim/duration")
        Call<ResponseBody> responseDuration(@Header("scenario") String scenario);

        @POST("/header/param/prim/byte")
        Call<ResponseBody> paramByte(@Header("scenario") String scenario, @Header("value") String value);

        @POST("/header/response/prim/byte")
        Call<ResponseBody> responseByte(@Header("scenario") String scenario);

        @POST("/header/param/prim/enum")
        Call<ResponseBody> paramEnum(@Header("scenario") String scenario, @Header("value") String value);

        @POST("/header/response/prim/enum")
        Call<ResponseBody> responseEnum(@Header("scenario") String scenario);

        @POST("/header/custom/x-ms-client-request-id/9C4D50EE-2D56-4CD3-8152-34347DC9F2B0")
        Call<ResponseBody> customRequestId();

    }
    /**
     * Send a post request with header value "User-Agent": "overwrite"
     *
     * @param userAgent Send a post request with header value "User-Agent": "overwrite"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramExistingKey(String userAgent) throws ServiceException;

    /**
     * Send a post request with header value "User-Agent": "overwrite"
     *
     * @param userAgent Send a post request with header value "User-Agent": "overwrite"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramExistingKeyAsync(String userAgent, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header value "User-Agent": "overwrite"
     *
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseExistingKey() throws ServiceException;

    /**
     * Get a response with header value "User-Agent": "overwrite"
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseExistingKeyAsync(final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header value "Content-Type": "text/html"
     *
     * @param contentType Send a post request with header value "Content-Type": "text/html"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramProtectedKey(String contentType) throws ServiceException;

    /**
     * Send a post request with header value "Content-Type": "text/html"
     *
     * @param contentType Send a post request with header value "Content-Type": "text/html"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramProtectedKeyAsync(String contentType, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header value "Content-Type": "text/html"
     *
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseProtectedKey() throws ServiceException;

    /**
     * Get a response with header value "Content-Type": "text/html"
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseProtectedKeyAsync(final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header values "scenario": "positive", "value": 1 or "scenario": "negative", "value": -2
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @param value Send a post request with header values 1 or -2
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramInteger(String scenario, int value) throws ServiceException;

    /**
     * Send a post request with header values "scenario": "positive", "value": 1 or "scenario": "negative", "value": -2
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @param value Send a post request with header values 1 or -2
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramIntegerAsync(String scenario, int value, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header value "value": 1 or -2
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseInteger(String scenario) throws ServiceException;

    /**
     * Get a response with header value "value": 1 or -2
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseIntegerAsync(String scenario, final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header values "scenario": "positive", "value": 105 or "scenario": "negative", "value": -2
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @param value Send a post request with header values 105 or -2
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramLong(String scenario, long value) throws ServiceException;

    /**
     * Send a post request with header values "scenario": "positive", "value": 105 or "scenario": "negative", "value": -2
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @param value Send a post request with header values 105 or -2
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramLongAsync(String scenario, long value, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header value "value": 105 or -2
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseLong(String scenario) throws ServiceException;

    /**
     * Get a response with header value "value": 105 or -2
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseLongAsync(String scenario, final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header values "scenario": "positive", "value": 0.07 or "scenario": "negative", "value": -3.0
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @param value Send a post request with header values 0.07 or -3.0
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramFloat(String scenario, double value) throws ServiceException;

    /**
     * Send a post request with header values "scenario": "positive", "value": 0.07 or "scenario": "negative", "value": -3.0
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @param value Send a post request with header values 0.07 or -3.0
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramFloatAsync(String scenario, double value, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header value "value": 0.07 or -3.0
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseFloat(String scenario) throws ServiceException;

    /**
     * Get a response with header value "value": 0.07 or -3.0
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseFloatAsync(String scenario, final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @param value Send a post request with header values 7e120 or -3.0
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramDouble(String scenario, double value) throws ServiceException;

    /**
     * Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @param value Send a post request with header values 7e120 or -3.0
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramDoubleAsync(String scenario, double value, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header value "value": 7e120 or -3.0
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseDouble(String scenario) throws ServiceException;

    /**
     * Get a response with header value "value": 7e120 or -3.0
     *
     * @param scenario Send a post request with header values "scenario": "positive" or "negative"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseDoubleAsync(String scenario, final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header values "scenario": "true", "value": true or "scenario": "false", "value": false
     *
     * @param scenario Send a post request with header values "scenario": "true" or "false"
     * @param value Send a post request with header values true or false
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramBool(String scenario, boolean value) throws ServiceException;

    /**
     * Send a post request with header values "scenario": "true", "value": true or "scenario": "false", "value": false
     *
     * @param scenario Send a post request with header values "scenario": "true" or "false"
     * @param value Send a post request with header values true or false
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramBoolAsync(String scenario, boolean value, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header value "value": true or false
     *
     * @param scenario Send a post request with header values "scenario": "true" or "false"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseBool(String scenario) throws ServiceException;

    /**
     * Get a response with header value "value": true or false
     *
     * @param scenario Send a post request with header values "scenario": "true" or "false"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseBoolAsync(String scenario, final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header values "scenario": "valid", "value": "The quick brown fox jumps over the lazy dog" or "scenario": "null", "value": null or "scenario": "empty", "value": ""
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "null" or "empty"
     * @param value Send a post request with header values "The quick brown fox jumps over the lazy dog" or null or ""
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramString(String scenario, String value) throws ServiceException;

    /**
     * Send a post request with header values "scenario": "valid", "value": "The quick brown fox jumps over the lazy dog" or "scenario": "null", "value": null or "scenario": "empty", "value": ""
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "null" or "empty"
     * @param value Send a post request with header values "The quick brown fox jumps over the lazy dog" or null or ""
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramStringAsync(String scenario, String value, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header values "The quick brown fox jumps over the lazy dog" or null or ""
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "null" or "empty"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseString(String scenario) throws ServiceException;

    /**
     * Get a response with header values "The quick brown fox jumps over the lazy dog" or null or ""
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "null" or "empty"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseStringAsync(String scenario, final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header values "scenario": "valid", "value": "2010-01-01" or "scenario": "min", "value": "0001-01-01"
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "min"
     * @param value Send a post request with header values "2010-01-01" or "0001-01-01"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramDate(String scenario, LocalDate value) throws ServiceException;

    /**
     * Send a post request with header values "scenario": "valid", "value": "2010-01-01" or "scenario": "min", "value": "0001-01-01"
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "min"
     * @param value Send a post request with header values "2010-01-01" or "0001-01-01"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramDateAsync(String scenario, LocalDate value, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header values "2010-01-01" or "0001-01-01"
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "min"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseDate(String scenario) throws ServiceException;

    /**
     * Get a response with header values "2010-01-01" or "0001-01-01"
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "min"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseDateAsync(String scenario, final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header values "scenario": "valid", "value": "2010-01-01T12:34:56Z" or "scenario": "min", "value": "0001-01-01T00:00:00Z"
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "min"
     * @param value Send a post request with header values "2010-01-01T12:34:56Z" or "0001-01-01T00:00:00Z"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramDatetime(String scenario, DateTime value) throws ServiceException;

    /**
     * Send a post request with header values "scenario": "valid", "value": "2010-01-01T12:34:56Z" or "scenario": "min", "value": "0001-01-01T00:00:00Z"
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "min"
     * @param value Send a post request with header values "2010-01-01T12:34:56Z" or "0001-01-01T00:00:00Z"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramDatetimeAsync(String scenario, DateTime value, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header values "2010-01-01T12:34:56Z" or "0001-01-01T00:00:00Z"
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "min"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseDatetime(String scenario) throws ServiceException;

    /**
     * Get a response with header values "2010-01-01T12:34:56Z" or "0001-01-01T00:00:00Z"
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "min"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseDatetimeAsync(String scenario, final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header values "scenario": "valid", "value": "Wed, 01 Jan 2010 12:34:56 GMT" or "scenario": "min", "value": "Mon, 01 Jan 0001 00:00:00 GMT"
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "min"
     * @param value Send a post request with header values "Wed, 01 Jan 2010 12:34:56 GMT" or "Mon, 01 Jan 0001 00:00:00 GMT"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramDatetimeRfc1123(String scenario, DateTimeRfc1123 value) throws ServiceException;

    /**
     * Send a post request with header values "scenario": "valid", "value": "Wed, 01 Jan 2010 12:34:56 GMT" or "scenario": "min", "value": "Mon, 01 Jan 0001 00:00:00 GMT"
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "min"
     * @param value Send a post request with header values "Wed, 01 Jan 2010 12:34:56 GMT" or "Mon, 01 Jan 0001 00:00:00 GMT"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramDatetimeRfc1123Async(String scenario, DateTimeRfc1123 value, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header values "Wed, 01 Jan 2010 12:34:56 GMT" or "Mon, 01 Jan 0001 00:00:00 GMT"
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "min"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseDatetimeRfc1123(String scenario) throws ServiceException;

    /**
     * Get a response with header values "Wed, 01 Jan 2010 12:34:56 GMT" or "Mon, 01 Jan 0001 00:00:00 GMT"
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "min"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseDatetimeRfc1123Async(String scenario, final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header values "scenario": "valid", "value": "P123DT22H14M12.011S"
     *
     * @param scenario Send a post request with header values "scenario": "valid"
     * @param value Send a post request with header values "P123DT22H14M12.011S"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramDuration(String scenario, Period value) throws ServiceException;

    /**
     * Send a post request with header values "scenario": "valid", "value": "P123DT22H14M12.011S"
     *
     * @param scenario Send a post request with header values "scenario": "valid"
     * @param value Send a post request with header values "P123DT22H14M12.011S"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramDurationAsync(String scenario, Period value, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header values "P123DT22H14M12.011S"
     *
     * @param scenario Send a post request with header values "scenario": "valid"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseDuration(String scenario) throws ServiceException;

    /**
     * Get a response with header values "P123DT22H14M12.011S"
     *
     * @param scenario Send a post request with header values "scenario": "valid"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseDurationAsync(String scenario, final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header values "scenario": "valid", "value": "啊齄丂狛狜隣郎隣兀﨩"
     *
     * @param scenario Send a post request with header values "scenario": "valid"
     * @param value Send a post request with header values "啊齄丂狛狜隣郎隣兀﨩"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramByte(String scenario, byte[] value) throws ServiceException;

    /**
     * Send a post request with header values "scenario": "valid", "value": "啊齄丂狛狜隣郎隣兀﨩"
     *
     * @param scenario Send a post request with header values "scenario": "valid"
     * @param value Send a post request with header values "啊齄丂狛狜隣郎隣兀﨩"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramByteAsync(String scenario, byte[] value, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header values "啊齄丂狛狜隣郎隣兀﨩"
     *
     * @param scenario Send a post request with header values "scenario": "valid"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseByte(String scenario) throws ServiceException;

    /**
     * Get a response with header values "啊齄丂狛狜隣郎隣兀﨩"
     *
     * @param scenario Send a post request with header values "scenario": "valid"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseByteAsync(String scenario, final ServiceCallback<Void> serviceCallback);

    /**
     * Send a post request with header values "scenario": "valid", "value": "GREY" or "scenario": "null", "value": null
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "null" or "empty"
     * @param value Send a post request with header values 'GREY' . Possible values for this parameter include: 'White', 'black', 'GREY'
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void paramEnum(String scenario, GreyscaleColors value) throws ServiceException;

    /**
     * Send a post request with header values "scenario": "valid", "value": "GREY" or "scenario": "null", "value": null
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "null" or "empty"
     * @param value Send a post request with header values 'GREY' . Possible values for this parameter include: 'White', 'black', 'GREY'
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> paramEnumAsync(String scenario, GreyscaleColors value, final ServiceCallback<Void> serviceCallback);

    /**
     * Get a response with header values "GREY" or null
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "null" or "empty"
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void responseEnum(String scenario) throws ServiceException;

    /**
     * Get a response with header values "GREY" or null
     *
     * @param scenario Send a post request with header values "scenario": "valid" or "null" or "empty"
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> responseEnumAsync(String scenario, final ServiceCallback<Void> serviceCallback);

    /**
     * Send x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request
     *
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    void customRequestId() throws ServiceException;

    /**
     * Send x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    Call<ResponseBody> customRequestIdAsync(final ServiceCallback<Void> serviceCallback);

}


text:
import { Endpoint } from "../../service";

export const endpoints = {

    // bcs/docs/services/basemap.md

    "basemaps": new Endpoint(
        // * Trailing slash is needed if security header is not set
        "GET", "/basemaps/",
    ),

    //  bcs/bcs-basemap-service/src/main/java/com/boundlessgeo/bcs/basemap/
    //  services/ProviderService.java
    "providers": new Endpoint(
        "GET", "/basemaps/providers",
    ),

    "provider": new Endpoint(
        "GET", "/basemaps/providers/{provider}",
    ),

    "manage": new Endpoint(
        "GET", "/basemaps/manage",
    ),
};

redpajama_set_name: RedPajamaGithub


text:
var events = require('events');
var util = require('util');

var Radio = function(station) {
  events.EventEmitter.call(this);

  var self = this;

  setTimeout(function() {
    self.emit('open', station);
  }, 0);

  setTimeout(function() {
    self.emit('stop', station);
  }, 5000);
}

util.inherits(Radio, events.EventEmitter);

module.exports = Radio;


text:
using Ets.Mobile.Business.Entities.Results.Signets;
using Ets.Mobile.Client.Factories.Interfaces.Shared;
using Ets.Mobile.Entities.Signets;
using System.Collections.Generic;

namespace Ets.Mobile.Client.Factories.Interfaces.Signets
{
    public interface ICoursesIntervalSemesterFactory : IFactory<CoursesIntervalSemesterResult, List<CourseIntervalVm>>
    {
    }
}


text:
@lombok.Data @lombok.Getter class DataWithGetter {
  private int x;
  private int y;
  private final String z;
  public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setX(final int x) {
    this.x = x;
  }
  public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setY(final int y) {
    this.y = y;
  }
  public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) {
    if ((o == this))
        return true;
    if ((! (o instanceof DataWithGetter)))
        return false;
    final DataWithGetter other = (DataWithGetter) o;
    if ((! other.canEqual((java.lang.Object) this)))
        return false;
    if ((this.getX() != other.getX()))
        return false;
    if ((this.getY() != other.getY()))
        return false;
    final java.lang.Object this$z = this.getZ();
    final java.lang.Object other$z = other.getZ();
    if (((this$z == null) ? (other$z != null) : (! this$z.equals(other$z))))
        return false;
    return true;
  }
  protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) {
    return (other instanceof DataWithGetter);
  }
  public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() {
    final int PRIME = 59;
    int result = 1;
    result = ((result * PRIME) + this.getX());
    result = ((result * PRIME) + this.getY());
    final java.lang.Object $z = this.getZ();
    result = ((result * PRIME) + (($z == null) ? 0 : $z.hashCode()));
    return result;
  }
  public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
    return (((((("DataWithGetter(x=" + this.getX()) + ", y=") + this.getY()) + ", z=") + this.getZ()) + ")");
  }
  public @java.beans.ConstructorProperties({"z"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") DataWithGetter(final String z) {
    super();
    this.z = z;
  }
  public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() {
    return this.x;
  }
  public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getY() {
    return this.y;
  }
  public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getZ() {
    return this.z;
  }
}


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

import io.airlift.slice.Slice;
import io.airlift.slice.Slices;

import javax.annotation.Nullable;

import java.util.Arrays;

import static io.airlift.slice.SizeOf.SIZE_OF_LONG;
import static java.lang.Math.ceil;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;

public final class BlockUtil
{
    private static final double BLOCK_RESET_SKEW = 1.25;

    private static final int DEFAULT_CAPACITY = 64;
    // See java.util.ArrayList for an explanation
    static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8;

    private BlockUtil()
    {
    }

    static void checkArrayRange(int[] array, int offset, int length)
    {
        requireNonNull(array, "array is null");
        if (offset < 0 || length < 0 || offset + length > array.length) {
            throw new IndexOutOfBoundsException(format("Invalid offset %s and length %s in array with %s elements", offset, length, array.length));
        }
    }

    static void checkArrayRange(boolean[] array, int offset, int length)
    {
        requireNonNull(array, "array is null");
        if (offset < 0 || length < 0 || offset + length > array.length) {
            throw new IndexOutOfBoundsException(format("Invalid offset %s and length %s in array with %s elements", offset, length, array.length));
        }
    }

    static void checkValidRegion(int positionCount, int positionOffset, int length)
    {
        if (positionOffset < 0 || length < 0 || positionOffset + length > positionCount) {
            throw new IndexOutOfBoundsException(format("Invalid position %s and length %s in block with %s positions", positionOffset, length, positionCount));
        }
    }

    static void checkValidPositions(boolean[] positions, int positionCount)
    {
        if (positions.length != positionCount) {
            throw new IllegalArgumentException(format("Invalid positions array size %d, actual position count is %d", positions.length, positionCount));
        }
    }

    static void checkValidPosition(int position, int positionCount)
    {
        if (position < 0 || position >= positionCount) {
            throw new IllegalArgumentException(format("Invalid position %s in block with %s positions", position, positionCount));
        }
    }

    static int calculateNewArraySize(int currentSize)
    {
        // grow array by 50%
        long newSize = (long) currentSize + (currentSize >> 1);

        // verify new size is within reasonable bounds
        if (newSize < DEFAULT_CAPACITY) {
            newSize = DEFAULT_CAPACITY;
        }
        else if (newSize > MAX_ARRAY_SIZE) {
            newSize = MAX_ARRAY_SIZE;
            if (newSize == currentSize) {
                throw new IllegalArgumentException(format("Can not grow array beyond '%s'", MAX_ARRAY_SIZE));
            }
        }
        return (int) newSize;
    }

    static int calculateBlockResetSize(int currentSize)
    {
        long newSize = (long) ceil(currentSize * BLOCK_RESET_SKEW);

        // verify new size is within reasonable bounds
        if (newSize < DEFAULT_CAPACITY) {
            newSize = DEFAULT_CAPACITY;
        }
        else if (newSize > MAX_ARRAY_SIZE) {
            newSize = MAX_ARRAY_SIZE;
        }
        return (int) newSize;
    }

    static int calculateBlockResetBytes(int currentBytes)
    {
        long newBytes = (long) ceil(currentBytes * BLOCK_RESET_SKEW);
        if (newBytes > MAX_ARRAY_SIZE) {
            return MAX_ARRAY_SIZE;
        }
        return (int) newBytes;
    }

    /**
     * Recalculate the offsets array for the specified range.
     * The returned offsets array contains length + 1 integers
     * with the first value set to 0.
     * If the range matches the entire offsets array,  the input array will be returned.
     */
    static int[] compactOffsets(int[] offsets, int index, int length)
    {
        if (index == 0 && offsets.length == length + 1) {
            return offsets;
        }

        int[] newOffsets = new int[length + 1];
        for (int i = 1; i <= length; i++) {
            newOffsets[i] = offsets[index + i] - offsets[index];
        }
        return newOffsets;
    }

    /**
     * Returns a slice containing values in the specified range of the specified slice.
     * If the range matches the entire slice, the input slice will be returned.
     * Otherwise, a copy will be returned.
     */
    static Slice compactSlice(Slice slice, int index, int length)
    {
        if (slice.isCompact() && index == 0 && length == slice.length()) {
            return slice;
        }
        return Slices.copyOf(slice, index, length);
    }

    /**
     * Returns an array containing elements in the specified range of the specified array.
     * If the range matches the entire array, the input array will be returned.
     * Otherwise, a copy will be returned.
     */
    public static boolean[] compactArray(boolean[] array, int index, int length)
    {
        if (index == 0 && length == array.length) {
            return array;
        }
        return Arrays.copyOfRange(array, index, index + length);
    }

    public static byte[] compactArray(byte[] array, int index, int length)
    {
        if (index == 0 && length == array.length) {
            return array;
        }
        return Arrays.copyOfRange(array, index, index + length);
    }

    public static short[] compactArray(short[] array, int index, int length)
    {
        if (index == 0 && length == array.length) {
            return array;
        }
        return Arrays.copyOfRange(array, index, index + length);
    }

    public static int[] compactArray(int[] array, int index, int length)
    {
        if (index == 0 && length == array.length) {
            return array;
        }
        return Arrays.copyOfRange(array, index, index + length);
    }

    public static long[] compactArray(long[] array, int index, int length)
    {
        if (index == 0 && length == array.length) {
            return array;
        }
        return Arrays.copyOfRange(array, index, index + length);
    }

    static int countUsedPositions(boolean[] positions)
    {
        int used = 0;
        for (boolean position : positions) {
            if (position) {
                used++;
            }
        }
        return used;
    }

    /**
     * Returns <tt>true</tt> if the two specified arrays contain the same object in every position.
     * Unlike the {@link Arrays#equals(Object[], Object[])} method, this method compares using reference equals.
     */
    static boolean arraySame(Object[] array1, Object[] array2)
    {
        if (array1 == null || array2 == null || array1.length != array2.length) {
            throw new IllegalArgumentException("array1 and array2 cannot be null and should have same length");
        }

        for (int i = 0; i < array1.length; i++) {
            if (array1[i] != array2[i]) {
                return false;
            }
        }
        return true;
    }

    public static boolean internalPositionInRange(int internalPosition, int offset, int positionCount)
    {
        boolean withinRange = internalPosition >= offset && internalPosition < positionCount + offset;
        assert withinRange : format("internalPosition %s is not within range [%s, %s)", internalPosition, offset, positionCount + offset);
        return withinRange;
    }

    static boolean[] appendNullToIsNullArray(@Nullable boolean[] isNull, int offsetBase, int positionCount)
    {
        int desiredLength = offsetBase + positionCount + 1;
        boolean[] newIsNull = new boolean[desiredLength];
        if (isNull != null) {
            checkArrayRange(isNull, offsetBase, positionCount);
            System.arraycopy(isNull, 0, newIsNull, 0, desiredLength - 1);
        }
        newIsNull[desiredLength - 1] = true;
        return newIsNull;
    }

    static int[] appendNullToOffsetsArray(int[] offsets, int offsetBase, int positionCount)
    {
        checkArrayRange(offsets, offsetBase, positionCount + 1);

        int desiredLength = offsetBase + positionCount + 2;
        int[] newOffsets = Arrays.copyOf(offsets, desiredLength);
        newOffsets[desiredLength - 1] = newOffsets[desiredLength - 2];
        return newOffsets;
    }

    /**
     * Returns a byte array of size capacity if the input buffer is null or smaller than the capacity.
     * If the input buffer is not null, the original values in buffer will be preserved.
     */
    public static byte[] ensureCapacity(byte[] buffer, int capacity)
    {
        if (buffer == null) {
            buffer = new byte[capacity];
        }
        else if (buffer.length < capacity) {
            buffer = Arrays.copyOf(buffer, capacity);
        }

        return buffer;
    }

    /**
     * Returns a short array of size capacity if the input buffer is null or smaller than the capacity.
     * If the input buffer is not null, the original values in buffer will be preserved.
     */
    public static short[] ensureCapacity(short[] buffer, int capacity)
    {
        if (buffer == null) {
            buffer = new short[capacity];
        }
        else if (buffer.length < capacity) {
            buffer = Arrays.copyOf(buffer, capacity);
        }

        return buffer;
    }

    /**
     * Returns an int array of size capacity if the input buffer is null or smaller than the capacity.
     * If the input buffer is not null, the original values in buffer will be preserved.
     */
    public static int[] ensureCapacity(int[] buffer, int capacity)
    {
        if (buffer == null) {
            buffer = new int[capacity];
        }
        else if (buffer.length < capacity) {
            buffer = Arrays.copyOf(buffer, capacity);
        }

        return buffer;
    }

    /**
     * Returns a long array of size capacity if the input buffer is null or smaller than the capacity.
     * If the input buffer is not null, the original values in buffer will be preserved.
     */
    public static long[] ensureCapacity(long[] buffer, int capacity)
    {
        if (buffer == null) {
            buffer = new long[capacity];
        }
        else if (buffer.length < capacity) {
            buffer = Arrays.copyOf(buffer, capacity);
        }

        return buffer;
    }

    public static int getNum128Integers(int length)
    {
        int num128Integers = length / SIZE_OF_LONG / 2;
        if (num128Integers * SIZE_OF_LONG * 2 != length) {
            throw new IllegalArgumentException(format("length %d must be a multiple of 16.", length));
        }
        return num128Integers;
    }
}


text: pipenv run python cocomud.py


text:
package com.bandeira.sidnei.appleitor.Repositorio;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

import com.bandeira.sidnei.appleitor.Classes.ColetaItem;
import com.bandeira.sidnei.appleitor.PersistirColeta.ColetaSQLHelper;

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

public class ColetaItemRepositorio {
    private ColetaSQLHelper helper;

    public ColetaItemRepositorio(Context ctx) {
        helper = new ColetaSQLHelper(ctx);
    }

    private long inserir(ColetaItem item) {
        SQLiteDatabase db = helper.getWritableDatabase();
        ContentValues cv = new ContentValues();
        cv.put(ColetaSQLHelper.COLUNA_CODBARRA, item.codbarras);
        cv.put(ColetaSQLHelper.COLUNA_QUANTIDADE, item.quantidade);
        cv.put(ColetaSQLHelper.COLUNA_ITEMIDCOLETA, item.idcoleta);

        long id = db.insert(ColetaSQLHelper.TABELA_COLETAITEM, null, cv);
        if (id != -1) {
            item._id = id;
        }
        db.close();
        return id;
    }

    private int atualizar(ColetaItem item) {
        SQLiteDatabase db = helper.getWritableDatabase();
        ContentValues cv = new ContentValues();
        cv.put(ColetaSQLHelper.COLUNA_COLETAITEMID, item._id);
        cv.put(ColetaSQLHelper.COLUNA_CODBARRA, item.codbarras);
        cv.put(ColetaSQLHelper.COLUNA_QUANTIDADE, item.quantidade);
        cv.put(ColetaSQLHelper.COLUNA_ITEMIDCOLETA, item.idcoleta);
        int linhasAfetadas = db.update(
                ColetaSQLHelper.TABELA_COLETAITEM,
                cv,
                ColetaSQLHelper.COLUNA_COLETAITEMID +" = ?",
                new String[]{ String.valueOf(item._id)});
        db.close();
        return linhasAfetadas;
    }

    public void salvar(ColetaItem item) {
        if (item._id == 0) {
            inserir(item);
        } else {
            atualizar(item);
        }
    }

    public int excluir(ColetaItem item) {
        SQLiteDatabase db = helper.getWritableDatabase();
        int linhasAfetadas = db.delete(
                ColetaSQLHelper.TABELA_COLETAITEM,
                ColetaSQLHelper.COLUNA_COLETAITEMID +" = ?",
                new String[]{ String.valueOf(item._id)});
        db.close();
        return linhasAfetadas;
    }

    // EXCLUI TODOS OS ITENS REFERENTES A UMA COLETA
    public int excluirTodosItens(Integer CodColeta) {
        SQLiteDatabase db = helper.getWritableDatabase();
        int linhasAfetadas = db.delete(
                ColetaSQLHelper.TABELA_COLETAITEM,
                ColetaSQLHelper.COLUNA_ITEMIDCOLETA +" = ?",
                new String[]{ String.valueOf(CodColeta)});
        db.close();
        return linhasAfetadas;
    }

    public List<ColetaItem> buscarColeta(String filtro) {
        SQLiteDatabase db = helper.getReadableDatabase();
        String sql = "SELECT * FROM "+ ColetaSQLHelper.TABELA_COLETAITEM;
        String[] argumentos = null;
        if (filtro != null) {
            sql += " WHERE "+ ColetaSQLHelper.COLUNA_ITEMIDCOLETA + " = ?";
            argumentos = new String[]{ filtro };
        }
        sql += " ORDER BY "+ ColetaSQLHelper.COLUNA_COLETAITEMID;
        Cursor cursor = db.rawQuery(sql, argumentos);
        List<ColetaItem> itens = new ArrayList<ColetaItem>();
        while (cursor.moveToNext()) {
            long id = cursor.getLong(
                    cursor.getColumnIndex(
                            ColetaSQLHelper.COLUNA_COLETAITEMID));
            Long itemCodigo = Long.parseLong(cursor.getString(cursor.getColumnIndex(ColetaSQLHelper.COLUNA_COLETAITEMID)));
            String itemBarras = cursor.getString(cursor.getColumnIndex(ColetaSQLHelper.COLUNA_CODBARRA));
            Double itemQtde = Double.parseDouble(cursor.getString(cursor.getColumnIndex(ColetaSQLHelper.COLUNA_QUANTIDADE)));
            Long itemIDColeta = Long.parseLong(cursor.getString(cursor.getColumnIndex(ColetaSQLHelper.COLUNA_COLETAID)));
            ColetaItem item = new ColetaItem(itemCodigo,itemBarras,itemQtde,itemIDColeta);
            itens.add(item);
        }
        cursor.close();
        db.close();
        return itens;
    }
}


text:
using System;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace MongoDB
{
    /// <summary>
    ///   Type that holds the bson timestamp type.
    /// </summary>
    [Serializable]
    public class MongoTimestamp : IEquatable<MongoTimestamp>, IEquatable<long>, IComparable<MongoTimestamp>, IComparable<long>, IXmlSerializable
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="MongoTimestamp"/> class.
        /// </summary>
        public MongoTimestamp()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MongoTimestamp"/> class.
        /// </summary>
        /// <param name="value">The value.</param>
        public MongoTimestamp(long value)
        {
            Value = value;
        }

        /// <summary>
        /// Gets or sets the value.
        /// </summary>
        /// <value>The value.</value>
        public long Value { get; set; }

        /// <summary>
        /// Equalses the specified other.
        /// </summary>
        /// <param name="other">The other.</param>
        /// <returns></returns>
        public bool Equals(MongoTimestamp other)
        {
            if(ReferenceEquals(null, other))
                return false;
            if(ReferenceEquals(this, other))
                return true;
            return other.Value == Value;
        }

        /// <summary>
        /// Determines whether the specified <see cref="System.Object"/> is equal to this instance.
        /// </summary>
        /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param>
        /// <returns>
        /// 	<c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.
        /// </returns>
        /// <exception cref="T:System.NullReferenceException">
        /// The <paramref name="obj"/> parameter is null.
        /// </exception>
        public override bool Equals(object obj)
        {
            if(ReferenceEquals(null, obj))
                return false;
            if(ReferenceEquals(this, obj))
                return true;
            return obj.GetType() == typeof(MongoTimestamp) && Equals((MongoTimestamp)obj);
        }

        /// <summary>
        /// Equalses the specified other.
        /// </summary>
        /// <param name="other">The other.</param>
        /// <returns></returns>
        public bool Equals(long other)
        {
            return Value.Equals(other);
        }

        /// <summary>
        /// Returns a hash code for this instance.
        /// </summary>
        /// <returns>
        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        /// </returns>
        public override int GetHashCode()
        {
            return Value.GetHashCode();
        }

        /// <summary>
        /// Compares to.
        /// </summary>
        /// <param name="other">The other.</param>
        /// <returns></returns>
        public int CompareTo(MongoTimestamp other)
        {
            return ReferenceEquals(other, null) ? 1 : Value.CompareTo(other);
        }

        /// <summary>
        /// Compares to.
        /// </summary>
        /// <param name="other">The other.</param>
        /// <returns></returns>
        public int CompareTo(long other)
        {
            return Value.CompareTo(other);
        }

        /// <summary>
        /// This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"/> to the class.
        /// </summary>
        /// <returns>
        /// An <see cref="T:System.Xml.Schema.XmlSchema"/> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"/> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"/> method.
        /// </returns>
        XmlSchema IXmlSerializable.GetSchema()
        {
            return null;
        }

        /// <summary>
        /// Generates an object from its XML representation.
        /// </summary>
        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"/> stream from which the object is deserialized.</param>
        void IXmlSerializable.ReadXml(XmlReader reader)
        {
            Value = reader.ReadElementContentAsLong();
        }

        /// <summary>
        /// Converts an object into its XML representation.
        /// </summary>
        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"/> stream to which the object is serialized.</param>
        void IXmlSerializable.WriteXml(XmlWriter writer)
        {
            writer.WriteString(Value.ToString());
        }
    }
}


text:
// Code generated by main. DO NOT EDIT.

package fleet

import (
	"github.com/rancher/lasso/pkg/controller"
	v1alpha1 "github.com/rancher/rancher/pkg/generated/controllers/fleet.cattle.io/v1alpha1"
)

type Interface interface {
	V1alpha1() v1alpha1.Interface
}

type group struct {
	controllerFactory controller.SharedControllerFactory
}

// New returns a new Interface.
func New(controllerFactory controller.SharedControllerFactory) Interface {
	return &group{
		controllerFactory: controllerFactory,
	}
}

func (g *group) V1alpha1() v1alpha1.Interface {
	return v1alpha1.New(g.controllerFactory)
}


text:
global.stub_out_jquery();

add_dependencies({
    util: 'js/util.js'
});

var util = global.util;
var _ = global._;

(function test_CachedValue() {
    var x = 5;

    var cv = new util.CachedValue({
        compute_value: function () {
            return x * 2;
        }
    });

    assert.equal(cv.get(), 10);

    x = 6;
    assert.equal(cv.get(), 10);
    cv.reset();
    assert.equal(cv.get(), 12);

}());

(function test_extract_pm_recipients() {
    assert.equal(util.extract_pm_recipients('bob@foo.com, alice@foo.com').length, 2);
    assert.equal(util.extract_pm_recipients('bob@foo.com, ').length, 1);
}());

(function test_lower_bound() {
    var arr = [10, 20, 30, 40, 50];
    assert.equal(util.lower_bound(arr, 5), 0);
    assert.equal(util.lower_bound(arr, 10), 0);
    assert.equal(util.lower_bound(arr, 15), 1);
    assert.equal(util.lower_bound(arr, 50), 4);
    assert.equal(util.lower_bound(arr, 55), 5);
    assert.equal(util.lower_bound(arr, 2, 4, 31), 3);

    arr = [{x: 10}, {x: 20}, {x:30}];

    function compare (a, b) {
        return a.x < b;
    }

    assert.equal(util.lower_bound(arr, 5, compare), 0);
    assert.equal(util.lower_bound(arr, 10, compare), 0);
    assert.equal(util.lower_bound(arr, 15, compare), 1);

}());

(function test_same_recipient() {
    _.each([util.same_recipient, util.same_major_recipient], function (same) {
        assert(same(
            {type: 'stream', stream: 'Foo', subject: 'Bar'},
            {type: 'stream', stream: 'fOO', subject: 'bar'}
        ));

        assert(!same(
            {type: 'stream', stream: 'Foo', subject: 'Bar'},
            {type: 'stream', stream: 'yo', subject: 'whatever'}
        ));

        assert(same(
            {type: 'private', reply_to: 'fred@zulip.com,melissa@zulip.com'},
            {type: 'private', reply_to: 'fred@zulip.com,melissa@zulip.com'}
        ));

        assert(same(
            {type: 'private', reply_to: 'fred@zulip.com'},
            {type: 'private', reply_to: 'Fred@zulip.com'}
        ));

        assert(!same(
            {type: 'stream', stream: 'Foo', subject: 'Bar'},
            {type: 'private', reply_to: 'Fred@zulip.com'}
        ));
    });

    assert(util.same_major_recipient(
        {type: 'stream', stream: 'Foo', subject: 'sub1'},
        {type: 'stream', stream: 'fOO', subject: 'sub2'}
    ));

    assert(!util.same_recipient(
        {type: 'stream', stream: 'Foo', subject: 'sub1'},
        {type: 'stream', stream: 'fOO', subject: 'sub2'}
    ));

}());

(function test_robust_uri_decode() {
    assert.equal(util.robust_uri_decode('xxx%3Ayyy'), 'xxx:yyy');
    assert.equal(util.robust_uri_decode('xxx%3'), 'xxx');
}());

(function test_array_compare() {
    assert(util.array_compare([], []));
    assert(util.array_compare([1,2,3], [1,2,3]));
    assert(!util.array_compare([1,2], [1,2,3]));
    assert(!util.array_compare([1,2,3], [1,2]));
    assert(!util.array_compare([1,2,3,4], [1,2,3,5]));
}());

(function test_normalize_recipients() {
    assert(util.normalize_recipients(' bob@foo.com, alice@foo.com '), 'alice@foo.com,bob@foo.com');
}());

(function test_random_int() {
    var min = 0;
    var max = 100;

    _.times(500, function () {
        var val = util.random_int(min, max);
        assert(min <= val);
        assert(val <= max);
        assert.equal(val, Math.floor(val));
    });
}());

(function test_enforce_arity() {
    function f1() {}
    var eaf1 = util.enforce_arity(f1);

    assert.doesNotThrow(function () { f1('foo'); });
    assert.doesNotThrow(function () { eaf1(); });
    assert.throws(function () { eaf1('foo'); }, /called with \d+ arguments/);
    assert.throws(function () { eaf1('foo', 'bar'); }, /called with \d+ arguments/);

    function f2(x) {}
    var eaf2 = util.enforce_arity(f2);

    assert.doesNotThrow(function () { f2(); });
    assert.doesNotThrow(function () { eaf2('foo'); });
    assert.throws(function () { eaf2(); }, /called with \d+ arguments/);
    assert.throws(function () { eaf2('foo', 'bar'); }, /called with \d+ arguments/);

    function f3(x, y) {}
    var eaf3 = util.enforce_arity(f3);

    assert.doesNotThrow(function () { f3(); });
    assert.doesNotThrow(function () { eaf3('foo', 'bar'); });
    assert.throws(function () { eaf3(); }, /called with \d+ arguments/);
    assert.throws(function () { eaf3('foo'); }, /called with \d+ arguments/);
    assert.throws(function () { eaf3('foo','bar', 'baz'); }, /called with \d+ arguments/);
}());

(function test_all_and_everyone_mentions_regexp() {
    var messages_with_all_mentions = [
      '@all',
      'some text before @all some text after',
      '@all some text after only',
      'some text before only @all',
      '@**all**',
      'some text before @**all** some text after',
      '@**all** some text after only',
      'some text before only @**all**'
    ];

    var messages_with_everyone_mentions = [
      '@everyone',
      'some text before @everyone some text after',
      '@everyone some text after only',
      'some text before only @everyone',
      '@**everyone**',
      'some text before @**everyone** some text after',
      '@**everyone** some text after only',
      'some text before only @**everyone**'
    ];

    var messages_without_all_mentions = [
      '`@everyone`',
      'some_email@everyone.com',
      '`@**everyone**`',
      'some_email@**everyone**.com'
    ];

    var messages_without_everyone_mentions = [
      '`@everyone`',
      'some_email@everyone.com',
      '`@**everyone**`',
      'some_email@**everyone**.com'
    ];
    var i;
    for(i=0; i<messages_with_all_mentions.length; i++) {
        assert(util.is_all_or_everyone_mentioned(messages_with_all_mentions[i]));
    }

    for(i=0; i<messages_with_everyone_mentions.length; i++) {
        assert(util.is_all_or_everyone_mentioned(messages_with_everyone_mentions[i]));
    }

    for(i=0; i<messages_without_all_mentions.length; i++) {
        assert(!util.is_all_or_everyone_mentioned(messages_without_everyone_mentions[i]));
    }

    for(i=0; i<messages_without_everyone_mentions.length; i++) {
        assert(!util.is_all_or_everyone_mentioned(messages_without_everyone_mentions[i]));
    }
}());


text:
import babel from 'rollup-plugin-babel';
import babelrc from 'babelrc-rollup';
import uglify from 'rollup-plugin-uglify';
import globals from 'rollup-plugin-node-globals';

let pkg = require('./package.json');
export default {
  entry: 'lib/index.js',
  plugins: [
    globals(),
    babel(babelrc()),
     uglify()
  ],
  dest: 'macrotask.min.js',
  moduleName: 'macrotask',
  format: 'umd'
};


text: Flaming-octo-lana


text:
import { ViewCompiler, ViewResources, BehaviorInstruction } from 'aurelia-framework';
import { FEATURE } from 'aurelia-pal';
import { DOMHelper } from '../dom-helper';

//  LIST
//
// create an <ul> or <"tag attribute value"> tag.
//
export function CreateListComponent(compiler: ViewCompiler,
                                    resources: ViewResources,
                                    element: HTMLElement,
                                    instruction: (BehaviorInstruction & any)): boolean {

  let tag = instruction.attributes['tag'];
  if (!tag) { tag = 'ul'; }

  // tag element
  const tagEl = DOMHelper.createElement(tag);
  tagEl.setAttribute('class', 'mdc-list');
  tagEl.setAttribute('class.bind', 'class');
  tagEl.setAttribute('ref', 'elementList');

  // move all element child nodes into tag element
  while (element.firstChild) {
    tagEl.appendChild(element.firstChild);
  }

  const templateEl: DocumentFragment = document.createDocumentFragment();
  templateEl.appendChild(tagEl);

  // ensure the template element has a content property
  if (!FEATURE.htmlTemplateElement) {
    (FEATURE as any).ensureHTMLTemplateElement(templateEl);
  }

  instruction.inheritBindingContext = true;
  instruction.viewFactory = compiler.compile(templateEl, resources, instruction);

  // Let Aurelia do her thing
  return true;
}

//  LIST ITEM
//
// create an <li> or <a> tag and add start/end/text/secondary areas/slots
// <li> tag is default, <a> tag is used if href attribute is present
//
export function CreateListItemComponent(compiler: ViewCompiler,
                                        resources: ViewResources,
                                        element: HTMLElement,
                                        instruction: (BehaviorInstruction & any)): boolean {

  const href = element.getAttribute('href');
  const tag = href ? 'a' : 'li';

  // create base element
  const base = DOMHelper.createElement(tag);
  base.setAttribute('class', 'mdc-list-item');
  base.setAttribute('class.bind', 'class');
  base.setAttribute('ref', 'elementListItem');
  base.setAttribute('href.bind', 'href');
  base.setAttribute('target.bind', 'target');
  base.setAttribute('model.bind', 'model');
  base.setAttribute('click.delegate', 'elementClick($event)');

  moveSlotElements(element, base);

  const templateEl: DocumentFragment = document.createDocumentFragment();
  templateEl.appendChild(base);

  // ensure the template element has a content property
  if (!FEATURE.htmlTemplateElement) {
    (FEATURE as any).ensureHTMLTemplateElement(templateEl);
  }

  instruction.inheritBindingContext = true;
  // instruction.enhance = true;
  instruction.viewFactory = compiler.compile(templateEl, resources, instruction);

  // Let Aurelia do her thing
  return true;
}

//
// add class to start node
//
function moveSlotElements(node: HTMLElement, base: HTMLElement) {
  if (!node.hasChildNodes()) { return; }
  // containers
  const startSlot = DOMHelper.createElement('div');
  const endSlot = DOMHelper.createElement('div');
  const textSlot = DOMHelper.createElement('span');
  const secondarySlot = DOMHelper.createElement('span');
  const noSlot = DOMHelper.createElement('div');

  // loop child nodes
  while (node.firstChild) {
    const childNode = node.firstChild;
    if (childNode.attributes) {

      const slotAtr = childNode.attributes.getNamedItem('slot');

      // find slots
      if (slotAtr) {

        // start node
        if (slotAtr.value === 'start') {
          if (childNode.hasChildNodes()) {
            while (childNode.firstChild) {
              if (childNode.firstChild.nodeType === Node.TEXT_NODE) {
                const span = DOMHelper.createElement('span');
                span.classList.add('mdc-list-item__graphic');
                span.appendChild(childNode.firstChild);
                startSlot.appendChild(span);
              } else {
                (childNode.firstChild as HTMLElement).classList.add('mdc-list-item__graphic');
                startSlot.appendChild(childNode.firstChild);
              }
            }
          }

          // end node
        } else if (slotAtr.value === 'end') {
          if (childNode.hasChildNodes()) {
            while (childNode.firstChild) {
              if (childNode.firstChild.nodeType === Node.TEXT_NODE) {
                const span = DOMHelper.createElement('span');
                span.classList.add('mdc-list-item__meta');
                span.appendChild(childNode.firstChild);
                endSlot.appendChild(span);
              } else {
                (childNode.firstChild as HTMLElement).classList.add('mdc-list-item__meta');
                endSlot.appendChild(childNode.firstChild);
              }
            }
          }

          // text node
        } else if (slotAtr.value === 'text') {
          if (childNode.hasChildNodes()) {
            while (childNode.firstChild) {
              textSlot.appendChild(childNode.firstChild);
            }
          }

          // secondary node
        } else if (slotAtr.value === 'secondary') {
          if (childNode.hasChildNodes()) {
            while (childNode.firstChild) {
              secondarySlot.appendChild(childNode.firstChild);
            }
          }
        }
        // remove slot node leftovers
        node.removeChild(childNode);

      } else {
        // element without slot attribute
        noSlot.appendChild(childNode);
      }
    } else {
      // element without attribute?
      noSlot.appendChild(childNode);
    }
  }

  // start
  if (startSlot.hasChildNodes()) {
    while (startSlot.firstChild) { base.appendChild(startSlot.firstChild); }
  }
  // build and add noSlot element
  if (secondarySlot.hasChildNodes()) {
    secondarySlot.classList.add('mdc-list-item__secondary-text');
    textSlot.appendChild(secondarySlot);
  }
  if (textSlot.hasChildNodes()) {
    textSlot.classList.add('mdc-list-item__text');
    noSlot.appendChild(textSlot);
  }
  if (noSlot.hasChildNodes()) {
    noSlot.classList.add('amb-mdc-list-item-text');
    base.appendChild(noSlot);
  }
  // end
  if (endSlot.hasChildNodes()) {
    while (endSlot.firstChild) { base.appendChild(endSlot.firstChild); }
  }
}


text:
//
//  CMGeoPoint.h
//  cloudmine-ios
//
//  Copyright (c) 2012 CloudMine, LLC. All rights reserved.
//  See LICENSE file included with SDK for details.
//

#import <CoreLocation/CoreLocation.h>
#include <math.h>
#import "CMObject.h"

extern NSString * const CMGeoPointClassName;

@interface CMGeoPoint : CMObject {

}

/**
 * Initializes a new instance of this class with the given latitude and longitude.
 *
 * @param theLatitude The latitude in degrees.
 * @param theLongitude The longitude in degrees.
 */
- (id)initWithLatitude:(double)theLatitude andLongitude:(double)theLongitude;

/**
 * Initializes a new instance of this class with the given latitude and longitude.
 *
 * This is a convenience constructor for when lat/long are in radians. This converts them
 * into degrees before storing.
 *
 * @param theLatitude The latitude in radians.
 * @param theLongitude The longitude in radians.
 */
- (id)initWithLatitudeInRadians:(double)theLatitude andLongitudeInRadians:(double)theLongitude;

/**
 * Initializes a new instance of this class given a <tt>CLLocation</tt> object most likely obtained from
 * <tt>CLLocationManager</tt> or some other part of the CoreLocation framework.
 *
 * @param location The <tt>CLLocation</tt> instance describing the location.
 *
 * @see https://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLLocation_Class/CLLocation/CLLocation.html
 * @see https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/Introduction/Introduction.html
 */
- (id)initWithCLLocation:(CLLocation *)location;

/**
 * The latitude in degrees.
 */
@property (atomic, assign) double latitude;

/**
 * The longitude in degrees.
 */
@property (atomic, assign) double longitude;

@end


text:
"""
Flask-Dance provides a handy Pytest_ fixture named
``betamax_record_flask_dance`` that wraps Flask-Dance
sessions with Betamax_ to record and replay HTTP requests.
In order to use this fixture, you must install Betamax in your testing
environment. You must also define two other Pytest fixtures:
``app`` and ``flask_dance_sessions``. The ``app`` fixture must
return the Flask app that is being tested, and the
``flask_dance_sessions`` fixture must return the Flask-Dance
session or sessions that should be wrapped using Betamax.

For example:

.. code-block:: python

    from flask_dance.contrib.github import github
    from myapp import app as _app

    @pytest.fixture
    def app():
        return _app

    @pytest.fixture
    def flask_dance_sessions():
        return github

The ``flask_dance_sessions`` fixture can return either a single
session, or a list/tuple of sessions.

To use this fixture, it's generally easiest to decorate your test
with :func:`pytest.mark.usefixtures`, like this:

.. code-block:: python
    :emphasize-lines: 1

    @pytest.mark.usefixtures("betamax_record_flask_dance")
    def test_home_page(app):
        with app.test_client() as client:
            response = client.get("/", base_url="https://example.com")
        assert response.status_code == 200

"""

import pytest

try:
    from betamax import Betamax
except ImportError:
    Betamax = None

@pytest.fixture
def betamax_record_flask_dance(app, flask_dance_sessions, request):
    """
    Wraps the specified Flask-Dance sessions with Betamax

    This allows you to record and re-play HTTP requests from Flask-Dance
    sessions. Requires the Betamax library. You must also define a
    `flask_dance_sessions` fixture, that defines the session or sessions
    that should be wrapped with Betamax.
    """
    if not Betamax:
        raise ImportError(
            "The `betamax_record_flask_dance` fixture depends on "
            "the `betamax` module"
        )

    if isinstance(flask_dance_sessions, (list, tuple)):
        betamax_setup_info = [
            (
                session,
                f"{request.node.name}-{index}",
            )
            for index, session in enumerate(flask_dance_sessions)
        ]
    else:
        session = flask_dance_sessions
        betamax_setup_info = [(session, request.node.name)]

    recorders = []

    @app.before_request
    def wrap_flask_dance_with_betamax():
        for session, cassette_name in betamax_setup_info:
            recorder = Betamax(session).use_cassette(cassette_name)
            recorders.append(recorder)
            recorder.start()

    request.addfinalizer(
        lambda: app.before_request_funcs[None].remove(wrap_flask_dance_with_betamax)
    )

    @app.after_request
    def unwrap(response):
        for recorder in recorders:
            recorder.stop()
        return response

    request.addfinalizer(lambda: app.after_request_funcs[None].remove(unwrap))

    return app


text:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <item android:id="@+id/menu_add_inseparable"
        app:showAsAction="never"
        android:title="@string/add_inseparable"/>

    <item android:id="@+id/menu_add_link"
        android:icon="@android:drawable/stat_sys_upload_done"
        app:showAsAction="ifRoom"
        android:title="@string/add_link"/>

    <item android:id="@+id/menu_change_link"
        android:icon="@android:drawable/stat_sys_upload_done"
        app:showAsAction="never"
        android:title="@string/change_link"/>

    <item android:id="@+id/menu_show_panel"
        android:icon="@drawable/font_icon_white"
        app:showAsAction="ifRoom"
        android:title="@string/show_panel"/>

    <item android:id="@+id/menu_arial"
        app:showAsAction="never"
        android:title="Arial"/>

    <item android:id="@+id/menu_times"
        app:showAsAction="never"
        android:title="Times"/>

    <item android:id="@+id/menu_courier"
        app:showAsAction="never"
        android:title="Courier"/>
</menu>


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

/*namespace TMPro.EditorUtilities
{
	[CustomEditor(typeof(TMP_Animated), true)]
	[CanEditMultipleObjects]
	public class TMP_AnimatedEditor : TMP_BaseEditorPanel
	{
		SerializedProperty speedProp;
		//SerializedProperty emotionProp;
		protected override void OnEnable()
		{
			base.OnEnable();
			speedProp = serializedObject.FindProperty("speed");
			//emotionProp = serializedObject.FindProperty("onEmotionChange");

		}
		protected override void OnUndoRedo()
		{
		}
		protected override void DrawExtraSettings()
		{
			EditorGUILayout.LabelField("Animation Settings", EditorStyles.boldLabel);
			EditorGUILayout.PropertyField(speedProp, new GUIContent("     Default Speed"));
			//EditorGUILayout.PropertyField(emotionProp);

		}
		protected override bool IsMixSelectionTypes()
		{
			return false;
		}
	}
}*/


text:
#import "BaseViewController.h"

@interface PaymentConvenientInfoViewController : BaseViewController
@property (nonatomic,strong) NSString *tradeID;

@end


text:
function  [cent, varargout]=FastPeakFind(d, thres, filt ,edg, res, fid)
% Analyze noisy 2D images and find peaks using local maxima (1 pixel
% resolution) or weighted centroids (sub-pixel resolution).
% The code is designed to be as fast as possible, so I kept it pretty basic.
% The code assumes that the peaks are relatively sparse, test whether there
% is too much pile up and set threshold or user defined filter accordingly.
%
% How the code works:
% In theory, each peak is a smooth point spread function (SPF), like a
% Gaussian of some size, etc. In reality, there is always noise, such as
%"salt and pepper" noise, which typically has a 1 pixel variation.
% Because the peak's PSF is assumed to be larger than 1 pixel, the "true"
% local maximum of that PSF can be obtained if we can get rid of these
% single pixel noise variations. There comes medfilt2, which is a 2D median
% filter that gets rid of "salt and pepper" noise. Next we "smooth" the
% image using conv2, so that with high probability there will be only one
% pixel in each peak that will correspond to the "true" PSF local maximum.
% The weighted centroid approach uses the same image processing, with the
% difference that it just calculated the weighted centroid of each
% connected object that was obtained following the image processing.  While
% this gives sub-pixel resolution, it can miss peaks that are very close to
% each other, and runs slightly slower. Read more about how to treat these
% cases in the relevant code commentes.
%
% Inputs:
% d     The 2D data raw image - assumes a Double\Single-precision
%       floating-point, uint8 or unit16 array. Please note that the code
%       casts the raw image to uint16 if needed.  If the image dynamic range
%       is between 0 and 1, I multiplied to fit uint16. This might not be
%       optimal for generic use, so modify according to your needs.
% thres A number between 0 and max(raw_image(:)) to remove  background
% filt  A filter matrix used to smooth the image. The filter size
%       should correspond the characteristic size of the peaks
% edg   A number>1 for skipping the first few and the last few 'edge' pixels
% res   A handle that switches between two peak finding methods:
%       1 - the local maxima method (default).
%       2 - the weighted centroid sub-pixel resolution method.
%       Note that the latter method takes ~20% more time on average.
% fid   In case the user would like to save the peak positions to a file,
%       the code assumes a "fid = fopen([filename], 'w+');" line in the
%       script that uses this function.
%
%Optional Outputs:
% cent        a 1xN vector of coordinates of peaks (x1,y1,x2,y2,...
% [cent cm]   in addition to cent, cm is a binary matrix  of size(d)
%             with 1's for peak positions. (not supported in the
%             the weighted centroid sub-pixel resolution method)
%
%Example:
%
%   p=FastPeakFind(image);
%   imagesc(image); hold on
%   plot(p(1:2:end),p(2:2:end),'r+')
%
%   Adi Natan (natan@stanford.edu)
%   Ver 1.7 , Date: Oct 10th 2013
%
%% defaults
if (nargin < 1)
    d=uint16(conv2(reshape(single( 2^14*(rand(1,1024*1024)>0.99995) ),[1024 1024]) ,fspecial('gaussian', 15,3),'same')+2^8*rand(1024));
    imagesc(d);

end

if ndims(d)>2 %I added this in case one uses imread (JPG\PNG\...).
    d=uint16(rgb2gray(d));
end

if isfloat(d) %For the case the input image is double, casting to uint16 keeps enough dynamic range while speeds up the code.
    if max(d(:))<=1
        d =  uint16( d.*2^16./(max(d(:))));
    else
        d = uint16(d);
    end
end

if (nargin < 2)
    thres = (max([min(max(d,[],1))  min(max(d,[],2))])) ;
end

if (nargin < 3)
    filt = (fspecial('gaussian', 7,1)); %if needed modify the filter according to the expected peaks sizes
end

if (nargin < 4)
    edg =3;
end

if (nargin < 5)
    res = 1;
end

if (nargin < 6)
    savefileflag = false;
else
    savefileflag = true;
end

%% Analyze image
if any(d(:))  ; %for the case of non zero raw image

    d = medfilt2(d,[3,3]);

    % apply threshold
    if isa(d,'uint8')
        d=d.*uint8(d>thres);
    else
        d=d.*uint16(d>thres);
    end

    if any(d(:))   ; %for the case of the image is still non zero

        % smooth image
        d=conv2(single(d),filt,'same') ;

        % Apply again threshold (and change if needed according to SNR)
        d=d.*(d>0.9*thres);

        switch res % switch between local maxima and sub-pixel methods

            case 1 % peak find - using the local maxima approach - 1 pixel resolution

                % d will be noisy on the edges, and also local maxima looks
                % for nearest neighbors so edge must be at least 1. We'll skip 'edge' pixels.
                sd=size(d);
                [x y]=find(d(edg:sd(1)-edg,edg:sd(2)-edg));

                % initialize outputs
                cent=[];%
                cent_map=zeros(sd);

                x=x+edg-1;
                y=y+edg-1;
                for j=1:length(y)
                    if (d(x(j),y(j))>=d(x(j)-1,y(j)-1 )) &&...
                            (d(x(j),y(j))>d(x(j)-1,y(j))) &&...
                            (d(x(j),y(j))>=d(x(j)-1,y(j)+1)) &&...
                            (d(x(j),y(j))>d(x(j),y(j)-1)) && ...
                            (d(x(j),y(j))>d(x(j),y(j)+1)) && ...
                            (d(x(j),y(j))>=d(x(j)+1,y(j)-1)) && ...
                            (d(x(j),y(j))>d(x(j)+1,y(j))) && ...
                            (d(x(j),y(j))>=d(x(j)+1,y(j)+1));

                        %All these alternatives were slower...
                        %if all(reshape( d(x(j),y(j))>=d(x(j)-1:x(j)+1,y(j)-1:y(j)+1),9,1))
                        %if  d(x(j),y(j)) == max(max(d((x(j)-1):(x(j)+1),(y(j)-1):(y(j)+1))))
                        %if  d(x(j),y(j))  == max(reshape(d(x(j),y(j))  >=  d(x(j)-1:x(j)+1,y(j)-1:y(j)+1),9,1))

                        cent = [cent ;  y(j) ; x(j)];
                        cent_map(x(j),y(j))=cent_map(x(j),y(j))+1; % if a binary matrix output is desired

                    end
                end

            case 2 % find weighted centroids of processed image,  sub-pixel resolution.
                   % no edg requirement needed.

                % get peaks areas and centroids
                stats = regionprops(logical(d),d,'Area','WeightedCentroid');

                % find reliable peaks by considering only peaks with an area
                % below some limit. The weighted centroid method can be not
                % accurate if peaks are very close to one another, i.e., a
                % single peak will be detected, instead of the real number
                % of peaks. This will result in a much larger area for that
                % peak. At the moment, the code ignores that peak. If that
                % happens often consider a different threshold, or return to
                % the more robust "local maxima" method.
                % To set a proper limit, inspect your data with:
                % hist([stats.Area],min([stats.Area]):max([stats.Area]));
                % to see if the limit I used (mean+2 standard deviations)
                % is an appropriate limit for your data.

                rel_peaks_vec=[stats.Area]<=mean([stats.Area])+2*std([stats.Area]);
                cent=[stats(rel_peaks_vec).WeightedCentroid]';
                cent_map=[];

        end

        if savefileflag
            % previous version used dlmwrite, which can be slower than  fprinf
            %             dlmwrite([filename '.txt'],[cent],   '-append', ...
            %                 'roffset', 0,   'delimiter', '\t', 'newline', 'unix');+

            fprintf(fid, '%f ', cent(:));
            fprintf(fid, '\n');

        end

    else % in case image after threshold is all zeros
        cent=[];
        cent_map=zeros(size(d));
        if nargout>1 ;  varargout{1}=cent_map; end
        return
    end

else % in case raw image is all zeros (dead event)
    cent=[];
    cent_map=zeros(size(d));
    if nargout>1 ;  varargout{1}=cent_map; end
    return
end

%demo mode - no input to the function
if (nargin < 1)
    colormap(bone);
    hold on;
    plot(cent(1:2:end),cent(2:2:end),'rs');
    hold off;
end

% return binary mask of centroid positions if asked for
if nargout>1 ;  varargout{1}=cent_map; end


text:
<?php

/**
 * rtShopPaymentToolkit
 *
 * @package    rtShopPlugin
 * @subpackage toolkits
 * @author     Piers Warmers <piers@wranglers.com.au>
 * @author     Konny Zurcher <konny@wranglers.com.au>
 */

class rtShopPaymentToolkit
{
  /**
   * Retrieve payment class
   *
   * @param string $class  Payment class name
   * @return rtShopPayment Object
   */
	public static function getPaymentObject($class)
	{
    if (is_null($class) || !class_exists($class))
    {
      throw new sfException('No valid payment class specified.');
    }

		$payment = new $class();

		return $payment;
	}
}


text:
using System;

namespace ScaffoldR.Core.Transactions
{
    /// <summary>
    /// Marks the class as being a transactional call.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class TransactionalAttribute : Attribute
    {

    }
}


text:
.. code-block:: bash

    curl -s --user 'api:YOUR_API_KEY' -X PUT \
        https://api.mailgun.net/v3/domains/YOUR_DOMAIN_NAME/templates/TEMPLATE_NAME \
        -F description = 'new template description'

.. code-block:: java

    import com.mailgun.api.v3.MailgunTemplatesApi;
    import com.mailgun.model.templates.TemplateStatusResponse;

    // ...

    public TemplateStatusResponse updateTemplate() {
        MailgunTemplatesApi mailgunTemplatesApi = MailgunClient.config(API_KEY)
            .createApi(MailgunTemplatesApi.class);

        return mailgunTemplatesApi.updateTemplate(YOUR_DOMAIN_NAME, TEMPLATE_NAME, "new template description");
    }

.. code-block:: php

  # Currently, the PHP SDK does not support the Templates endpoint.
  # Consider using the following php curl function.
  function update_template() {
    $params = array(
      'description' => 'new template description'
    );

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, 'api:PRIVATE_API_KEY');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
    curl_setopt($ch, CURLOPT_URL, 'https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/templates/TEMPLATE_NAME');
    curl_setopt($ch, CURLOPT_POSTFIELDS, $params);

    $result = curl_exec($ch);
    curl_close($ch);

    return $result;
  }

.. code-block:: py

 def update_template():
     return requests.put(
         ("https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/templates/TEMPLATE_NAME"),
         auth=('api', 'YOUR_API_KEY'),
         data={'description': 'new template description'})

.. code-block:: rb

 def update_template
   RestClient.put("https://api:YOUR_API_KEY" \
                  "@api.mailgun.net/v3/YOUR_DOMAIN_NAME/templates/TEMPLATE_NAME",
                  :description => 'new template description')
 end

.. code-block:: csharp

 using System;
 using System.IO;
 using RestSharp;
 using RestSharp.Authenticators;

 public class UpdateTemplateChunk
 {

     public static void Main (string[] args)
     {
         Console.WriteLine (UpdateTemplate ().Content.ToString ());
     }

     public static IRestResponse UpdateTemplate ()
     {
         RestClient client = new RestClient ();
         client.BaseUrl = new Uri ("https://api.mailgun.net/v3");
         client.Authenticator =
             new HttpBasicAuthenticator ("api",
                                         "YOUR_API_KEY");
         RestRequest request = new RestRequest ();
         request.Resource = "/YOUR_DOMAIN_NAME/template/TEMPLATE_NAME";
         request.AddParameter ("description", "new template description");
         request.Method = Method.PUT;
         return client.Execute (request);
     }

 }

.. code-block:: go

    import (
        "context"
        "github.com/mailgun/mailgun-go/v3"
        "time"
    )

    func UpdateTemplate(domain, apiKey string) error {
        mg := mailgun.NewMailgun(domain, apiKey)

        ctx, cancel := context.WithTimeout(context.Background(), time.Second*30)
        defer cancel()

        return mg.UpdateTemplate(ctx, &mailgun.Template{
            Name:        "TEMPLATE_NAME",
            Description: "Add a description to the template",
        })
    }

.. code-block:: js

  const DOMAIN = 'YOUR_DOMAIN_NAME';
  const formData = require('form-data');
  const Mailgun = require('mailgun.js');

  const mailgun = new Mailgun(formData);

  const client = mailgun.client({ username: 'api', key: 'YOUR_API_KEY' || '' });
  (async () => {
    try {
      const updatedDomainTemplate = await client.domains.domainTemplates.update(
      DOMAIN,
      'YOUR_TEMPLATE_NAME',
      {
          description: 'new template description'
      });
      console.log('updatedDomainTemplate', updatedDomainTemplate);
    } catch (error) {
      console.error(error);
    }
  })();


text:
group "roadrunner" do
  gid 1337
  system true
end

user "roadrunner" do
  gid 1337
  uid 1337
  system true
end


text:
process.src             = process.cwd() + '/src/';
var expect              = require('chai').expect;
var serverCfg           = require(process.src + 'net/darkhounds/aethernauts/server/config/confServer.js');
var ModelConnections    = require(process.src + 'net/darkhounds/aethernauts/server/models/modelConnections.js');
var ControllerDB        = require(process.src + 'net/darkhounds/aethernauts/server/controllers/controllerDB.js');

describe("ModelConnections :: net/darkhounds/aethernauts/server/controllers/modelConnections.js", function() {

    this.timeout(5000);

    serverCfg.dbName    = "aethernauts-test";
    var rawData         = {
        dir:    "north",
        x:      "0",
        y:      "0",
        z:      "0",
        source: null,
        target: null
    };
    var parsedData;
    //
    before(function(done) {
        ControllerDB.once(ControllerDB.CONNECTED, function(){ done(); });
        ControllerDB.connect(serverCfg);
    });

    it("Should created a new connection with the rawdata", function(done) {
        ModelConnections.create(rawData, function (err, data) {
            expect(err).to.be.null;
            parsedData = data;
            done();
        });
    });

    after(function(done) {
        ControllerDB.disconnect();
        ControllerDB.once(ControllerDB.DISCONNECTED, function(){ done(); });
    });
});


text:
var cdb = require('cartodb.js');
var _ = require('underscore');
var DatasetsItem = require('./datasets/datasets_item');
var MapsItem = require('./maps/maps_item');
var PlaceholderItem = require('./maps/placeholder_item_view');
var RemoteDatasetsItem = require('./datasets/remote_datasets_item');
var MapTemplates = require('../common/map_templates');
var MAP_CARDS_PER_ROW = 3;

/**
 *  View representing the list of items
 */

module.exports = cdb.core.View.extend({

  tagName: 'ul',

  events: {},

  _ITEMS: {
    'remotes':  RemoteDatasetsItem,
    'datasets': DatasetsItem,
    'maps':     MapsItem
  },

  initialize: function() {
    this.router = this.options.router;
    this.user = this.options.user;
    this._initBinds();
  },

  render: function() {
    this.clearSubViews();
    this.$el.attr('class', this.router.model.isDatasets() ? 'DatasetsList' : 'MapsList');
    this.collection.each(this._addItem, this);

    if (this.router.model.isMaps() && this.collection.size() > 0) {
      this._fillEmptySlotsWithPlaceholderItems();
    }

    return this;
  },

  show: function() {
    this.$el.removeClass('is-hidden');
  },

  hide: function() {
    this.$el.addClass('is-hidden');
  },

  _addItem: function(m) {
    var type = this.router.model.get('content_type');

    if (m.get('type') === "remote" && this.router.model.isDatasets()) {
      type = "remotes"
    }

    var item = new this._ITEMS[type]({
      model:  m,
      router: this.router,
      user:   this.user
    });

    this.addView(item);
    this.$el.append(item.render().el);
  },

  _initBinds: function() {
    this.collection.bind('loading', this._onItemsLoading, this);
    this.collection.bind('reset', this.render, this);
    this.add_related_model(this.collection);
  },

  _onItemsLoading: function() {
    this.$el.addClass('is-loading');
  },

  _fillEmptySlotsWithPlaceholderItems: function() {
    var mapTemplates = _.shuffle(MapTemplates);
    _.times(this._emptySlotsCount(), function(i) {
      var d = mapTemplates[i];
      if (d) {
        var m = new cdb.core.Model(d);
        var view = new PlaceholderItem({
          model: m,
          collection: this.collection
        });
        this.$el.append(view.render().el);
        this.addView(view);
      }
    }, this);
  },

  _emptySlotsCount: function() {
    return (this.collection._ITEMS_PER_PAGE - this.collection.size()) % MAP_CARDS_PER_ROW;
  }

});