text:
namespace net {

class SpdyFramer;

// This class provides facilities for basic binary value packing
// into Spdy frames.
//
// The SpdyFrameBuilder supports appending primitive values (int, string, etc)
// to a frame instance.  The SpdyFrameBuilder grows its internal memory buffer
// dynamically to hold the sequence of primitive values.   The internal memory
// buffer is exposed as the "data" of the SpdyFrameBuilder.
class NET_EXPORT_PRIVATE SpdyFrameBuilder {
 public:
  // Initializes a SpdyFrameBuilder with a buffer of given size
  SpdyFrameBuilder(size_t size, SpdyMajorVersion version);

  ~SpdyFrameBuilder();

  // Returns the total size of the SpdyFrameBuilder's data, which may include
  // multiple frames.
  size_t length() const { return offset_ + length_; }

  // Returns a writeable buffer of given size in bytes, to be appended to the
  // currently written frame. Does bounds checking on length but does not
  // increment the underlying iterator. To do so, consumers should subsequently
  // call Seek().
  // In general, consumers should use Write*() calls instead of this.
  // Returns NULL on failure.
  char* GetWritableBuffer(size_t length);

  // Seeks forward by the given number of bytes. Useful in conjunction with
  // GetWriteableBuffer() above.
  bool Seek(size_t length);

  // Populates this frame with a SPDY control frame header using
  // version-specific information from the |framer| and length information from
  // capacity_. The given type must be a control frame type.
  // Used only for SPDY versions <4.
  bool WriteControlFrameHeader(const SpdyFramer& framer,
                               SpdyFrameType type,
                               uint8_t flags);

  // Populates this frame with a SPDY data frame header using version-specific
  // information from the |framer| and length information from capacity_.
  bool WriteDataFrameHeader(const SpdyFramer& framer,
                            SpdyStreamId stream_id,
                            uint8_t flags);

  // Populates this frame with a SPDY4/HTTP2 frame prefix using
  // version-specific information from the |framer| and length information from
  // capacity_. The given type must be a control frame type.
  // Used only for SPDY versions >=4.
  bool BeginNewFrame(const SpdyFramer& framer,
                     SpdyFrameType type,
                     uint8_t flags,
                     SpdyStreamId stream_id);

  // Takes the buffer from the SpdyFrameBuilder.
  SpdyFrame* take() {
    if (version_ > SPDY3) {
      DLOG_IF(DFATAL, SpdyConstants::GetFrameMaximumSize(version_) < length_)
          << "Frame length " << length_
          << " is longer than the maximum allowed length.";
    }
    SpdyFrame* rv = new SpdyFrame(buffer_.release(), length(), true);
    capacity_ = 0;
    length_ = 0;
    offset_ = 0;
    return rv;
  }

  // Methods for adding to the payload.  These values are appended to the end
  // of the SpdyFrameBuilder payload. Note - binary integers are converted from
  // host to network form.
  bool WriteUInt8(uint8_t value) { return WriteBytes(&value, sizeof(value)); }
  bool WriteUInt16(uint16_t value) {
    value = base::HostToNet16(value);
    return WriteBytes(&value, sizeof(value));
  }
  bool WriteUInt24(uint32_t value) {
    value = base::HostToNet32(value);
    return WriteBytes(reinterpret_cast<char*>(&value) + 1,
                      sizeof(value) - 1);
  }
  bool WriteUInt32(uint32_t value) {
    value = base::HostToNet32(value);
    return WriteBytes(&value, sizeof(value));
  }
  bool WriteUInt64(uint64_t value) {
    uint32_t upper = base::HostToNet32(static_cast<uint32_t>(value >> 32));
    uint32_t lower = base::HostToNet32(static_cast<uint32_t>(value));
    return (WriteBytes(&upper, sizeof(upper)) &&
            WriteBytes(&lower, sizeof(lower)));
  }
  bool WriteStringPiece16(const base::StringPiece& value);
  bool WriteStringPiece32(const base::StringPiece& value);
  bool WriteBytes(const void* data, uint32_t data_len);

  // Update (in-place) the length field in the frame being built to reflect the
  // current actual length of bytes written to said frame through this builder.
  // The framer parameter is used to determine version-specific location and
  // size information of the length field to be written, and must be initialized
  // with the correct version for the frame being written.
  bool RewriteLength(const SpdyFramer& framer);

  // Update (in-place) the length field in the frame being built to reflect the
  // given length.
  // The framer parameter is used to determine version-specific location and
  // size information of the length field to be written, and must be initialized
  // with the correct version for the frame being written.
  bool OverwriteLength(const SpdyFramer& framer, size_t length);

  // Update (in-place) the flags field in the frame being built to reflect the
  // given flags value.
  // Used only for SPDY versions >=4.
  bool OverwriteFlags(const SpdyFramer& framer, uint8_t flags);

 private:
  // Checks to make sure that there is an appropriate amount of space for a
  // write of given size, in bytes.
  bool CanWrite(size_t length) const;

  scoped_ptr<char[]> buffer_;
  size_t capacity_;  // Allocation size of payload, set by constructor.
  size_t length_;    // Length of the latest frame in the buffer.
  size_t offset_;    // Position at which the latest frame begins.

  const SpdyMajorVersion version_;
};

}  // namespace net

#endif  // NET_SPDY_SPDY_FRAME_BUILDER_H_


text:
import {
  ControlType,
  DynamicFormService,
  FormBuilder,
  FormBuilderSubset,
} from '@angular-dynaform/core';
import { Component } from '@angular/core';
import { FormTestBaseComponent } from './form-test-base.component';

const TITLE = 'Test TextView';
const FORM_ID = 'test-textview';
const TEST_CONTROL_ID = 'test-textview-control';
const TEST_CONTROL_LABEL = 'textview';
const TEST_CONTROL_PLACEHOLDER = 'placeholder';

@Component({
  selector: 'adf-form-test-textview',
  moduleId: module.id,
  templateUrl: './form-test-base.component.html',
})
export class FormTestTextViewComponent extends FormTestBaseComponent {
  constructor(dynamicFormService: DynamicFormService, formBuilder: FormBuilder) {
    super(dynamicFormService, formBuilder, TITLE, { id: FORM_ID, updateOn: 'change' });
  }

  addControl(fieldsdiv: FormBuilderSubset): void {
    fieldsdiv.group.addControl({
      id: TEST_CONTROL_ID,
      controlType: ControlType.CONTROL_TEXTAREA,
      options: {
        label: TEST_CONTROL_LABEL,
        placeholder: TEST_CONTROL_PLACEHOLDER,
        cols: 20,
        rows: 5,
        wrap: true,
      },
    });
  }
}

redpajama_set_name: RedPajamaGithub


text:
from django_coverage.coverage_runner import CoverageRunner

class Runner(CoverageRunner):
    def build_suite(self, *args, **kwargs):
        suite = super(Runner, self).build_suite(*args, **kwargs)
        tests = []
        for case in suite:
            pkg = case.__class__.__module__.split('.')[0]
            if pkg in ['opps']:
                tests.append(case)
        suite._tests = tests
        return suite


text:
function __processArg(obj, key) {
    var arg = null;
    if (obj) {
        arg = obj[key] || null;
        delete obj[key];
    }
    return arg;
}

function Controller() {
    require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
    this.__controllerPath = "newsRow";
    if (arguments[0]) {
        __processArg(arguments[0], "__parentSymbol");
        __processArg(arguments[0], "$model");
        __processArg(arguments[0], "__itemTemplate");
    }
    var $ = this;
    var exports = {};
    $.__views.row = Ti.UI.createTableViewRow({
        height: "auto",
        backgroundColor: Alloy.Globals.ThemeStyles.feed_table_row.backgroundColor,
        selectedBackgroundColor: Alloy.Globals.ThemeStyles.feed_table_row.selectedBackgroundColor,
        id: "row"
    });
    $.__views.row && $.addTopLevelView($.__views.row);
    $.__views.imgNews = Ti.UI.createImageView({
        width: 96,
        top: 12,
        left: 14,
        id: "imgNews"
    });
    $.__views.row.add($.__views.imgNews);
    $.__views.outerContainer = Ti.UI.createView({
        height: Ti.UI.SIZE,
        top: 10,
        left: 124,
        bottom: 10,
        layout: "vertical",
        id: "outerContainer"
    });
    $.__views.row.add($.__views.outerContainer);
    $.__views.lblName = Ti.UI.createLabel({
        left: 0,
        font: Alloy.Globals.ThemeStyles.feed_table_row_title.font,
        color: Alloy.Globals.ThemeStyles.feed_table_row_title.color,
        top: 0,
        height: Ti.UI.SIZE,
        wordWrap: true,
        id: "lblName"
    });
    $.__views.outerContainer.add($.__views.lblName);
    $.__views.tagView = Ti.UI.createView({
        height: Ti.UI.SIZE,
        layout: "horizontal",
        left: 0,
        top: 0,
        id: "tagView"
    });
    $.__views.outerContainer.add($.__views.tagView);
    $.__views.lblDetail = Ti.UI.createLabel({
        left: 0,
        right: 14,
        top: 10,
        font: Alloy.Globals.ThemeStyles.feed_table_row_teaser.font,
        color: Alloy.Globals.ThemeStyles.feed_table_row_teaser.color,
        id: "lblDetail"
    });
    $.__views.outerContainer.add($.__views.lblDetail);
    exports.destroy = function() {};
    _.extend($, $.__views);
    var args = arguments[0] || {};
    $.imgNews.image = args.NewsItem.picture;
    $.lblName.text = args.NewsItem.title;
    $.row.NewsItem = args.NewsItem;
    for (var i = 0; args.NewsItem.tags.length > i; i++) {
        var lblTag = Ti.UI.createLabel({
            color: Alloy.Globals.ThemeStyles.feed_table_row_tags.color,
            font: Alloy.Globals.ThemeStyles.feed_table_row_tags.font,
            left: 0
        });
        lblTag.text = i + 1 == args.NewsItem.tags.length ? args.NewsItem.tags[i] : args.NewsItem.tags[i] + ", ";
        $.tagView.add(lblTag);
    }
    $.lblDetail.text = args.NewsItem.body.length > 100 ? args.NewsItem.body.substring(0, 100) + "..." : args.NewsItem.body;
    if ("7" == Alloy.Globals.isIOS7()) {
        var seprator = Ti.UI.createView({
            height: 1,
            backgroundColor: "#343434",
            width: Ti.Platform.displayCaps.platformWidth,
            bottom: 0
        });
        $.row.add(seprator);
    }
    _.extend($, exports);
}

var Alloy = require("alloy"), Backbone = Alloy.Backbone, _ = Alloy._;

module.exports = Controller;


text:
#ifndef __OPENCV_GPU_REDUCE_DETAIL_HPP__
#define __OPENCV_GPU_REDUCE_DETAIL_HPP__

#include <thrust/tuple.h>
#include "../warp.hpp"
#include "../warp_shuffle.hpp"

namespace cv { namespace gpu { namespace device
{
    namespace reduce_detail
    {
        template <typename T> struct GetType;
        template <typename T> struct GetType<T*>
        {
            typedef T type;
        };
        template <typename T> struct GetType<volatile T*>
        {
            typedef T type;
        };
        template <typename T> struct GetType<T&>
        {
            typedef T type;
        };

        template <unsigned int I, unsigned int N>
        struct For
        {
            template <class PointerTuple, class ValTuple>
            static __device__ void loadToSmem(const PointerTuple& smem, const ValTuple& val, unsigned int tid)
            {
                thrust::get<I>(smem)[tid] = thrust::get<I>(val);

                For<I + 1, N>::loadToSmem(smem, val, tid);
            }
            template <class PointerTuple, class ValTuple>
            static __device__ void loadFromSmem(const PointerTuple& smem, const ValTuple& val, unsigned int tid)
            {
                thrust::get<I>(val) = thrust::get<I>(smem)[tid];

                For<I + 1, N>::loadFromSmem(smem, val, tid);
            }

            template <class PointerTuple, class ValTuple, class OpTuple>
            static __device__ void merge(const PointerTuple& smem, const ValTuple& val, unsigned int tid, unsigned int delta, const OpTuple& op)
            {
                typename GetType<typename thrust::tuple_element<I, PointerTuple>::type>::type reg = thrust::get<I>(smem)[tid + delta];
                thrust::get<I>(smem)[tid] = thrust::get<I>(val) = thrust::get<I>(op)(thrust::get<I>(val), reg);

                For<I + 1, N>::merge(smem, val, tid, delta, op);
            }
            template <class ValTuple, class OpTuple>
            static __device__ void mergeShfl(const ValTuple& val, unsigned int delta, unsigned int width, const OpTuple& op)
            {
                typename GetType<typename thrust::tuple_element<I, ValTuple>::type>::type reg = shfl_down(thrust::get<I>(val), delta, width);
                thrust::get<I>(val) = thrust::get<I>(op)(thrust::get<I>(val), reg);

                For<I + 1, N>::mergeShfl(val, delta, width, op);
            }
        };
        template <unsigned int N>
        struct For<N, N>
        {
            template <class PointerTuple, class ValTuple>
            static __device__ void loadToSmem(const PointerTuple&, const ValTuple&, unsigned int)
            {
            }
            template <class PointerTuple, class ValTuple>
            static __device__ void loadFromSmem(const PointerTuple&, const ValTuple&, unsigned int)
            {
            }

            template <class PointerTuple, class ValTuple, class OpTuple>
            static __device__ void merge(const PointerTuple&, const ValTuple&, unsigned int, unsigned int, const OpTuple&)
            {
            }
            template <class ValTuple, class OpTuple>
            static __device__ void mergeShfl(const ValTuple&, unsigned int, unsigned int, const OpTuple&)
            {
            }
        };

        template <typename T>
        __device__ __forceinline__ void loadToSmem(volatile T* smem, T& val, unsigned int tid)
        {
            smem[tid] = val;
        }
        template <typename T>
        __device__ __forceinline__ void loadFromSmem(volatile T* smem, T& val, unsigned int tid)
        {
            val = smem[tid];
        }
        template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9,
                  typename R0, typename R1, typename R2, typename R3, typename R4, typename R5, typename R6, typename R7, typename R8, typename R9>
        __device__ __forceinline__ void loadToSmem(const thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,
                                                       const thrust::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9>& val,
                                                       unsigned int tid)
        {
            For<0, thrust::tuple_size<thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> >::value>::loadToSmem(smem, val, tid);
        }
        template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9,
                  typename R0, typename R1, typename R2, typename R3, typename R4, typename R5, typename R6, typename R7, typename R8, typename R9>
        __device__ __forceinline__ void loadFromSmem(const thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,
                                                         const thrust::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9>& val,
                                                         unsigned int tid)
        {
            For<0, thrust::tuple_size<thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> >::value>::loadFromSmem(smem, val, tid);
        }

        template <typename T, class Op>
        __device__ __forceinline__ void merge(volatile T* smem, T& val, unsigned int tid, unsigned int delta, const Op& op)
        {
            T reg = smem[tid + delta];
            smem[tid] = val = op(val, reg);
        }
        template <typename T, class Op>
        __device__ __forceinline__ void mergeShfl(T& val, unsigned int delta, unsigned int width, const Op& op)
        {
            T reg = shfl_down(val, delta, width);
            val = op(val, reg);
        }
        template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9,
                  typename R0, typename R1, typename R2, typename R3, typename R4, typename R5, typename R6, typename R7, typename R8, typename R9,
                  class Op0, class Op1, class Op2, class Op3, class Op4, class Op5, class Op6, class Op7, class Op8, class Op9>
        __device__ __forceinline__ void merge(const thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>& smem,
                                              const thrust::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9>& val,
                                              unsigned int tid,
                                              unsigned int delta,
                                              const thrust::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9>& op)
        {
            For<0, thrust::tuple_size<thrust::tuple<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> >::value>::merge(smem, val, tid, delta, op);
        }
        template <typename R0, typename R1, typename R2, typename R3, typename R4, typename R5, typename R6, typename R7, typename R8, typename R9,
                  class Op0, class Op1, class Op2, class Op3, class Op4, class Op5, class Op6, class Op7, class Op8, class Op9>
        __device__ __forceinline__ void mergeShfl(const thrust::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9>& val,
                                                  unsigned int delta,
                                                  unsigned int width,
                                                  const thrust::tuple<Op0, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Op9>& op)
        {
            For<0, thrust::tuple_size<thrust::tuple<R0, R1, R2, R3, R4, R5, R6, R7, R8, R9> >::value>::mergeShfl(val, delta, width, op);
        }

        template <unsigned int N> struct Generic
        {
            template <typename Pointer, typename Reference, class Op>
            static __device__ void reduce(Pointer smem, Reference val, unsigned int tid, Op op)
            {
                loadToSmem(smem, val, tid);
                if (N >= 32)
                    __syncthreads();

                if (N >= 2048)
                {
                    if (tid < 1024)
                        merge(smem, val, tid, 1024, op);

                    __syncthreads();
                }
                if (N >= 1024)
                {
                    if (tid < 512)
                        merge(smem, val, tid, 512, op);

                    __syncthreads();
                }
                if (N >= 512)
                {
                    if (tid < 256)
                        merge(smem, val, tid, 256, op);

                    __syncthreads();
                }
                if (N >= 256)
                {
                    if (tid < 128)
                        merge(smem, val, tid, 128, op);

                    __syncthreads();
                }
                if (N >= 128)
                {
                    if (tid < 64)
                        merge(smem, val, tid, 64, op);

                    __syncthreads();
                }
                if (N >= 64)
                {
                    if (tid < 32)
                        merge(smem, val, tid, 32, op);
                }

                if (tid < 16)
                {
                    merge(smem, val, tid, 16, op);
                    merge(smem, val, tid, 8, op);
                    merge(smem, val, tid, 4, op);
                    merge(smem, val, tid, 2, op);
                    merge(smem, val, tid, 1, op);
                }
            }
        };

        template <unsigned int I, typename Pointer, typename Reference, class Op>
        struct Unroll
        {
            static __device__ void loopShfl(Reference val, Op op, unsigned int N)
            {
                mergeShfl(val, I, N, op);
                Unroll<I / 2, Pointer, Reference, Op>::loopShfl(val, op, N);
            }
            static __device__ void loop(Pointer smem, Reference val, unsigned int tid, Op op)
            {
                merge(smem, val, tid, I, op);
                Unroll<I / 2, Pointer, Reference, Op>::loop(smem, val, tid, op);
            }
        };
        template <typename Pointer, typename Reference, class Op>
        struct Unroll<0, Pointer, Reference, Op>
        {
            static __device__ void loopShfl(Reference, Op, unsigned int)
            {
            }
            static __device__ void loop(Pointer, Reference, unsigned int, Op)
            {
            }
        };

        template <unsigned int N> struct WarpOptimized
        {
            template <typename Pointer, typename Reference, class Op>
            static __device__ void reduce(Pointer smem, Reference val, unsigned int tid, Op op)
            {
            #if __CUDA_ARCH__ >= 300
                (void) smem;
                (void) tid;

                Unroll<N / 2, Pointer, Reference, Op>::loopShfl(val, op, N);
            #else
                loadToSmem(smem, val, tid);

                if (tid < N / 2)
                    Unroll<N / 2, Pointer, Reference, Op>::loop(smem, val, tid, op);
            #endif
            }
        };

        template <unsigned int N> struct GenericOptimized32
        {
            enum { M = N / 32 };

            template <typename Pointer, typename Reference, class Op>
            static __device__ void reduce(Pointer smem, Reference val, unsigned int tid, Op op)
            {
                const unsigned int laneId = Warp::laneId();

            #if __CUDA_ARCH__ >= 300
                Unroll<16, Pointer, Reference, Op>::loopShfl(val, op, warpSize);

                if (laneId == 0)
                    loadToSmem(smem, val, tid / 32);
            #else
                loadToSmem(smem, val, tid);

                if (laneId < 16)
                    Unroll<16, Pointer, Reference, Op>::loop(smem, val, tid, op);

                __syncthreads();

                if (laneId == 0)
                    loadToSmem(smem, val, tid / 32);
            #endif

                __syncthreads();

                loadFromSmem(smem, val, tid);

                if (tid < 32)
                {
                #if __CUDA_ARCH__ >= 300
                    Unroll<M / 2, Pointer, Reference, Op>::loopShfl(val, op, M);
                #else
                    Unroll<M / 2, Pointer, Reference, Op>::loop(smem, val, tid, op);
                #endif
                }
            }
        };

        template <bool val, class T1, class T2> struct StaticIf;
        template <class T1, class T2> struct StaticIf<true, T1, T2>
        {
            typedef T1 type;
        };
        template <class T1, class T2> struct StaticIf<false, T1, T2>
        {
            typedef T2 type;
        };

        template <unsigned int N> struct IsPowerOf2
        {
            enum { value = ((N != 0) && !(N & (N - 1))) };
        };

        template <unsigned int N> struct Dispatcher
        {
            typedef typename StaticIf<
                (N <= 32) && IsPowerOf2<N>::value,
                WarpOptimized<N>,
                typename StaticIf<
                    (N <= 1024) && IsPowerOf2<N>::value,
                    GenericOptimized32<N>,
                    Generic<N>
                >::type
            >::type reductor;
        };
    }
}}}

#endif // __OPENCV_GPU_REDUCE_DETAIL_HPP__


text:
<?php

class Google_Service_FirebaseHosting_FirebasehostingEmpty extends Google_Model
{
}


text:
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):

        # Changing field 'GipsyToolbarMenu.url'
        db.alter_column(u'gipsy_toolbar_gipsytoolbarmenu', 'url', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))

    def backwards(self, orm):

        # User chose to not deal with backwards NULL issues for 'GipsyToolbarMenu.url'
        raise RuntimeError("Cannot reverse this migration. 'GipsyToolbarMenu.url' and its values cannot be restored.")

        # The following code is provided here to aid in writing a correct migration
        # Changing field 'GipsyToolbarMenu.url'
        db.alter_column(u'gipsy_toolbar_gipsytoolbarmenu', 'url', self.gf('django.db.models.fields.CharField')(max_length=255))

    models = {
        u'gipsy_toolbar.gipsytoolbarmenu': {
            'Meta': {'ordering': "['order']", 'object_name': 'GipsyToolbarMenu'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'order': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['gipsy_toolbar.GipsyToolbarMenu']", 'null': 'True', 'blank': 'True'}),
            'url': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
        }
    }

    complete_apps = ['gipsy_toolbar']


text:
import {Component} from 'angular2/core';
import {Router, RouteConfig, Route, ROUTER_DIRECTIVES} from 'angular2/router';

@Component({
  selector: 'userAccount',
  templateUrl: 'app/share/components/user-account.component.html',
  styleUrls: ['app/share/components/user-account.component.css'],
  directives: [ROUTER_DIRECTIVES]
})
export class UserAccount {

}


text:
package org.apache.hadoop.hbase.io.crypto;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.Key;
import java.util.Arrays;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.io.crypto.aes.AES;
import org.apache.hadoop.hbase.testclassification.MiscTests;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.junit.Test;
import org.junit.experimental.categories.Category;

@Category({MiscTests.class, SmallTests.class})
public class TestCipherProvider {

  public static class MyCipherProvider implements CipherProvider {
    private Configuration conf;
    @Override
    public Configuration getConf() {
      return conf;
    }

    @Override
    public void setConf(Configuration conf) {
      this.conf = conf;
    }

    @Override
    public String getName() {
      return MyCipherProvider.class.getName();
    }

    @Override
    public String[] getSupportedCiphers() {
      return new String[] { "TEST" };
    }

    @Override
    public Cipher getCipher(String name) {
      if (name.equals("TEST")) {
        return new Cipher(this) {
          @Override
          public String getName() {
            return "TEST";
          }

          @Override
          public int getKeyLength() {
            return 0;
          }

          @Override
          public int getIvLength() {
            return 0;
          }

          @Override
          public Key getRandomKey() {
            return null;
          }

          @Override
          public Encryptor getEncryptor() {
            return null;
          }

          @Override
          public Decryptor getDecryptor() {
            return null;
          }

          @Override
          public OutputStream createEncryptionStream(OutputStream out, Context context, byte[] iv)
              throws IOException {
            return null;
          }

          @Override
          public OutputStream createEncryptionStream(OutputStream out, Encryptor encryptor)
              throws IOException {
            return null;
          }

          @Override
          public InputStream createDecryptionStream(InputStream in, Context context, byte[] iv)
              throws IOException {
            return null;
          }

          @Override
          public InputStream createDecryptionStream(InputStream in, Decryptor decryptor)
              throws IOException {
            return null;
          }
        };
      }
      return null;
    }
  }

  @Test
  public void testCustomProvider() {
    Configuration conf = HBaseConfiguration.create();
    conf.set(HConstants.CRYPTO_CIPHERPROVIDER_CONF_KEY, MyCipherProvider.class.getName());
    CipherProvider provider = Encryption.getCipherProvider(conf);
    assertTrue(provider instanceof MyCipherProvider);
    assertTrue(Arrays.asList(provider.getSupportedCiphers()).contains("TEST"));
    Cipher a = Encryption.getCipher(conf, "TEST");
    assertNotNull(a);
    assertTrue(a.getProvider() instanceof MyCipherProvider);
    assertEquals(a.getName(), "TEST");
    assertEquals(a.getKeyLength(), 0);
  }

  @Test
  public void testDefaultProvider() {
    Configuration conf = HBaseConfiguration.create();
    CipherProvider provider = Encryption.getCipherProvider(conf);
    assertTrue(provider instanceof DefaultCipherProvider);
    String algorithm =
        conf.get(HConstants.CRYPTO_KEY_ALGORITHM_CONF_KEY, HConstants.CIPHER_AES);
    assertTrue(Arrays.asList(provider.getSupportedCiphers()).contains(algorithm));
    Cipher a = Encryption.getCipher(conf, algorithm);
    assertNotNull(a);
    assertTrue(a.getProvider() instanceof DefaultCipherProvider);
    assertEquals(a.getName(), algorithm);
    assertEquals(a.getKeyLength(), AES.KEY_LENGTH);
  }

}


text:
define(['./_group', './_has'], function (_group, _has) {

  // Counts instances of an object that group by a certain criterion. Pass
  // either a string attribute to count by, or a function that returns the
  // criterion.
  var countBy = _group(function(result, value, key) {
    if (_has(result, key)) result[key]++; else result[key] = 1;
  });

  return countBy;

});


text:
namespace Azure.AI.AnomalyDetector
{
    public partial class AnomalyDetectorClient
    {
        protected AnomalyDetectorClient() { }
        public AnomalyDetectorClient(System.Uri endpoint, string apiVersion, Azure.AzureKeyCredential credential) { }
        public AnomalyDetectorClient(System.Uri endpoint, string apiVersion, Azure.AzureKeyCredential credential, Azure.AI.AnomalyDetector.AnomalyDetectorClientOptions options) { }
        public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
        public virtual Azure.Response<Azure.AI.AnomalyDetector.Models.Model> CreateAndTrainMultivariateModel(Azure.AI.AnomalyDetector.Models.ModelInfo body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual Azure.Response CreateAndTrainMultivariateModel(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.AnomalyDetector.Models.Model>> CreateAndTrainMultivariateModelAsync(Azure.AI.AnomalyDetector.Models.ModelInfo body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> CreateAndTrainMultivariateModelAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response DeleteMultivariateModel(string modelId, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> DeleteMultivariateModelAsync(string modelId, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response<Azure.AI.AnomalyDetector.Models.DetectionResult> DetectMultivariateBatchAnomaly(string modelId, Azure.AI.AnomalyDetector.Models.DetectionRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual Azure.Response DetectMultivariateBatchAnomaly(string modelId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.AnomalyDetector.Models.DetectionResult>> DetectMultivariateBatchAnomalyAsync(string modelId, Azure.AI.AnomalyDetector.Models.DetectionRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> DetectMultivariateBatchAnomalyAsync(string modelId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response<Azure.AI.AnomalyDetector.Models.LastDetectionResult> DetectMultivariateLastAnomaly(string modelId, Azure.AI.AnomalyDetector.Models.LastDetectionRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual Azure.Response DetectMultivariateLastAnomaly(string modelId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.AnomalyDetector.Models.LastDetectionResult>> DetectMultivariateLastAnomalyAsync(string modelId, Azure.AI.AnomalyDetector.Models.LastDetectionRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> DetectMultivariateLastAnomalyAsync(string modelId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response<Azure.AI.AnomalyDetector.Models.ChangePointDetectResponse> DetectUnivariateChangePoint(Azure.AI.AnomalyDetector.Models.ChangePointDetectRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual Azure.Response DetectUnivariateChangePoint(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.AnomalyDetector.Models.ChangePointDetectResponse>> DetectUnivariateChangePointAsync(Azure.AI.AnomalyDetector.Models.ChangePointDetectRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> DetectUnivariateChangePointAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response<Azure.AI.AnomalyDetector.Models.EntireDetectResponse> DetectUnivariateEntireSeries(Azure.AI.AnomalyDetector.Models.DetectRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual Azure.Response DetectUnivariateEntireSeries(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.AnomalyDetector.Models.EntireDetectResponse>> DetectUnivariateEntireSeriesAsync(Azure.AI.AnomalyDetector.Models.DetectRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> DetectUnivariateEntireSeriesAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response<Azure.AI.AnomalyDetector.Models.LastDetectResponse> DetectUnivariateLastPoint(Azure.AI.AnomalyDetector.Models.DetectRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual Azure.Response DetectUnivariateLastPoint(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.AnomalyDetector.Models.LastDetectResponse>> DetectUnivariateLastPointAsync(Azure.AI.AnomalyDetector.Models.DetectRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> DetectUnivariateLastPointAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response GetMultivariateBatchDetectionResult(string resultId, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> GetMultivariateBatchDetectionResultAsync(string resultId, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response<Azure.AI.AnomalyDetector.Models.DetectionResult> GetMultivariateBatchDetectionResultValue(string resultId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.AnomalyDetector.Models.DetectionResult>> GetMultivariateBatchDetectionResultValueAsync(string resultId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual Azure.Response GetMultivariateModel(string modelId, Azure.RequestContext context = null) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response> GetMultivariateModelAsync(string modelId, Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Pageable<System.BinaryData> GetMultivariateModels(int? skip = default(int?), int? maxCount = default(int?), Azure.RequestContext context = null) { throw null; }
        public virtual Azure.AsyncPageable<System.BinaryData> GetMultivariateModelsAsync(int? skip = default(int?), int? maxCount = default(int?), Azure.RequestContext context = null) { throw null; }
        public virtual Azure.Response<Azure.AI.AnomalyDetector.Models.Model> GetMultivariateModelValue(string modelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.AnomalyDetector.Models.Model>> GetMultivariateModelValueAsync(string modelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual Azure.Pageable<Azure.AI.AnomalyDetector.Models.Model> GetMultivariateModelValues(int? skip = default(int?), int? maxCount = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
        public virtual Azure.AsyncPageable<Azure.AI.AnomalyDetector.Models.Model> GetMultivariateModelValuesAsync(int? skip = default(int?), int? maxCount = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
    }
    public partial class AnomalyDetectorClientOptions : Azure.Core.ClientOptions
    {
        public AnomalyDetectorClientOptions(Azure.AI.AnomalyDetector.AnomalyDetectorClientOptions.ServiceVersion version = Azure.AI.AnomalyDetector.AnomalyDetectorClientOptions.ServiceVersion.V1_1) { }
        public enum ServiceVersion
        {
            V1_1 = 1,
        }
    }
}
namespace Azure.AI.AnomalyDetector.Models
{
    public enum AlignMode
    {
        Inner = 0,
        Outer = 1,
    }
    public partial class AlignPolicy
    {
        public AlignPolicy() { }
        public Azure.AI.AnomalyDetector.Models.AlignMode? AlignMode { get { throw null; } set { } }
        public Azure.AI.AnomalyDetector.Models.FillNAMethod? FillNAMethod { get { throw null; } set { } }
        public float? PaddingValue { get { throw null; } set { } }
    }
    public partial class AnomalyInterpretation
    {
        internal AnomalyInterpretation() { }
        public float? ContributionScore { get { throw null; } }
        public Azure.AI.AnomalyDetector.Models.CorrelationChanges CorrelationChanges { get { throw null; } }
        public string Variable { get { throw null; } }
    }
    public partial class AnomalyState
    {
        internal AnomalyState() { }
        public System.Collections.Generic.IReadOnlyList<Azure.AI.AnomalyDetector.Models.ErrorResponse> Errors { get { throw null; } }
        public System.DateTimeOffset Timestamp { get { throw null; } }
        public Azure.AI.AnomalyDetector.Models.AnomalyValue Value { get { throw null; } }
    }
    public partial class AnomalyValue
    {
        internal AnomalyValue() { }
        public System.Collections.Generic.IReadOnlyList<Azure.AI.AnomalyDetector.Models.AnomalyInterpretation> Interpretation { get { throw null; } }
        public bool IsAnomaly { get { throw null; } }
        public float Score { get { throw null; } }
        public float Severity { get { throw null; } }
    }
    public partial class ChangePointDetectRequest
    {
        public ChangePointDetectRequest(System.Collections.Generic.IEnumerable<Azure.AI.AnomalyDetector.Models.TimeSeriesPoint> series, Azure.AI.AnomalyDetector.Models.TimeGranularity granularity) { }
        public int? CustomInterval { get { throw null; } set { } }
        public Azure.AI.AnomalyDetector.Models.TimeGranularity Granularity { get { throw null; } }
        public int? Period { get { throw null; } set { } }
        public System.Collections.Generic.IList<Azure.AI.AnomalyDetector.Models.TimeSeriesPoint> Series { get { throw null; } }
        public int? StableTrendWindow { get { throw null; } set { } }
        public float? Threshold { get { throw null; } set { } }
    }
    public partial class ChangePointDetectResponse
    {
        internal ChangePointDetectResponse() { }
        public System.Collections.Generic.IReadOnlyList<float> ConfidenceScores { get { throw null; } }
        public System.Collections.Generic.IReadOnlyList<bool> IsChangePoint { get { throw null; } }
        public int? Period { get { throw null; } }
    }
    public partial class CorrelationChanges
    {
        internal CorrelationChanges() { }
        public System.Collections.Generic.IReadOnlyList<string> ChangedVariables { get { throw null; } }
    }
    public enum DataSchema
    {
        OneTable = 0,
        MultiTable = 1,
    }
    public partial class DetectionRequest
    {
        public DetectionRequest(string dataSource, int topContributorCount, System.DateTimeOffset startTime, System.DateTimeOffset endTime) { }
        public string DataSource { get { throw null; } set { } }
        public System.DateTimeOffset EndTime { get { throw null; } set { } }
        public System.DateTimeOffset StartTime { get { throw null; } set { } }
        public int TopContributorCount { get { throw null; } set { } }
    }
    public partial class DetectionResult
    {
        internal DetectionResult() { }
        public string ResultId { get { throw null; } }
        public System.Collections.Generic.IReadOnlyList<Azure.AI.AnomalyDetector.Models.AnomalyState> Results { get { throw null; } }
        public Azure.AI.AnomalyDetector.Models.DetectionResultSummary Summary { get { throw null; } }
    }
    public partial class DetectionResultSummary
    {
        internal DetectionResultSummary() { }
        public System.Collections.Generic.IReadOnlyList<Azure.AI.AnomalyDetector.Models.ErrorResponse> Errors { get { throw null; } }
        public Azure.AI.AnomalyDetector.Models.DetectionRequest SetupInfo { get { throw null; } }
        public Azure.AI.AnomalyDetector.Models.DetectionStatus Status { get { throw null; } }
        public System.Collections.Generic.IReadOnlyList<Azure.AI.AnomalyDetector.Models.VariableState> VariableStates { get { throw null; } }
    }
    public enum DetectionStatus
    {
        Created = 0,
        Running = 1,
        Ready = 2,
        Failed = 3,
    }
    public partial class DetectRequest
    {
        public DetectRequest(System.Collections.Generic.IEnumerable<Azure.AI.AnomalyDetector.Models.TimeSeriesPoint> series) { }
        public int? CustomInterval { get { throw null; } set { } }
        public Azure.AI.AnomalyDetector.Models.TimeGranularity? Granularity { get { throw null; } set { } }
        public float? ImputeFixedValue { get { throw null; } set { } }
        public Azure.AI.AnomalyDetector.Models.ImputeMode? ImputeMode { get { throw null; } set { } }
        public float? MaxAnomalyRatio { get { throw null; } set { } }
        public int? Period { get { throw null; } set { } }
        public int? Sensitivity { get { throw null; } set { } }
        public System.Collections.Generic.IList<Azure.AI.AnomalyDetector.Models.TimeSeriesPoint> Series { get { throw null; } }
    }
    public partial class DiagnosticsInfo
    {
        public DiagnosticsInfo() { }
        public Azure.AI.AnomalyDetector.Models.ModelState ModelState { get { throw null; } set { } }
        public System.Collections.Generic.IList<Azure.AI.AnomalyDetector.Models.VariableState> VariableStates { get { throw null; } }
    }
    public partial class EntireDetectResponse
    {
        internal EntireDetectResponse() { }
        public System.Collections.Generic.IReadOnlyList<float> ExpectedValues { get { throw null; } }
        public System.Collections.Generic.IReadOnlyList<bool> IsAnomaly { get { throw null; } }
        public System.Collections.Generic.IReadOnlyList<bool> IsNegativeAnomaly { get { throw null; } }
        public System.Collections.Generic.IReadOnlyList<bool> IsPositiveAnomaly { get { throw null; } }
        public System.Collections.Generic.IReadOnlyList<float> LowerMargins { get { throw null; } }
        public int Period { get { throw null; } }
        public System.Collections.Generic.IReadOnlyList<float> Severity { get { throw null; } }
        public System.Collections.Generic.IReadOnlyList<float> UpperMargins { get { throw null; } }
    }
    public partial class ErrorResponse
    {
        public ErrorResponse(string code, string message) { }
        public string Code { get { throw null; } set { } }
        public string Message { get { throw null; } set { } }
    }
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public readonly partial struct FillNAMethod : System.IEquatable<Azure.AI.AnomalyDetector.Models.FillNAMethod>
    {
        private readonly object _dummy;
        private readonly int _dummyPrimitive;
        public FillNAMethod(string value) { throw null; }
        public static Azure.AI.AnomalyDetector.Models.FillNAMethod Fixed { get { throw null; } }
        public static Azure.AI.AnomalyDetector.Models.FillNAMethod Linear { get { throw null; } }
        public static Azure.AI.AnomalyDetector.Models.FillNAMethod Previous { get { throw null; } }
        public static Azure.AI.AnomalyDetector.Models.FillNAMethod Subsequent { get { throw null; } }
        public static Azure.AI.AnomalyDetector.Models.FillNAMethod Zero { get { throw null; } }
        public bool Equals(Azure.AI.AnomalyDetector.Models.FillNAMethod other) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override bool Equals(object obj) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override int GetHashCode() { throw null; }
        public static bool operator ==(Azure.AI.AnomalyDetector.Models.FillNAMethod left, Azure.AI.AnomalyDetector.Models.FillNAMethod right) { throw null; }
        public static implicit operator Azure.AI.AnomalyDetector.Models.FillNAMethod (string value) { throw null; }
        public static bool operator !=(Azure.AI.AnomalyDetector.Models.FillNAMethod left, Azure.AI.AnomalyDetector.Models.FillNAMethod right) { throw null; }
        public override string ToString() { throw null; }
    }
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public readonly partial struct ImputeMode : System.IEquatable<Azure.AI.AnomalyDetector.Models.ImputeMode>
    {
        private readonly object _dummy;
        private readonly int _dummyPrimitive;
        public ImputeMode(string value) { throw null; }
        public static Azure.AI.AnomalyDetector.Models.ImputeMode Auto { get { throw null; } }
        public static Azure.AI.AnomalyDetector.Models.ImputeMode Fixed { get { throw null; } }
        public static Azure.AI.AnomalyDetector.Models.ImputeMode Linear { get { throw null; } }
        public static Azure.AI.AnomalyDetector.Models.ImputeMode NotFill { get { throw null; } }
        public static Azure.AI.AnomalyDetector.Models.ImputeMode Previous { get { throw null; } }
        public static Azure.AI.AnomalyDetector.Models.ImputeMode Zero { get { throw null; } }
        public bool Equals(Azure.AI.AnomalyDetector.Models.ImputeMode other) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override bool Equals(object obj) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override int GetHashCode() { throw null; }
        public static bool operator ==(Azure.AI.AnomalyDetector.Models.ImputeMode left, Azure.AI.AnomalyDetector.Models.ImputeMode right) { throw null; }
        public static implicit operator Azure.AI.AnomalyDetector.Models.ImputeMode (string value) { throw null; }
        public static bool operator !=(Azure.AI.AnomalyDetector.Models.ImputeMode left, Azure.AI.AnomalyDetector.Models.ImputeMode right) { throw null; }
        public override string ToString() { throw null; }
    }
    public partial class LastDetectionRequest
    {
        public LastDetectionRequest(System.Collections.Generic.IEnumerable<Azure.AI.AnomalyDetector.Models.VariableValues> variables, int topContributorCount) { }
        public int TopContributorCount { get { throw null; } }
        public System.Collections.Generic.IList<Azure.AI.AnomalyDetector.Models.VariableValues> Variables { get { throw null; } }
    }
    public partial class LastDetectionResult
    {
        internal LastDetectionResult() { }
        public System.Collections.Generic.IReadOnlyList<Azure.AI.AnomalyDetector.Models.AnomalyState> Results { get { throw null; } }
        public System.Collections.Generic.IReadOnlyList<Azure.AI.AnomalyDetector.Models.VariableState> VariableStates { get { throw null; } }
    }
    public partial class LastDetectResponse
    {
        internal LastDetectResponse() { }
        public float ExpectedValue { get { throw null; } }
        public bool IsAnomaly { get { throw null; } }
        public bool IsNegativeAnomaly { get { throw null; } }
        public bool IsPositiveAnomaly { get { throw null; } }
        public float LowerMargin { get { throw null; } }
        public int Period { get { throw null; } }
        public float? Severity { get { throw null; } }
        public int SuggestedWindow { get { throw null; } }
        public float UpperMargin { get { throw null; } }
    }
    public partial class Model
    {
        internal Model() { }
        public System.DateTimeOffset CreatedTime { get { throw null; } }
        public System.DateTimeOffset LastUpdatedTime { get { throw null; } }
        public string ModelId { get { throw null; } }
        public Azure.AI.AnomalyDetector.Models.ModelInfo ModelInfo { get { throw null; } }
    }
    public partial class ModelInfo
    {
        public ModelInfo(string dataSource, System.DateTimeOffset startTime, System.DateTimeOffset endTime) { }
        public Azure.AI.AnomalyDetector.Models.AlignPolicy AlignPolicy { get { throw null; } set { } }
        public Azure.AI.AnomalyDetector.Models.DataSchema? DataSchema { get { throw null; } set { } }
        public string DataSource { get { throw null; } set { } }
        public Azure.AI.AnomalyDetector.Models.DiagnosticsInfo DiagnosticsInfo { get { throw null; } set { } }
        public string DisplayName { get { throw null; } set { } }
        public System.DateTimeOffset EndTime { get { throw null; } set { } }
        public System.Collections.Generic.IList<Azure.AI.AnomalyDetector.Models.ErrorResponse> Errors { get { throw null; } }
        public int? SlidingWindow { get { throw null; } set { } }
        public System.DateTimeOffset StartTime { get { throw null; } set { } }
        public Azure.AI.AnomalyDetector.Models.ModelStatus? Status { get { throw null; } set { } }
    }
    public partial class ModelList
    {
        internal ModelList() { }
        public int CurrentCount { get { throw null; } }
        public int MaxCount { get { throw null; } }
        public System.Collections.Generic.IReadOnlyList<Azure.AI.AnomalyDetector.Models.Model> Models { get { throw null; } }
        public string NextLink { get { throw null; } }
    }
    public partial class ModelState
    {
        public ModelState() { }
        public System.Collections.Generic.IList<int> EpochIds { get { throw null; } }
        public System.Collections.Generic.IList<float> LatenciesInSeconds { get { throw null; } }
        public System.Collections.Generic.IList<float> TrainLosses { get { throw null; } }
        public System.Collections.Generic.IList<float> ValidationLosses { get { throw null; } }
    }
    public enum ModelStatus
    {
        Created = 0,
        Running = 1,
        Ready = 2,
        Failed = 3,
    }
    public enum TimeGranularity
    {
        Yearly = 0,
        Monthly = 1,
        Weekly = 2,
        Daily = 3,
        Hourly = 4,
        PerMinute = 5,
        PerSecond = 6,
        Microsecond = 7,
        None = 8,
    }
    public partial class TimeSeriesPoint
    {
        public TimeSeriesPoint(float value) { }
        public System.DateTimeOffset? Timestamp { get { throw null; } set { } }
        public float Value { get { throw null; } }
    }
    public partial class VariableState
    {
        public VariableState() { }
        public int? EffectiveCount { get { throw null; } set { } }
        public float? FilledNARatio { get { throw null; } set { } }
        public System.DateTimeOffset? FirstTimestamp { get { throw null; } set { } }
        public System.DateTimeOffset? LastTimestamp { get { throw null; } set { } }
        public string Variable { get { throw null; } set { } }
    }
    public partial class VariableValues
    {
        public VariableValues(string variable, System.Collections.Generic.IEnumerable<string> timestamps, System.Collections.Generic.IEnumerable<float> values) { }
        public System.Collections.Generic.IList<string> Timestamps { get { throw null; } }
        public System.Collections.Generic.IList<float> Values { get { throw null; } }
        public string Variable { get { throw null; } }
    }
}


text:
ACCEPTED

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

#### Published in
Prodr. 2:270. 1825 (F. E. L. Fischer, Cat. jard. Gorenki ed. 1812:68. 1812, nom. nud. )

#### Original name
null

### Remarks
null


text:
package elasticsearch.impl;

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

/**
 * 3/2/16
 *
 * @author {anobis}
 */
public class SearchQuery {
    private String league;
    private String query;
    private String implicitMod;
    private List<String> explicitMods;

    public SearchQuery() {
        this.query = "Query";
        this.implicitMod = "Implicit";
        this.explicitMods = new ArrayList<>();
    }

    @Override
    public String toString() {
        return "SearchQuery{" +
                "query='" + query + '\'' +
                '}';
    }
}


text:
package awsecs

import (
	"testing"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/ecs"
	"golang.org/x/net/context"

	"github.com/cloudstax/firecamp/api/common"
	"github.com/cloudstax/firecamp/pkg/containersvc"
	"github.com/cloudstax/firecamp/pkg/log/jsonfile"
	"github.com/cloudstax/firecamp/pkg/utils"
)

func TestTaskDef(t *testing.T) {
	cfg := aws.NewConfig().WithRegion("us-west-1")
	sess, err := session.NewSession(cfg)
	if err != nil {
		t.Fatalf("failed to create session, error %s", err)
	}

	e := NewAWSEcs(sess)

	// create context
	ctx := context.Background()

	commonOpts := &containersvc.CommonOptions{
		Cluster:        "test-cluster",
		ServiceName:    "test-service",
		ServiceUUID:    "test-serviceUUID",
		ContainerImage: containersvc.TestBusyBoxContainerImage,
		Resource: &common.Resources{
			MaxCPUUnits:     common.DefaultMaxCPUUnits,
			ReserveCPUUnits: int64(0),
			MaxMemMB:        int64(128),
			ReserveMemMB:    int64(16),
		},
		LogConfig: jsonfilelog.CreateJSONFileLogConfig(),
	}

	opts := &containersvc.RunTaskOptions{
		Common:   commonOpts,
		TaskType: common.TaskTypeInit,
	}

	uuid := utils.GenUUID()
	taskDefFamily := "testTaskDef-" + uuid

	// create the task def
	taskDef, exist, err := e.createEcsTaskDefinitionForTask(ctx, taskDefFamily, opts)
	if err != nil {
		t.Fatalf("createEcsTaskDefinitionForTask %s error %s", taskDefFamily, err)
	}
	if exist {
		t.Fatalf("taskDefFamily %s exists", taskDefFamily)
	}

	// taskdef should exist
	exist, err = e.isTaskDefFamilyExist(ctx, taskDefFamily)
	if err != nil {
		t.Fatalf("isTaskDefFamilyExist %s error %s", taskDefFamily, err)
	}
	if !exist {
		t.Fatalf("taskDefFamily %s not exists", taskDefFamily)
	}

	taskDef1, err := e.getLatestTaskDefinition(ctx, taskDefFamily)
	if err != nil {
		t.Fatalf("getLatestTaskDefinition %s error %s", taskDefFamily, err)
	}
	if taskDef != taskDef1 {
		t.Fatalf("expect task definition %s got %s", taskDef, taskDef1)
	}

	// test createEcsTaskDefinitionForTask for the created taskDef
	taskDef2, exist, err := e.createEcsTaskDefinitionForTask(ctx, taskDefFamily, opts)
	if err != nil {
		t.Fatalf("createEcsTaskDefinitionForTask %s error %s", taskDefFamily, err)
	}
	if exist != true || taskDef != taskDef2 {
		t.Fatalf("createEcsTaskDefinitionForTask expect taskDef exist %d, get taskdef %s expect %s", exist, taskDef, taskDef2)
	}

	// deregisterTaskDefinition
	err = e.deregisterTaskDefinition(ctx, taskDef)
	if err != nil {
		t.Fatalf("DeregisterTaskDefinition %s error %s", taskDef, err)
	}
}

func TestService(t *testing.T) {
	cfg := aws.NewConfig().WithRegion("us-west-1")
	sess, err := session.NewSession(cfg)
	if err != nil {
		t.Fatalf("failed to create session, error %s", err)
	}

	e := NewAWSEcs(sess)

	// create context
	ctx := context.Background()

	// create ECS cluster
	cluster := "cluster-" + utils.GenUUID()
	err = e.CreateCluster(ctx, cluster)
	if err != nil {
		t.Fatalf("create cluster %s error %s", cluster, err)
	}
	defer deleteCluster(ctx, t, e, cluster)

	// create services
	service := "test-service1"
	containerPath := ""
	serviceTest(ctx, t, e, cluster, service, containerPath, nil)

	service = "test-service2"
	containerPath = "/data"
	serviceTest(ctx, t, e, cluster, service, containerPath, nil)

	service = "test-service3"
	containerPath = "/data"
	place := &containersvc.Placement{
		Zones: []string{"us-east-1a", "us-east-1b"},
	}
	serviceTest(ctx, t, e, cluster, service, containerPath, place)
}

func serviceTest(ctx context.Context, t *testing.T, e *AWSEcs, cluster string, service string, containerPath string, place *containersvc.Placement) {
	exist, err := e.IsServiceExist(ctx, cluster, service)
	if err != nil {
		t.Fatalf("IsServiceExist error %s, cluster %s service %s", err, cluster, service)
	}
	if exist {
		t.Fatalf("service %s should not exist, cluster %s", service, cluster)
	}

	commonOpts := &containersvc.CommonOptions{
		Cluster:        cluster,
		ServiceName:    service,
		ServiceUUID:    service + "uuid",
		ContainerImage: containersvc.TestBusyBoxContainerImage,
		Resource: &common.Resources{
			MaxCPUUnits:     common.DefaultMaxCPUUnits,
			ReserveCPUUnits: int64(0),
			MaxMemMB:        int64(128),
			ReserveMemMB:    int64(16),
		},
		LogConfig: jsonfilelog.CreateJSONFileLogConfig(),
	}

	p := common.PortMapping{
		ContainerPort: 23011,
		HostPort:      23011,
	}

	opts := &containersvc.CreateServiceOptions{
		Common:       commonOpts,
		PortMappings: []common.PortMapping{p},
		Replicas:     int64(0),
		Place:        place,
	}
	if len(containerPath) != 0 {
		opts.DataVolume = &containersvc.VolumeOptions{
			MountPath: containerPath,
		}
	}

	err = e.CreateService(ctx, opts)
	if err != nil {
		t.Fatalf("CreateService error %s, %s", err, opts)
	}
	defer deleteService(ctx, t, e, cluster, service)

	exist, err = e.IsServiceExist(ctx, cluster, service)
	if err != nil {
		t.Fatalf("IsServiceExist error %s, cluster %s service %s", err, cluster, service)
	}
	if !exist {
		t.Fatalf("service %s should exist, cluster %s", service, cluster)
	}

	// update service
	uopts := &containersvc.UpdateServiceOptions{
		Cluster:         cluster,
		ServiceName:     service,
		MaxCPUUnits:     utils.Int64Ptr(200),
		ReserveCPUUnits: utils.Int64Ptr(100),
		MaxMemMB:        utils.Int64Ptr(256),
		ReserveMemMB:    utils.Int64Ptr(128),
		PortMappings: []common.PortMapping{
			{ContainerPort: 23011, HostPort: 23011},
			{ContainerPort: 23012, HostPort: 23012},
		},
	}

	contDef := testUpdateService(ctx, t, e, uopts)

	if *contDef.Memory != *uopts.MaxMemMB ||
		*contDef.MemoryReservation != *uopts.ReserveMemMB ||
		*contDef.Cpu != *uopts.ReserveCPUUnits {
		t.Fatalf("expect resource %d %d %d, get %d %d %d", *uopts.MaxMemMB, *uopts.ReserveMemMB,
			*uopts.ReserveCPUUnits, *contDef.Memory, *contDef.MemoryReservation, *contDef.Cpu)
	}
	if len(contDef.PortMappings) != len(uopts.PortMappings) {
		t.Fatalf("expect %d port mappings, get %d", len(uopts.PortMappings), len(contDef.PortMappings))
	}
	for i := 0; i < len(uopts.PortMappings); i++ {
		if *contDef.PortMappings[i].ContainerPort != uopts.PortMappings[i].ContainerPort ||
			*contDef.PortMappings[i].HostPort != uopts.PortMappings[i].HostPort {
			t.Fatalf("expect port %d:%d, get %d:%d", uopts.PortMappings[i].ContainerPort, uopts.PortMappings[i].HostPort,
				*contDef.PortMappings[i].ContainerPort, *contDef.PortMappings[i].HostPort)
		}
	}

	// update service again
	uopts1 := &containersvc.UpdateServiceOptions{
		Cluster:      cluster,
		ServiceName:  service,
		MaxMemMB:     utils.Int64Ptr(299),
		ReserveMemMB: utils.Int64Ptr(199),
	}

	contDef = testUpdateService(ctx, t, e, uopts1)

	if *contDef.Memory != *uopts1.MaxMemMB ||
		*contDef.MemoryReservation != *uopts1.ReserveMemMB ||
		*contDef.Cpu != *uopts.ReserveCPUUnits {
		t.Fatalf("expect resource %d %d %d, get %d %d %d", *uopts1.MaxMemMB, *uopts1.ReserveMemMB,
			*uopts.ReserveCPUUnits, *contDef.Memory, *contDef.MemoryReservation, *contDef.Cpu)
	}
	if len(contDef.PortMappings) != len(uopts.PortMappings) {
		t.Fatalf("expect %d port mappings, get %d", len(uopts.PortMappings), len(contDef.PortMappings))
	}
	for i := 0; i < len(uopts.PortMappings); i++ {
		if *contDef.PortMappings[i].ContainerPort != uopts.PortMappings[i].ContainerPort ||
			*contDef.PortMappings[i].HostPort != uopts.PortMappings[i].HostPort {
			t.Fatalf("expect port %d:%d, get %d:%d", uopts.PortMappings[i].ContainerPort, uopts.PortMappings[i].HostPort,
				*contDef.PortMappings[i].ContainerPort, *contDef.PortMappings[i].HostPort)
		}
	}

	// update the release version
	newVersion := "newversion"
	uopts2 := &containersvc.UpdateServiceOptions{
		Cluster:        cluster,
		ServiceName:    service,
		ReleaseVersion: newVersion,
	}

	contDef = testUpdateService(ctx, t, e, uopts2)

	if *contDef.Memory != *uopts1.MaxMemMB ||
		*contDef.MemoryReservation != *uopts1.ReserveMemMB ||
		*contDef.Cpu != *uopts.ReserveCPUUnits {
		t.Fatalf("expect resource %d %d %d, get %d %d %d", *uopts1.MaxMemMB, *uopts1.ReserveMemMB,
			*uopts.ReserveCPUUnits, *contDef.Memory, *contDef.MemoryReservation, *contDef.Cpu)
	}
	if len(contDef.PortMappings) != len(uopts.PortMappings) {
		t.Fatalf("expect %d port mappings, get %d", len(uopts.PortMappings), len(contDef.PortMappings))
	}
	for i := 0; i < len(uopts.PortMappings); i++ {
		if *contDef.PortMappings[i].ContainerPort != uopts.PortMappings[i].ContainerPort ||
			*contDef.PortMappings[i].HostPort != uopts.PortMappings[i].HostPort {
			t.Fatalf("expect port %d:%d, get %d:%d", uopts.PortMappings[i].ContainerPort, uopts.PortMappings[i].HostPort,
				*contDef.PortMappings[i].ContainerPort, *contDef.PortMappings[i].HostPort)
		}
	}
	for _, ev := range contDef.Environment {
		if *ev.Name == common.ENV_VERSION {
			if *ev.Value != newVersion {
				t.Fatalf("expect firecamp version %s, get %s", newVersion, *ev.Value)
			}
		}
	}
}

func testUpdateService(ctx context.Context, t *testing.T, e *AWSEcs, uopts *containersvc.UpdateServiceOptions) *ecs.ContainerDefinition {
	err := e.UpdateService(ctx, uopts)
	if err != nil {
		t.Fatalf("UpdateService error %s, cluster %s service %s", err, uopts.Cluster, uopts.ServiceName)
	}

	// verify the service update
	taskDefFamily := e.genTaskDefFamilyForService(uopts.Cluster, uopts.ServiceName)
	descInput := &ecs.DescribeTaskDefinitionInput{
		TaskDefinition: aws.String(taskDefFamily),
	}

	svc := ecs.New(e.sess)
	taskDef, err := svc.DescribeTaskDefinition(descInput)
	if err != nil {
		t.Fatalf("DescribeTaskDefinition error %s, taskDefFamily %s, cluster %s service %s", err, taskDefFamily, uopts.Cluster, uopts.ServiceName)
	}
	return taskDef.TaskDefinition.ContainerDefinitions[0]
}

func deleteCluster(ctx context.Context, t *testing.T, e *AWSEcs, cluster string) {
	err := e.DeleteCluster(ctx, cluster)
	if err != nil {
		t.Fatalf("DeleteCluster %s error %s", cluster, err)
	}
}

func deleteService(ctx context.Context, t *testing.T, e *AWSEcs, cluster string, service string) {
	err := e.DeleteService(ctx, cluster, service)
	if err != nil {
		t.Fatalf("DeleteService %s error %s, cluster %s", service, err, cluster)
	}
}


text:
namespace Microsoft.Azure.Management.Sql
{
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Models;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// Extension methods for ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations.
    /// </summary>
    public static partial class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperationsExtensions
    {
            /// <summary>
            /// Gets a database's vulnerability assessment rule baseline.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group that contains the resource. You can obtain
            /// this value from the Azure Resource Manager API or the portal.
            /// </param>
            /// <param name='managedInstanceName'>
            /// The name of the managed instance.
            /// </param>
            /// <param name='databaseName'>
            /// The name of the database for which the vulnerability assessment rule
            /// baseline is defined.
            /// </param>
            /// <param name='ruleId'>
            /// The vulnerability assessment rule ID.
            /// </param>
            /// <param name='baselineName'>
            /// The name of the vulnerability assessment rule baseline (default implies a
            /// baseline on a database level rule and master for server level rule).
            /// Possible values include: 'master', 'default'
            /// </param>
            public static DatabaseVulnerabilityAssessmentRuleBaseline Get(this IManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName)
            {
                return operations.GetAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Gets a database's vulnerability assessment rule baseline.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group that contains the resource. You can obtain
            /// this value from the Azure Resource Manager API or the portal.
            /// </param>
            /// <param name='managedInstanceName'>
            /// The name of the managed instance.
            /// </param>
            /// <param name='databaseName'>
            /// The name of the database for which the vulnerability assessment rule
            /// baseline is defined.
            /// </param>
            /// <param name='ruleId'>
            /// The vulnerability assessment rule ID.
            /// </param>
            /// <param name='baselineName'>
            /// The name of the vulnerability assessment rule baseline (default implies a
            /// baseline on a database level rule and master for server level rule).
            /// Possible values include: 'master', 'default'
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<DatabaseVulnerabilityAssessmentRuleBaseline> GetAsync(this IManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Creates or updates a database's vulnerability assessment rule baseline.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group that contains the resource. You can obtain
            /// this value from the Azure Resource Manager API or the portal.
            /// </param>
            /// <param name='managedInstanceName'>
            /// The name of the managed instance.
            /// </param>
            /// <param name='databaseName'>
            /// The name of the database for which the vulnerability assessment rule
            /// baseline is defined.
            /// </param>
            /// <param name='ruleId'>
            /// The vulnerability assessment rule ID.
            /// </param>
            /// <param name='baselineName'>
            /// The name of the vulnerability assessment rule baseline (default implies a
            /// baseline on a database level rule and master for server level rule).
            /// Possible values include: 'master', 'default'
            /// </param>
            /// <param name='parameters'>
            /// The requested rule baseline resource.
            /// </param>
            public static DatabaseVulnerabilityAssessmentRuleBaseline CreateOrUpdate(this IManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaseline parameters)
            {
                return operations.CreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName, parameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Creates or updates a database's vulnerability assessment rule baseline.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group that contains the resource. You can obtain
            /// this value from the Azure Resource Manager API or the portal.
            /// </param>
            /// <param name='managedInstanceName'>
            /// The name of the managed instance.
            /// </param>
            /// <param name='databaseName'>
            /// The name of the database for which the vulnerability assessment rule
            /// baseline is defined.
            /// </param>
            /// <param name='ruleId'>
            /// The vulnerability assessment rule ID.
            /// </param>
            /// <param name='baselineName'>
            /// The name of the vulnerability assessment rule baseline (default implies a
            /// baseline on a database level rule and master for server level rule).
            /// Possible values include: 'master', 'default'
            /// </param>
            /// <param name='parameters'>
            /// The requested rule baseline resource.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<DatabaseVulnerabilityAssessmentRuleBaseline> CreateOrUpdateAsync(this IManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaseline parameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName, parameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Removes the database's vulnerability assessment rule baseline.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group that contains the resource. You can obtain
            /// this value from the Azure Resource Manager API or the portal.
            /// </param>
            /// <param name='managedInstanceName'>
            /// The name of the managed instance.
            /// </param>
            /// <param name='databaseName'>
            /// The name of the database for which the vulnerability assessment rule
            /// baseline is defined.
            /// </param>
            /// <param name='ruleId'>
            /// The vulnerability assessment rule ID.
            /// </param>
            /// <param name='baselineName'>
            /// The name of the vulnerability assessment rule baseline (default implies a
            /// baseline on a database level rule and master for server level rule).
            /// Possible values include: 'master', 'default'
            /// </param>
            public static void Delete(this IManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName)
            {
                operations.DeleteAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Removes the database's vulnerability assessment rule baseline.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group that contains the resource. You can obtain
            /// this value from the Azure Resource Manager API or the portal.
            /// </param>
            /// <param name='managedInstanceName'>
            /// The name of the managed instance.
            /// </param>
            /// <param name='databaseName'>
            /// The name of the database for which the vulnerability assessment rule
            /// baseline is defined.
            /// </param>
            /// <param name='ruleId'>
            /// The vulnerability assessment rule ID.
            /// </param>
            /// <param name='baselineName'>
            /// The name of the vulnerability assessment rule baseline (default implies a
            /// baseline on a database level rule and master for server level rule).
            /// Possible values include: 'master', 'default'
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task DeleteAsync(this IManagedDatabaseVulnerabilityAssessmentRuleBaselinesOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, string ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

    }
}


text:
.list-block{
    margin: 0;
}
.list-block .list-title{
    color: #333;
    font-size: 15px;
}
.list-block .list-content{
    color: #777;
    font-size: 13px;
}
.list-block .list-order{
    color: #777;
    font-size: 10px;
}
.list-block ul li.empty-list {
    height: 300px;
    text-align: center;
    color: #9c9a8f;
    background-color: #efeff4;
    padding: 100px 0;
}
.list-block ul li.empty-list:before {
    display: inline-block;
    content: "";
    font-size: 2.6em;
    width: 2.6em;
    height: 2.6em;
    background: url(../../images/empty.png) no-repeat;
    background-size: 2.6em;
}

/*滑动列表*/
.list-block li {
    overflow: hidden;
}
.list-block .item-container {
    display: flex;
}
.list-block .item-operation {
    display: flex;
    text-align: center;
    background-color: white;
    color: #fff;
}
.list-block .item-operation .item-buttons {
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}
.list-block .item-operation .item-buttons.red {
    background-color: red;
    color: #fff;
}
.list-block .item-operation .item-buttons.gray {
    background-color: grey;
    color: #fff;
}

.swap-container .item-content {
    min-width: 100%;
}
.item-operation div {
    width: 100%;
}

.list-block .item-inner{
    padding: .4rem .55rem .35rem .55rem;
}


text:
@class NSError, NSObject<OS_dispatch_semaphore>;

@interface IDEDeviceServiceSimulatorSessionHelper : NSObject <DTiPhoneSimulatorSessionDelegate>
{
    NSObject<OS_dispatch_semaphore> *_startSemaphore;
    NSObject<OS_dispatch_semaphore> *_endSemaphore;
    BOOL _didStart;
    NSError *_startError;
}

@property(readonly) NSError *startError; // @synthesize startError=_startError;
@property(readonly) BOOL didStart; // @synthesize didStart=_didStart;
- (void).cxx_destruct;
- (void)session:(id)arg1 didEndWithError:(id)arg2;
- (void)session:(id)arg1 didStart:(BOOL)arg2 withError:(id)arg3;
- (id)initWithStartSemaphore:(id)arg1 endSemaphore:(id)arg2;

@end