text:
// Type definitions for Google Apps Script 2018-05-23
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
//                 linlex <https://github.com/linlex/>
//                 agektmr <https://github.com/agektmr/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.charts.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
/// <reference path="google-apps-script.drive.d.ts" />

declare namespace GoogleAppsScript {
  /**
   * This service allows scripts to create, access, and modify Google Sheets files. See also the guide to storing data in spreadsheets.
   *
   * https://developers.google.com/apps-script/guides/sheets
   */
  export module Spreadsheet {
    /**
     * Styles that can be set on a range using
     *  Range.setBorder(top, left, bottom, right, vertical, horizontal, color, style).
     */
    export enum BorderStyle { DOTTED, DASHED, SOLID }

    /**
     * Access boolean conditions in `ConditionalFormatRules`. Each conditional
     * format rule may contain a single boolean condition. The boolean condition
     * itself contains a boolean criteria (with values) and formatting settings.
     * The criteria is evaluated against the content of a cell resulting in
     * either a `true` or `false` value. If the criteria evaluates to `true`,
     * the condition's formatting settings are applied to the cell.
     */
    export interface BooleanCondition {
      getBackground(): string;
      getBold(): boolean;
      getCriteriaType(): BooleanCriteria;
      getCriteriaValue(): Object[];
      getFontColor(): string,
      getItalic(): boolean;
      getStrikethrough(): boolean;
      getUnderline(): boolean;
    }

    /**
     * The chart's position within a sheet.  Can be updated using the EmbeddedChart.modify()
     *  function.
     *
     *      chart = chart.modify().setPosition(5, 5, 0, 0).build();
     *      sheet.updateChart(chart);
     */
    export interface ContainerInfo {
      /**
       * The chart's left side will be anchored to this column.
       * @returns {Integer}  1-indexed column (i.e. column C will be 3)
       */
      getAnchorColumn(): Integer;
      /**
       * The chart's top side will be anchored to this row.
       * @returns {Integer}  1-indexed row (i.e. row 5 will return 5)
       */
      getAnchorRow(): Integer;
      /**
       * The chart's upper left hand corner will be offset from the anchor column by this many pixels.
       * @returns {Integer} the horizontal offset in pixels for the upper left hand corner of the chart
       */
      getOffsetX(): Integer;
      /**
       * Chart's upper left hand corner will be offset from the anchor row by this many pixels.
       * @returns {Integer} the vertical offset in pixels for the upper left hand corner of the chart
       */
      getOffsetY(): Integer;
    }

    /**
     * This class allows users to access existing data-validation rules. To create a new rule, see
     *  SpreadsheetApp.newDataValidation(), DataValidationBuilder, and
     *  Range.setDataValidation(rule).
     *
     *      // Log information about the data-validation rule for cell A1.
     *      var cell = SpreadsheetApp.getActive().getRange('A1');
     *      var rule = cell.getDataValidation();
     *      if (rule != null) {
     *        var criteria = rule.getCriteriaType();
     *        var args = rule.getCriteriaValues();
     *        Logger.log('The data-validation rule is %s %s', criteria, args);
     *      } else {
     *        Logger.log('The cell does not have a data-validation rule.')
     *      }
     */
    export interface DataValidation {
      copy(): DataValidationBuilder;
      getAllowInvalid(): boolean;
      getCriteriaType(): DataValidationCriteria;
      getCriteriaValues(): Object[];
      getHelpText(): string;
    }

    /**
     * Builder for data-validation rules.
     *
     *      // Set the data validation for cell A1 to require a value from B1:B10.
     *      var cell = SpreadsheetApp.getActive().getRange('A1');
     *      var range = SpreadsheetApp.getActive().getRange('B1:B10');
     *      var rule = SpreadsheetApp.newDataValidation().requireValueInRange(range).build();
     *      cell.setDataValidation(rule);
     */
    export interface DataValidationBuilder {
      build(): DataValidation;
      copy(): DataValidationBuilder;
      getAllowInvalid(): boolean;
      getCriteriaType(): DataValidationCriteria;
      getCriteriaValues(): Object[];
      getHelpText(): string;
      requireDate(): DataValidationBuilder;
      requireDateAfter(date: Date): DataValidationBuilder;
      requireDateBefore(date: Date): DataValidationBuilder;
      requireDateBetween(start: Date, end: Date): DataValidationBuilder;
      requireDateEqualTo(date: Date): DataValidationBuilder;
      requireDateNotBetween(start: Date, end: Date): DataValidationBuilder;
      requireDateOnOrAfter(date: Date): DataValidationBuilder;
      requireDateOnOrBefore(date: Date): DataValidationBuilder;
      requireFormulaSatisfied(formula: string): DataValidationBuilder;
      requireNumberBetween(start: Number, end: Number): DataValidationBuilder;
      requireNumberEqualTo(number: Number): DataValidationBuilder;
      requireNumberGreaterThan(number: Number): DataValidationBuilder;
      requireNumberGreaterThanOrEqualTo(number: Number): DataValidationBuilder;
      requireNumberLessThan(number: Number): DataValidationBuilder;
      requireNumberLessThanOrEqualTo(number: Number): DataValidationBuilder;
      requireNumberNotBetween(start: Number, end: Number): DataValidationBuilder;
      requireNumberNotEqualTo(number: Number): DataValidationBuilder;
      requireTextContains(text: string): DataValidationBuilder;
      requireTextDoesNotContain(text: string): DataValidationBuilder;
      requireTextEqualTo(text: string): DataValidationBuilder;
      requireTextIsEmail(): DataValidationBuilder;
      requireTextIsUrl(): DataValidationBuilder;
      requireValueInList(values: string[]): DataValidationBuilder;
      requireValueInList(values: string[], showDropdown: boolean): DataValidationBuilder;
      requireValueInRange(range: Range): DataValidationBuilder;
      requireValueInRange(range: Range, showDropdown: boolean): DataValidationBuilder;
      setAllowInvalid(allowInvalidData: boolean): DataValidationBuilder;
      setHelpText(helpText: string): DataValidationBuilder;
      withCriteria(criteria: DataValidationCriteria, args: Object[]): DataValidationBuilder;
    }

    /**
     * An enumeration representing the data-validation criteria that can be set on a range.
     *
     *      // Change existing data-validation rules that require a date in 2013 to require a date in 2014.
     *      var oldDates = [new Date('1/1/2013'), new Date('12/31/2013')];
     *      var newDates = [new Date('1/1/2014'), new Date('12/31/2014')];
     *      var sheet = SpreadsheetApp.getActiveSheet();
     *      var range = sheet.getRange(1, 1, sheet.getMaxRows(), sheet.getMaxColumns());
     *      var rules = range.getDataValidations();
     *
     *      for (var i = 0; i < rules.length; i++) {
     *        for (var j = 0; j < rules[i].length; j++) {
     *          var rule = rules[i][j];
     *
     *          if (rule != null) {
     *            var criteria = rule.getCriteriaType();
     *            var args = rule.getCriteriaValues();
     *
     *            if (criteria == SpreadsheetApp.DataValidationCriteria.DATE_BETWEEN
     *                && args[0].getTime() == oldDates[0].getTime()
     *                && args[1].getTime() == oldDates[1].getTime()) {
     *              // Create a builder from the existing rule, then change the dates.
     *              rules[i][j] = rule.copy().withCriteria(criteria, newDates).build();
     *            }
     *          }
     *        }
     *      }
     *      range.setDataValidations(rules);
     */
    export enum DataValidationCriteria { DATE_AFTER, DATE_BEFORE, DATE_BETWEEN, DATE_EQUAL_TO, DATE_IS_VALID_DATE, DATE_NOT_BETWEEN, DATE_ON_OR_AFTER, DATE_ON_OR_BEFORE, NUMBER_BETWEEN, NUMBER_EQUAL_TO, NUMBER_GREATER_THAN, NUMBER_GREATER_THAN_OR_EQUAL_TO, NUMBER_LESS_THAN, NUMBER_LESS_THAN_OR_EQUAL_TO, NUMBER_NOT_BETWEEN, NUMBER_NOT_EQUAL_TO, TEXT_CONTAINS, TEXT_DOES_NOT_CONTAIN, TEXT_EQUAL_TO, TEXT_IS_VALID_EMAIL, TEXT_IS_VALID_URL, VALUE_IN_LIST, VALUE_IN_RANGE, CUSTOM_FORMULA }

    /**
     * Builder for area charts. For more details, see the Gviz
     *  documentation.
     */
    export interface EmbeddedAreaChartBuilder {
      addRange(range: Range): EmbeddedChartBuilder;
      asAreaChart(): EmbeddedAreaChartBuilder;
      asBarChart(): EmbeddedBarChartBuilder;
      asColumnChart(): EmbeddedColumnChartBuilder;
      asComboChart(): EmbeddedComboChartBuilder;
      asHistogramChart(): EmbeddedHistogramChartBuilder;
      asLineChart(): EmbeddedLineChartBuilder;
      asPieChart(): EmbeddedPieChartBuilder;
      asScatterChart(): EmbeddedScatterChartBuilder;
      asTableChart(): EmbeddedTableChartBuilder;
      build(): EmbeddedChart;
      getChartType(): Charts.ChartType;
      getContainer(): ContainerInfo;
      getRanges(): Range[];
      removeRange(range: Range): EmbeddedChartBuilder;
      reverseCategories(): EmbeddedAreaChartBuilder;
      setBackgroundColor(cssValue: string): EmbeddedAreaChartBuilder;
      setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
      setColors(cssValues: string[]): EmbeddedAreaChartBuilder;
      setLegendPosition(position: Charts.Position): EmbeddedAreaChartBuilder;
      setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder;
      setOption(option: string, value: Object): EmbeddedChartBuilder;
      setPointStyle(style: Charts.PointStyle): EmbeddedAreaChartBuilder;
      setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
      setRange(start: Number, end: Number): EmbeddedAreaChartBuilder;
      setStacked(): EmbeddedAreaChartBuilder;
      setTitle(chartTitle: string): EmbeddedAreaChartBuilder;
      setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder;
      setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder;
      setXAxisTitle(title: string): EmbeddedAreaChartBuilder;
      setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder;
      setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder;
      setYAxisTitle(title: string): EmbeddedAreaChartBuilder;
      setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder;
      useLogScale(): EmbeddedAreaChartBuilder;
    }

    /**
     * Builder for bar charts. For more details, see the Gviz
     *  documentation.
     */
    export interface EmbeddedBarChartBuilder {
      addRange(range: Range): EmbeddedChartBuilder;
      asAreaChart(): EmbeddedAreaChartBuilder;
      asBarChart(): EmbeddedBarChartBuilder;
      asColumnChart(): EmbeddedColumnChartBuilder;
      asComboChart(): EmbeddedComboChartBuilder;
      asHistogramChart(): EmbeddedHistogramChartBuilder;
      asLineChart(): EmbeddedLineChartBuilder;
      asPieChart(): EmbeddedPieChartBuilder;
      asScatterChart(): EmbeddedScatterChartBuilder;
      asTableChart(): EmbeddedTableChartBuilder;
      build(): EmbeddedChart;
      getChartType(): Charts.ChartType;
      getContainer(): ContainerInfo;
      getRanges(): Range[];
      removeRange(range: Range): EmbeddedChartBuilder;
      reverseCategories(): EmbeddedBarChartBuilder;
      reverseDirection(): EmbeddedBarChartBuilder;
      setBackgroundColor(cssValue: string): EmbeddedBarChartBuilder;
      setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
      setColors(cssValues: string[]): EmbeddedBarChartBuilder;
      setLegendPosition(position: Charts.Position): EmbeddedBarChartBuilder;
      setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder;
      setOption(option: string, value: Object): EmbeddedChartBuilder;
      setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
      setRange(start: Number, end: Number): EmbeddedBarChartBuilder;
      setStacked(): EmbeddedBarChartBuilder;
      setTitle(chartTitle: string): EmbeddedBarChartBuilder;
      setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder;
      setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder;
      setXAxisTitle(title: string): EmbeddedBarChartBuilder;
      setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder;
      setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder;
      setYAxisTitle(title: string): EmbeddedBarChartBuilder;
      setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder;
      useLogScale(): EmbeddedBarChartBuilder;
    }

    /**
     * Represents a chart that has been embedded into a Spreadsheet.
     *
     * This example shows how to modify an existing chart:
     *
     *      var sheet = SpreadsheetApp.getActiveSheet();
     *      var range = sheet.getRange("A2:B8")
     *      var chart = sheet.getCharts()[0];
     *      chart = chart.modify()
     *          .addRange(range)
     *          .setOption('title', 'Updated!')
     *          .setOption('animation.duration', 500)
     *          .setPosition(2,2,0,0)
     *          .build();
     *      sheet.updateChart(chart);
     *
     * This example shows how to create a new chart:
     *
     *      function newChart(range, sheet) {
     *        var sheet = SpreadsheetApp.getActiveSheet();
     *        var chartBuilder = sheet.newChart();
     *        chartBuilder.addRange(range)
     *            .setChartType(Charts.ChartType.LINE)
     *            .setOption('title', 'My Line Chart!');
     *        sheet.insertChart(chartBuilder.build());
     *      }
     */
    export interface EmbeddedChart {
      getAs(contentType: string): Base.Blob;
      getBlob(): Base.Blob;
      getContainerInfo(): ContainerInfo;
      getId(): string;
      getOptions(): Charts.ChartOptions;
      getRanges(): Range[];
      getType(): string;
      modify(): EmbeddedChartBuilder;
      setId(id: string): Charts.Chart;
    }

    /**
     * This builder allows you to edit an EmbeddedChart. Make sure to call
     *  sheet.updateChart(builder.build()) to save your changes.
     *
     *      var sheet = SpreadsheetApp.getActiveSheet();
     *      var range = sheet.getRange("A1:B8");
     *      var chart = sheet.getCharts()[0];
     *      chart = chart.modify()
     *          .addRange(range)
     *          .setOption('title', 'Updated!')
     *          .setOption('animation.duration', 500)
     *          .setPosition(2,2,0,0)
     *          .build();
     *      sheet.updateChart(chart);
     */
    export interface EmbeddedChartBuilder {
      addRange(range: Range): EmbeddedChartBuilder;
      asAreaChart(): EmbeddedAreaChartBuilder;
      asBarChart(): EmbeddedBarChartBuilder;
      asColumnChart(): EmbeddedColumnChartBuilder;
      asComboChart(): EmbeddedComboChartBuilder;
      asHistogramChart(): EmbeddedHistogramChartBuilder;
      asLineChart(): EmbeddedLineChartBuilder;
      asPieChart(): EmbeddedPieChartBuilder;
      asScatterChart(): EmbeddedScatterChartBuilder;
      asTableChart(): EmbeddedTableChartBuilder;
      build(): EmbeddedChart;
      getChartType(): Charts.ChartType;
      getContainer(): ContainerInfo;
      getRanges(): Range[];
      removeRange(range: Range): EmbeddedChartBuilder;
      setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
      setOption(option: string, value: Object): EmbeddedChartBuilder;
      setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
    }

    /**
     * Builder for column charts. For more details, see the Gviz
     *  documentation.
     */
    export interface EmbeddedColumnChartBuilder {
      addRange(range: Range): EmbeddedChartBuilder;
      asAreaChart(): EmbeddedAreaChartBuilder;
      asBarChart(): EmbeddedBarChartBuilder;
      asColumnChart(): EmbeddedColumnChartBuilder;
      asComboChart(): EmbeddedComboChartBuilder;
      asHistogramChart(): EmbeddedHistogramChartBuilder;
      asLineChart(): EmbeddedLineChartBuilder;
      asPieChart(): EmbeddedPieChartBuilder;
      asScatterChart(): EmbeddedScatterChartBuilder;
      asTableChart(): EmbeddedTableChartBuilder;
      build(): EmbeddedChart;
      getChartType(): Charts.ChartType;
      getContainer(): ContainerInfo;
      getRanges(): Range[];
      removeRange(range: Range): EmbeddedChartBuilder;
      reverseCategories(): EmbeddedColumnChartBuilder;
      setBackgroundColor(cssValue: string): EmbeddedColumnChartBuilder;
      setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
      setColors(cssValues: string[]): EmbeddedColumnChartBuilder;
      setLegendPosition(position: Charts.Position): EmbeddedColumnChartBuilder;
      setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder;
      setOption(option: string, value: Object): EmbeddedChartBuilder;
      setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
      setRange(start: Number, end: Number): EmbeddedColumnChartBuilder;
      setStacked(): EmbeddedColumnChartBuilder;
      setTitle(chartTitle: string): EmbeddedColumnChartBuilder;
      setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder;
      setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder;
      setXAxisTitle(title: string): EmbeddedColumnChartBuilder;
      setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder;
      setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder;
      setYAxisTitle(title: string): EmbeddedColumnChartBuilder;
      setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder;
      useLogScale(): EmbeddedColumnChartBuilder;
    }

    /**
     * Builder for combo charts. For more details, see the Gviz
     *  documentation.
     */
    export interface EmbeddedComboChartBuilder {
      addRange(range: Range): EmbeddedChartBuilder;
      asAreaChart(): EmbeddedAreaChartBuilder;
      asBarChart(): EmbeddedBarChartBuilder;
      asColumnChart(): EmbeddedColumnChartBuilder;
      asComboChart(): EmbeddedComboChartBuilder;
      asHistogramChart(): EmbeddedHistogramChartBuilder;
      asLineChart(): EmbeddedLineChartBuilder;
      asPieChart(): EmbeddedPieChartBuilder;
      asScatterChart(): EmbeddedScatterChartBuilder;
      asTableChart(): EmbeddedTableChartBuilder;
      build(): EmbeddedChart;
      getChartType(): Charts.ChartType;
      getContainer(): ContainerInfo;
      getRanges(): Range[];
      removeRange(range: Range): EmbeddedChartBuilder;
      reverseCategories(): EmbeddedComboChartBuilder;
      setBackgroundColor(cssValue: string): EmbeddedComboChartBuilder;
      setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
      setColors(cssValues: string[]): EmbeddedComboChartBuilder;
      setLegendPosition(position: Charts.Position): EmbeddedComboChartBuilder;
      setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder;
      setOption(option: string, value: Object): EmbeddedChartBuilder;
      setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
      setRange(start: Number, end: Number): EmbeddedComboChartBuilder;
      setStacked(): EmbeddedComboChartBuilder;
      setTitle(chartTitle: string): EmbeddedComboChartBuilder;
      setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder;
      setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder;
      setXAxisTitle(title: string): EmbeddedComboChartBuilder;
      setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder;
      setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder;
      setYAxisTitle(title: string): EmbeddedComboChartBuilder;
      setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder;
      useLogScale(): EmbeddedComboChartBuilder;
    }

    /**
     * Builder for histogram charts. For more details, see the Gviz
     *  documentation.
     */
    export interface EmbeddedHistogramChartBuilder {
      addRange(range: Range): EmbeddedChartBuilder;
      asAreaChart(): EmbeddedAreaChartBuilder;
      asBarChart(): EmbeddedBarChartBuilder;
      asColumnChart(): EmbeddedColumnChartBuilder;
      asComboChart(): EmbeddedComboChartBuilder;
      asHistogramChart(): EmbeddedHistogramChartBuilder;
      asLineChart(): EmbeddedLineChartBuilder;
      asPieChart(): EmbeddedPieChartBuilder;
      asScatterChart(): EmbeddedScatterChartBuilder;
      asTableChart(): EmbeddedTableChartBuilder;
      build(): EmbeddedChart;
      getChartType(): Charts.ChartType;
      getContainer(): ContainerInfo;
      getRanges(): Range[];
      removeRange(range: Range): EmbeddedChartBuilder;
      reverseCategories(): EmbeddedHistogramChartBuilder;
      setBackgroundColor(cssValue: string): EmbeddedHistogramChartBuilder;
      setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
      setColors(cssValues: string[]): EmbeddedHistogramChartBuilder;
      setLegendPosition(position: Charts.Position): EmbeddedHistogramChartBuilder;
      setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder;
      setOption(option: string, value: Object): EmbeddedChartBuilder;
      setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
      setRange(start: Number, end: Number): EmbeddedHistogramChartBuilder;
      setStacked(): EmbeddedHistogramChartBuilder;
      setTitle(chartTitle: string): EmbeddedHistogramChartBuilder;
      setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder;
      setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder;
      setXAxisTitle(title: string): EmbeddedHistogramChartBuilder;
      setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder;
      setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder;
      setYAxisTitle(title: string): EmbeddedHistogramChartBuilder;
      setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder;
      useLogScale(): EmbeddedHistogramChartBuilder;
    }

    /**
     * Builder for line charts. For more details, see the Gviz
     *  documentation.
     */
    export interface EmbeddedLineChartBuilder {
      addRange(range: Range): EmbeddedChartBuilder;
      asAreaChart(): EmbeddedAreaChartBuilder;
      asBarChart(): EmbeddedBarChartBuilder;
      asColumnChart(): EmbeddedColumnChartBuilder;
      asComboChart(): EmbeddedComboChartBuilder;
      asHistogramChart(): EmbeddedHistogramChartBuilder;
      asLineChart(): EmbeddedLineChartBuilder;
      asPieChart(): EmbeddedPieChartBuilder;
      asScatterChart(): EmbeddedScatterChartBuilder;
      asTableChart(): EmbeddedTableChartBuilder;
      build(): EmbeddedChart;
      getChartType(): Charts.ChartType;
      getContainer(): ContainerInfo;
      getRanges(): Range[];
      removeRange(range: Range): EmbeddedChartBuilder;
      reverseCategories(): EmbeddedLineChartBuilder;
      setBackgroundColor(cssValue: string): EmbeddedLineChartBuilder;
      setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
      setColors(cssValues: string[]): EmbeddedLineChartBuilder;
      setCurveStyle(style: Charts.CurveStyle): EmbeddedLineChartBuilder;
      setLegendPosition(position: Charts.Position): EmbeddedLineChartBuilder;
      setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder;
      setOption(option: string, value: Object): EmbeddedChartBuilder;
      setPointStyle(style: Charts.PointStyle): EmbeddedLineChartBuilder;
      setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
      setRange(start: Number, end: Number): EmbeddedLineChartBuilder;
      setTitle(chartTitle: string): EmbeddedLineChartBuilder;
      setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder;
      setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder;
      setXAxisTitle(title: string): EmbeddedLineChartBuilder;
      setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder;
      setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder;
      setYAxisTitle(title: string): EmbeddedLineChartBuilder;
      setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder;
      useLogScale(): EmbeddedLineChartBuilder;
    }

    /**
     * Builder for pie charts. For more details, see the Gviz
     *  documentation.
     */
    export interface EmbeddedPieChartBuilder {
      addRange(range: Range): EmbeddedChartBuilder;
      asAreaChart(): EmbeddedAreaChartBuilder;
      asBarChart(): EmbeddedBarChartBuilder;
      asColumnChart(): EmbeddedColumnChartBuilder;
      asComboChart(): EmbeddedComboChartBuilder;
      asHistogramChart(): EmbeddedHistogramChartBuilder;
      asLineChart(): EmbeddedLineChartBuilder;
      asPieChart(): EmbeddedPieChartBuilder;
      asScatterChart(): EmbeddedScatterChartBuilder;
      asTableChart(): EmbeddedTableChartBuilder;
      build(): EmbeddedChart;
      getChartType(): Charts.ChartType;
      getContainer(): ContainerInfo;
      getRanges(): Range[];
      removeRange(range: Range): EmbeddedChartBuilder;
      reverseCategories(): EmbeddedPieChartBuilder;
      set3D(): EmbeddedPieChartBuilder;
      setBackgroundColor(cssValue: string): EmbeddedPieChartBuilder;
      setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
      setColors(cssValues: string[]): EmbeddedPieChartBuilder;
      setLegendPosition(position: Charts.Position): EmbeddedPieChartBuilder;
      setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedPieChartBuilder;
      setOption(option: string, value: Object): EmbeddedChartBuilder;
      setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
      setTitle(chartTitle: string): EmbeddedPieChartBuilder;
      setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedPieChartBuilder;
    }

    /**
     * Builder for scatter charts. For more details, see the Gviz
     *  documentation.
     */
    export interface EmbeddedScatterChartBuilder {
      addRange(range: Range): EmbeddedChartBuilder;
      asAreaChart(): EmbeddedAreaChartBuilder;
      asBarChart(): EmbeddedBarChartBuilder;
      asColumnChart(): EmbeddedColumnChartBuilder;
      asComboChart(): EmbeddedComboChartBuilder;
      asHistogramChart(): EmbeddedHistogramChartBuilder;
      asLineChart(): EmbeddedLineChartBuilder;
      asPieChart(): EmbeddedPieChartBuilder;
      asScatterChart(): EmbeddedScatterChartBuilder;
      asTableChart(): EmbeddedTableChartBuilder;
      build(): EmbeddedChart;
      getChartType(): Charts.ChartType;
      getContainer(): ContainerInfo;
      getRanges(): Range[];
      removeRange(range: Range): EmbeddedChartBuilder;
      setBackgroundColor(cssValue: string): EmbeddedScatterChartBuilder;
      setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
      setColors(cssValues: string[]): EmbeddedScatterChartBuilder;
      setLegendPosition(position: Charts.Position): EmbeddedScatterChartBuilder;
      setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder;
      setOption(option: string, value: Object): EmbeddedChartBuilder;
      setPointStyle(style: Charts.PointStyle): EmbeddedScatterChartBuilder;
      setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
      setTitle(chartTitle: string): EmbeddedScatterChartBuilder;
      setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder;
      setXAxisLogScale(): EmbeddedScatterChartBuilder;
      setXAxisRange(start: Number, end: Number): EmbeddedScatterChartBuilder;
      setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder;
      setXAxisTitle(title: string): EmbeddedScatterChartBuilder;
      setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder;
      setYAxisLogScale(): EmbeddedScatterChartBuilder;
      setYAxisRange(start: Number, end: Number): EmbeddedScatterChartBuilder;
      setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder;
      setYAxisTitle(title: string): EmbeddedScatterChartBuilder;
      setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder;
    }

    /**
     * Builder for table charts. For more details, see the Gviz
     *  documentation.
     */
    export interface EmbeddedTableChartBuilder {
      addRange(range: Range): EmbeddedChartBuilder;
      asAreaChart(): EmbeddedAreaChartBuilder;
      asBarChart(): EmbeddedBarChartBuilder;
      asColumnChart(): EmbeddedColumnChartBuilder;
      asComboChart(): EmbeddedComboChartBuilder;
      asHistogramChart(): EmbeddedHistogramChartBuilder;
      asLineChart(): EmbeddedLineChartBuilder;
      asPieChart(): EmbeddedPieChartBuilder;
      asScatterChart(): EmbeddedScatterChartBuilder;
      asTableChart(): EmbeddedTableChartBuilder;
      build(): EmbeddedChart;
      enablePaging(enablePaging: boolean): EmbeddedTableChartBuilder;
      enablePaging(pageSize: Integer): EmbeddedTableChartBuilder;
      enablePaging(pageSize: Integer, startPage: Integer): EmbeddedTableChartBuilder;
      enableRtlTable(rtlEnabled: boolean): EmbeddedTableChartBuilder;
      enableSorting(enableSorting: boolean): EmbeddedTableChartBuilder;
      getChartType(): Charts.ChartType;
      getContainer(): ContainerInfo;
      getRanges(): Range[];
      removeRange(range: Range): EmbeddedChartBuilder;
      setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
      setFirstRowNumber(number: Integer): EmbeddedTableChartBuilder;
      setInitialSortingAscending(column: Integer): EmbeddedTableChartBuilder;
      setInitialSortingDescending(column: Integer): EmbeddedTableChartBuilder;
      setOption(option: string, value: Object): EmbeddedChartBuilder;
      setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
      showRowNumberColumn(showRowNumber: boolean): EmbeddedTableChartBuilder;
      useAlternatingRowStyle(alternate: boolean): EmbeddedTableChartBuilder;
    }

    /**
     * Access gradient (color) conditions in `ConditionalFormatRuleApis`. Each
     * conditional format rule may contain a single gradient condition. A
     * gradient condition is defined by three points along a number scale (min,
     * mid, and max), each of which has a color, a value, and a
     * `InterpolationType`. The content of a cell is compared to the values in
     * the number scale and the color applied to the cell is interpolated based
     * on the cell content's proximity to the gradient condition min, mid, and
     * max points.
     *
     * // Logs all the information inside gradient conditional format rules on * a sheet.
     * var sheet = SpreadsheetApp.getActiveSheet();
     * var rules = sheet.getConditionalFormatRules();
     * for (int i = 0; i < rules.length; i++) {
     *   var gradient = rules[i].getGradientCondition();
     *   Logger.log("The conditional format gradient information for rule %d:\n
     *     MinColor %s, MinType %s, MinValue %s, \n
     *     MidColor %s, MidType %s, MidValue %s, \n
     *     MaxColor %s, MaxType %s, MaxValue %s \n", i,
     *     gradient.getMinColor(), gradient.getMinType(), gradient.getMinValue(),
     *     gradient.getMidColor(), gradient.getMidType(), gradient.getMidValue(),
     *     gradient.getMaxColor(), gradient.getMaxType(), gradient.getMaxValue());
     * }
     **/
    export interface GradientCondition {
      getMaxColor(): string;
      getMaxType(): InterpolationType;
      getMaxValue(): string;
      getMidColor(): string;
      getMidType(): InterpolationType;
      getMidValue(): string;
      getMinColor(): string;
      getMinType(): InterpolationType;
      getMinValue(): string;
    }

    /**
     * Create, access and modify named ranges in a spreadsheet.
     *  Named ranges are ranges that have associated string aliases.
     *  They can be viewed and edited via the Sheets UI under the
     *  Data > Named ranges... menu.
     */
    export interface NamedRange {
      /**
       * Gets the name of this named range.
       */
      getName(): string;
      /**
       * Gets teh range referenced by this named range.
       */
      getRange(): Range;
      /**
       * Deletes this named range.
       */
      remove(): void;
      /**
       * Sets/updates the name of this named range.
       */
      setName(name: string): NamedRange;
      /**
       * Sets/updates the range for this named range.
       */
      setRange(range: Range): NamedRange;
    }

    /**
     * @deprecated
     * For spreadsheets created in the newer version of Google Sheets, use the more powerful
     *      Protection class instead. Although this class is deprecated, it will remain
     *      available for compatibility with the older version of Sheets.
     * Access and modify protected sheets in the older version of Google Sheets.
     */
    export interface PageProtection {
      addUser(email: string): void;
      getUsers(): string[];
      isProtected(): boolean;
      removeUser(user: string): void;
      setProtected(protection: boolean): void;
    }

    /**
     * Access and modify protected ranges and sheets. A protected range can protect either a static
     *  range of cells or a named range. A protected sheet may include unprotected regions. For
     *  spreadsheets created with the older version of Google Sheets, use the PageProtection
     *  class instead.
     *
     *      // Protect range A1:B10, then remove all other users from the list of editors.
     *      var ss = SpreadsheetApp.getActive();
     *      var range = ss.getRange('A1:B10');
     *      var protection = range.protect().setDescription('Sample protected range');
     *
     *      // Ensure the current user is an editor before removing others. Otherwise, if the user's edit
     *      // permission comes from a group, the script will throw an exception upon removing the group.
     *      var me = Session.getEffectiveUser();
     *      protection.addEditor(me);
     *      protection.removeEditors(protection.getEditors());
     *      if (protection.canDomainEdit()) {
     *        protection.setDomainEdit(false);
     *      }
     *
     *      // Remove all range protections in the spreadsheet that the user has permission to edit.
     *      var ss = SpreadsheetApp.getActive();
     *      var protections = ss.getProtections(SpreadsheetApp.ProtectionType.RANGE);
     *      for (var i = 0; i < protections.length; i++) {
     *        var protection = protections[i];
     *        if (protection.canEdit()) {
     *          protection.remove();
     *        }
     *      }
     *
     *      // Protect the active sheet, then remove all other users from the list of editors.
     *      var sheet = SpreadsheetApp.getActiveSheet();
     *      var protection = sheet.protect().setDescription('Sample protected sheet');
     *
     *      // Ensure the current user is an editor before removing others. Otherwise, if the user's edit
     *      // permission comes from a group, the script will throw an exception upon removing the group.
     *      var me = Session.getEffectiveUser();
     *      protection.addEditor(me);
     *      protection.removeEditors(protection.getEditors());
     *      if (protection.canDomainEdit()) {
     *        protection.setDomainEdit(false);
     *      }
     */
    export interface Protection {
      addEditor(emailAddress: string): Protection;
      addEditor(user: Base.User): Protection;
      addEditors(emailAddresses: string[]): Protection;
      canDomainEdit(): boolean;
      canEdit(): boolean;
      getDescription(): string;
      getEditors(): Base.User[];
      getProtectionType(): ProtectionType;
      getRange(): Range;
      getRangeName(): string;
      getUnprotectedRanges(): Range[];
      isWarningOnly(): boolean;
      remove(): void;
      removeEditor(emailAddress: string): Protection;
      removeEditor(user: Base.User): Protection;
      removeEditors(emailAddresses: string[]): Protection;
      setDescription(description: string): Protection;
      setDomainEdit(editable: boolean): Protection;
      setNamedRange(namedRange: NamedRange): Protection;
      setRange(range: Range): Protection;
      setRangeName(rangeName: string): Protection;
      setUnprotectedRanges(ranges: Range[]): Protection;
      setWarningOnly(warningOnly: boolean): Protection;
    }

    /**
     * An enumeration representing the parts of a spreadsheet that can be protected from edits.
     *
     *      // Remove all range protections in the spreadsheet that the user has permission to edit.
     *      var ss = SpreadsheetApp.getActive();
     *      var protections = ss.getProtections(SpreadsheetApp.ProtectionType.RANGE);
     *      for (var i = 0; i < protections.length; i++) {
     *        var protection = protections[i];
     *        if (protection.canEdit()) {
     *          protection.remove();
     *        }
     *      }
     *
     *      // Removes sheet protection from the active sheet, if the user has permission to edit it.
     *      var sheet = SpreadsheetApp.getActiveSheet();
     *      var protection = sheet.getProtections(SpreadsheetApp.ProtectionType.SHEET)[0];
     *      if (protection && protection.canEdit()) {
     *        protection.remove();
     *      }
     */
    export enum ProtectionType { RANGE, SHEET }

    /**
     * Access and modify spreadsheet ranges.
     *
     *  This class allows users to access and modify ranges in Google Sheets. A range can be
     *  a single cell in a sheet or a range of cells in a sheet.
     */
    export interface Range {
      activate(): Range;
      breakApart(): Range;
      canEdit(): boolean;
      clear(): Range;
      clear(options: Object): Range;
      clearContent(): Range;
      clearDataValidations(): Range;
      clearFormat(): Range;
      clearNote(): Range;
      copyFormatToRange(gridId: Integer, column: Integer, columnEnd: Integer, row: Integer, rowEnd: Integer): void;
      copyFormatToRange(sheet: Sheet, column: Integer, columnEnd: Integer, row: Integer, rowEnd: Integer): void;
      copyTo(destination: Range): void;
      copyTo(destination: Range, options: Object): void;
      copyValuesToRange(gridId: Integer, column: Integer, columnEnd: Integer, row: Integer, rowEnd: Integer): void;
      copyValuesToRange(sheet: Sheet, column: Integer, columnEnd: Integer, row: Integer, rowEnd: Integer): void;
      getA1Notation(): string;
      getBackground(): string;
      getBackgrounds(): string[][];
      getCell(row: Integer, column: Integer): Range;
      getColumn(): Integer;
      getColumnIndex(): Integer;
      getDataSourceUrl(): string;
      getDataTable(): Charts.DataTable;
      getDataTable(firstRowIsHeader: boolean): Charts.DataTable;
      getDataValidation(): DataValidation;
      getDataValidations(): DataValidation[][];
      getDisplayValue(): string;
      getDisplayValues(): string[][];
      getFontColor(): string;
      getFontColors(): string[][];
      getFontFamilies(): string[][];
      getFontFamily(): string;
      getFontLine(): string;
      getFontLines(): string[][];
      getFontSize(): Integer;
      getFontSizes(): Integer[][];
      getFontStyle(): string;
      getFontStyles(): string[][];
      getFontWeight(): string;
      getFontWeights(): string[][];
      getFormula(): string;
      getFormulaR1C1(): string;
      getFormulas(): string[][];
      getFormulasR1C1(): string[][];
      getGridId(): Integer;
      getHeight(): Integer;
      getHorizontalAlignment(): string;
      getHorizontalAlignments(): string[][];
      getLastColumn(): Integer;
      getLastRow(): Integer;
      getMergedRanges(): Range[];
      getNote(): string;
      getNotes(): string[][];
      getNumColumns(): Integer;
      getNumRows(): Integer;
      getNumberFormat(): string;
      getNumberFormats(): string[][];
      getRow(): Integer;
      getRowIndex(): Integer;
      getSheet(): Sheet;
      getValue(): Object;
      getValues(): Object[][];
      getVerticalAlignment(): string;
      getVerticalAlignments(): string[][];
      getWidth(): Integer;
      getWrap(): boolean;
      getWraps(): Boolean[][];
      isBlank(): boolean;
      isEndColumnBounded(): boolean;
      isEndRowBounded(): boolean;
      isPartOfMerge(): boolean;
      isStartColumnBounded(): boolean;
      isStartRowBounded(): boolean;
      merge(): Range;
      mergeAcross(): Range;
      mergeVertically(): Range;
      moveTo(target: Range): void;
      offset(rowOffset: Integer, columnOffset: Integer): Range;
      offset(rowOffset: Integer, columnOffset: Integer, numRows: Integer): Range;
      offset(rowOffset: Integer, columnOffset: Integer, numRows: Integer, numColumns: Integer): Range;
      protect(): Protection;
      setBackground(color: string): Range;
      setBackgroundRGB(red: Integer, green: Integer, blue: Integer): Range;
      setBackgrounds(color: string[][]): Range;
      setBorder(top: boolean, left: boolean, bottom: boolean, right: boolean, vertical: boolean, horizontal: boolean): Range;
      setBorder(top: boolean, left: boolean, bottom: boolean, right: boolean, vertical: boolean, horizontal: boolean, color: string, style: BorderStyle): Range;
      setDataValidation(rule: DataValidation): Range;
      setDataValidations(rules: DataValidation[][]): Range;
      setFontColor(color: string): Range;
      setFontColors(colors: Object[][]): Range;
      setFontFamilies(fontFamilies: Object[][]): Range;
      setFontFamily(fontFamily: string): Range;
      setFontLine(fontLine: string): Range;
      setFontLines(fontLines: Object[][]): Range;
      setFontSize(size: Integer): Range;
      setFontSizes(sizes: Object[][]): Range;
      setFontStyle(fontStyle: string): Range;
      setFontStyles(fontStyles: Object[][]): Range;
      setFontWeight(fontWeight: string): Range;
      setFontWeights(fontWeights: Object[][]): Range;
      setFormula(formula: string): Range;
      setFormulaR1C1(formula: string): Range;
      setFormulas(formulas: string[][]): Range;
      setFormulasR1C1(formulas: string[][]): Range;
      setHorizontalAlignment(alignment: string): Range;
      setHorizontalAlignments(alignments: Object[][]): Range;
      setNote(note: string): Range;
      setNotes(notes: Object[][]): Range;
      setNumberFormat(numberFormat: string): Range;
      setNumberFormats(numberFormats: Object[][]): Range;
      setValue(value: Object): Range;
      setValues(values: Object[][]): Range;
      setVerticalAlignment(alignment: string): Range;
      setVerticalAlignments(alignments: Object[][]): Range;
      setWrap(isWrapEnabled: boolean): Range;
      setWraps(isWrapEnabled: Object[][]): Range;
      sort(sortSpecObj: Object): Range;
    }

    /**
     * Access and modify spreadsheet sheets. Common operations
     *  are renaming a sheet and accessing range objects from the sheet.
     */
    export interface Sheet {
      activate(): Sheet;
      appendRow(rowContents: Object[]): Sheet;
      autoResizeColumn(columnPosition: Integer): Sheet;
      clear(): Sheet;
      clear(options: Object): Sheet;
      clearConditionalFormatRules(): void;
      clearContents(): Sheet;
      clearFormats(): Sheet;
      clearNotes(): Sheet;
      copyTo(spreadsheet: Spreadsheet): Sheet;
      deleteColumn(columnPosition: Integer): Sheet;
      deleteColumns(columnPosition: Integer, howMany: Integer): void;
      deleteRow(rowPosition: Integer): Sheet;
      deleteRows(rowPosition: Integer, howMany: Integer): void;
      getActiveCell(): Range;
      getActiveRange(): Range;
      getCharts(): EmbeddedChart[];
      getColumnWidth(columnPosition: Integer): Integer;
      getConditionalFormatRules(): ConditionalFormatRule[];
      getDataRange(): Range;
      getFrozenColumns(): Integer;
      getFrozenRows(): Integer;
      getIndex(): Integer;
      getLastColumn(): Integer;
      getLastRow(): Integer;
      getMaxColumns(): Integer;
      getMaxRows(): Integer;
      getName(): string;
      getNamedRanges(): NamedRange[];
      getParent(): Spreadsheet;
      getProtections(type: ProtectionType): Protection[];
      getRange(row: Integer, column: Integer): Range;
      getRange(row: Integer, column: Integer, numRows: Integer): Range;
      getRange(row: Integer, column: Integer, numRows: Integer, numColumns: Integer): Range;
      getRange(a1Notation: string): Range;
      getRowHeight(rowPosition: Integer): Integer;
      getSheetId(): Integer;
      getSheetName(): string;
      getSheetValues(startRow: Integer, startColumn: Integer, numRows: Integer, numColumns: Integer): Object[][];
      getTabColor(): string;
      hideColumn(column: Range): void;
      hideColumns(columnIndex: Integer): void;
      hideColumns(columnIndex: Integer, numColumns: Integer): void;
      hideRow(row: Range): void;
      hideRows(rowIndex: Integer): void;
      hideRows(rowIndex: Integer, numRows: Integer): void;
      hideSheet(): Sheet;
      insertChart(chart: EmbeddedChart): void;
      insertColumnAfter(afterPosition: Integer): Sheet;
      insertColumnBefore(beforePosition: Integer): Sheet;
      insertColumns(columnIndex: Integer): void;
      insertColumns(columnIndex: Integer, numColumns: Integer): void;
      insertColumnsAfter(afterPosition: Integer, howMany: Integer): Sheet;
      insertColumnsBefore(beforePosition: Integer, howMany: Integer): Sheet;
      insertImage(blob: Base.Blob, column: Integer, row: Integer): void;
      insertImage(blob: Base.Blob, column: Integer, row: Integer, offsetX: Integer, offsetY: Integer): void;
      insertImage(url: string, column: Integer, row: Integer): void;
      insertImage(url: string, column: Integer, row: Integer, offsetX: Integer, offsetY: Integer): void;
      insertRowAfter(afterPosition: Integer): Sheet;
      insertRowBefore(beforePosition: Integer): Sheet;
      insertRows(rowIndex: Integer): void;
      insertRows(rowIndex: Integer, numRows: Integer): void;
      insertRowsAfter(afterPosition: Integer, howMany: Integer): Sheet;
      insertRowsBefore(beforePosition: Integer, howMany: Integer): Sheet;
      isSheetHidden(): boolean;
      newChart(): EmbeddedChartBuilder;
      protect(): Protection;
      removeChart(chart: EmbeddedChart): void;
      setActiveRange(range: Range): Range;
      setActiveSelection(range: Range): Range;
      setActiveSelection(a1Notation: string): Range;
      setColumnWidth(columnPosition: Integer, width: Integer): Sheet;
      setConditionalFormatRules(rules: ReadonlyArray<ConditionalFormatRule>): void;
      setCurrentCell(cell: Range): void;
      setFrozenColumns(columns: Integer): void;
      setFrozenRows(rows: Integer): void;
      setName(name: string): Sheet;
      setRowHeight(rowPosition: Integer, height: Integer): Sheet;
      setTabColor(color: string): Sheet;
      showColumns(columnIndex: Integer): void;
      showColumns(columnIndex: Integer, numColumns: Integer): void;
      showRows(rowIndex: Integer): void;
      showRows(rowIndex: Integer, numRows: Integer): void;
      showSheet(): Sheet;
      sort(columnPosition: Integer): Sheet;
      sort(columnPosition: Integer, ascending: boolean): Sheet;
      unhideColumn(column: Range): void;
      unhideRow(row: Range): void;
      updateChart(chart: EmbeddedChart): void;
      getSheetProtection(): PageProtection;
      setSheetProtection(permissions: PageProtection): void;
    }

    /**
     * This class allows users to access and modify Google Sheets files. Common operations are adding
     *  new sheets and adding collaborators.
     */
    export interface Spreadsheet {
      addEditor(emailAddress: string): Spreadsheet;
      addEditor(user: Base.User): Spreadsheet;
      addEditors(emailAddresses: string[]): Spreadsheet;
      addMenu(name: string, subMenus: Object[]): void;
      addViewer(emailAddress: string): Spreadsheet;
      addViewer(user: Base.User): Spreadsheet;
      addViewers(emailAddresses: string[]): Spreadsheet;
      appendRow(rowContents: Object[]): Sheet;
      autoResizeColumn(columnPosition: Integer): Sheet;
      copy(name: string): Spreadsheet;
      deleteActiveSheet(): Sheet;
      deleteColumn(columnPosition: Integer): Sheet;
      deleteColumns(columnPosition: Integer, howMany: Integer): void;
      deleteRow(rowPosition: Integer): Sheet;
      deleteRows(rowPosition: Integer, howMany: Integer): void;
      deleteSheet(sheet: Sheet): void;
      duplicateActiveSheet(): Sheet;
      getActiveCell(): Range;
      getActiveRange(): Range;
      getActiveSheet(): Sheet;
      getAs(contentType: string): Base.Blob;
      getBlob(): Base.Blob;
      getColumnWidth(columnPosition: Integer): Integer;
      getDataRange(): Range;
      getEditors(): Base.User[];
      getFormUrl(): string;
      getFrozenColumns(): Integer;
      getFrozenRows(): Integer;
      getId(): string;
      getLastColumn(): Integer;
      getLastRow(): Integer;
      getName(): string;
      getNamedRanges(): NamedRange[];
      getNumSheets(): Integer;
      getOwner(): Base.User;
      getProtections(type: ProtectionType): Protection[];
      getRange(a1Notation: string): Range;
      getRangeByName(name: string): Range;
      getRowHeight(rowPosition: Integer): Integer;
      getSheetByName(name: string): Sheet;
      getSheetId(): Integer;
      getSheetName(): string;
      getSheetValues(startRow: Integer, startColumn: Integer, numRows: Integer, numColumns: Integer): Object[][];
      getSheets(): Sheet[];
      getSpreadsheetLocale(): string;
      getSpreadsheetTimeZone(): string;
      getUrl(): string;
      getViewers(): Base.User[];
      hideColumn(column: Range): void;
      hideRow(row: Range): void;
      insertColumnAfter(afterPosition: Integer): Sheet;
      insertColumnBefore(beforePosition: Integer): Sheet;
      insertColumnsAfter(afterPosition: Integer, howMany: Integer): Sheet;
      insertColumnsBefore(beforePosition: Integer, howMany: Integer): Sheet;
      insertImage(blob: Base.Blob, column: Integer, row: Integer): void;
      insertImage(blob: Base.Blob, column: Integer, row: Integer, offsetX: Integer, offsetY: Integer): void;
      insertImage(url: string, column: Integer, row: Integer): void;
      insertImage(url: string, column: Integer, row: Integer, offsetX: Integer, offsetY: Integer): void;
      insertRowAfter(afterPosition: Integer): Sheet;
      insertRowBefore(beforePosition: Integer): Sheet;
      insertRowsAfter(afterPosition: Integer, howMany: Integer): Sheet;
      insertRowsBefore(beforePosition: Integer, howMany: Integer): Sheet;
      insertSheet(): Sheet;
      insertSheet(sheetIndex: Integer): Sheet;
      insertSheet(sheetIndex: Integer, options: Object): Sheet;
      insertSheet(options: Object): Sheet;
      insertSheet(sheetName: string): Sheet;
      insertSheet(sheetName: string, sheetIndex: Integer): Sheet;
      insertSheet(sheetName: string, sheetIndex: Integer, options: Object): Sheet;
      insertSheet(sheetName: string, options: Object): Sheet;
      moveActiveSheet(pos: Integer): void;
      removeEditor(emailAddress: string): Spreadsheet;
      removeEditor(user: Base.User): Spreadsheet;
      removeMenu(name: string): void;
      removeNamedRange(name: string): void;
      removeViewer(emailAddress: string): Spreadsheet;
      removeViewer(user: Base.User): Spreadsheet;
      rename(newName: string): void;
      renameActiveSheet(newName: string): void;
      setActiveRange(range: Range): Range;
      setActiveSelection(range: Range): Range;
      setActiveSelection(a1Notation: string): Range;
      setActiveSheet(sheet: Sheet): Sheet;
      setColumnWidth(columnPosition: Integer, width: Integer): Sheet;
      setFrozenColumns(columns: Integer): void;
      setFrozenRows(rows: Integer): void;
      setNamedRange(name: string, range: Range): void;
      setRowHeight(rowPosition: Integer, height: Integer): Sheet;
      setSpreadsheetLocale(locale: string): void;
      setSpreadsheetTimeZone(timezone: string): void;
      show(userInterface: Object): void;
      sort(columnPosition: Integer): Sheet;
      sort(columnPosition: Integer, ascending: boolean): Sheet;
      toast(msg: string): void;
      toast(msg: string, title: string): void;
      toast(msg: string, title: string, timeoutSeconds: Number): void;
      unhideColumn(column: Range): void;
      unhideRow(row: Range): void;
      updateMenu(name: string, subMenus: Object[]): void;
      getSheetProtection(): PageProtection;
      isAnonymousView(): boolean;
      isAnonymousWrite(): boolean;
      setAnonymousAccess(anonymousReadAllowed: boolean, anonymousWriteAllowed: boolean): void;
      setSheetProtection(permissions: PageProtection): void;
    }

    /**
     * This class allows users to open Google Sheets files and to create new ones. This class is
     *  the parent class for the Spreadsheet service.
     */
    export interface SpreadsheetApp {
      /**
       * An enumeration of the valid styles for setting borders on a Range.
       */
      BorderStyle: typeof BorderStyle;
      /**
       * An enumeration representing the data-validation criteria that can be set on a range.
       */
      DataValidationCriteria: typeof DataValidationCriteria;
      /**
       * An enumeration representing the interpolation options for calculating a value to be used in a GradientCondition in a ConditionalFormatRule.
       */
      InterpolationType: typeof InterpolationType;
      /**
       * An enumeration representing the boolean criteria that can be used in conditional format or filter.
       */
      BooleanCriteria: typeof BooleanCriteria;
      /**
       * An enumeration representing the parts of a spreadsheet that can be protected from edits.
       */
      ProtectionType: typeof ProtectionType;
      /**
       * Creates a new spreadsheet with the given name.
       */
      create(name: string): Spreadsheet;
      /**
       * Creates a new spreadsheet with the given name and the specified number of rows and columns.
       */
      create(name: string, rows: Integer, columns: Integer): Spreadsheet;
      /**
       * Applies all pending Spreadsheet changes.
       */
      flush(): void;
      /**
       * Returns the currently active spreadsheet, or null if there is none.
       */
      getActive(): Spreadsheet | null;
      /**
       * Returns the range of cells that is currently considered active.
       */
      getActiveRange(): Range;
      /**
       * Gets the active sheet in a spreadsheet.
       */
      getActiveSheet(): Sheet;
      /**
       * Returns the currently active spreadsheet, or null if there is none.
       */
      getActiveSpreadsheet(): Spreadsheet | null;
      /**
       * Returns an instance of the spreadsheet's user-interface environment that allows the script to add features like menus, dialogs, and sidebars.
       */
      getUi(): Base.Ui;
      /**
       * Creates a builder for a data-validation rule.
       */
      newDataValidation(): DataValidationBuilder;
      /**
       * Opens the spreadsheet that corresponds to the given File object.
       */
      open(file: Drive.File): Spreadsheet;
      /**
       * Opens the spreadsheet with the given ID.
       */
      openById(id: string): Spreadsheet;
      /**
       * Opens the spreadsheet with the given url.
       */
      openByUrl(url: string): Spreadsheet;
      /**
       * Sets the active range for the application.
       */
      setActiveRange(range: Range): Range;
      /**
       * Sets the active sheet in a spreadsheet.
       */
      setActiveSheet(sheet: Sheet): Sheet;
      /**
       * Sets the active spreadsheet.
       */
      setActiveSpreadsheet(newActiveSpreadsheet: Spreadsheet): void;
      /**
       * Creates a builder for a conditional formatting rule.
       */
      newConditionalFormatRule(): ConditionalFormatRuleBuilder;
    }

    /**
     * Access conditional formatting rules. To create a new rule, use SpreadsheetApp.newConditionalFormatRule() and
     * ConditionalFormatRuleBuilder. You can use Sheet.setConditionalFormatRules(rules) to set the rules for a given
     * sheet.
     */
    export interface ConditionalFormatRule {
      /**
       * Returns a rule builder preset with this rule's settings.
       */
      copy(): ConditionalFormatRuleBuilder;

      /**
       * Retrieves the rule's BooleanCondition information if this rule uses boolean condition criteria.
       */
      getBooleanCondition(): BooleanCondition;

      /**
       * Retrieves the rule's GradientCondition information, if this rule uses gradient condition criteria.
       */
      getGradientCondition(): GradientCondition;

      /**
       * Retrieves the ranges to which this conditional format rule is applied.
       */
      getRanges(): Range[];
    }

    /**
     * Builder for conditional format rules.
     */
    export interface ConditionalFormatRuleBuilder {

      /**
       * Constructs a conditional format rule from the settings applied to the builder.
       */
      build(): ConditionalFormatRule;

      /**
       * Returns a rule builder preset with this rule's settings.
       */
      copy(): ConditionalFormatRuleBuilder;

      /**
       * Retrieves the rule's BooleanCondition information if this rule uses boolean condition criteria.
       */
      getBooleanCondition(): BooleanCondition;

      /**
       * Retrieves the rule's GradientCondition information, if this rule uses gradient condition criteria.
       */
      getGradientCondition(): GradientCondition;

      /**
       * Retrieves the ranges to which this conditional format rule is applied.
       */
      getRanges(): Range[];

      /**
       * Sets the background color for the conditional format rule's format.
       */
      setBackground(color: string): ConditionalFormatRuleBuilder;

      /**
       * Sets text bolding for the conditional format rule's format.
       */
      setBold(bold: boolean): ConditionalFormatRuleBuilder;

      /**
       * Sets the font color for the conditional format rule's format.
       */
      setFontColor(color: string): ConditionalFormatRuleBuilder;

      /**
       * Clears the conditional format rule's gradient maxpoint value, and instead uses the maximum value in the rule's ranges.
       */
      setGradientMaxpoint(color: string): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule's gradient maxpoint fields.
       */
      setGradientMaxpointWithValue(color: string, type: InterpolationType, value: string): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule's gradient midpoint fields.
       */
      setGradientMidpointWithValue(color: string, type: InterpolationType, value: string): ConditionalFormatRuleBuilder;

      /**
       * Clears the conditional format rule's gradient minpoint value, and instead uses the minimum value in the rule's ranges.
       */
      setGradientMinpoint(color: string): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule's gradient minpoint fields.
       */
      setGradientMinpointWithValue(color: string, type: InterpolationType, value: string): ConditionalFormatRuleBuilder;

      /**
       * Sets text italics for the conditional format rule's format.
       */
      setItalic(italic: boolean): ConditionalFormatRuleBuilder;

      /**
       * Sets one or more ranges to which this conditional format rule is applied.
       */
      setRanges(ranges: ReadonlyArray<Range>): ConditionalFormatRuleBuilder;

      /**
       * Sets text strikethrough for the conditional format rule's format.
       */
      setStrikethrough(strikethrough: boolean): ConditionalFormatRuleBuilder;

      /**
       * Sets text underlining for the conditional format rule's format.
       */
      setUnderline(underline: boolean): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when the cell is empty.
       */
      whenCellEmpty(): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when the cell is not empty.
       */
      whenCellNotEmpty(): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a date is after the given value.
       */
      whenDateAfter(date: Date): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a date is after the given relative date.
       */
      whenDateAfter(date: Date): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a date is before the given date.
       */
      whenDateBefore(date: Date): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a date is before the given relative date.
       */
      whenDateBefore(date: Date): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a date is equal to the given date.
       */
      whenDateEqualTo(date: Date): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a date is equal to the given relative date.
       */
      whenDateEqualTo(date: Date): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when that the given formula evaluates to true.
       */
      whenFormulaSatisfied(formula: string): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a number falls between, or is either of, two specified values.
       */
      whenNumberBetween(start: number, end: number): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a number is equal to the given value.
       */
      whenNumberEqualTo(number: number): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a number is greater than the given value.
       */
      whenNumberGreaterThan(number: number): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a number is greater than or equal to the given value.
       */
      whenNumberGreaterThanOrEqualTo(number: number): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional conditional format rule to trigger when a number less than the given value.
       */
      whenNumberLessThan(number: number): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a number less than or equal to the given value.
       */
      whenNumberLessThanOrEqualTo(number: number): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a number does not fall between, and is neither of, two specified values.
       */
      whenNumberNotBetween(start: number, end: number): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when a number is not equal to the given value.
       */
      whenNumberNotEqualTo(number: number): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when that the input contains the given value.
       */
      whenTextContains(text: string): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when that the input does not contain the given value.
       */
      whenTextDoesNotContain(text: string): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when that the input ends with the given value.
       */
      whenTextEndsWith(text: string): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when that the input is equal to the given value.
       */
      whenTextEqualTo(text: string): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to trigger when that the input starts with the given value.
       */
      whenTextStartsWith(text: string): ConditionalFormatRuleBuilder;

      /**
       * Sets the conditional format rule to criteria defined by BooleanCriteria values, typically taken from the criteria and arguments of an existing rule.
       */
      withCriteria(criteria: BooleanCriteria, args: ReadonlyArray<number|string|Date>): ConditionalFormatRuleBuilder;
    }

    /**
     * An enumeration representing the boolean criteria that can be used in conditional format or filter.
     */
    export enum BooleanCriteria {
      /**
       * The criteria is met when a cell is empty.
       */
      CELL_EMPTY,

      /**
       * The criteria is met when a cell is not empty.
       */
      CELL_NOT_EMPTY,

      /**
       * The criteria is met when a date is after the given value.
       */
      DATE_AFTER,

      /**
       * The criteria is met when a date is before the given value.
       */
      DATE_BEFORE,

      /**
       * The criteria is met when a date is equal to the given value.
       */
      DATE_EQUAL_TO,

      /**
       * The criteria is met when a date is after the relative date value.
       */
      DATE_AFTER_RELATIVE,

      /**
       * The criteria is met when a date is before the relative date value.
       */
      DATE_BEFORE_RELATIVE,

      /**
       * The criteria is met when a date is equal to the relative date value.
       */
      DATE_EQUAL_TO_RELATIVE,

      /**
       * The criteria is met when a number that is between the given values.
       */
      NUMBER_BETWEEN,

      /**
       * The criteria is met when a number that is equal to the given value.
       */
      NUMBER_EQUAL_TO,

      /**
       * The criteria is met when a number that is greater than the given value.
       */
      NUMBER_GREATER_THAN,

      /**
       * The criteria is met when a number that is greater than or equal to the given value.
       */
      NUMBER_GREATER_THAN_OR_EQUAL_TO,

      /**
       * The criteria is met when a number that is less than the given value.
       */
      NUMBER_LESS_THAN,

      /**
       * The criteria is met when a number that is less than or equal to the given value.
       */
      NUMBER_LESS_THAN_OR_EQUAL_TO,

      /**
       * The criteria is met when a number that is not between the given values.
       */
      NUMBER_NOT_BETWEEN,

      /**
       * The criteria is met when a number that is not equal to the given value.
       */
      NUMBER_NOT_EQUAL_TO,

      /**
       * The criteria is met when the input contains the given value.
       */
      TEXT_CONTAINS,

      /**
       * The criteria is met when the input does not contain the given value.
       */
      TEXT_DOES_NOT_CONTAIN,

      /**
       * The criteria is met when the input is equal to the given value.
       */
      TEXT_EQUAL_TO,

      /**
       * The criteria is met when the input begins with the given value.
       */
      TEXT_STARTS_WITH,

      /**
       * The criteria is met when the input ends with the given value.
       */
      TEXT_ENDS_WITH,

      /**
       * The criteria is met when the input makes the given formula evaluate to true.
       */
      CUSTOM_FORMULA
    }

    /**
     * An enumeration representing the interpolation options for calculating a value to be used in a GradientCondition in a ConditionalFormatRule.
     */
    export enum InterpolationType {
      /**
       * Use the number as as specific interpolation point for a gradient condition.
       */
      NUMBER,

      /**
       * Use the number as a percentage interpolation point for a gradient condition.
       */
      PERCENT,

      /**
       * Use the number as a percentile interpolation point for a gradient condition.
       */
      PERCENTILE,

      /**
       * Infer the minimum number as a specific interpolation point for a gradient condition.
       */
      MIN,

      /**
       * Infer the maximum number as a specific interpolation point for a gradient condition.
       */
      MAX
    }
  }
}

/**
 * This class allows users to open Google Sheets files and to create new ones. This class is
 *  the parent class for the Spreadsheet service.
 */
declare var SpreadsheetApp: GoogleAppsScript.Spreadsheet.SpreadsheetApp;


text:
/*
 * This source code is provided to illustrate the usage of a given feature
 * or technique and has been deliberately simplified. Additional steps
 * required for a production-quality application, such as security checks,
 * input validation and proper error handling, might not be present in
 * this sample code.
 */

import java.io.*;
import java.nio.channels.*;
import javax.net.ssl.*;

/**
 * A Runnable class which sits in a loop accepting SocketChannels,
 * then registers the Channels with the read/write Selector.
 *
 * @author Mark Reinhold
 * @author Brad R. Wetmore
 */
class Acceptor implements Runnable {

    private ServerSocketChannel ssc;
    private Dispatcher d;

    private SSLContext sslContext;

    Acceptor(ServerSocketChannel ssc, Dispatcher d, SSLContext sslContext) {
        this.ssc = ssc;
        this.d = d;
        this.sslContext = sslContext;
    }

    public void run() {
        for (;;) {
            try {
                SocketChannel sc = ssc.accept();

                ChannelIO cio = (sslContext != null ?
                    ChannelIOSecure.getInstance(
                        sc, false /* non-blocking */, sslContext) :
                    ChannelIO.getInstance(
                        sc, false /* non-blocking */));

                RequestHandler rh = new RequestHandler(cio);

                d.register(cio.getSocketChannel(), SelectionKey.OP_READ, rh);

            } catch (IOException x) {
                x.printStackTrace();
                break;
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
from shared.messages import convert_message_to_csv_dict
import json
import requests
with open('test_message.json') as jsonfile:
    msg = json.load(jsonfile)

post_data = convert_message_to_csv_dict(msg, None)
r = requests.post(
        'http://20170418t204309.prediction-service.outlook-autocategories.appspot.com/predict/',
        data=post_data,
        params={'userId': '8lWZYw-u-yNbGBkC4B--ip77K1oVwwyZTHKLeD7rm7k'}
    )
print r.text


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

			<title></title>
			<link rel="stylesheet" href="media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>

Full index

Package indexes

core

	a
	b
	c
	d
	e
	g
	h
	j
	l
	m
	n
	o
	p
	q
	r
	s
	v
	x

a

top

						</title>
			add_keyword

GeSHi::add_keyword() in geshi.php

Adds a keyword to a keyword group for highlighting

						</title>
			add_keyword_group

GeSHi::add_keyword_group() in geshi.php

Creates a new keyword group

						</title>
			actionscript.php

actionscript.php in actionscript.php

						</title>
			ada.php

ada.php in ada.php

						</title>
			apache.php

apache.php in apache.php

						</title>
			asm.php

asm.php in asm.php

						</title>
			asp.php

asp.php in asp.php

b

top

						</title>
			bash.php

bash.php in bash.php

c

top

						</title>
			caddcl.php

caddcl.php in caddcl.php

						</title>
			cadlisp.php

cadlisp.php in cadlisp.php

						</title>
			cpp.php

cpp.php in cpp.php

						</title>
			csharp.php

csharp.php in csharp.php

						</title>
			css.php

css.php in css.php

						</title>
			c_mac.php

c_mac.php in c_mac.php

						</title>
			c.php

c.php in c.php

d

top

						</title>
			disable_highlighting

GeSHi::disable_highlighting() in geshi.php

Disables all highlighting

						</title>
			delphi.php

delphi.php in delphi.php

						</title>
			diff.php

diff.php in diff.php

						</title>
			d.php

d.php in d.php

e

top

						</title>
			enable_classes

GeSHi::enable_classes() in geshi.php

Sets whether CSS classes should be used to highlight the source. Default  is off, calling this method with no arguments will turn it on

						</title>
			enable_highlighting

GeSHi::enable_highlighting() in geshi.php

Enables all highlighting

						</title>
			enable_ids

GeSHi::enable_ids() in geshi.php

Whether CSS IDs should be added to each line

						</title>
			enable_important_blocks

GeSHi::enable_important_blocks() in geshi.php

Sets whether context-important blocks are highlighted

						</title>
			enable_line_numbers

GeSHi::enable_line_numbers() in geshi.php

Sets whether line numbers should be displayed.

						</title>
			enable_strict_mode

GeSHi::enable_strict_mode() in geshi.php

Enables/disables strict highlighting. Default is off, calling this  method without parameters will turn it on. See documentation  for more details on strict mode and where to use it.

						</title>
			error

GeSHi::error() in geshi.php

Returns an error message associated with the last GeSHi operation,  or false if no error has occured

g

top

						</title>
			GeSHi

GeSHi in geshi.php

The GeSHi Class.

						</title>
			GeSHi

GeSHi::GeSHi() in geshi.php

Creates a new GeSHi object, with source and language

						</title>
			GESHI_ACTIVE

GESHI_ACTIVE in geshi.php

Links in the source in the :active state

						</title>
			GESHI_CAPS_LOWER

GESHI_CAPS_LOWER in geshi.php

Leave keywords found as the case that they are

						</title>
			GESHI_CAPS_NO_CHANGE

GESHI_CAPS_NO_CHANGE in geshi.php

Lowercase keywords found

						</title>
			GESHI_CAPS_UPPER

GESHI_CAPS_UPPER in geshi.php

Uppercase keywords found

						</title>
			GESHI_DIR_SEPARATOR

GESHI_DIR_SEPARATOR in geshi.php

Set the correct directory separator

						</title>
			GESHI_END_IMPORTANT

GESHI_END_IMPORTANT in geshi.php

The ender for important parts of the source

						</title>
			GESHI_FANCY_LINE_NUMBERS

GESHI_FANCY_LINE_NUMBERS in geshi.php

Use fancy line numbers when building the result

						</title>
			GESHI_HEADER_DIV

GESHI_HEADER_DIV in geshi.php

Use a <div> to surround the source

						</title>
			GESHI_HEADER_PRE

GESHI_HEADER_PRE in geshi.php

Use a

						</title>
			geshi_highlight

geshi_highlight() in geshi.php

Easy way to highlight stuff. Behaves just like highlight_string

						</title>
			GESHI_HOVER

GESHI_HOVER in geshi.php

Links in the source in the :hover state

						</title>
			GESHI_LANG_ROOT

GESHI_LANG_ROOT in geshi.php

The language file directory for GeSHi

						</title>
			GESHI_LINK

GESHI_LINK in geshi.php

Links in the source in the :link state

						</title>
			GESHI_NORMAL_LINE_NUMBERS

GESHI_NORMAL_LINE_NUMBERS in geshi.php

Use normal line numbers when building the result

						</title>
			GESHI_NO_LINE_NUMBERS

GESHI_NO_LINE_NUMBERS in geshi.php

Use no line numbers when building the result

						</title>
			GESHI_OUTPUT_HTML

GESHI_OUTPUT_HTML in geshi.php

For the future (though this may never be realised)

						</title>
			geshi.php

geshi.php in geshi.php

						</title>
			GESHI_ROOT

GESHI_ROOT in geshi.php

The root directory for GeSHi

						</title>
			GESHI_START_IMPORTANT

GESHI_START_IMPORTANT in geshi.php

The starter for important parts of the source

						</title>
			GESHI_VERSION

GESHI_VERSION in geshi.php

The version of this GeSHi file

						</title>
			GESHI_VISITED

GESHI_VISITED in geshi.php

Links in the source in the :visited state

						</title>
			get_language_name

GeSHi::get_language_name() in geshi.php

Gets a human-readable language name (thanks to Simon Patterson  for the idea :))

						</title>
			get_language_name_from_extension

GeSHi::get_language_name_from_extension() in geshi.php

Given a file extension, this method returns either a valid geshi language  name, or the empty string if it couldn't be found

						</title>
			get_stylesheet

GeSHi::get_stylesheet() in geshi.php

Returns a stylesheet for the highlighted code. If $economy mode  is true, we only return the stylesheet declarations that matter for  this code block instead of the whole thing

						</title>
			get_time

GeSHi::get_time() in geshi.php

Gets the time taken to parse the code

h

top

						</title>
			html4strict.php

html4strict.php in html4strict.php

						</title>
			highlight_lines_extra

GeSHi::highlight_lines_extra() in geshi.php

Specifies which lines to highlight extra

j

top

						</title>
			javascript.php

javascript.php in javascript.php

						</title>
			java.php

java.php in java.php

l

top

						</title>
			lisp.php

lisp.php in lisp.php

						</title>
			lua.php

lua.php in lua.php

						</title>
			load_from_file

GeSHi::load_from_file() in geshi.php

Given a file name, this method loads its contents in, and attempts

m

top

						</title>
			matlab.php

matlab.php in matlab.php

						</title>
			mpasm.php

mpasm.php in mpasm.php

n

top

						</title>
			nsis.php

nsis.php in nsis.php

o

top

						</title>
			objc.php

objc.php in objc.php

						</title>
			oobas.php

oobas.php in oobas.php

						</title>
			oracle8.php

oracle8.php in oracle8.php

p

top

						</title>
			pascal.php

pascal.php in pascal.php

						</title>
			perl.php

perl.php in perl.php

						</title>
			php-brief.php

php-brief.php in php-brief.php

						</title>
			php.php

php.php in php.php

						</title>
			python.php

python.php in python.php

						</title>
			parse_code

GeSHi::parse_code() in geshi.php

Returns the code in $this->source, highlighted and surrounded by the  nessecary HTML.

q

top

						</title>
			qbasic.php

qbasic.php in qbasic.php

r

top

						</title>
			remove_keyword

GeSHi::remove_keyword() in geshi.php

Removes a keyword from a keyword group

						</title>
			remove_keyword_group

GeSHi::remove_keyword_group() in geshi.php

Removes a keyword group

s

top

						</title>
			smarty.php

smarty.php in smarty.php

						</title>
			sql.php

sql.php in sql.php

						</title>
			set_brackets_highlighting

GeSHi::set_brackets_highlighting() in geshi.php

Turns highlighting on/off for brackets

						</title>
			set_brackets_style

GeSHi::set_brackets_style() in geshi.php

Sets the styles for brackets. If $preserve_defaults is  true, then styles are merged with the default styles, with the  user defined styles having priority

						</title>
			set_case_keywords

GeSHi::set_case_keywords() in geshi.php

Sets the case that keywords should use when found. Use the constants:

						</title>
			set_case_sensitivity

GeSHi::set_case_sensitivity() in geshi.php

Sets whether a set of keywords are checked for in a case sensitive manner

						</title>
			set_code_style

GeSHi::set_code_style() in geshi.php

Sets the style for the actual code. This should be a string

						</title>
			set_comments_highlighting

GeSHi::set_comments_highlighting() in geshi.php

Turns highlighting on/off for comment groups

						</title>
			set_comments_style

GeSHi::set_comments_style() in geshi.php

Sets the styles for comment groups.  If $preserve_defaults is  true, then styles are merged with the default styles, with the  user defined styles having priority

						</title>
			set_encoding

GeSHi::set_encoding() in geshi.php

Sets the encoding used for htmlspecialchars(), for international  support.

						</title>
			set_escape_characters_highlighting

GeSHi::set_escape_characters_highlighting() in geshi.php

Turns highlighting on/off for escaped characters

						</title>
			set_escape_characters_style

GeSHi::set_escape_characters_style() in geshi.php

Sets the styles for escaped characters. If $preserve_defaults is  true, then styles are merged with the default styles, with the  user defined styles having priority

						</title>
			set_footer_content

GeSHi::set_footer_content() in geshi.php

Sets the content of the footer block

						</title>
			set_footer_content_style

GeSHi::set_footer_content_style() in geshi.php

Sets the style for the footer content

						</title>
			set_header_content

GeSHi::set_header_content() in geshi.php

Sets the content of the header block

						</title>
			set_header_content_style

GeSHi::set_header_content_style() in geshi.php

Sets the style for the header content

						</title>
			set_header_type

GeSHi::set_header_type() in geshi.php

Sets the type of header to be used.

						</title>
			set_highlight_lines_extra_style

GeSHi::set_highlight_lines_extra_style() in geshi.php

Sets the style for extra-highlighted lines

						</title>
			set_important_styles

GeSHi::set_important_styles() in geshi.php

Sets styles for important parts of the code

						</title>
			set_keyword_group_highlighting

GeSHi::set_keyword_group_highlighting() in geshi.php

Turns highlighting on/off for a keyword group

						</title>
			set_keyword_group_style

GeSHi::set_keyword_group_style() in geshi.php

Sets the style for a keyword group. If $preserve_defaults is  true, then styles are merged with the default styles, with the  user defined styles having priority

						</title>
			set_language

GeSHi::set_language() in geshi.php

Sets the language for this object

						</title>
			set_language_path

GeSHi::set_language_path() in geshi.php

Sets the path to the directory containing the language files. Note  that this path is relative to the directory of the script that included  geshi.php, NOT geshi.php itself.

						</title>
			set_line_style

GeSHi::set_line_style() in geshi.php

Sets the styles for the line numbers.

						</title>
			set_link_styles

GeSHi::set_link_styles() in geshi.php

Sets styles for links in code

						</title>
			set_link_target

GeSHi::set_link_target() in geshi.php

Sets the target for links in code

						</title>
			set_methods_highlighting

GeSHi::set_methods_highlighting() in geshi.php

Turns highlighting on/off for methods

						</title>
			set_methods_style

GeSHi::set_methods_style() in geshi.php

Sets the styles for methods. $key is a number that references the

						</title>
			set_numbers_highlighting

GeSHi::set_numbers_highlighting() in geshi.php

Turns highlighting on/off for numbers

						</title>
			set_numbers_style

GeSHi::set_numbers_style() in geshi.php

Sets the styles for numbers. If $preserve_defaults is  true, then styles are merged with the default styles, with the  user defined styles having priority

						</title>
			set_overall_class

GeSHi::set_overall_class() in geshi.php

Sets the overall classname for this block of code. This  class can then be used in a stylesheet to style this object's  output

						</title>
			set_overall_id

GeSHi::set_overall_id() in geshi.php

Sets the overall id for this block of code. This id can then  be used in a stylesheet to style this object's output

						</title>
			set_overall_style

GeSHi::set_overall_style() in geshi.php

Sets the styles for the code that will be outputted  when this object is parsed. The style should be a  string of valid stylesheet declarations

						</title>
			set_regexps_highlighting

GeSHi::set_regexps_highlighting() in geshi.php

Turns highlighting on/off for regexps

						</title>
			set_regexps_style

GeSHi::set_regexps_style() in geshi.php

Sets the styles for regexps. If $preserve_defaults is  true, then styles are merged with the default styles, with the  user defined styles having priority

						</title>
			set_source

GeSHi::set_source() in geshi.php

Sets the source code for this object

						</title>
			set_strings_highlighting

GeSHi::set_strings_highlighting() in geshi.php

Turns highlighting on/off for strings

						</title>
			set_strings_style

GeSHi::set_strings_style() in geshi.php

Sets the styles for strings. If $preserve_defaults is  true, then styles are merged with the default styles, with the  user defined styles having priority

						</title>
			set_symbols_highlighting

GeSHi::set_symbols_highlighting() in geshi.php

Turns highlighting on/off for symbols

						</title>
			set_symbols_style

GeSHi::set_symbols_style() in geshi.php

Sets the styles for symbols. If $preserve_defaults is  true, then styles are merged with the default styles, with the  user defined styles having priority

						</title>
			set_tab_width

GeSHi::set_tab_width() in geshi.php

Sets how many spaces a tab is substituted for

						</title>
			set_url_for_keyword_group

GeSHi::set_url_for_keyword_group() in geshi.php

Sets the base URL to be used for keywords

						</title>
			start_line_numbers_at

GeSHi::start_line_numbers_at() in geshi.php

Sets what number line numbers should start at. Should  be a positive integer, and will be converted to one.

v

top

						</title>
			vbnet.php

vbnet.php in vbnet.php

						</title>
			vb.php

vb.php in vb.php

						</title>
			vhdl.php

vhdl.php in vhdl.php

						</title>
			visualfoxpro.php

visualfoxpro.php in visualfoxpro.php

x

top

						</title>
			xml.php

xml.php in xml.php

	a
	b
	c
	d
	e
	g
	h
	j
	l
	m
	n
	o
	p
	q
	r
	s
	v
	x


text:
<!doctype html>

  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link href="../../app/css/bootstrap.css" rel="stylesheet">
  <link href="../../app/css/bootstrap-theme.css" rel="stylesheet">
  <link href="../../app/css/font-awesome.min.css" rel="stylesheet">
  <link href="../../app/css/style.css" rel="stylesheet">

      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        Toggle navigation

      </button>
      T1_Leandro Nascimento

Início

Formação

Experiência

Poritfólio


text:
"""
ANA File Reader

.. warning::
    The reading and writing of ana file is not supported under Windows or Python 3.
    The C extensions will not be built in either case.

Notes
-----
ANA is a script that allows people to access compressed ana files.
It accesses a C library, based on Michiel van Noort's
IDL DLM library 'f0' which contains a cleaned up version of the original
anarw routines.

Created by Tim van Werkhoven (t.i.m.vanwerkhoven@gmail.com) on 2009-02-11.
Copyright (c) 2009--2011 Tim van Werkhoven.
"""
from __future__ import absolute_import, division, print_function

import os

try:
    from sunpy.io import _pyana
except ImportError:  # pragma: no cover
    _pyana = None  # pragma: no cover

from sunpy.io.header import FileHeader

__all__ = ['read', 'get_header', 'write']

def read(filename, debug=False, **kwargs):
    """
    Loads an ANA file and returns the data and a header in a list of (data,
    header) tuples.

    Parameters
    ----------
    filename : `str`
        Name of file to be read.
    debug : `bool` (optional)
        Prints verbose debug information.

    Returns
    -------
    out : `list`
        A list of (data, header) tuples

    Examples
    --------
    >>> data = sunpy.io.ana.read(filename)   # doctest: +SKIP

    """
    if not os.path.isfile(filename):
        raise IOError("File does not exist!")

    if _pyana is None:
        raise ImportError("C extension for ANA is missing, please rebuild") # pragma: no cover

    data = _pyana.fzread(filename, debug)
    return [(data['data'],FileHeader(data['header']))]

def get_header(filename, debug=False):
    """
    Loads an ANA file and only return the header consisting of the dimensions,
    size (defined as the product of all dimensions times the size of the
    datatype, this not relying on actual filesize) and comments.

    Parameters
    ----------
    filename : `str`
        Name of file to be read.
    debug : `bool` (optional)
        Prints verbose debug information.

    Returns
    -------
    out : `list`
        A list of `~sunpy.io.header.FileHeader` headers.

    Examples
    --------
    >>> header = sunpy.io.ana.get_header(filename)   # doctest: +SKIP
    """
    if _pyana is None:
        raise ImportError("C extension for ANA is missing, please rebuild")# pragma: no cover

    data = _pyana.fzread(filename, debug)
    return [FileHeader(data['header'])]

def write(filename, data, comments=False, compress=1, debug=False):
    """
    Saves a 2D numpy array as an ANA file and returns the bytes written or NULL

    Parameters
    ----------
    filename : `str`
        Name of file to be created.
    data : `numpy.ndarray`
        Name of data to be stored.
    comments : `~sunpy.io.header.FileHeader`, optional
        The comments to be stored as a header.
    compress : `int`, optional
        To compress the data or not.
        1 is to compress, 0 is uncompressed
    debug : `bool`, optional
        Prints verbose debug information.

    Returns
    -------
    out: ANA compressed archive
        A new ANA compressed archive containing the data and header.

    Examples
    --------
    >>> written = sunpy.io.ana.write(filename, data, comments=Falsem, compress=1)   # doctest: +SKIP
    """
    if _pyana is None:
        raise ImportError("C extension for ANA is missing, please rebuild")# pragma: no cover

    if comments:
        return _pyana.fzwrite(filename, data, compress, comments, debug)
    else:
        return _pyana.fzwrite(filename, data, compress, '', debug)


text:
/*jshint unused:false */
function TiddlerController($scope, tiddlerService) {

    $scope.getTiddler = function() {

        tiddlerService.getTiddler($scope.bagName, $scope.tiddlerTitle, function(tiddler) {

            $scope.tiddler = tiddler;
        }, $scope.render);
    };

    $scope.clearTiddler = function() {

        $scope.tiddler = null;
    };

    $scope.putTiddler = function() {

        var tags = $scope.tiddlerTags;
        if(tags) {
            tags = tags.split(" ");
        } else {
            tags = [];
        }

        var tiddlerData = { title: $scope.tiddlerTitle, text: $scope.tiddlerText, tags: tags };

        tiddlerService.putTiddler($scope.bagName, tiddlerData, function(tiddler) {

            $scope.tiddler = tiddler;
        });
    };

    $scope.deleteTiddler = function() {

        tiddlerService.deleteTiddler($scope.bagName, $scope.tiddlerTitle, function() {

            $scope.tiddler = null;
        });
    };
}