text:
function patchMouseEvent (e, pixelRatio) {
  return {
    deltaX: -e.dx * 10 || 0,
    deltaY: -e.dy * 10 || 0,
    deltaZ: 0,
    deltaMode: 0,
    button: e.buttonNumber || 0,
    buttons: e.buttonNumber || 0,
    x: e.x / pixelRatio,
    y: e.y / pixelRatio,
    offsetX: e.x / pixelRatio,
    offsetY: e.y / pixelRatio,
    altKey: e.option,
    shiftKey: e.shift,
    ctrlKey: e.ctrl,
    metaKey: e.cmd,
    defaultPrevented: false,
    preventDefault: function () {
      this.defaultPrevented = true
    },
    stopPropagation: function () {
      this._cancelled = true
    },
    stopImmediatePropagation: function () {
      this._cancelled = true
    }
  }
}

module.exports = patchMouseEvent


text:
VALUE eQuickTime;

void Init_rmov_ext()
{
  VALUE mQuickTime;

  EnterMovies(); // Enables the QuickTime framework

  mQuickTime = rb_define_module("QuickTime");
  eQuickTime = rb_define_class_under(mQuickTime, "Error", rb_eStandardError);
  Init_quicktime_movie();
  Init_quicktime_track();
  Init_quicktime_exporter();
}

redpajama_set_name: RedPajamaGithub


text:
require 'ora_utils/oracle_access'
require 'easy_type'

Puppet::Type.type(:ora_tablespace).provide(:simple) do
	include EasyType::Provider
	include ::OraUtils::OracleAccess

  desc "Manage an Oracle Tablespace in an Oracle Database via regular SQL"

  mk_resource_methods

end


text:
export interface IProduct {
  "id": string,
  "title": string,
  "description": string,
  "sector": string,
  "formQty": number
}


text:
package Db;

import java.util.ArrayList;

import Mdl.*;

public interface IFDBcustomerType {
    public ArrayList<customerType> getAllCustomerTypes();

    public customerType getCustomerType(int id);

    //insert a new customer
    public customerType insertCustomerType(customerType cType) throws Exception;
    //update information about an customer
    public int updateCustomerType(customerType cType);
    public customerType getLatest();

}


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.broad.igv.feature.genome;

import org.apache.log4j.Logger;
import org.broad.igv.Globals;
import org.broad.igv.util.FileUtils;
import org.broad.igv.util.HttpUtils;

import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

/**
 * /**
 *
 * @author jrobinso
 */
public class GenomeImporter {
    public static final int MAX_CONTIGS = 1500000;

    static Logger log = Logger.getLogger(GenomeImporter.class);
    public static final Pattern SEQUENCE_NAME_SPLITTER = Pattern.compile("\\s+");

    /**
     * Create a zip containing all the information and data required to load a
     * genome. All file/directory validation is assume to have been done by validation
     * outside of this method.
     *
     * @param genomeFile
     * @param genomeId          Id of the genome.
     * @param genomeDisplayName The genome name that is user-friendly.
     * @param fastaFile         The location of a fasta file, or directory of fasta files
     * @param geneAnnotFile
     * @param cytobandFile
     * @return The newly created genome archive file.
     */
    public File createGenomeArchive(File genomeFile,
                                    String genomeId,
                                    String genomeDisplayName,
                                    String fastaFile,
                                    File geneAnnotFile,
                                    File cytobandFile,
                                    File chrAliasFile) throws IOException {

        if ((genomeFile == null) || (genomeId == null) || (genomeDisplayName == null)) {

            log.error("Invalid input for genome creation: ");
            log.error("\tGenome file=" + genomeFile.getAbsolutePath());
            log.error("\tGenome Id=" + genomeId);
            log.error("\tGenome Name" + genomeDisplayName);
            return null;
        }

        File propertyFile = null;
        FileWriter propertyFileWriter = null;
        try {
            boolean fastaDirectory = false;
            List<String> fastaFileNames = new ArrayList<String>();

            if (!FileUtils.resourceExists(fastaFile)) {
                String msg = "File not found: " + fastaFile;
                throw new GenomeException(msg);
            }
            if (fastaFile.toLowerCase().endsWith(Globals.ZIP_EXTENSION)) {
                String msg = "Error.  Zip archives are not supported.  Please select a fasta file.";
                throw new GenomeException(msg);
            }
            if (fastaFile.toLowerCase().endsWith(Globals.GZIP_FILE_EXTENSION)) {
                String msg = "Error.  GZipped files are not supported.  Please select a non-gzipped fasta file.";
                throw new GenomeException(msg);
            }

            List<String> fastaIndexPathList = new ArrayList<String>();
            String fastaIndexPath = fastaFile + ".fai";

            File sequenceInputFile = new File(fastaFile);
            if (sequenceInputFile.exists()) {
                // Local file
                if (sequenceInputFile.isDirectory()) {
                    fastaDirectory = true;
                    List<File> files = getSequenceFiles(sequenceInputFile);
                    for (File file : files) {
                        if (file.getName().toLowerCase().endsWith(Globals.GZIP_FILE_EXTENSION)) {
                            String msg = "Error.  One or more fasta files are gzipped: " + file.getName() +
                                    "
All fasta files must be gunzipped prior to importing.";
                            throw new GenomeException(msg);
                        }

                        File indexFile = new File(sequenceInputFile, file.getName() + ".fai");
                        if (!indexFile.exists()) {
                            FastaUtils.createIndexFile(file.getAbsolutePath(), indexFile.getAbsolutePath());
                        }
                        fastaIndexPathList.add(fastaIndexPath);
                        fastaFileNames.add(file.getName());
                    }
                } else {
                    // Index if neccessary
                    File indexFile = new File(fastaIndexPath);
                    if (!indexFile.exists()) {
                        FastaUtils.createIndexFile(fastaFile, fastaIndexPath);
                    }
                    fastaIndexPathList.add(fastaIndexPath);
                }
            } else {
                if (!FileUtils.resourceExists(fastaIndexPath)) {
                    String msg = "Index file " + fastaIndexPath + " Not found. " +
                            "
Remote fasta files must be indexed prior to importing.";
                    throw new GenomeException(msg);
                }
            }

            fastaFile = FileUtils.getRelativePath(genomeFile.getParent(), fastaFile);

            // Create "in memory" property file
            byte[] propertyBytes = createGenomePropertyFile(genomeId, genomeDisplayName, fastaFile, geneAnnotFile,
                    cytobandFile, chrAliasFile, fastaDirectory, fastaFileNames);
            File[] inputFiles = {geneAnnotFile, cytobandFile, chrAliasFile};

            // Create archive
            createGenomeArchive(genomeFile, inputFiles, propertyBytes);

        } finally {
            if (propertyFileWriter != null) {
                try {
                    propertyFileWriter.close();
                } catch (IOException ex) {
                    log.error("Failed to close genome archive: +" + genomeFile.getAbsolutePath(), ex);
                }
            }

            if (propertyFile != null) propertyFile.delete();
        }
        return genomeFile;
    }

    private List<File> getSequenceFiles(File sequenceDir) {
        ArrayList<File> files = new ArrayList();
        for (File f : sequenceDir.listFiles()) {
            if (f.getName().startsWith(".") || f.isDirectory() || f.getName().endsWith(".fai")) {
                continue;
            } else {
                files.add(f);
            }
        }
        return files;
    }

    /**
     * This method creates the property.txt file that is stored in each
     * .genome file. This is not the user-defined genome property file
     * created by storeUserDefinedGenomeListToFile(...)
     *
     * @param genomeId
     * @param genomeDisplayName
     * @param sequenceLocation Path to nucleotide sequence. Can be absolute or relative, also local or remote
     * @param geneAnnotFile
     * @param cytobandFile
     * @param fastaFileNames
     * @return
     */
    public byte[] createGenomePropertyFile(String genomeId,
                                           String genomeDisplayName,
                                           String sequenceLocation,
                                           File geneAnnotFile,
                                           File cytobandFile,
                                           File chrAliasFile,
                                           boolean fastaDirectory,
                                           List<String> fastaFileNames) throws IOException {

        PrintWriter propertyFileWriter = null;
        try {

            ByteArrayOutputStream propertyBytes = new ByteArrayOutputStream();

            // Add the new property file to the archive
            propertyFileWriter = new PrintWriter(new OutputStreamWriter(propertyBytes));

            propertyFileWriter.println("fasta=true"); // Fasta is the only format supported now

            propertyFileWriter.println("fastaDirectory=" + fastaDirectory);

            if (fastaDirectory) {
                propertyFileWriter.print("fastaFiles=");
                for (String fif : fastaFileNames) {
                    propertyFileWriter.print(fif + ",");
                }
                propertyFileWriter.println();
            }

            propertyFileWriter.println("ordered=" + !fastaDirectory);
            if (genomeId != null) {
                propertyFileWriter.println(Globals.GENOME_ARCHIVE_ID_KEY + "=" + genomeId);
            }
            if (genomeDisplayName != null) {
                propertyFileWriter.println(Globals.GENOME_ARCHIVE_NAME_KEY + "=" + genomeDisplayName);
            }
            if (cytobandFile != null) {
                propertyFileWriter.println(Globals.GENOME_ARCHIVE_CYTOBAND_FILE_KEY + "=" + cytobandFile.getName());
            }
            if (geneAnnotFile != null) {
                propertyFileWriter.println(Globals.GENOME_ARCHIVE_GENE_FILE_KEY + "=" + geneAnnotFile.getName());
            }
            if (chrAliasFile != null) {
                propertyFileWriter.println(Globals.GENOME_CHR_ALIAS_FILE_KEY + "=" + chrAliasFile.getName());
            }
            if (sequenceLocation != null) {
                if (!HttpUtils.isRemoteURL(sequenceLocation)) {
                    sequenceLocation = sequenceLocation.replace('\\', '/');
                }
                propertyFileWriter.println(Globals.GENOME_ARCHIVE_SEQUENCE_FILE_LOCATION_KEY + "=" + sequenceLocation);
            }

            propertyFileWriter.flush();
            return propertyBytes.toByteArray();

        } finally {
            if (propertyFileWriter != null) {
                propertyFileWriter.close();

            }
        }

    }

    final static int ZIP_ENTRY_CHUNK_SIZE = 64000;

    static public void createGenomeArchive(File zipOutputFile, File[] inputFiles, byte[] propertyBytes)
            throws FileNotFoundException, IOException {

        if (zipOutputFile == null) {
            return;
        }

        if ((inputFiles == null) || (inputFiles.length == 0)) {
            return;
        }

        ZipOutputStream zipOutputStream = null;

        try {
            zipOutputStream = new ZipOutputStream(new FileOutputStream(zipOutputFile));

            ZipEntry propertiesEntry = new ZipEntry("property.txt");
            propertiesEntry.setSize(propertyBytes.length);
            zipOutputStream.putNextEntry(propertiesEntry);
            zipOutputStream.write(propertyBytes);

            for (File file : inputFiles) {

                if (file == null) {
                    continue;
                }

                long fileLength = file.length();

                ZipEntry zipEntry = new ZipEntry(file.getName());
                zipEntry.setSize(fileLength);
                zipOutputStream.putNextEntry(zipEntry);

                BufferedInputStream bufferedInputstream = null;
                try {
                    InputStream inputStream = new FileInputStream(file);
                    bufferedInputstream = new BufferedInputStream(inputStream);

                    int bytesRead = 0;
                    byte[] data = new byte[ZIP_ENTRY_CHUNK_SIZE];

                    while ((bytesRead = bufferedInputstream.read(data)) != -1) {
                        zipOutputStream.write(data, 0, bytesRead);
                    }
                } finally {
                    if (bufferedInputstream != null) {
                        bufferedInputstream.close();
                    }
                }
            }
        } finally {
            if (zipOutputStream != null) {
                zipOutputStream.flush();
                zipOutputStream.close();
            }
        }
    }

}


text:
EVENTABLE_ROOT = File.join(File.dirname(__FILE__), '..', '..')
class EventableGenerator < Rails::Generator::Base

  def manifest
    record do |m|

      m.directory File.join("test", "factories")
      m.file "factories.rb", "test/factories/eventable.rb"

      m.migration_template "migrations/eventable.rb",
                           'db/migrate',
                           :migration_file_name => "setup_eventable_#{version.gsub('.', '_')}"

      m.readme "README"
    end
  end

  private

  def version
    config = YAML.load(File.read(File.join(EVENTABLE_ROOT, 'VERSION.yml')))
    "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
  end

end


text:
package com.systematic.trading.backtest.input;

import java.time.LocalDate;

/**
 * The inclusive start date for the back test.
 *
 * @author CJ Hare
 */
public class BacktestStartDate {

	private final LocalDate date;

	public BacktestStartDate( final LocalDate date ) {

		this.date = date;
	}

	public LocalDate date() {

		return date;
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>dataframework-repository</artifactId>

    <parent>
        <artifactId>dataframework</artifactId>
        <groupId>com.kiselev.dataframework</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <dependencies>
        <dependency>
            <groupId>com.kiselev.dataframework</groupId>
            <artifactId>dataframework-core</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>

        <dependency>
            <groupId>com.kiselev.dataframework</groupId>
            <artifactId>dataframework-mapper</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>
</project>


text:
package org.eclipse.deeplearning4j.nd4j.linalg.dataset;

import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.nd4j.common.tests.tags.NativeTag;
import org.nd4j.common.tests.tags.TagNames;
import org.nd4j.linalg.BaseNd4jTestWithBackends;
import org.nd4j.linalg.api.buffer.DataType;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.dataset.DataSet;
import org.nd4j.linalg.dataset.api.DataSetPreProcessor;
import org.nd4j.linalg.dataset.api.preprocessor.LabelLastTimeStepPreProcessor;
import org.nd4j.linalg.factory.Nd4j;
import org.nd4j.linalg.factory.Nd4jBackend;
import org.nd4j.linalg.indexing.NDArrayIndex;

import static org.junit.jupiter.api.Assertions.*;
@Tag(TagNames.NDARRAY_ETL)
@NativeTag
@Tag(TagNames.FILE_IO)
public class PreProcessorTests extends BaseNd4jTestWithBackends {

    @ParameterizedTest
    @MethodSource("org.nd4j.linalg.BaseNd4jTestWithBackends#configs")
    public void testLabelLastTimeStepPreProcessor(Nd4jBackend backend){

        INDArray f = Nd4j.rand(DataType.FLOAT, 3, 5, 8);
        INDArray l = Nd4j.rand(DataType.FLOAT, 3, 4, 8);

        //First test: no mask
        DataSet dsNoMask = new DataSet(f, l);

        DataSetPreProcessor preProc = new LabelLastTimeStepPreProcessor();
        preProc.preProcess(dsNoMask);

        assertSame(f, dsNoMask.getFeatures()); //Should be exact same object (not modified)

        INDArray l2d = dsNoMask.getLabels();
        INDArray l2dExp = l.get(NDArrayIndex.all(), NDArrayIndex.all(), NDArrayIndex.point(7));
        assertEquals(l2dExp, l2d);

        //Second test: mask, but only 1 value at last time step

        INDArray lmSingle = Nd4j.createFromArray(new float[][]{
                {0,0,0,1,0,0,0,0},
                {0,0,0,1,0,0,1,0},
                {0,0,0,0,0,0,0,1}});

        INDArray fm = Nd4j.createFromArray(new float[][]{
                {1,1,1,1,0,0,0,0},
                {1,1,1,1,1,1,1,0},
                {1,1,1,1,1,1,1,1}});

        DataSet dsMask1 = new DataSet(f, l, fm, lmSingle);
        preProc.preProcess(dsMask1);

        INDArray expL = Nd4j.create(DataType.FLOAT, 3, 4);
        expL.putRow(0, l.get(NDArrayIndex.point(0), NDArrayIndex.all(), NDArrayIndex.point(3)));
        expL.putRow(1, l.get(NDArrayIndex.point(1), NDArrayIndex.all(), NDArrayIndex.point(6)));
        expL.putRow(2, l.get(NDArrayIndex.point(2), NDArrayIndex.all(), NDArrayIndex.point(7)));

        DataSet exp1 = new DataSet(f, expL, fm, null);
        assertEquals(exp1, dsMask1);

        //Third test: mask, but multiple values in label mask
        INDArray lmMultiple = Nd4j.createFromArray(new float[][]{
                {1,1,1,1,0,0,0,0},
                {1,1,1,1,1,1,1,0},
                {1,1,1,1,1,1,1,1}});

        DataSet dsMask2 = new DataSet(f, l, fm, lmMultiple);
        preProc.preProcess(dsMask2);
    }

    @Override
    public char ordering() {
        return 'c';
    }

}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mycol. Writ. 7: 1330 (1924)

#### Original name
Polyporus beardsleei Lloyd, 1924

### Remarks
null


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.redis.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.redis.fluent.models.RedisAccessKeysInner;
import com.azure.resourcemanager.redis.fluent.models.RedisForceRebootResponseInner;
import com.azure.resourcemanager.redis.fluent.models.RedisResourceInner;
import com.azure.resourcemanager.redis.fluent.models.UpgradeNotificationInner;
import com.azure.resourcemanager.redis.models.CheckNameAvailabilityParameters;
import com.azure.resourcemanager.redis.models.ExportRdbParameters;
import com.azure.resourcemanager.redis.models.ImportRdbParameters;
import com.azure.resourcemanager.redis.models.RedisCreateParameters;
import com.azure.resourcemanager.redis.models.RedisRebootParameters;
import com.azure.resourcemanager.redis.models.RedisRegenerateKeyParameters;
import com.azure.resourcemanager.redis.models.RedisUpdateParameters;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in RedisClient. */
public interface RedisClient
    extends InnerSupportsGet<RedisResourceInner>, InnerSupportsListing<RedisResourceInner>, InnerSupportsDelete<Void> {
    /**
     * Checks that the redis cache name is valid and is not already in use.
     *
     * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource
     *     type is 'Microsoft.Cache/redis'.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<Void>> checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityParameters parameters);

    /**
     * Checks that the redis cache name is valid and is not already in use.
     *
     * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource
     *     type is 'Microsoft.Cache/redis'.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Void> checkNameAvailabilityAsync(CheckNameAvailabilityParameters parameters);

    /**
     * Checks that the redis cache name is valid and is not already in use.
     *
     * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource
     *     type is 'Microsoft.Cache/redis'.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void checkNameAvailability(CheckNameAvailabilityParameters parameters);

    /**
     * Checks that the redis cache name is valid and is not already in use.
     *
     * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource
     *     type is 'Microsoft.Cache/redis'.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> checkNameAvailabilityWithResponse(CheckNameAvailabilityParameters parameters, Context context);

    /**
     * Gets any upgrade notifications for a Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param history how many minutes in past to look for upgrade notifications.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return any upgrade notifications for a Redis cache as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedFlux<UpgradeNotificationInner> listUpgradeNotificationsAsync(
        String resourceGroupName, String name, double history);

    /**
     * Gets any upgrade notifications for a Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param history how many minutes in past to look for upgrade notifications.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return any upgrade notifications for a Redis cache as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<UpgradeNotificationInner> listUpgradeNotifications(
        String resourceGroupName, String name, double history);

    /**
     * Gets any upgrade notifications for a Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param history how many minutes in past to look for upgrade notifications.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return any upgrade notifications for a Redis cache as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<UpgradeNotificationInner> listUpgradeNotifications(
        String resourceGroupName, String name, double history, Context context);

    /**
     * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters supplied to the Create Redis operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a single Redis item in List or Get Operation along with {@link Response} on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<Flux<ByteBuffer>>> createWithResponseAsync(
        String resourceGroupName, String name, RedisCreateParameters parameters);

    /**
     * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters supplied to the Create Redis operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of a single Redis item in List or Get Operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    PollerFlux<PollResult<RedisResourceInner>, RedisResourceInner> beginCreateAsync(
        String resourceGroupName, String name, RedisCreateParameters parameters);

    /**
     * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters supplied to the Create Redis operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of a single Redis item in List or Get Operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<RedisResourceInner>, RedisResourceInner> beginCreate(
        String resourceGroupName, String name, RedisCreateParameters parameters);

    /**
     * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters supplied to the Create Redis operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of a single Redis item in List or Get Operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<RedisResourceInner>, RedisResourceInner> beginCreate(
        String resourceGroupName, String name, RedisCreateParameters parameters, Context context);

    /**
     * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters supplied to the Create Redis operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a single Redis item in List or Get Operation on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<RedisResourceInner> createAsync(String resourceGroupName, String name, RedisCreateParameters parameters);

    /**
     * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters supplied to the Create Redis operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a single Redis item in List or Get Operation.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    RedisResourceInner create(String resourceGroupName, String name, RedisCreateParameters parameters);

    /**
     * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters supplied to the Create Redis operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a single Redis item in List or Get Operation.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    RedisResourceInner create(String resourceGroupName, String name, RedisCreateParameters parameters, Context context);

    /**
     * Update an existing Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters supplied to the Update Redis operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a single Redis item in List or Get Operation along with {@link Response} on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<RedisResourceInner>> updateWithResponseAsync(
        String resourceGroupName, String name, RedisUpdateParameters parameters);

    /**
     * Update an existing Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters supplied to the Update Redis operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a single Redis item in List or Get Operation on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<RedisResourceInner> updateAsync(String resourceGroupName, String name, RedisUpdateParameters parameters);

    /**
     * Update an existing Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters supplied to the Update Redis operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a single Redis item in List or Get Operation.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    RedisResourceInner update(String resourceGroupName, String name, RedisUpdateParameters parameters);

    /**
     * Update an existing Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters supplied to the Update Redis operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a single Redis item in List or Get Operation along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<RedisResourceInner> updateWithResponse(
        String resourceGroupName, String name, RedisUpdateParameters parameters, Context context);

    /**
     * Deletes a Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String name);

    /**
     * Deletes a Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String name);

    /**
     * Deletes a Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String name);

    /**
     * Deletes a Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String name, Context context);

    /**
     * Deletes a Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Void> deleteAsync(String resourceGroupName, String name);

    /**
     * Deletes a Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String name);

    /**
     * Deletes a Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String name, Context context);

    /**
     * Gets a Redis cache (resource description).
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a Redis cache (resource description) along with {@link Response} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<RedisResourceInner>> getByResourceGroupWithResponseAsync(String resourceGroupName, String name);

    /**
     * Gets a Redis cache (resource description).
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a Redis cache (resource description) on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<RedisResourceInner> getByResourceGroupAsync(String resourceGroupName, String name);

    /**
     * Gets a Redis cache (resource description).
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a Redis cache (resource description).
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    RedisResourceInner getByResourceGroup(String resourceGroupName, String name);

    /**
     * Gets a Redis cache (resource description).
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a Redis cache (resource description) along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<RedisResourceInner> getByResourceGroupWithResponse(String resourceGroupName, String name, Context context);

    /**
     * Lists all Redis caches in a resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response of list Redis operation as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedFlux<RedisResourceInner> listByResourceGroupAsync(String resourceGroupName);

    /**
     * Lists all Redis caches in a resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response of list Redis operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<RedisResourceInner> listByResourceGroup(String resourceGroupName);

    /**
     * Lists all Redis caches in a resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response of list Redis operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<RedisResourceInner> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Gets all Redis caches in the specified subscription.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return all Redis caches in the specified subscription as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedFlux<RedisResourceInner> listAsync();

    /**
     * Gets all Redis caches in the specified subscription.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return all Redis caches in the specified subscription as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<RedisResourceInner> list();

    /**
     * Gets all Redis caches in the specified subscription.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return all Redis caches in the specified subscription as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<RedisResourceInner> list(Context context);

    /**
     * Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return redis cache access keys along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<RedisAccessKeysInner>> listKeysWithResponseAsync(String resourceGroupName, String name);

    /**
     * Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return redis cache access keys on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<RedisAccessKeysInner> listKeysAsync(String resourceGroupName, String name);

    /**
     * Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return redis cache access keys.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    RedisAccessKeysInner listKeys(String resourceGroupName, String name);

    /**
     * Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return redis cache access keys along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<RedisAccessKeysInner> listKeysWithResponse(String resourceGroupName, String name, Context context);

    /**
     * Regenerate Redis cache's access keys. This operation requires write permission to the cache resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Specifies which key to regenerate.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return redis cache access keys along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<RedisAccessKeysInner>> regenerateKeyWithResponseAsync(
        String resourceGroupName, String name, RedisRegenerateKeyParameters parameters);

    /**
     * Regenerate Redis cache's access keys. This operation requires write permission to the cache resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Specifies which key to regenerate.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return redis cache access keys on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<RedisAccessKeysInner> regenerateKeyAsync(
        String resourceGroupName, String name, RedisRegenerateKeyParameters parameters);

    /**
     * Regenerate Redis cache's access keys. This operation requires write permission to the cache resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Specifies which key to regenerate.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return redis cache access keys.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    RedisAccessKeysInner regenerateKey(String resourceGroupName, String name, RedisRegenerateKeyParameters parameters);

    /**
     * Regenerate Redis cache's access keys. This operation requires write permission to the cache resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Specifies which key to regenerate.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return redis cache access keys along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<RedisAccessKeysInner> regenerateKeyWithResponse(
        String resourceGroupName, String name, RedisRegenerateKeyParameters parameters, Context context);

    /**
     * Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be
     * potential data loss.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Specifies which Redis node(s) to reboot.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return response to force reboot for Redis cache along with {@link Response} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<RedisForceRebootResponseInner>> forceRebootWithResponseAsync(
        String resourceGroupName, String name, RedisRebootParameters parameters);

    /**
     * Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be
     * potential data loss.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Specifies which Redis node(s) to reboot.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return response to force reboot for Redis cache on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<RedisForceRebootResponseInner> forceRebootAsync(
        String resourceGroupName, String name, RedisRebootParameters parameters);

    /**
     * Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be
     * potential data loss.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Specifies which Redis node(s) to reboot.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return response to force reboot for Redis cache.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    RedisForceRebootResponseInner forceReboot(String resourceGroupName, String name, RedisRebootParameters parameters);

    /**
     * Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be
     * potential data loss.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Specifies which Redis node(s) to reboot.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return response to force reboot for Redis cache along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<RedisForceRebootResponseInner> forceRebootWithResponse(
        String resourceGroupName, String name, RedisRebootParameters parameters, Context context);

    /**
     * Import data into Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis import operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<Flux<ByteBuffer>>> importDataWithResponseAsync(
        String resourceGroupName, String name, ImportRdbParameters parameters);

    /**
     * Import data into Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis import operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    PollerFlux<PollResult<Void>, Void> beginImportDataAsync(
        String resourceGroupName, String name, ImportRdbParameters parameters);

    /**
     * Import data into Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis import operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginImportData(
        String resourceGroupName, String name, ImportRdbParameters parameters);

    /**
     * Import data into Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis import operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginImportData(
        String resourceGroupName, String name, ImportRdbParameters parameters, Context context);

    /**
     * Import data into Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis import operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Void> importDataAsync(String resourceGroupName, String name, ImportRdbParameters parameters);

    /**
     * Import data into Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis import operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void importData(String resourceGroupName, String name, ImportRdbParameters parameters);

    /**
     * Import data into Redis cache.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis import operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void importData(String resourceGroupName, String name, ImportRdbParameters parameters, Context context);

    /**
     * Export data from the redis cache to blobs in a container.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis export operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<Flux<ByteBuffer>>> exportDataWithResponseAsync(
        String resourceGroupName, String name, ExportRdbParameters parameters);

    /**
     * Export data from the redis cache to blobs in a container.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis export operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    PollerFlux<PollResult<Void>, Void> beginExportDataAsync(
        String resourceGroupName, String name, ExportRdbParameters parameters);

    /**
     * Export data from the redis cache to blobs in a container.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis export operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginExportData(
        String resourceGroupName, String name, ExportRdbParameters parameters);

    /**
     * Export data from the redis cache to blobs in a container.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis export operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginExportData(
        String resourceGroupName, String name, ExportRdbParameters parameters, Context context);

    /**
     * Export data from the redis cache to blobs in a container.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis export operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Void> exportDataAsync(String resourceGroupName, String name, ExportRdbParameters parameters);

    /**
     * Export data from the redis cache to blobs in a container.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis export operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void exportData(String resourceGroupName, String name, ExportRdbParameters parameters);

    /**
     * Export data from the redis cache to blobs in a container.
     *
     * @param resourceGroupName The name of the resource group.
     * @param name The name of the Redis cache.
     * @param parameters Parameters for Redis export operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void exportData(String resourceGroupName, String name, ExportRdbParameters parameters, Context context);
}


text:
namespace Microsoft.Zelig.Emulation.Hosting
{
    using System;
    using System.Collections.Generic;

    //
    // Master mode, from controller to bus.
    //
    public interface ISynchronousSerialInterfaceBus
    {
        uint ShiftData( uint value          ,
                        int  bitSize        ,
                        int  clockFrequency );
    }
}


text:
namespace pb {

	// Define struct that holds the physical properties of a rigid body
	struct PhysicalProperties {
		// Define size of state
		static size_t const STATE_SIZE = 13;

		//
		// Constant quantities
		//
		// Mass
		float mass;
		// Inertia tensor of the body
		math::mat3x3f inertia_tensor_body;
		// Inverse of inertia tensor
		math::mat3x3f inv_inertia_tensor_body;

		//
		// State variables
		//
		// Position
		math::vec3f x;
		// Orientation
		math::quaternionf q;
		// Linear and angular momentum
		math::vec3f P;
		math::vec3f L;

		//
		// Derived quantities
		//
		// Inverse of inertia tensor
		math::mat3x3f inv_inertia_tensor;
		// Orientation matrix
		math::mat3x3f R;
		// Velocity
		math::vec3f v;
		// Rotation vector
		math::vec3f omega;

		//
		// Compute quantities on body
		//
		// Force on body
		math::vec3f force;
		// Torque on body
		math::vec3f torque;
	};

	// Copy the state information into an array
	void stateToArray(PhysicalProperties const * const rb, float * y);

	// Copy array into object state
	void arrayToState(PhysicalProperties * const rb, float const * y);

	// State derivative to array
	void ddtStateToArray(PhysicalProperties const * const rb, float * y_dot);

} // pb namespace


text:
#page.watch #guide-container{left:270px !important}
.watch-medium #watch7-player,#watch7-main-container .maWide{margin:0 auto}
.exp-new-site-width #page{margin:0 auto !important}
.exp-new-site-width #page.search{width:1003px !important}
.sidebar-expanded .watch7-playlist{position:relative;margin:0 auto;width:915px !important}
.sidebar-expanded .watch-wide .watch7-playlist{left:15px !important;width:854px !important}
.sidebar-expanded #watch7-main{width:955px !important;margin:0 auto !important}
.sidebar-expanded #watch7-video{width:100% !important}
#watch7-container #player-api{position:relative;left:-153px;width:640px;margin:0 auto}
#watch7-container.watch-wide #player-api{left:0;width:854px;margin:0 auto !important}
#watch7-container #player-api embed{position:absolute;left:0;width:640px !important;height:390px !important}
#watch7-container.watch-wide #player-api embed{width:100% !important;height:100% !important}
#footer-hh #footer-hh-main{width:650px;margin:0 auto}
#footer-hh #footer-hh-links{width:695px;margin:0 auto;padding-left:60px}
#watch7-main-container .maWide{margin-top:5px} /*** Fix for Magic Youtube Actions ***/
.black-video-background #page.watch #guide-container.branded{background:rgba(0,0,0,0.8)}
.black-video-background .guide-context-item .title{color:#ccc}
.black-video-background .guide-context-item a:hover .title,.black-video-background .guide-context-item.context-playing .title{color:#333}
.black-video-background .guide-context-item.context-playing a{background-color:rgba(25,25,25,0.7)}
.purple-video-background #page.watch #guide-container.branded{background:rgba(25,0,15,0.8)}
.purple-video-background .guide-context-item .title{color:#ccc}
.purple-video-background .guide-context-item a:hover .title,.purple-video-background .guide-context-item.context-playing .title{color:#333}
.purple-video-background .guide-context-item.context-playing a{background-color:rgba(25,0,15,0.9)}


text:
template <class T>
struct S
{
    S () { }

    S (const S&) { }
};

template S<int>::S ();
template S<double>::S ();

template S<char>::S (const S<char>&);
template S<unsigned>::S (const S<unsigned>&);


text:
import QuestionFormBase from './form-base';

class Essay extends QuestionFormBase {
  constructor($form) {
    super($form);

    this.initTitleEditor(this.validator);
    this.initAnalysisEditor();

    this.answerFieldId = 'question-answer-field';
    this.$answerField = $('#' + this.answerFieldId);

    this.init();
  }

  init() {
    this.$answerField.rules('add', {
      required: true
    })

    let editor = CKEDITOR.replace(this.answerFieldId, {
      toolbar: 'Minimal',
      filebrowserImageUploadUrl: this.$answerField.data('imageUploadUrl'),
      height: this.$answerField.height()
    });

    editor.on('change', () => {
      this.$answerField.val(editor.getData());
    });
    editor.on('blur', () => {
      this.$answerField.val(editor.getData());
    });
  }
}

export default Essay;


text:
package org.apache.felix.sigil.eclipse.runtime.config;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.model.BaseWorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;

public class FormSelectionDialog extends Dialog
{
    private IFile formFile;

    public FormSelectionDialog(Shell parent)
    {
        super(parent);
    }

    @Override
    protected Control createDialogArea(Composite parent)
    {
        Composite composite = (Composite) super.createDialogArea(parent);
        new Label(composite, SWT.NONE).setText("Select bundle form file from workspace:");
        Tree tree = new Tree(composite, SWT.SINGLE);

        TreeViewer viewer = new TreeViewer(tree);
        viewer.setContentProvider(new BaseWorkbenchContentProvider());
        viewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
        viewer.addSelectionChangedListener(new ISelectionChangedListener()
        {
            public void selectionChanged(SelectionChangedEvent evt)
            {
                if (evt.getSelection().isEmpty())
                {
                    updateFile(null);
                }
                else
                {
                    StructuredSelection sel = (StructuredSelection) evt.getSelection();
                    IResource r = (IResource) sel.getFirstElement();
                    if (r instanceof IFile)
                    {
                        IFile f = (IFile) r;
                        updateFile(f);
                    }
                    else
                    {
                        updateFile(null);
                    }
                }
            }
        });
        viewer.setLabelProvider(new WorkbenchLabelProvider());

        tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

        return composite;
    }

    public IFile getFormFile()
    {
        return formFile;
    }

    protected void updateFile(IFile file)
    {
        formFile = file;

        if (file == null)
        {
            getButton(Window.OK).setEnabled(false);
        }
        else
        {
            getButton(Window.OK).setEnabled(true);
        }
    }

}


text:
#include <boost/test/unit_test.hpp>

#include "Werk/Utility/Latch.hpp"

BOOST_AUTO_TEST_SUITE(LatchTest)

BOOST_AUTO_TEST_CASE(TestBasics)
{
	werk::Latch<> l;
	BOOST_REQUIRE(!l.value());

	l.set();
	BOOST_REQUIRE(l.value());

	l.set();
	BOOST_REQUIRE(l.value());

	l.reset();
	BOOST_REQUIRE(!l.value());

	l.reset();
	BOOST_REQUIRE(!l.value());
}

BOOST_AUTO_TEST_CASE(TestSetResetLatchActions)
{
	werk::Latch<> l;
	werk::SetLatchAction<> s("SetLatch", l);
	werk::ResetAction<werk::Latch<> > r("ResetLatch", l);

	BOOST_REQUIRE(!l.value());

	s.execute();
	BOOST_REQUIRE(l.value());

	s.execute();
	BOOST_REQUIRE(l.value());

	r.execute();
	BOOST_REQUIRE(!l.value());

	r.execute();
	BOOST_REQUIRE(!l.value());
}

BOOST_AUTO_TEST_CASE(TestConditionalAction)
{
	werk::Latch<> l;
	werk::CounterAction<> counter("Counter");
	werk::ConditionalAction<> c("Conditional", l, &counter);

	BOOST_REQUIRE_EQUAL(counter.count(), 0);

	c.execute();
	BOOST_REQUIRE_EQUAL(counter.count(), 0);
	c.execute();
	BOOST_REQUIRE_EQUAL(counter.count(), 0);
	counter.execute();
	BOOST_REQUIRE_EQUAL(counter.count(), 1);
	c.execute();
	BOOST_REQUIRE_EQUAL(counter.count(), 1);

	l.set();
	c.execute();
	BOOST_REQUIRE_EQUAL(counter.count(), 2);
	c.execute();
	BOOST_REQUIRE_EQUAL(counter.count(), 3);

	l.reset();
	c.execute();
	BOOST_REQUIRE_EQUAL(counter.count(), 3);
	c.execute();
	BOOST_REQUIRE_EQUAL(counter.count(), 3);
}

BOOST_AUTO_TEST_SUITE_END()


text:
'use strict';

function loadMetadata(requirements, platform) {
  let reqs = JSON.parse(JSON.stringify(requirements));
  for(var object in requirements) {
    if(reqs[object].platform) {
      if(reqs[object].platform[platform]) {
        Object.assign(reqs[object], reqs[object].platform[platform]);
        delete reqs[object].platform;
      } else {
        delete reqs[object];
      }
    }
  }
  return reqs;
}

module.exports = loadMetadata;


text:
\begin{thebibliography}{99}

\bibitem{uno} Kaplan J., Sharma S. \& Weinberg A. (2011). "Meeting the cybersecurity challenge". McKinsey \& Company. Recuperado 12 Marzo 2017, de \url{http://www.mckinsey.com/business-functions/business-technology/our-insights/meeting-the-cybersecurity-challenge}

\bibitem{dos} THE EDITORS AT CYBERSECURITY VENTURES. (2014). "The Cybersecurity Market Report covers the business of cybersecurity, including market sizing and industry forecasts, spending, notable M\&A and IPO activity, and more..'' Cybersecurity Ventures. Recuperado 26 Septiembre 2016, de \url{http://cybersecurityventures.com/cybersecurity-market-report/}

\bibitem{tres} King, S. (2016). ''Assessing the real risk of being online". ComputerWeekly. Recuperado 26 Septiembre 2016, de http://\url{www.computerweekly.com/feature/Assessing-the-real-risk-of-being-online}

\bibitem{cuatro} Computer Hope (2016). "Why do people hack computers?". Computerhope.com. Recuperado 26 Septiembre 2016, de \url{http://www.computerhope.com/issues/ch001530.htm}

\bibitem{cinco} Cloudbric. (2016). "6 Reasons Why Hackers Want to Hack Your Website". Recuperado 26 Septiembre 2016, de \url{https://www.cloudbric.com/blog/2015/10/6-reasons-why-hackers-want-to-hack-your-website/}

\bibitem{seis} Imperva Inc. (2016). "2015 Web Application Attack Report (WAAR)". WAAR 2015. Recuperado de \url{https://www.imperva.com/docs/HII\_Web\_Application\_Attack\_Report\_Ed6.pdf}

\bibitem{cookie} Gutierrez, E. (2009). "JavaScript". 1st ed. Barcelona: Ed. ENI, p.233.

\bibitem{siete} Assis, R. (2016). "Primero post de la serie sobre vulnerabilidades XSS". Sucuri Español. Recuperado 19 Diciembre 2016, de \url{https://blog.sucuri.net/espanol/2016/04/pregunte-sucuri-que-es-una-vulnerabilidad-xss.html}

\bibitem{ocho} (2016). "Qué es y cómo funciona un ataque Cross - Site Scripting". Hostalia. Recuperado 19 Diciembre 2016, de \url{http://pressroom.hostalia.com/wp-content/themes/hostalia\_pressroom/images/cross-site-scripting-wp-hostalia.pdf}

\bibitem{nueve} Ramos Pereira, K. (2016). ''Cross-Site Scripting". Revistasbolivianas.org.bo. Recuperado 20 Noviembre 2016, de \url{http://www.revistasbolivianas.org.bo/scielo.php?pid=S1997-40442013000100023\&script=sci\_arttext}

\bibitem{diez} (2014). "Su navegador esta desnudo: por qué los navegadores protegidos siguen siendo vulnerables.". Panda Security. Recuperado 27 Noviembre 2016, de \url{http://resources.pandasecurity.com/enterprise/solutions/7.\%20WP\%20PCIP\%20ESP\%20Su\%20Navegador\%20esta\%20desnudo.pdf}

\bibitem{once} Greene, T. (2016). "8 cyber security technologies DHS is trying to commercialize". Network World. Recuperado 26 Septiembre 2016, de \url{http://www.networkworld.com/article/3056624/security/8-cyber-security-technologies-dhs-is-trying-to-commercialize.html}

\bibitem{doce} (2016). "School of Computer Science and Information Technology University of Nottingham". Firewalls, Intrusion Detection Systems and Anti-Virus Scanners (p. 57). NOTTINGHAM NG8 1BB, UK. Recuperado de \url{http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.107.2262\&rep=rep1\&type=pdf}

\bibitem{trece} Mookhey , K. K., Nilesh, B. (2011). "Detection of SQL Injection and Cross-site Scripting Attacks | Symantec Connect".
Symantec.com. Recuperado 26 Septiembre 2016, de \url{http://www.symantec.com/connect/articles/detection-sql-injection-and-cross- site-scripting-attacks10}

\bibitem{catorce} Tim, K. (2016). "Strategies to Reduce False Positives and False Negatives in NIDS | Symantec Connect". Symantec.com.
Recuperado 26 Septiembre 2016, de \url{http://www.symantec.com/connect/articles/strategies-reduce-false-positives-and-false-negatives-nids}

\bibitem{quince} Garcia-Alfaro, J. \& Navarro-Arribas, G. (2005). "Prevención de ataques de Cross-Site Scripting en aplicaciones Web".Recuperado 25 Noviembre 2016, de \url{http://www-public.tem-tsp.eu/~garcia\_a/web/papers/recsi08-xss.pdf}

\bibitem{dieciseis} González Márquez, V. (2009). "Sistema de detección de intrusos basado en sistema experto (Tesis de maestría)". Centro de Investigación en Computación. México.

\bibitem{proxy} National Institute of Standards and Technology,. (2007). "Guidelines on Securing Public Web Servers" (p. 121). Washington.

\bibitem{nist94} National Institute of Standards and Technology,. (2007). "Guide to Intrusion Detection and Prevention Systems (IDPS)" (p. 9). Washington.

\bibitem{nist41} National Institute of Standards and Technology,. (2009). "Guidelines on Firewalls and Firewall Policy" (p. 7). Washington.

\bibitem{nist33} National Institute of Standards and Technology,. (2001). ''Underlying Technical Models for Information Technology Security" (p. 6). Washington.

\bibitem{nist53} National Institute of Standards and Technology,. (2014). "Summary of NIST SP 800-53 Revision 4, Security and Privacy Controls for Federal Information Systems and Organizations" (p. 6). Washington.

\bibitem{CIDF} Tung, B. (1999). ''Common Intrusion Detection Framework". Gost.isi.edu. Recuperado 15 Abril 2017, de \url{http://gost.isi.edu/cidf/}

\bibitem{arquitecturas} Mira, J. (2017). ''Implantación de un Sistema de Detección de Intrusos en la Universidad de Valencia" (1ra ed., p. 15-21). Valencia: Recuperado de \url{http://rediris.es/cert/doc/pdf/ids-uv.pdf}

\bibitem{IEFT} Anónimo. (2017). ''Internet Engineering Task Force (IETF)". Ietf.org. Recuperado 16 Abril 2017, de \url{https://www.ietf.org/}

\bibitem{XML} Anónimo. ''Extensible Markup Language (XML)". (2017). W3.org. Recuperado 21 Abril 2017, de \url{https://www.w3.org/XML/}

\bibitem{defmach} Tsai, J., \& Yu, Z. (2011). ''Intrusion detection" (1st ed.). London: Imperial College Press.

\bibitem{defxss} Anónimo. (2017). Cross-site Scripting (XSS) - OWASP. Owasp.org. Recuperado 2 Mayo 2017, de \url{https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)}

\bibitem{typexss} Types of Cross-Site Scripting - OWASP. (2017). Owasp.org. Recuperado 2 May 2017, de \url{https://www.owasp.org/index.php/Types_of_Cross-Site_Scripting}

\end{thebibliography}


text:
package orc.error.compiletime.typing;

import orc.compile.parse.OrcSourceRange;
import orc.error.compiletime.CompilationException;

public abstract class TypeException extends CompilationException {
    private static final long serialVersionUID = 4486691396677409976L;

    public TypeException(final String message) {
        super(message);
    }

    public TypeException(final Throwable cause) {
        super(cause);
    }

    public TypeException(final String message, final Throwable cause) {
        super(message, cause);
    }

    public TypeException(final String message, final OrcSourceRange location) {
        super(message);
        setPosition(location);
    }

}


text:
package jsettlers.graphics.image.reader;

import java.util.List;

public final class Hashes {

	private final List<Long> hashes;

	public Hashes(List<Long> hashes) {
		this.hashes = hashes;
	}

	public int[] compareAndCreateMapping(Hashes other) {
		int[] mapping = new int[hashes.size()];

		for (int i1 = 0; i1 < hashes.size(); i1++) {
			Long h1 = hashes.get(i1);
			int i2 = i1 < other.hashes.size()
				&& h1.equals(other.hashes.get(i1)) ? i1 : other.hashes.indexOf(h1);
			mapping[i1] = i2;
			System.out.println(i1 + " -> " + i2);
		}

		return mapping;
	}

	public long hash() {
		long hashCode = 1L;
		long multiplier = 1L;
		for (Long hash : hashes) {
			multiplier *= 31L;
			hashCode += (hash + 27L) * multiplier;
		}
		return hashCode;
	}

	public List<Long> getHashes() {
		return hashes;
	}
}


text:
require 'spec_helper'

describe "Navigating Dashboards" do
  it "makes Dashboard the root path of the application" do
    visit "http://example.com"

    expect(page).to have_selector("header>h1")
    expect(page).to have_selector("#chart-ytd-attendance")
  end

end


text:
A List of Elements that a [Traversal](traversal.md) has visited.

## Components

* `id` - The element's ID.
* `type` - One of `edge`, `node`, or `boundary`.
* `repo` - The repository the element resides in (or points to, if a boundary).
* `markers` - An array of markers.

## JSON Representation

````javascript
{
  "id": "",
  "type": "",
  "repo": "",
  "markers": []
}
````


text:
package main

import (
	"fmt"
	"net"
	"os"
	"strings"
)

var clients = make(map[net.Conn]bool)

func main() {

	port := "2000"
	if os.Getenv("PORT") != "" {
		port = os.Getenv("PORT")
	}

	listener, err := net.Listen("tcp", ":"+port)
	if err != nil {
		panic(err)
	}

	fmt.Println("War Operation Plan Response (WOPR) has initialized.\r\nRunning on port: " + port)

	for {
		client, err := listener.Accept()
		if err != nil {
			continue
		}

		go connectClient(client)
	}
}

func connectClient(client net.Conn) {

	// Clear Screen
	sendString(client, "\u001B[2J")
	sendString(client, "LOGON: ")

	for {
		buf := make([]byte, 4096)
		numBytes, err := client.Read(buf)
		if numBytes == 0 || err != nil {
			return
		}

		// If we get telnet commands, ignore them
		if buf[0] == 255 {
			continue
		}

		handleInput(string(buf[0:numBytes]), client)
	}
}

func handleInput(input string, client net.Conn) {

	input = stripInput(input)
	fmt.Println("handleInput:", input)

	if !clientLoggedIn(client) {
		disconnect := true

		switch input {
		case "JOSHUA":
			loginClient(client)
			sendString(client, "GREETING PROFESSOR FALKEN.\r\n")
			disconnect = false
		case "HELP", "HELP LOGON":
			sendString(client, "HELP NOT AVAILABLE.\r\n")
		default:
			sendString(client, "IDENTIFICATION NOT RECOGNIZED BY SYSTEM.\r\n")
		}

		if disconnect {
			sendString(client, "--CONNECTION TERMINATED--\r\n")
			client.Close()
		}
	} else {
		switch input {
		case "EXIT":
			client.Close()
		case "HELLO":
			sendString(client, "HOW ARE YOU FEELING TODAY?\r\n")
		case "I AM FINE. HOW ARE YOU?":
			sendString(client, "EXCELLENT. IT'S BEEN A LONG TIME.\r\n")
			sendString(client, "CAN YOU EXPLAIN THE REMOVAL OF YOUR USER ACCOUNT ON 6/23/73?\r\n")
		case "HELP GAMES":
			sendString(client, "'GAMES' REFERS TO MODELS, SIMULATIONS AND GAMES WHICH HAVE")
			sendString(client, " TACTICAL AND STRATEGIC APPLICATIONS\r\n")
		case "LIST GAMES":
			listGames(client)
		case "HELP SYSTEM":
			sendString(client, "HELP GAMES\r\nLIST GAMES\r\nEXIT\r\n")
		case "PEOPLE SOMETIMES MAKE MISTAKES":
			sendString(client, "YES THEY DO. SHALL WE PLAY A GAME?\r\n")
		case "LOVE TO. HOW ABOUT GLOBAL THERMONUCLEAR WAR":
			sendString(client, "WOULDN'T YOU PREFER A GOOD GAME OF CHESS?\r\n")
		case "LATER. LET'S PLAY GLOBAL THERMONUCLEAR WAR":
			sendString(client, "FINE\r\n")
		case "":
			// Do nothing
		default:
			sendString(client, "UNKNOWN COMMAND: '"+input+"'\r\n")
		}
	}
}

func listGames(client net.Conn) {
	sendString(client, "FALKEN'S MAZE\r\n")
	sendString(client, "BLACK JACK\r\n")
	sendString(client, "GIN RUMMY\r\n")
	sendString(client, "HEARTS\r\n")
	sendString(client, "BRIDGE\r\n")
	sendString(client, "CHECKERS\r\n")
	sendString(client, "CHESS\r\n")
	sendString(client, "POKER\r\n")
	sendString(client, "FIGHTER COMBAT\r\n")
	sendString(client, "GUERILLA ENGAGEMENT\r\n")
	sendString(client, "DESERT WARFARE\r\n")
	sendString(client, "AIR-TO-GROUND ACTIONS\r\n")
	sendString(client, "THEATERWIDE TACTICAL WARFARE\r\n")
	sendString(client, "THEATERWIDE BIOTOXIC AND CHEMICAL WARFARE\r\n\r\n")
	sendString(client, "GLOBAL THERMONUCLEAR WAR\r\n")
}

func loginClient(client net.Conn) {
	clients[client] = true
}

func clientLoggedIn(client net.Conn) bool {
	return clients[client]
}

func sendString(client net.Conn, msg string) {
	client.Write([]byte(msg))
}

func stripInput(input string) string {
	input = strings.Replace(input, "\r", "", -1)
	input = strings.Replace(input, "\n", "", -1)
	input = strings.ToUpper(input)

	return input
}


text:
title: "Maintain Sensu"
description: "Read about how to maintain and troubleshoot your Sensu installation, including upgrading to the latest Sensu version."
product: "Sensu Go"
version: "6.0"
weight: 30
layout: "single"
toc: true
menu:
  sensu-go-6.0:
    parent: operations
    identifier: maintain-sensu
---

The Maintain Sensu category includes information to keep your Sensu installation up-to-date and running smoothly.

## Upgrade or migrate

Follow the [upgrade guide][1] for step-by-step instructions to upgrade to the latest version of Sensu from any earlier version.
The upgrade instructions include details about important changes between versions that could affect your upgrade and any special requirements to make sure your upgrade is successful.

If you are still using Sensu Core 1.x, follow the [migrate guide][2] to upgrade to Sensu Go.
The migrate guide includes links to Sensu's migration resources and Core configuration translation tools, as well as instructions for [installing Sensu Go alongside your existing Sensu Core instance][3].

## Troubleshoot

Use the Sensu [troubleshooting guide][4] to diagnose and resolve common issues.
Learn how to read, configure, and find the [logs produced by Sensu services][6].
Sensu log messages can help you identify and solve [backend startup errors][7] and [permissions issues][8].

The troubleshooting guide also describes how to [use Sensu handlers and filters to test and debug your observability pipeline][9] and diagnose problems related to [dynamic runtime assets][10].

## Manage license

Read the [license reference][5] to learn how to activate your commercial license.
The license reference also explains how to view your license details and expiration date and find your current entity count and limits.

[1]: upgrade/
[2]: migrate/
[3]: migrate/#step-by-step-migration-instructions
[4]: troubleshoot/
[5]: license/
[6]: troubleshoot/#service-logging
[7]: troubleshoot/#sensu-backend-startup-errors
[8]: troubleshoot/#permission-issues
[9]: troubleshoot/#handlers-and-event-filters
[10]: troubleshoot/#dynamic-runtime-assets


text:
export const window = {
  addEventListener: () => {}
};


text:
package com.elnware.spotifystreamer.view;

import android.support.v7.widget.RecyclerView;
import android.view.ViewGroup;

import java.util.List;

/**
 * Custom RecyclerViewAdapter that implements onClick and OnLongItemClick
 * and some common functions similar to those in ListView
 * Created by elnoxvie on 6/21/15.
 * @param <L> List Type
 * @param <M> Class that extends MyRecylerViewHolder
 * @param <T> Type of the class returned by getItem(int position)
 */
@SuppressWarnings("unchecked")
public class MyRecyclerAdapter<L extends List, M extends MyRecyclerViewHolder, T> extends RecyclerView.Adapter<M>{
   private L mData;
   private  MyRecyclerView.MyRecylerCallbacks mCallbacks;

   public MyRecyclerAdapter(L data){
      this.mData = data;
   }

   public void setRecyclerCallbacks(MyRecyclerView.MyRecylerCallbacks callbacks){
      this.mCallbacks = callbacks;
   }

   public MyRecyclerView.MyRecylerCallbacks getRecyclerCallbacks(){
      return mCallbacks;
   }

   public L getItems(){
      return mData;
   }

   public void changeData(L data){
      mData = data;
      notifyDataSetChanged();
   }

   @Override
   public M onCreateViewHolder(ViewGroup viewGroup, int i) {  return null; }

   @Override
   public void onBindViewHolder(M holder , int i) {
   }

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

   @SuppressWarnings("unchecked")
   public T getItem(int position){
      //noinspection unchecked
      return (T) mData.get(position);
   }
}