text:
namespace LimpiezasPalmeralForms
{
    partial class PantallaProducto
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.groupBoxProductosAcciones = new System.Windows.Forms.GroupBox();
            this.buttonGenerarInforme = new System.Windows.Forms.Button();
            this.buttonIncrementarStock = new System.Windows.Forms.Button();
            this.buttonReducirStock = new System.Windows.Forms.Button();
            this.buttonEliminar = new System.Windows.Forms.Button();
            this.buttonEditar = new System.Windows.Forms.Button();
            this.buttonConsultar = new System.Windows.Forms.Button();
            this.buttonRegistrar = new System.Windows.Forms.Button();
            this.groupBoxProductos = new System.Windows.Forms.GroupBox();
            this.comboBoxFiltro = new System.Windows.Forms.ComboBox();
            this.textBoxBuscar = new System.Windows.Forms.TextBox();
            this.dataGridViewProducto = new System.Windows.Forms.DataGridView();
            this.groupBoxProductosAcciones.SuspendLayout();
            this.groupBoxProductos.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewProducto)).BeginInit();
            this.SuspendLayout();
            //
            // groupBoxProductosAcciones
            //
            this.groupBoxProductosAcciones.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.groupBoxProductosAcciones.Controls.Add(this.buttonGenerarInforme);
            this.groupBoxProductosAcciones.Controls.Add(this.buttonIncrementarStock);
            this.groupBoxProductosAcciones.Controls.Add(this.buttonReducirStock);
            this.groupBoxProductosAcciones.Controls.Add(this.buttonEliminar);
            this.groupBoxProductosAcciones.Controls.Add(this.buttonEditar);
            this.groupBoxProductosAcciones.Controls.Add(this.buttonConsultar);
            this.groupBoxProductosAcciones.Controls.Add(this.buttonRegistrar);
            this.groupBoxProductosAcciones.Location = new System.Drawing.Point(594, 12);
            this.groupBoxProductosAcciones.Name = "groupBoxProductosAcciones";
            this.groupBoxProductosAcciones.Size = new System.Drawing.Size(133, 356);
            this.groupBoxProductosAcciones.TabIndex = 3;
            this.groupBoxProductosAcciones.TabStop = false;
            this.groupBoxProductosAcciones.Text = "Acciones";
            //
            // buttonGenerarInforme
            //
            this.buttonGenerarInforme.Location = new System.Drawing.Point(6, 317);
            this.buttonGenerarInforme.Name = "buttonGenerarInforme";
            this.buttonGenerarInforme.Size = new System.Drawing.Size(121, 44);
            this.buttonGenerarInforme.TabIndex = 9;
            this.buttonGenerarInforme.Text = "Generar Informe";
            this.buttonGenerarInforme.UseVisualStyleBackColor = true;
            this.buttonGenerarInforme.Click += new System.EventHandler(this.buttonGenerarInforme_Click);
            //
            // buttonIncrementarStock
            //
            this.buttonIncrementarStock.Location = new System.Drawing.Point(6, 217);
            this.buttonIncrementarStock.Name = "buttonIncrementarStock";
            this.buttonIncrementarStock.Size = new System.Drawing.Size(121, 44);
            this.buttonIncrementarStock.TabIndex = 8;
            this.buttonIncrementarStock.Text = "Incrementar Stock";
            this.buttonIncrementarStock.UseVisualStyleBackColor = true;
            this.buttonIncrementarStock.Click += new System.EventHandler(this.button1_Click);
            //
            // buttonReducirStock
            //
            this.buttonReducirStock.Location = new System.Drawing.Point(6, 267);
            this.buttonReducirStock.Name = "buttonReducirStock";
            this.buttonReducirStock.Size = new System.Drawing.Size(121, 44);
            this.buttonReducirStock.TabIndex = 7;
            this.buttonReducirStock.Text = "Reducir Stock";
            this.buttonReducirStock.UseVisualStyleBackColor = true;
            this.buttonReducirStock.Click += new System.EventHandler(this.buttonReducirStock_Click);
            //
            // buttonEliminar
            //
            this.buttonEliminar.Location = new System.Drawing.Point(6, 167);
            this.buttonEliminar.Name = "buttonEliminar";
            this.buttonEliminar.Size = new System.Drawing.Size(121, 44);
            this.buttonEliminar.TabIndex = 6;
            this.buttonEliminar.Text = "Eliminar";
            this.buttonEliminar.UseVisualStyleBackColor = true;
            this.buttonEliminar.Click += new System.EventHandler(this.buttonEliminar_Click);
            //
            // buttonEditar
            //
            this.buttonEditar.Location = new System.Drawing.Point(6, 117);
            this.buttonEditar.Name = "buttonEditar";
            this.buttonEditar.Size = new System.Drawing.Size(121, 44);
            this.buttonEditar.TabIndex = 5;
            this.buttonEditar.Text = "Editar";
            this.buttonEditar.UseVisualStyleBackColor = true;
            this.buttonEditar.Click += new System.EventHandler(this.buttonEditar_Click);
            //
            // buttonConsultar
            //
            this.buttonConsultar.Location = new System.Drawing.Point(6, 67);
            this.buttonConsultar.Name = "buttonConsultar";
            this.buttonConsultar.Size = new System.Drawing.Size(121, 44);
            this.buttonConsultar.TabIndex = 4;
            this.buttonConsultar.Text = "Consultar";
            this.buttonConsultar.UseVisualStyleBackColor = true;
            this.buttonConsultar.Click += new System.EventHandler(this.buttonConsultar_Click);
            //
            // buttonRegistrar
            //
            this.buttonRegistrar.Location = new System.Drawing.Point(6, 17);
            this.buttonRegistrar.Name = "buttonRegistrar";
            this.buttonRegistrar.Size = new System.Drawing.Size(121, 44);
            this.buttonRegistrar.TabIndex = 3;
            this.buttonRegistrar.Text = "Registrar";
            this.buttonRegistrar.UseVisualStyleBackColor = true;
            this.buttonRegistrar.Click += new System.EventHandler(this.buttonRegistrar_Click);
            //
            // groupBoxProductos
            //
            this.groupBoxProductos.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.groupBoxProductos.Controls.Add(this.comboBoxFiltro);
            this.groupBoxProductos.Controls.Add(this.textBoxBuscar);
            this.groupBoxProductos.Controls.Add(this.dataGridViewProducto);
            this.groupBoxProductos.Location = new System.Drawing.Point(12, 12);
            this.groupBoxProductos.Name = "groupBoxProductos";
            this.groupBoxProductos.Size = new System.Drawing.Size(576, 356);
            this.groupBoxProductos.TabIndex = 2;
            this.groupBoxProductos.TabStop = false;
            this.groupBoxProductos.Text = "Productos";
            //
            // comboBoxFiltro
            //
            this.comboBoxFiltro.FormattingEnabled = true;
            this.comboBoxFiltro.Items.AddRange(new object[] {
            "Id",
            "Nombre",
            "Stock"});
            this.comboBoxFiltro.Location = new System.Drawing.Point(7, 17);
            this.comboBoxFiltro.Name = "comboBoxFiltro";
            this.comboBoxFiltro.Size = new System.Drawing.Size(121, 21);
            this.comboBoxFiltro.TabIndex = 1;
            //
            // textBoxBuscar
            //
            this.textBoxBuscar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.textBoxBuscar.Location = new System.Drawing.Point(134, 17);
            this.textBoxBuscar.Name = "textBoxBuscar";
            this.textBoxBuscar.Size = new System.Drawing.Size(436, 20);
            this.textBoxBuscar.TabIndex = 2;
            this.textBoxBuscar.Text = "Introduzca el producto que desea buscar.";
            this.textBoxBuscar.Click += new System.EventHandler(this.textBoxBuscar_Click);
            this.textBoxBuscar.TextChanged += new System.EventHandler(this.textBoxBuscar_TextChanged);
            //
            // dataGridViewProducto
            //
            this.dataGridViewProducto.AllowUserToAddRows = false;
            this.dataGridViewProducto.AllowUserToDeleteRows = false;
            this.dataGridViewProducto.AllowUserToResizeColumns = false;
            this.dataGridViewProducto.AllowUserToResizeRows = false;
            this.dataGridViewProducto.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.dataGridViewProducto.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
            this.dataGridViewProducto.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dataGridViewProducto.Location = new System.Drawing.Point(7, 47);
            this.dataGridViewProducto.Name = "dataGridViewProducto";
            this.dataGridViewProducto.ReadOnly = true;
            this.dataGridViewProducto.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
            this.dataGridViewProducto.Size = new System.Drawing.Size(563, 303);
            this.dataGridViewProducto.TabIndex = 0;
            //
            // PantallaProducto
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(739, 380);
            this.ControlBox = false;
            this.Controls.Add(this.groupBoxProductosAcciones);
            this.Controls.Add(this.groupBoxProductos);
            this.Name = "PantallaProducto";
            this.Text = "Pantalla Producto";
            this.groupBoxProductosAcciones.ResumeLayout(false);
            this.groupBoxProductos.ResumeLayout(false);
            this.groupBoxProductos.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewProducto)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.GroupBox groupBoxProductosAcciones;
        private System.Windows.Forms.Button buttonEliminar;
        private System.Windows.Forms.Button buttonEditar;
        private System.Windows.Forms.Button buttonConsultar;
        private System.Windows.Forms.Button buttonRegistrar;
        private System.Windows.Forms.GroupBox groupBoxProductos;
        private System.Windows.Forms.ComboBox comboBoxFiltro;
        private System.Windows.Forms.TextBox textBoxBuscar;
        private System.Windows.Forms.DataGridView dataGridViewProducto;
        private System.Windows.Forms.Button buttonReducirStock;
        private System.Windows.Forms.Button buttonIncrementarStock;
        private System.Windows.Forms.Button buttonGenerarInforme;

    }
}


text:
package org.apache.hadoop.hive.ql.ddl.workloadmanagement.pool.create;

import org.antlr.runtime.tree.Tree;
import org.apache.hadoop.hive.ql.QueryState;
import org.apache.hadoop.hive.ql.ddl.DDLWork;
import org.apache.hadoop.hive.ql.ddl.workloadmanagement.WMUtils;
import org.apache.hadoop.hive.ql.ddl.DDLSemanticAnalyzerFactory.DDLType;
import org.apache.hadoop.hive.ql.ddl.DDLUtils;
import org.apache.hadoop.hive.ql.exec.TaskFactory;
import org.apache.hadoop.hive.ql.parse.ASTNode;
import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer;
import org.apache.hadoop.hive.ql.parse.HiveParser;
import org.apache.hadoop.hive.ql.parse.SemanticException;
import org.apache.hadoop.hive.ql.plan.PlanUtils;

/**
 * Analyzer for create pool commands.
 */
@DDLType(type=HiveParser.TOK_CREATE_POOL)
public class CreateWMPoolAnalyzer extends BaseSemanticAnalyzer {
  public CreateWMPoolAnalyzer(QueryState queryState) throws SemanticException {
    super(queryState);
  }

  @Override
  public void analyzeInternal(ASTNode root) throws SemanticException {
    // TODO: allow defaults for e.g. scheduling policy.
    if (root.getChildCount() < 3) {
      throw new SemanticException("Expected more arguments: " + root.toStringTree());
    }

    String resourcePlanName = unescapeIdentifier(root.getChild(0).getText());
    String poolPath = WMUtils.poolPath(root.getChild(1));
    Double allocFraction = null;
    Integer queryParallelism = null;
    String schedulingPolicy = null;

    for (int i = 2; i < root.getChildCount(); ++i) {
      Tree child = root.getChild(i);
      if (child.getChildCount() != 1) {
        throw new SemanticException("Expected 1 paramter for: " + child.getText());
      }

      String param = child.getChild(0).getText();
      switch (child.getType()) {
      case HiveParser.TOK_ALLOC_FRACTION:
        allocFraction = Double.parseDouble(param);
        break;
      case HiveParser.TOK_QUERY_PARALLELISM:
        queryParallelism = Integer.parseInt(param);
        break;
      case HiveParser.TOK_SCHEDULING_POLICY:
        schedulingPolicy = PlanUtils.stripQuotes(param);
        break;
      case HiveParser.TOK_PATH:
        throw new SemanticException("Invalid parameter path in create pool");
      default:
        throw new SemanticException("Invalid parameter " + child.getText() + " in create pool");
      }
    }

    if (allocFraction == null) {
      throw new SemanticException("alloc_fraction should be specified for a pool");
    }
    if (queryParallelism == null) {
      throw new SemanticException("query_parallelism should be specified for a pool");
    }

    CreateWMPoolDesc desc = new CreateWMPoolDesc(resourcePlanName, poolPath, allocFraction, queryParallelism,
        schedulingPolicy);
    rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), desc)));

    DDLUtils.addServiceOutput(conf, getOutputs());
  }
}

redpajama_set_name: RedPajamaGithub


text:
package org.opentech.activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;

/**
 * A special Activity which is displayed like a dialog and shows a room image. Specify the room name and the room image id as Intent extras.
 *
 * @author Christophe Beyls
 */
public class RoomImageDialogActivity extends Activity {

    public static final String EXTRA_ROOM_NAME = "roomName";
    public static final String EXTRA_ROOM_IMAGE_RESOURCE_ID = "imageResId";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent intent = getIntent();

        setTitle(intent.getStringExtra(EXTRA_ROOM_NAME));

        ImageView imageView = new ImageView(this);
        imageView.setImageResource(intent.getIntExtra(EXTRA_ROOM_IMAGE_RESOURCE_ID, 0));
        setContentView(imageView);
    }
}


text:
> If neurotic is wanting two mutually exclusive things at one and the same
> time, then I'm neurotic as hell. I'll be flying back and forth between one
> mutually exclusive thing and another for the rest of my days.
>
> ― Sylvia Plath

plath is an experiment to build a minimal threading library in Rust without the
help of much other than standard Linux syscalls. It should contain all the most
fundamental elements of pthreads / standard threading libraries.

In the interest of keeping this simple, only recent x86_64 Linux systems are
supported.


text:
Arborism
========

[![Build status][1]][2]

Arborism is an implementation of tree different algorithms described
in the following papers.

> Zhang and Shasha. 1989. Simple fast algorithms for the editing
> distance between trees and related problems. *SIAM Journal on
> Computing*, Vol. 18, No. 6. https://doi.org/10.1137/0218082

> Dulucq and Touzet. 2003. Analysis of tree edit distance
> algorithms. In: Baeza-Yates R., Chávez E., Crochemore M. (eds)
> *Combinatorial Pattern Matching*. Lecture Notes in Computer Science,
> vol 2676. https://doi.org/10.1007/3-540-44888-8_7

> Demaine, Mozes, Rossman, and Weimann. 2009. An Optimal Decomposition
> Algorithm for Tree Edit Distance. *ACM Transactions on Algorithms*,
> Vol. 6, No. 1. https://doi.org/10.1145/1644015.1644017

[1]: https://travis-ci.org/thsutton/arborism.svg?branch=master
[2]: https://travis-ci.org/thsutton/arborism


text:
import iconMessages from './icons/en-US';

export default {
  IndexFilters: {
    filters: '{quantity, plural,\n  =0 {Filters}\n  =1 {one filter}\n  ' +
      'other {# filters}\n}'
  },
  ...iconMessages,
  Active: 'Active',
  Activate: 'Activate',
  Activated: 'Activated',
  Add: 'Add',
  add: 'add',
  Alerts: 'Alerts',
  All: 'All',
  Arc: 'Arc',
  AxisLabel: '{orientation} Axis',
  area: 'area',
  Bar: 'Bar',
  bar: 'bar',
  Blank: 'Blank',
  Box: 'Box',
  Carousel: 'Carousel',
  Category: 'Category',
  Circle: 'Circle',
  Chart: 'Chart',
  Children: 'Children',
  Clear: 'Clear',
  Cleared: 'Cleared',
  Close: 'Close',
  'Close Menu': 'Close Menu',
  Completed: 'Completed',
  'Connects With': 'Connects With',
  created: 'Created',
  Critical: 'Critical',
  'Currently Active': 'Currently Active',
  'Date Selector': 'Date Selector',
  'Date Time Icon': 'Open Date and Time Selector',
  Disabled: 'Disabled',
  Distribution: 'Distribution',
  Email: 'Email',
  'Enter Select': 'Press enter to select it',
  Error: 'Error',
  Filter: 'Filter',
  Footer: 'Footer',
  Grommet: 'Grommet',
  HotSpotsLabel: 'HotSpots: press arrow keys to interact with it',
  'GraphValues': (
    'Graph has {count} items. Highest is {highest}' +
    ' and smallest is {smallest}'
  ),
  hour: 'hour',
  'Grommet Logo': 'Grommet Logo',
  'Layer': 'Layer',
  List: 'List',
  line: 'line',
  'Loading': 'Loading',
  loginInvalidPassword: 'Please provide Username and Password.',
  'Log In': 'Log In',
  Logout: 'Logout',
  'Main Content': 'Main Content',
  Max: 'Max',
  Menu: 'Menu',
  Meter: 'Meter',
  Min: 'Min',
  minute: 'minute',
  model: 'Model',
  modified: 'Modified',
  monitor: 'monitor',
  'Multi Select': 'Multi Select',
  Name: 'Name',
  'Navigation Help': 'Use arrow keys to navigate',
  'Next Month': 'Next Month',
  'Next Slide': 'Next Slide',
  'No Relationship': 'No Relationship',
  'Notification': 'Notification',
  OK: 'OK',
  Open: 'Open',
  Parent: 'Parent',
  Parents: 'Parents',
  Parts: 'Parts',
  Part: 'Part',
  Password: 'Password',
  'Previous Month': 'Previous Month',
  'Previous Slide': 'Previous Slide',
  'Previous Tiles': 'Previous Tiles',
  'Remember me': 'Remember me',
  Resource: 'Resource',
  Running: 'Running',
  Search: 'Search',
  'Match Results': `There {count, plural,
      =0 {is no match}
      one {is # match}
      other {are # matches}
  }`,
  second: 'second',
  'Select Icon': 'Open Select Drop',
  Selected: 'Selected',
  'Skip to': 'Skip to',
  'Slide Number': 'Slide {slideNumber}',
  Sort: 'Sort',
  Spinning: 'Spinning',
  Spiral: 'Spiral',
  State: 'State',
  Status: 'Status',
  Subtract: 'Subtract',
  SunBurst: 'SunBurst',
  'Tab Contents': '{activeTitle} Tab Contents',
  Table: 'Table',
  Tasks: 'Tasks',
  Tiles: 'Tiles',
  Time: 'Time',
  Title: 'Title',
  Today: 'Today',
  Topology: 'Topology',
  Total: 'Total',
  Threshold: 'Threshold',
  Unknown: 'Unknown',
  Username: 'Username',
  uri: 'URI',
  Value: 'Value',
  Warning: 'Warning'
};


text:
ILRT (Instrumentation Log Report Tool) is a utility I created to help detect and diagnose performance bottlenecks of __IBM WebSphere Lombardi Edition__ / __IBM BPM__, primarily in the Lombardi (BPMN processes) runtime. Lombardi process runtime has embedded instrumentation capabilities, and can record detailed system profile of every process or service activity. It is somehow described [here](http://www-01.ibm.com/support/docview.wss?uid=swg21613989). Оutput of NonXMLDump utility provided by IBM is a human-readable but in fact is a big and raw instrumentation log which is very difficult to read and analyze by hand. ILRT parse such raw text instrumentation log and then produce report with statistical information and detailed aggregate profile of top expensive activities in a much more readable form.

Example of such report output can be viewed [here](example-reports/inst001.report.txt?raw=true).

>It is very first version created to address some common problems, so it was written quick using __Ruby__ language. It is very helpful, works well, but not as fast as we would like. Maybe someday I'll rewrite it on something more performant, Scala for example.

#### Download

* [ilrt.rb](ilrt.rb?raw=true) - If you on the Mac OS X, or your system has Ruby interpreter installed.
* [ilrt.jar](ilrt.jar?raw=true) - It is binary compiled version based on JRuby, and is only required to have Java JRE to run.

For Windows systems you can download and install Ruby interpreter from here - http://rubyinstaller.org/

#### How to Run

First you should create plain text instrumentation log from binary log with [IBM provided utility](http://www-01.ibm.com/support/docview.wss?uid=swg21613989). Note that default values for `dumpIfOver` and `truncateIfOver` are 10000 and 20000, so if your activities has more than 10k periods, such activities will be splitted and truncated. For logs with big and expensive activities I use much more bigger values here, so nothing will be truncated.

```
$ NonXMLDump inst001.dat -dumpIfOver 10000000 -truncateIfOver 10000000 > inst001.txt
```

Java version. You must set value for maximum heap with __-Xmx__ option proportionally to instrumentation log size:
```
$ java -Xmx2048m -jar ilrt.jar -f inst001.txt -p
```

Ruby version:
```
$ ./ilrt.rb -f inst001.txt -p
```

After processing is completed report will be written to the __{BASENAME}.report.txt__ file, in this case __inst001.report.txt__.

#### More Info

More details about how to use this tool here - http://afedotov.github.io/ILRT


text:
package org.apach3.http.conn.ssl;

import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

/**
 * A trust strategy that accepts self-signed certificates as trusted. Verification of all other
 * certificates is done by the trust manager configured in the SSL context.
 *
 * @since 4.1
 */
public class TrustSelfSignedStrategy implements TrustStrategy {

    public boolean isTrusted(
            final X509Certificate[] chain, final String authType) throws CertificateException {
        return chain.length == 1;
    }

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using HiddenSound.API.Areas.Shared.Models;

namespace HiddenSound.API.Areas.Shared.Repositories
{
    public interface IAuthorizationRepository
    {
        List<Authorization> GetAllAuthorizations();

        Authorization GetAuthorization(string code);

        Task<Authorization> GetAuthorizationAsync(Guid application, string code, CancellationToken cancellationToken);

        void UpdateAuthorization(Authorization authorization);

        void CreateAuthorization(Authorization authorization);

        Task RemoveAuthorizationsByApplicationAsync(Guid applicationId, CancellationToken cancellationToken);

        Task<List<Authorization>> GetAuthorizationsByApplicationAsync(Guid applicationId, CancellationToken cancellationToken);

        Task<List<Authorization>> GetAuthorizationsByUserAsync(Guid userId, CancellationToken cancellationToken);
    }
}


text:
<?php
namespace TYPO3\CMS\Backend\Domain\Model\Module;

/**
 * Model for menu entries
 */
class BackendModule
{
    /**
     * @var string
     */
    protected $title = '';

    /**
     * @var string
     */
    protected $name = '';

    /**
     * @var string
     */
    protected $icon = '';

    /**
     * @var string
     */
    protected $link = '';

    /**
     * @var string
     */
    protected $onClick = '';

    /**
     * @var string
     */
    protected $description = '';

    /**
     * @var string
     */
    protected $navigationComponentId = '';

    /**
     * @var string
     */
    protected $navigationFrameScript = '';

    /**
     * @var string
     */
    protected $navigationFrameScriptParameters = '';

    /**
     * @var \SplObjectStorage
     */
    protected $children;

    /**
     * construct
     */
    public function __construct()
    {
        $this->children = new \SplObjectStorage();
    }

    /**
     * Set children
     *
     * @param \SplObjectStorage $children
     * @return void
     */
    public function setChildren($children)
    {
        $this->children = $children;
    }

    /**
     * Get children
     *
     * @return \SplObjectStorage
     */
    public function getChildren()
    {
        return $this->children;
    }

    /**
     * Add Child
     *
     * @param \TYPO3\CMS\Backend\Domain\Model\Module\BackendModule $child
     * @return void
     */
    public function addChild(\TYPO3\CMS\Backend\Domain\Model\Module\BackendModule $child)
    {
        $this->children->attach($child);
    }

    /**
     * Set icon
     *
     * @param string $icon
     * @return void
     */
    public function setIcon($icon)
    {
        $this->icon = $icon;
    }

    /**
     * Get icon
     *
     * @return string
     */
    public function getIcon()
    {
        return $this->icon;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return void
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set title
     *
     * @param string $title
     * @return void
     */
    public function setTitle($title)
    {
        $this->title = $title;
    }

    /**
     * Get Title
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set Link
     *
     * @param string $link
     * @return void
     */
    public function setLink($link)
    {
        $this->link = $link;
    }

    /**
     * Get Link
     *
     * @return string
     */
    public function getLink()
    {
        return $this->link;
    }

    /**
     * Set Description
     *
     * @param string $description
     * @return void
     */
    public function setDescription($description)
    {
        $this->description = $description;
    }

    /**
     * Get Description
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set Navigation Component Id
     *
     * @param string $navigationComponentId
     * @return void
     */
    public function setNavigationComponentId($navigationComponentId)
    {
        $this->navigationComponentId = $navigationComponentId;
    }

    /**
     * Get Navigation Component Id
     *
     * @return string
     */
    public function getNavigationComponentId()
    {
        return $this->navigationComponentId;
    }

    /**
     * @param string $navigationFrameScript
     */
    public function setNavigationFrameScript($navigationFrameScript)
    {
        $this->navigationFrameScript = $navigationFrameScript;
    }

    /**
     * @return string
     */
    public function getNavigationFrameScript()
    {
        return $this->navigationFrameScript;
    }

    /**
     * @param string $navigationFrameScriptParameters
     */
    public function setNavigationFrameScriptParameters($navigationFrameScriptParameters)
    {
        $this->navigationFrameScriptParameters = $navigationFrameScriptParameters;
    }

    /**
     * @return string
     */
    public function getNavigationFrameScriptParameters()
    {
        return $this->navigationFrameScriptParameters;
    }

    /**
     * Set onClick
     *
     * @param string $onClick
     * @return void
     */
    public function setOnClick($onClick)
    {
        $this->onClick = $onClick;
    }

    /**
     * Get onClick
     *
     * @return string
     */
    public function getOnClick()
    {
        return $this->onClick;
    }
}


text:
//
//  RCPublicServiceChatViewController.h
//  RongIMKit
//
//  Created by litao on 15/6/12.
//  Copyright (c) 2015年 RongCloud. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "RCConversationViewController.h"

/**
 * 公众服务号会话VC
 *
 * 当初始化此类时,需要正确初始化基类,比如服务号ID,服务号类型,例如:
 * RCPublicServiceChatViewController *conversationVC = [[RCPublicServiceChatViewController alloc] init];
 * conversationVC.conversationType = conversationType;
 * conversationVC.targetId = targetId;
 * conversationVC.userName = conversationTitle;
 * conversationVC.title = conversationTitle;
 * [self.navigationController pushViewController:conversationVC animated:YES];
 */
@interface RCPublicServiceChatViewController : RCConversationViewController

@end


text:
from flask_wtf import Form
from wtforms import StringField, TextField
from wtforms.validators import DataRequired, Length

class CommentForm(Form):
    """Form vaildator for comment."""

    # Set some field(InputBox) for enter the data.
    # patam validators: setup list of validators
    name = StringField(
        'Name',
        validators=[DataRequired(), Length(max=255)])

    text = TextField(u'Comment', validators=[DataRequired()])


text:
```
Copyright 2020 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```

## Limitations on macOS

* TinyInst may not always detect the exact time of target process exit. As a consequence the `OnProcessExit()` callback might have a maximum delay of 100ms. In the future, additional APIs (e.g. kqueue) could be used to detect process exit accurately.
* TinyInst on macOS is affected by the same custom exceptions-handling issues as the Windows version. For the description of the issue and workarounds, see [this section in the readme](https://github.com/googleprojectzero/TinyInst#return-address-patching)
* TinyInst leverages read-only pages to redirect the instruction pointer to the
instrumented code if the original, uninstrumented, code is invoked. On macOS running on ARM chips, the code
section of the modules inside the Dyld cache is aligned to 4k pages, however, ARM uses 16k pages. This makes it more difficult to instrument
individual modules inside the Dyld cache. TinyInst currently solves ths by instrumenting adjacent modules automatically until their code section
aligns to 16k to ensure that not only parts of a module is instrumented. This
behavior is controlled by the `-page_extend_modules` flag which is set to
`true` by default on M1. In some cases it might be possible to turn off this flag resulting in better performance.

## TinyInst and Guard Malloc

On macOS, [Guard Malloc](https://developer.apple.com/library/archive/documentation/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html) is a special version of the malloc library that makes it easier to catch certain types of memory safety issues. To enable Guard Malloc for a target process running under TinyInst, use the following flag:

```
-target_env DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib
```

However, on some targets, additional workarounds might be needed.

An issue was observed with some targets, where the combination of TinyInst and Guard Malloc put a process in a state where calls to (mach_)vm_allocate would fail, even though there was still sufficient free memory in the system and the target process address space (possibly due to an issue in macOS itself). This caused libgmalloc to be stuck in an infinite loop the first time it tried to allocate memory after a module was instrumented. The workaround for this is to have the modules loaded and instrumented before libgmalloc is loaded. This can be accomplished by the following flags:

```
-target_env DYLD_INSERT_LIBRARIES=/path/to/instrumented/module.dylib:/usr/lib/libgmalloc.dylib -instrument_modules_on_load
```

The first part ensures that the instrumented module will be loaded before libgmalloc (the order of libraries in `DYLD_INSERT_LIBRARIES` is important). The `-instrument_modules_on_load` flag ensures that modules will be instrumented as soon as they are loaded (and not when the process entypoint or the target method is reached, as is normally the case in TinyInst.

Additionally, especially if you enconter errors related to stack unwinding, the `-patch_return_addresses` flag might be needed.


text:
package io.reark.rxgithubapp.advanced.activities;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import javax.inject.Inject;

import io.reark.reark.utils.Log;
import io.reark.rxgithubapp.R;
import io.reark.rxgithubapp.advanced.RxGitHubApp;
import io.reark.rxgithubapp.advanced.fragments.RepositoryFragment;
import io.reark.rxgithubapp.shared.data.DataFunctions;
import io.reark.rxgithubapp.shared.pojo.UserSettings;

public class MainActivity extends AppCompatActivity {
    private static final String TAG = MainActivity.class.getSimpleName();

    @Inject
    DataFunctions.SetUserSettings setUserSettings;

    public MainActivity() {
        RxGitHubApp.getInstance().getGraph().inject(this);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction()
                    .add(R.id.container, new RepositoryFragment())
                    .commit();
        }
    }

    public void chooseRepository() {
        Log.d(TAG, "chooseRepository");
        Intent intent = new Intent(this, ChooseRepositoryActivity.class);
        startActivityForResult(intent, 0);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        Log.d(TAG, "onActivityResult");
        if (data == null) {
            Log.d(TAG, "No data from onActivityResult");
            return;
        }
        final int repositoryId = data.getIntExtra("repositoryId", 0);
        if (repositoryId == 0) {
            Log.e(TAG, "Invalid repositoryId from onActivityResult");
            return;
        }
        Log.d(TAG, "New repositoryId: " + repositoryId);
        // We should probably send an intent to update the widget
        // in case its service is not alive anymore. This works as
        // long as it is alive, though.
        setUserSettings.call(new UserSettings(repositoryId));
    }
}


text:
from unittest import TestCase

from cate.core import plugin

class PluginTest(TestCase):
    def test_that_test_plugins_are_loaded(self):
        self.assertIsNotNone(plugin.PLUGIN_REGISTRY)

    def test_cate_init(self):
        # Yes, this is really a silly test :)
        # But this way we cover one more (empty) statement.
        plugin.cate_init(True, False, a=1, b=2)


text:
package com.tngtech.archunit.exampletest.junit5;

import com.tngtech.archunit.core.domain.JavaClass;
import com.tngtech.archunit.example.cycles.complexcycles.slice1.SliceOneCallingConstructorInSliceTwoAndMethodInSliceThree;
import com.tngtech.archunit.example.cycles.complexcycles.slice3.ClassCallingConstructorInSliceFive;
import com.tngtech.archunit.junit.AnalyzeClasses;
import com.tngtech.archunit.junit.ArchTag;
import com.tngtech.archunit.junit.ArchTest;
import com.tngtech.archunit.lang.ArchRule;
import com.tngtech.archunit.library.dependencies.SliceAssignment;
import com.tngtech.archunit.library.dependencies.SliceIdentifier;

import static com.tngtech.archunit.base.DescribedPredicate.alwaysTrue;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.resideInAPackage;
import static com.tngtech.archunit.library.dependencies.SlicesRuleDefinition.slices;

@ArchTag("example")
@AnalyzeClasses(packages = "com.tngtech.archunit.example.cycles")
public class CyclicDependencyRulesTest {

    @ArchTest
    static final ArchRule no_cycles_by_method_calls_between_slices =
            slices().matching("..(simplecycle).(*)..").namingSlices("$2 of $1").should().beFreeOfCycles();

    @ArchTest
    static final ArchRule no_cycles_by_constructor_calls_between_slices =
            slices().matching("..(constructorcycle).(*)..").namingSlices("$2 of $1").should().beFreeOfCycles();

    @ArchTest
    static final ArchRule no_cycles_by_inheritance_between_slices =
            slices().matching("..(inheritancecycle).(*)..").namingSlices("$2 of $1").should().beFreeOfCycles();

    @ArchTest
    static final ArchRule no_cycles_by_field_access_between_slices =
            slices().matching("..(fieldaccesscycle).(*)..").namingSlices("$2 of $1").should().beFreeOfCycles();

    @ArchTest
    static final ArchRule no_cycles_by_member_dependencies_between_slices =
            slices().matching("..(membercycle).(*)..").namingSlices("$2 of $1").should().beFreeOfCycles();

    @ArchTest
    static final ArchRule no_cycles_in_simple_scenario =
            slices().matching("..simplescenario.(*)..").namingSlices("$1").should().beFreeOfCycles();

    @ArchTest
    static final ArchRule no_cycles_in_complex_scenario =
            slices().matching("..(complexcycles).(*)..").namingSlices("$2 of $1").should().beFreeOfCycles();

    @ArchTest
    static final ArchRule no_cycles_in_complex_scenario_with_custom_ignore =
            slices().matching("..(complexcycles).(*)..").namingSlices("$2 of $1")
                    .as("Slices of complex scenario ignoring some violations")
                    .should().beFreeOfCycles()
                    .ignoreDependency(SliceOneCallingConstructorInSliceTwoAndMethodInSliceThree.class, ClassCallingConstructorInSliceFive.class)
                    .ignoreDependency(resideInAPackage("..slice4.."), alwaysTrue());

    @ArchTest
    static final ArchRule no_cycles_in_freely_customized_slices =
            slices().assignedFrom(inComplexSliceOneOrTwo())
                    .namingSlices("$1[$2]")
                    .should().beFreeOfCycles();

    private static SliceAssignment inComplexSliceOneOrTwo() {
        return new SliceAssignment() {
            @Override
            public String getDescription() {
                return "complex slice one or two";
            }

            @Override
            public SliceIdentifier getIdentifierOf(JavaClass javaClass) {
                if (javaClass.getPackageName().contains("complexcycles.slice1")) {
                    return SliceIdentifier.of("Complex-Cycle", "One");
                }
                if (javaClass.getPackageName().contains("complexcycles.slice2")) {
                    return SliceIdentifier.of("Complex-Cycle", "Two");
                }
                return SliceIdentifier.ignore();
            }
        };
    }
}


text:
class TransformationsController < ApplicationController
  def index
    all = Transformation.all
    @transformations = TransformationSerializer.many(all)
    @in_use = all.inject({}) do |u, trm|
      u.merge(trm.public_id => Association.where(transformation: trm).count)
    end
  end
end


text:
package de.uni_mannheim.informatik.dws.winter.webtables.parsers;

import java.util.List;

public interface StringNormalizer {

	// determines which string/character corresponds to the null value
	public static final String nullValue = "NULL";

	String normaliseHeader(String columnName);

	String normaliseValue(String value, boolean removeContentInBrackets);

	String normalise(String s, boolean useStemmer);

	List<String> tokenise(String s, boolean useStemmer);
}


text:
'use strict';

/*
    Last.fm Release Crawl Seeder

    Executes seeder query and dispatches crawl jobs to the job queue.
    Job processors will use MusicBrainz Release ID or MixRadio Artist
    and Release Name to query the Last.fm Release API.

    SCRIPT Data Columns
    ===================================
    mb_realease_id: String,
    mb_artist_id: String
    mr_release_id: String,
    mr_release_name: Integer,
    mr_release_cardinality: Integer,
    mr_release_tracks: [{
        "mr_track_id": Integer,
        "mr_track_name": String,
        "mr_track_position": Integer,
        "mb_track_id": String,
    }]
    ===================================
*/

/* Constants */
const namespace = "lastfm:release";

/* Parse Job Metadata from text line */
const lineParser = (line) => {

    const attrs = line.split('\t');

    // Parse Line Data
    const data = {
        mb_release_id: attrs[0],
        mb_artist_id: attrs[1],
        mr_release_id: attrs[2],
        mr_release_name: attrs[3],
        mr_release_cardinality: attrs[4],
        mr_release_tracks: JSON.parse(attrs[5])
    };

    return { namespace, data };
};

module.exports = { namespace, lineParser };


text:
GLGame
======

A game coded from scratch with OpenGL


text:
NOTE: this is an example of what can be done with Slots. It is *not* an example of what *should* be done with Slots.

I am showing how a slot can initialize itself on object creation.

#name => ExampleSlotWithDefaultValue default: 5


text:
<?php

declare(strict_types=1);

namespace Czim\Service\Interpreters\Decorators;

use Czim\Service\Contracts\ServiceInterpreterInterface;
use Czim\Service\Contracts\ServiceRequestInterface;
use Czim\Service\Contracts\ServiceResponseInformationInterface;
use Czim\Service\Contracts\ServiceResponseInterface;

/**
 * Fixes raw XML with relative namespaces and potentially other problems
 */
class FixXmlNamespacesDecorator implements ServiceInterpreterInterface
{
    public function __construct(protected readonly ServiceInterpreterInterface $interpreter)
    {
    }

    /**
     * @param ServiceRequestInterface                  $request the request sent in order to retrieve the response
     * @param mixed                                    $response
     * @param ServiceResponseInformationInterface|null $responseInformation
     * @return ServiceResponseInterface
     */
    public function interpret(
        ServiceRequestInterface $request,
        mixed $response,
        ServiceResponseInformationInterface $responseInformation = null,
    ): ServiceResponseInterface {
        return $this->interpreter->interpret(
            $request,
            $this->makeRelativeNamespacesAbsolute($response),
            $responseInformation
        );
    }

    /**
     * Fixes namespaces (which must be absolute for anything to work).
     *
     * @param string $xml
     * @return string
     */
    protected function makeRelativeNamespacesAbsolute(string $xml): string
    {
        return preg_replace('#((xmlns(:[a-z]+)?)="((?!http)[^"]+)")#i', '\\2="http://\\4"', $xml);
    }
}


text:
/**
 * user controller
 * @return
 */
module.exports = Controller("User/BaseController", function(){
    "use strict";
    return {
        indexAction: function(){
            var self= this;
            sessionController(self, function(){
                console.log('cookie:\n', self.http.cookie)
                console.log('user index')
                return self.display();
            })
        },
        editinfoAction: function(){
            var self= this;
            console.log('edit:', self.http.cookie.userid)
            if(!!self.http.cookie.userid){
                var api_url = zyoAPI.user_detail+"&uid="+JSON.parse(self.http.cookie.userid);
                request(api_url, function(error, response, body){
                    console.log(api_url)
                    var res= JSON.parse(body)
                    if(res.code== 0){
                        self.end(res)
                    }
                })
            }
            else{
                self.end({"code":"1", "msg":"unlogin"})
            }
        },
        saveinfoAction: function(){
            var self= this;
            console.log('save:', self.http.cookie.userid)
            if(!!self.http.cookie.userid){
                //&uid=883270&userName=小姚&birthday=1999-09-09&city=上海&gender=1
                var api_url = zyoAPI.user_detail_save+"&uid="+JSON.parse(self.http.cookie.userid)+'&userName='+self.http.query.userName+'&birthday='+self.http.query.birthday+'&city='+self.http.query.city+'&gender='+self.http.query.gender;
                console.log(api_url)
                request(api_url, function(error, response, body){
                    var res= JSON.parse(body)
                    console.log(res)
                    if(res.code== 0){
                        self.end(res)
                    }
                })
            }
            else{
                self.end({"code":"1", "msg":"unlogin"})
            }
        },
    };
});


text:
#ifndef NATIVE_CLIENT_SRC_TRUSTED_GENERIC_CONTAINER_CONTAINER_LIST_H_
#define NATIVE_CLIENT_SRC_TRUSTED_GENERIC_CONTAINER_CONTAINER_LIST_H_

#include "native_client/src/include/nacl_base.h"
#include "native_client/src/include/portability.h"

#include "native_client/src/trusted/generic_container/container.h"

EXTERN_C_BEGIN

struct NaClItemList {
  struct NaClItemList *next;
  void                *datum; /* dynamically allocated, pod */
};

struct NaClContainerList {
  struct NaClContainer  base;
  struct NaClCmpFunctor *cmp_functor;
  struct NaClItemList   *head;
};

int NaClContainerListCtor(struct NaClContainerList  *clp,
                          struct NaClCmpFunctor     *cmp_functor);

int NaClContainerListInsert(struct NaClContainer  *base_pointer,
                            void              *obj);

struct NaClContainerIter *NaClContainerListFind(
    struct NaClContainer      *base_pointer,
    void                      *key,
    struct NaClContainerIter  *out);

void NaClContainerListDtor(struct NaClContainer  *vself);

struct NaClContainerListIter {
  struct NaClContainerIter    base;
  struct NaClItemList         **cur;
};

int NaClContainerListIterCtor(struct NaClContainer      *vself,
                              struct NaClContainerIter  *viter);

EXTERN_C_END

#endif /* NATIVE_CLIENT_SRC_TRUSTED_GENERIC_CONTAINER_CONTAINER_LIST_H_ */


text:
package cherry.goods.masker;

public abstract class StringMasker implements Masker<String> {

	public static StringMasker tail(String maskChar, int count) {
		return new TailImpl(maskChar, count);
	}

	public static StringMasker fixedTail(String maskChar, int count,
			int fixedLength) {
		return new FixedTailImpl(maskChar, count, fixedLength);
	}

	static class TailImpl extends StringMasker {

		private final String maskChar;

		private final int count;

		public TailImpl(String maskChar, int count) {
			this.maskChar = maskChar;
			this.count = count;
		}

		@Override
		public String mask(String value) {
			if (value == null) {
				return value;
			}
			StringBuilder s = new StringBuilder();
			for (int i = 0; i < value.length(); i++) {
				if (i < count) {
					s.append(value.charAt(i));
				} else {
					s.append(maskChar);
				}
			}
			return s.toString();
		}
	}

	static class FixedTailImpl extends StringMasker {

		private final String maskChar;

		private final int count;

		private final int fixedLength;

		public FixedTailImpl(String maskChar, int count, int fixedLength) {
			this.maskChar = maskChar;
			this.count = count;
			this.fixedLength = fixedLength;
		}

		@Override
		public String mask(String value) {
			if (value == null) {
				return value;
			}
			StringBuilder s = new StringBuilder();
			for (int i = 0; i < fixedLength; i++) {
				if (i < count && i < value.length()) {
					s.append(value.charAt(i));
				} else {
					s.append(maskChar);
				}
			}
			return s.toString();
		}
	}

}


text:
from uuulib.updaters import abstractupdater
from jnscommons import jnsos

_CMD = 'cygwin'
_OPT_NAME = 'cygwin_exe'

class CygwinUpdater(abstractupdater.AbstractUpdater):
    def add_help_argument(self, parser):
        parser.add_argument('--' + _CMD, action='store', default=None, metavar='setup_exe', dest=_OPT_NAME,
                            help="Specify the location of Cygwin's setup-x86.exe or setup-x86_64.exe")

    def get_config_command(self):
        return _CMD

    def update_opts_for_command(self, opts, ccmd):
        self.update_opts_set_file(ccmd, opts, _OPT_NAME)

    def validate_opts(self, opts):
        if opts.choco and not (opts.dry_run or jnsos.is_windows() or jnsos.is_cygwin()):
            raise NotCygwinOSError(
                'Can only update Cygwin packages when in Windows, in Cygwin, or performing a dry run.')

    def is_root_required(self, opts):
        return False

    def update(self, opts, runner):
        if opts.cygwin_exe:
            cmds = [[opts.cygwin_exe, '--quiet-mode', '--no-desktop']]
            runner.run(opts=opts, cmds=cmds, title='updating cygwin packages')

class NotCygwinOSError(Exception):
    pass


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Lambda2Js.Tests
{
    [TestClass]
    public class LinqMethodsTests
    {
        [TestMethod]
        public void LinqWhere1()
        {
            Expression<Func<string[], IEnumerable<string>>> expr = array => array.Where(x => x == "Miguel");

            var js = expr.CompileToJavascript(
                new JavascriptCompilationOptions(
                    JsCompilationFlags.BodyOnly | JsCompilationFlags.ScopeParameter,
                    new[] { new LinqMethods(), }));

            Assert.AreEqual("array.filter(function(x){return x===\"Miguel\";})", js);
        }

        [TestMethod]
        public void LinqSelect1()
        {
            Expression<Func<string[], IEnumerable<char>>> expr = array => array.Select(x => x[0]);

            var js = expr.CompileToJavascript(
                new JavascriptCompilationOptions(
                    JsCompilationFlags.BodyOnly | JsCompilationFlags.ScopeParameter,
                    new[] { new LinqMethods(), }));

            Assert.AreEqual("array.map(function(x){return x[0];})", js);
        }

        [TestMethod]
        public void LinqToArray1()
        {
            Expression<Func<string[], IEnumerable<string>>> expr = array => array.ToArray();

            var js = expr.CompileToJavascript(
                new JavascriptCompilationOptions(
                    JsCompilationFlags.BodyOnly | JsCompilationFlags.ScopeParameter,
                    new[] { new LinqMethods(), }));

            Assert.AreEqual("array.slice()", js);
        }

        [TestMethod]
        public void LinqToArrayEs6()
        {
            Expression<Func<string[], IEnumerable<string>>> expr = array => array.ToArray();

            var js = expr.Body.CompileToJavascript(
                new JavascriptCompilationOptions(
                    ScriptVersion.Es60,
                    new LinqMethods()));

            Assert.AreEqual("[...array]", js);
        }
    }
}


text:
<?php

/**
 * @see Zend_Mime_Decode
 */
require_once 'Zend/Mime/Decode.php';

/**
 * @see Zend_Mail_Part
 */
require_once 'Zend/Mail/Part.php';

/**
 * @category   Zend
 * @package    Zend_Mail
 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Mail_Part_File extends Zend_Mail_Part
{
    protected $_contentPos = array();
    protected $_partPos = array();
    protected $_fh;

    /**
     * Public constructor
     *
     * This handler supports the following params:
     * - file     filename or open file handler with message content (required)
     * - startPos start position of message or part in file (default: current position)
     * - endPos   end position of message or part in file (default: end of file)
     *
     * @param   array $params  full message with or without headers
     * @throws  Zend_Mail_Exception
     */
    public function __construct(array $params)
    {
        if (empty($params['file'])) {
            /**
             * @see Zend_Mail_Exception
             */
            require_once 'Zend/Mail/Exception.php';
            throw new Zend_Mail_Exception('no file given in params');
        }

        if (!is_resource($params['file'])) {
            $this->_fh = fopen($params['file'], 'r');
        } else {
            $this->_fh = $params['file'];
        }
        if (!$this->_fh) {
            /**
             * @see Zend_Mail_Exception
             */
            require_once 'Zend/Mail/Exception.php';
            throw new Zend_Mail_Exception('could not open file');
        }
        if (isset($params['startPos'])) {
            fseek($this->_fh, $params['startPos']);
        }
        $header = '';
        $endPos = isset($params['endPos']) ? $params['endPos'] : null;
        while (($endPos === null || ftell($this->_fh) < $endPos) && trim($line = fgets($this->_fh))) {
            $header .= $line;
        }

        Zend_Mime_Decode::splitMessage($header, $this->_headers, $null);

        $this->_contentPos[0] = ftell($this->_fh);
        if ($endPos !== null) {
            $this->_contentPos[1] = $endPos;
        } else {
            fseek($this->_fh, 0, SEEK_END);
            $this->_contentPos[1] = ftell($this->_fh);
        }
        if (!$this->isMultipart()) {
            return;
        }

        $boundary = $this->getHeaderField('content-type', 'boundary');
        if (!$boundary) {
            /**
             * @see Zend_Mail_Exception
             */
            require_once 'Zend/Mail/Exception.php';
            throw new Zend_Mail_Exception('no boundary found in content type to split message');
        }

        $part = array();
        $pos = $this->_contentPos[0];
        fseek($this->_fh, $pos);
        while (!feof($this->_fh) && ($endPos === null || $pos < $endPos)) {
            $line = fgets($this->_fh);
            if ($line === false) {
                if (feof($this->_fh)) {
                    break;
                }
                /**
                 * @see Zend_Mail_Exception
                 */
                require_once 'Zend/Mail/Exception.php';
                throw new Zend_Mail_Exception('error reading file');
            }

            $lastPos = $pos;
            $pos = ftell($this->_fh);
            $line = trim($line);

            if ($line == '--' . $boundary) {
                if ($part) {
                    // not first part
                    $part[1] = $lastPos;
                    $this->_partPos[] = $part;
                }
                $part = array($pos);
            } else if ($line == '--' . $boundary . '--') {
                $part[1] = $lastPos;
                $this->_partPos[] = $part;
                break;
            }
        }
        $this->_countParts = count($this->_partPos);

    }

    /**
     * Body of part
     *
     * If part is multipart the raw content of this part with all sub parts is returned
     *
     * @return string body
     * @throws Zend_Mail_Exception
     */
    public function getContent($stream = null)
    {
        fseek($this->_fh, $this->_contentPos[0]);
        if ($stream !== null) {
            return stream_copy_to_stream($this->_fh, $stream, $this->_contentPos[1] - $this->_contentPos[0]);
        }
        $length = $this->_contentPos[1] - $this->_contentPos[0];
        return $length < 1 ? '' : fread($this->_fh, $length);
    }

    /**
     * Return size of part
     *
     * Quite simple implemented currently (not decoding). Handle with care.
     *
     * @return int size
     */
    public function getSize() {
        return $this->_contentPos[1] - $this->_contentPos[0];
    }

    /**
     * Get part of multipart message
     *
     * @param  int $num number of part starting with 1 for first part
     * @return Zend_Mail_Part wanted part
     * @throws Zend_Mail_Exception
     */
    public function getPart($num)
    {
        --$num;
        if (!isset($this->_partPos[$num])) {
            /**
             * @see Zend_Mail_Exception
             */
            require_once 'Zend/Mail/Exception.php';
            throw new Zend_Mail_Exception('part not found');
        }

        return new self(array('file' => $this->_fh, 'startPos' => $this->_partPos[$num][0],
                              'endPos' => $this->_partPos[$num][1]));
    }
}


text:
                <md-whiteframe class="md-whiteframe-z1 dashboard-card-full " layout="column" data-ng-hide="collapseForm">

                    <md-content class="md-padding">
                        <form name="advertisementForm" data-ng-submit="create()" flex layout-fill class="std-text">

Create a New Ad

                                    <md-select placeholder="Select Ad Type" ng-model="advertisement.type">
                                        <md-option value="article">article</md-option>
                                        <md-option value="event">event</md-option>
                                        <md-option value="grabba">promotion</md-option>
                                      </md-select>

                                    <md-input-container flex>
                                        Title
                                        <input type="text" name="title" ng-model="advertisement.title" placeholder="Title">

                                    </md-input-container>

                                    <md-input-container flex>
                                        Description
                                        <input type="text" name="description" ng-model="advertisement.description" placeholder="Like a short description of what is the ad about">

                                    </md-input-container>

                                   <md-list>
                                      <md-item ng-repeat="spec in specifications">
                                        <md-item-content >

                                          <md-button data-ng-click="removeSpec(spec)" class="md-fab md-mini md-primary" aria-label="remove Specification" layout-margin>
                                                          <ng-md-icon icon="close" size="25" ng-attr-style="fill: {{fill}}"></ng-md-icon>
                                                    </md-button>

{{spec.key + ':' + ' '}}

 {{spec.value}}

                                        </md-item-content>
                                      </md-item>
                                    </md-list>

                                    <md-input-container flex>
                                        Enter a Specification Description
                                        <input type="text"  name="key" ng-model="specification.key" placeholder="Specification Description">

                                    </md-input-container>
                                    <md-input-container flex>
                                        Enter a Specification Value
                                        <input type="text"  name="key" ng-model="specification.value" placeholder="Specification Value">
                                    </md-input-container>

                                     <md-button class="md-warn md-raised md-hue-2" data-ng-click="pushSpec()">Add Specification</md-button>

                                   <md-list>
                                      <md-item ng-repeat="sponsor in selSponsors">
                                        <md-item-content >

{{Sponsor.name}}

                                        </md-item-content>
                                      </md-item>
                                    </md-list>

                                    <md-select ng-model="sponsor" md-on-open="loadSponsors()" style="min-width: 200px;">
                                      <md-select-label>{{ sponsor ? sponsor.name : 'Select Sponsor' }}</md-select-label>
                                      <md-option ng-value="sponsor" ng-repeat="sponsor in sponsors" ng-click="addSponsor(sponsor)">
                                      {{sponsor.name}}
                                      </md-option>
                                    </md-select>

{{ sponsor ? sponsor.name : 'No Sponsor Selected' }}

                                 <input type="file" ng-file-select ng-model="picFile" name="file" accept="image/*"
                                       ng-file-change="generateThumb(picFile[0], $files)" required>

                                    <md-progress-linear class="md-warn" md-mode="buffer" value="{{picFile[0].progress}}" md-buffer-value="0">
                                    </md-progress-linear>

                                        <md-button data-ng-click="uploadPic(picFile)" class="md-raised md-warn">Create new Promotion</md-button>

                        </form>
                    </md-content>
                </md-whiteframe>


text:
package com.cc.apptroy.baksmali.Adaptors.Format;

import com.cc.apptroy.baksmali.Adaptors.CommentingIndentingWriter;
import com.cc.apptroy.baksmali.Adaptors.LabelMethodItem;
import com.cc.apptroy.baksmali.Adaptors.MethodDefinition;
import com.cc.apptroy.baksmali.Renderers.IntegerRenderer;

import org.cc.dexlib2.iface.instruction.SwitchElement;
import org.cc.dexlib2.iface.instruction.formats.SparseSwitchPayload;
import org.cc.util.IndentingWriter;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class SparseSwitchMethodItem extends InstructionMethodItem<SparseSwitchPayload> {
    private final List<SparseSwitchTarget> targets;

    // Whether this sparse switch instruction should be commented out because it is never referenced
    private boolean commentedOut;

    public SparseSwitchMethodItem(MethodDefinition methodDef, int codeAddress, SparseSwitchPayload instruction) {
        super(methodDef, codeAddress, instruction);

        int baseCodeAddress = methodDef.getSparseSwitchBaseAddress(codeAddress);

        targets = new ArrayList<SparseSwitchTarget>();
        if (baseCodeAddress >= 0) {
            for (SwitchElement switchElement: instruction.getSwitchElements()) {
                LabelMethodItem label = methodDef.getLabelCache().internLabel(
                        new LabelMethodItem( methodDef.classDef.options, baseCodeAddress + switchElement.getOffset(),
                                "sswitch_"));
                targets.add(new SparseSwitchLabelTarget(switchElement.getKey(), label));
            }
        } else {
            commentedOut = true;
            //if we couldn't determine a base address, just use relative offsets rather than labels
            for (SwitchElement switchElement: instruction.getSwitchElements()) {
                targets.add(new SparseSwitchOffsetTarget(switchElement.getKey(), switchElement.getOffset()));
            }
        }
    }

    @Override
    public boolean writeTo(IndentingWriter writer) throws IOException {
        if (commentedOut) {
            writer = new CommentingIndentingWriter(writer);
        }

        writer.write(".sparse-switch\n");
        writer.indent(4);
        for (SparseSwitchTarget target: targets) {
            IntegerRenderer.writeTo(writer, target.getKey());
            writer.write(" -> ");
            target.writeTargetTo(writer);
            writeCommentIfResourceId(writer, target.getKey());
            writer.write('\n');
        }
        writer.deindent(4);
        writer.write(".end sparse-switch");
        return true;
    }

    private static abstract class SparseSwitchTarget {
        private final int key;
        public SparseSwitchTarget(int key) {
            this.key = key;
        }
        public int getKey() { return key; }
        public abstract void writeTargetTo(IndentingWriter writer) throws IOException;
    }

    private static class SparseSwitchLabelTarget extends SparseSwitchTarget {
        private final LabelMethodItem target;
        public SparseSwitchLabelTarget(int key, LabelMethodItem target) {
            super(key);
            this.target = target;
        }

        public void writeTargetTo(IndentingWriter writer) throws IOException {
            target.writeTo(writer);
        }
    }

    private static class SparseSwitchOffsetTarget extends SparseSwitchTarget {
        private final int target;
        public SparseSwitchOffsetTarget(int key, int target) {
            super(key);
            this.target = target;
        }

        public void writeTargetTo(IndentingWriter writer) throws IOException {
            if (target >= 0) {
                writer.write('+');
            }
            writer.printSignedIntAsDec(target);
        }
    }
}


text:
package ar.edu.unc.famaf.redditreader.backend;

import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;
import android.os.AsyncTask;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.List;

import ar.edu.unc.famaf.redditreader.model.Listing;
import ar.edu.unc.famaf.redditreader.model.PostModel;

public class GetTopPostsTask extends AsyncTask<RedditDBHelper, Void, List<PostModel>> {

    @Override
    protected List<PostModel> doInBackground(RedditDBHelper... redditDBHelpers) {

        InputStream input;
        RedditDBHelper dbreddit = redditDBHelpers[0];

        try {
            HttpURLConnection conn = (HttpURLConnection) new URL
                    ("https://www.reddit.com/top.json?limit=50").openConnection();
            conn.setRequestMethod("GET");
            input = conn.getInputStream();
            Parser parserJson = new Parser();
            Listing listing = parserJson.readJsonStream(input);
            if (listing != null) {
                SQLiteDatabase db = dbreddit.getWritableDatabase();
                dbreddit.onUpgrade(db, RedditDBHelper.VERSION, RedditDBHelper.VERSION);
                for (int i = 0; i < listing.getChildren().size(); i++) {
                    ContentValues values = new ContentValues();
                    values.put(dbreddit.POST_TABLE_TITLE, listing.getChildren().get(i).getTitle());
                    values.put(dbreddit.POST_TABLE_AUTHOR, listing.getChildren().get(i).getAuthor());
                    values.put(dbreddit.POST_TABLE_DATE, listing.getChildren().get(i).getDate());
                    values.put(dbreddit.POST_TABLE_COMMENTS, listing.getChildren().get(i).getComments());
                    values.put(dbreddit.POST_TABLE_URLSTRING, listing.getChildren().get(i).getUrlString());
                    long insertId = db.insert(dbreddit.POST_TABLE, null, values);

                }

                return listing.getChildren();

            } else {
                return null;
            }
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }

    }

}


text:
<form>

Reactive Angular - Wikipedia Example

  <input type="text" ng-model="search">
</form>

    {{ result }}


text:
vector<vector<int>> PathSumII::pathSum(TreeNode *root, int sum) {
    vector<vector<int>> res;
    vector<int> path;
    pathSum(root, path, sum, res);
    return res;
}

void PathSumII::pathSum(TreeNode *root, vector<int> &path, int sum,
                        vector<vector<int>> &res) {
    if (root == nullptr)
        return;

    path.push_back(root->val);

    if (root->val == sum && root->left == nullptr && root->right == nullptr)
        res.push_back(path);

    pathSum(root->left, path, sum - root->val, res);
    pathSum(root->right, path, sum - root->val, res);
    path.pop_back();
}


text:
package com.amazonaws.services.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.ModifyInstanceEventWindowRequestMarshaller;

/**
 *
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ModifyInstanceEventWindowRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
        DryRunSupportedRequest<ModifyInstanceEventWindowRequest> {

    /**
     *

     * The name of the event window.
     *

     */
    private String name;
    /**
     *

     * The ID of the event window.
     *

     */
    private String instanceEventWindowId;
    /**
     *

     * The time ranges of the event window.
     *

     */
    private com.amazonaws.internal.SdkInternalList<InstanceEventWindowTimeRangeRequest> timeRanges;
    /**
     *

     * The cron expression of the event window, for example, * 0-4,20-23 * * 1,5.
     *

     *

     * Constraints:
     *

     *

     *

     *

     * Only hour and day of the week values are supported.
     *

     *

     *

     *

     * For day of the week values, you can specify either integers 0 through 6, or alternative
     * single values SUN through SAT.
     *

     *

     *

     *

     * The minute, month, and year must be specified by *.
     *

     *

     *

     *

     * The hour value must be one or a multiple range, for example, 0-4 or 0-4,20-23.
     *

     *

     *

     *

     * Each hour range must be >= 2 hours, for example, 0-2 or 20-23.
     *

     *

     *

     *

     * The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours.
     *

     *

     *

     *

     * For more information about cron expressions, see cron on the
     * Wikipedia website.
     *

     */
    private String cronExpression;

    /**
     *

     * The name of the event window.
     *

     *
     * @param name
     *        The name of the event window.
     */

    public void setName(String name) {
        this.name = name;
    }

    /**
     *

     * The name of the event window.
     *

     *
     * @return The name of the event window.
     */

    public String getName() {
        return this.name;
    }

    /**
     *

     * The name of the event window.
     *

     *
     * @param name
     *        The name of the event window.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ModifyInstanceEventWindowRequest withName(String name) {
        setName(name);
        return this;
    }

    /**
     *

     * The ID of the event window.
     *

     *
     * @param instanceEventWindowId
     *        The ID of the event window.
     */

    public void setInstanceEventWindowId(String instanceEventWindowId) {
        this.instanceEventWindowId = instanceEventWindowId;
    }

    /**
     *

     * The ID of the event window.
     *

     *
     * @return The ID of the event window.
     */

    public String getInstanceEventWindowId() {
        return this.instanceEventWindowId;
    }

    /**
     *

     * The ID of the event window.
     *

     *
     * @param instanceEventWindowId
     *        The ID of the event window.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ModifyInstanceEventWindowRequest withInstanceEventWindowId(String instanceEventWindowId) {
        setInstanceEventWindowId(instanceEventWindowId);
        return this;
    }

    /**
     *

     * The time ranges of the event window.
     *

     *
     * @return The time ranges of the event window.
     */

    public java.util.List<InstanceEventWindowTimeRangeRequest> getTimeRanges() {
        if (timeRanges == null) {
            timeRanges = new com.amazonaws.internal.SdkInternalList<InstanceEventWindowTimeRangeRequest>();
        }
        return timeRanges;
    }

    /**
     *

     * The time ranges of the event window.
     *

     *
     * @param timeRanges
     *        The time ranges of the event window.
     */

    public void setTimeRanges(java.util.Collection<InstanceEventWindowTimeRangeRequest> timeRanges) {
        if (timeRanges == null) {
            this.timeRanges = null;
            return;
        }

        this.timeRanges = new com.amazonaws.internal.SdkInternalList<InstanceEventWindowTimeRangeRequest>(timeRanges);
    }

    /**
     *

     * The time ranges of the event window.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setTimeRanges(java.util.Collection)} or {@link #withTimeRanges(java.util.Collection)} if you want to
     * override the existing values.
     *

     *
     * @param timeRanges
     *        The time ranges of the event window.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ModifyInstanceEventWindowRequest withTimeRanges(InstanceEventWindowTimeRangeRequest... timeRanges) {
        if (this.timeRanges == null) {
            setTimeRanges(new com.amazonaws.internal.SdkInternalList<InstanceEventWindowTimeRangeRequest>(timeRanges.length));
        }
        for (InstanceEventWindowTimeRangeRequest ele : timeRanges) {
            this.timeRanges.add(ele);
        }
        return this;
    }

    /**
     *

     * The time ranges of the event window.
     *

     *
     * @param timeRanges
     *        The time ranges of the event window.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ModifyInstanceEventWindowRequest withTimeRanges(java.util.Collection<InstanceEventWindowTimeRangeRequest> timeRanges) {
        setTimeRanges(timeRanges);
        return this;
    }

    /**
     *

     * The cron expression of the event window, for example, * 0-4,20-23 * * 1,5.
     *

     *

     * Constraints:
     *

     *

     *

     *

     * Only hour and day of the week values are supported.
     *

     *

     *

     *

     * For day of the week values, you can specify either integers 0 through 6, or alternative
     * single values SUN through SAT.
     *

     *

     *

     *

     * The minute, month, and year must be specified by *.
     *

     *

     *

     *

     * The hour value must be one or a multiple range, for example, 0-4 or 0-4,20-23.
     *

     *

     *

     *

     * Each hour range must be >= 2 hours, for example, 0-2 or 20-23.
     *

     *

     *

     *

     * The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours.
     *

     *

     *

     *

     * For more information about cron expressions, see cron on the
     * Wikipedia website.
     *

     *
     * @param cronExpression
     *        The cron expression of the event window, for example, * 0-4,20-23 * * 1,5.

     *

     *        Constraints:
     *

     *

     *

     *

     *        Only hour and day of the week values are supported.
     *

     *

     *

     *

     *        For day of the week values, you can specify either integers 0 through 6, or
     *        alternative single values SUN through SAT.
     *

     *

     *

     *

     *        The minute, month, and year must be specified by *.
     *

     *

     *

     *

     *        The hour value must be one or a multiple range, for example, 0-4 or 0-4,20-23.
     *

     *

     *

     *

     *        Each hour range must be >= 2 hours, for example, 0-2 or 20-23.
     *

     *

     *

     *

     *        The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4
     *        hours.
     *

     *

     *

     *

     *        For more information about cron expressions, see cron on
     *        the Wikipedia website.
     */

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    /**
     *

     * The cron expression of the event window, for example, * 0-4,20-23 * * 1,5.
     *

     *

     * Constraints:
     *

     *

     *

     *

     * Only hour and day of the week values are supported.
     *

     *

     *

     *

     * For day of the week values, you can specify either integers 0 through 6, or alternative
     * single values SUN through SAT.
     *

     *

     *

     *

     * The minute, month, and year must be specified by *.
     *

     *

     *

     *

     * The hour value must be one or a multiple range, for example, 0-4 or 0-4,20-23.
     *

     *

     *

     *

     * Each hour range must be >= 2 hours, for example, 0-2 or 20-23.
     *

     *

     *

     *

     * The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours.
     *

     *

     *

     *

     * For more information about cron expressions, see cron on the
     * Wikipedia website.
     *

     *
     * @return The cron expression of the event window, for example, * 0-4,20-23 * * 1,5.

     *

     *         Constraints:
     *

     *

     *

     *

     *         Only hour and day of the week values are supported.
     *

     *

     *

     *

     *         For day of the week values, you can specify either integers 0 through 6, or
     *         alternative single values SUN through SAT.
     *

     *

     *

     *

     *         The minute, month, and year must be specified by *.
     *

     *

     *

     *

     *         The hour value must be one or a multiple range, for example, 0-4 or 0-4,20-23.
     *

     *

     *

     *

     *         Each hour range must be >= 2 hours, for example, 0-2 or 20-23.
     *

     *

     *

     *

     *         The event window must be >= 4 hours. The combined total time ranges in the event window must be >=
     *         4 hours.
     *

     *

     *

     *

     *         For more information about cron expressions, see cron on
     *         the Wikipedia website.
     */

    public String getCronExpression() {
        return this.cronExpression;
    }

    /**
     *

     * The cron expression of the event window, for example, * 0-4,20-23 * * 1,5.
     *

     *

     * Constraints:
     *

     *

     *

     *

     * Only hour and day of the week values are supported.
     *

     *

     *

     *

     * For day of the week values, you can specify either integers 0 through 6, or alternative
     * single values SUN through SAT.
     *

     *

     *

     *

     * The minute, month, and year must be specified by *.
     *

     *

     *

     *

     * The hour value must be one or a multiple range, for example, 0-4 or 0-4,20-23.
     *

     *

     *

     *

     * Each hour range must be >= 2 hours, for example, 0-2 or 20-23.
     *

     *

     *

     *

     * The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours.
     *

     *

     *

     *

     * For more information about cron expressions, see cron on the
     * Wikipedia website.
     *

     *
     * @param cronExpression
     *        The cron expression of the event window, for example, * 0-4,20-23 * * 1,5.

     *

     *        Constraints:
     *

     *

     *

     *

     *        Only hour and day of the week values are supported.
     *

     *

     *

     *

     *        For day of the week values, you can specify either integers 0 through 6, or
     *        alternative single values SUN through SAT.
     *

     *

     *

     *

     *        The minute, month, and year must be specified by *.
     *

     *

     *

     *

     *        The hour value must be one or a multiple range, for example, 0-4 or 0-4,20-23.
     *

     *

     *

     *

     *        Each hour range must be >= 2 hours, for example, 0-2 or 20-23.
     *

     *

     *

     *

     *        The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4
     *        hours.
     *

     *

     *

     *

     *        For more information about cron expressions, see cron on
     *        the Wikipedia website.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ModifyInstanceEventWindowRequest withCronExpression(String cronExpression) {
        setCronExpression(cronExpression);
        return this;
    }

    /**
     * This method is intended for internal use only. Returns the marshaled request configured with additional
     * parameters to enable operation dry-run.
     */
    @Override
    public Request<ModifyInstanceEventWindowRequest> getDryRunRequest() {
        Request<ModifyInstanceEventWindowRequest> request = new ModifyInstanceEventWindowRequestMarshaller().marshall(this);
        request.addParameter("DryRun", Boolean.toString(true));
        return request;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getName() != null)
            sb.append("Name: ").append(getName()).append(",");
        if (getInstanceEventWindowId() != null)
            sb.append("InstanceEventWindowId: ").append(getInstanceEventWindowId()).append(",");
        if (getTimeRanges() != null)
            sb.append("TimeRanges: ").append(getTimeRanges()).append(",");
        if (getCronExpression() != null)
            sb.append("CronExpression: ").append(getCronExpression());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof ModifyInstanceEventWindowRequest == false)
            return false;
        ModifyInstanceEventWindowRequest other = (ModifyInstanceEventWindowRequest) obj;
        if (other.getName() == null ^ this.getName() == null)
            return false;
        if (other.getName() != null && other.getName().equals(this.getName()) == false)
            return false;
        if (other.getInstanceEventWindowId() == null ^ this.getInstanceEventWindowId() == null)
            return false;
        if (other.getInstanceEventWindowId() != null && other.getInstanceEventWindowId().equals(this.getInstanceEventWindowId()) == false)
            return false;
        if (other.getTimeRanges() == null ^ this.getTimeRanges() == null)
            return false;
        if (other.getTimeRanges() != null && other.getTimeRanges().equals(this.getTimeRanges()) == false)
            return false;
        if (other.getCronExpression() == null ^ this.getCronExpression() == null)
            return false;
        if (other.getCronExpression() != null && other.getCronExpression().equals(this.getCronExpression()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
        hashCode = prime * hashCode + ((getInstanceEventWindowId() == null) ? 0 : getInstanceEventWindowId().hashCode());
        hashCode = prime * hashCode + ((getTimeRanges() == null) ? 0 : getTimeRanges().hashCode());
        hashCode = prime * hashCode + ((getCronExpression() == null) ? 0 : getCronExpression().hashCode());
        return hashCode;
    }

    @Override
    public ModifyInstanceEventWindowRequest clone() {
        return (ModifyInstanceEventWindowRequest) super.clone();
    }
}


text:
namespace NServiceBus.Transport.Kafka.Tests
{
    using System.Threading.Tasks;
    using Extensibility;
    using NUnit.Framework;
    using Transport;
    using Transport.Kafka.Tests;
    using System;
    using System.Linq;
    using System.Runtime.Serialization.Formatters.Binary;
    using System.IO;
    using System.Collections.Generic;
    using Routing;
    /*
    [TestFixture]
    class When_subscribed_to_a_event : KafkaContext
    {
        int TIMEOUT = 20;
        int MAXMESSAGES = 50;

       [Test]
        public async Task Should_receive_published_events_of_that_type()
        {
            base.SetUp(typeof(MyEvent));

            Publish<MyEvent>();

            var receivedMessages = ReceiveMessages(TIMEOUT, MAXMESSAGES);

            var typesReceived = receivedMessages.Select(s => s.Headers["NServiceBus.CorrelationId"]);
            TestContext.Out.WriteLine("messages received: " + string.Join(", ", typesReceived));

            Assert.IsTrue( receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(MyEvent).FullName));

        }

        [Test]
        public async Task Should_receive_the_event_if_subscribed_to_the_base_class()
        {
            base.SetUp(typeof(EventBase));
            Publish<SubEvent1>();
            Publish<SubEvent2>();

            var receivedMessages = ReceiveMessages(TIMEOUT, MAXMESSAGES);

            var typesReceived = receivedMessages.Select(s => s.Headers["NServiceBus.CorrelationId"]);
            TestContext.Out.WriteLine("messages received: "+string.Join(", ", typesReceived));

            Assert.IsTrue(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(SubEvent1).FullName));
            Assert.IsTrue(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(SubEvent2).FullName));
        }

        [Test]
        public async Task Should_not_receive_the_event_if_subscribed_to_the_specific_class()
        {
            base.SetUp(typeof(SubEvent1));

            Publish<EventBase>();

            var receivedMessages = ReceiveMessages(5, 5);

            var typesReceived = receivedMessages.Select(s => s.Headers["NServiceBus.CorrelationId"]);
            TestContext.Out.WriteLine("messages received: " + string.Join(", ", typesReceived));

            Assert.IsFalse(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(EventBase).FullName));
        }

        [Test]
        public async Task Should_receive_the_event_if_subscribed_to_the_base_interface()
        {
            base.SetUp(typeof(IMyEvent));

            Publish<MyEvent1>();
            Publish<MyEvent2>();

            var receivedMessages = ReceiveMessages(TIMEOUT, MAXMESSAGES);

            var typesReceived = receivedMessages.Select(s => s.Headers["NServiceBus.CorrelationId"]);
            TestContext.Out.WriteLine("messages received: " + string.Join(", ", typesReceived));

            Assert.IsTrue(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(MyEvent1).FullName));
            Assert.IsTrue(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(MyEvent2).FullName));

        }

        [Test]
        public async Task Should_not_receive_the_event_if_subscribed_to_specific_interface()
        {

            base.SetUp(typeof(MyEvent1));

            Publish<IMyEvent>();

            var receivedMessages = ReceiveMessages(10, 5);

            var typesReceived = receivedMessages.Select(s => s.Headers["NServiceBus.CorrelationId"]);
            TestContext.Out.WriteLine("messages received: " + string.Join(", ", typesReceived));

            Assert.IsFalse(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(IMyEvent).FullName));

        }

        [Test]
        public async Task Should_not_receive_events_of_other_types()
        {
            base.SetUp(typeof(MyEvent1));

            //publish a event that that this publisher isn't subscribed to
            Publish<MyOtherEvent>();
            Publish<MyEvent>();

            var receivedMessages = ReceiveMessages(TIMEOUT, MAXMESSAGES);

            var typesReceived = receivedMessages.Select(s => s.Headers["NServiceBus.CorrelationId"]);
            TestContext.Out.WriteLine("messages received: " + string.Join(", ", typesReceived));

            Assert.IsTrue(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(MyEvent).FullName));
            Assert.IsFalse(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(MyOtherEvent).FullName));

        }

        [Test]
        public async Task Subscribing_to_IEvent_should_subscribe_to_all_published_messages()
        {

            base.SetUp(typeof(IEvent));

            Publish<MyOtherEvent>();
            Publish<MyEvent>();

            var receivedMessages = ReceiveMessages(TIMEOUT, MAXMESSAGES);

            var typesReceived = receivedMessages.Select(s => s.Headers["NServiceBus.CorrelationId"]);
            TestContext.Out.WriteLine("messages received: " + string.Join(", ", typesReceived));

            Assert.IsTrue(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(MyOtherEvent).FullName));
            Assert.IsTrue(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(MyEvent).FullName));

        }

        [Test]
        public async Task Subscribing_to_Object_should_subscribe_to_all_published_messages()
        {
            base.SetUp(typeof(object));

            Publish<MyOtherEvent>();
            Publish<MyEvent>();

            var receivedMessages = ReceiveMessages(TIMEOUT, MAXMESSAGES);

            var typesReceived = receivedMessages.Select(s => s.Headers["NServiceBus.CorrelationId"]);
            TestContext.Out.WriteLine("messages received: " + string.Join(", ", typesReceived));

            Assert.IsTrue(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(MyOtherEvent).FullName));
            Assert.IsTrue(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(MyEvent).FullName));

        }

        [Test]
        public async Task Subscribing_to_a_class_implementing_a_interface_should_only_give_the_concrete_class()
        {
            base.SetUp(typeof(CombinedClassAndInterface));

            Publish<CombinedClassAndInterface>();
            Publish<IMyEvent>();

            var receivedMessages = ReceiveMessages(TIMEOUT, MAXMESSAGES);

            var typesReceived = receivedMessages.Select(s => s.Headers["NServiceBus.CorrelationId"]);
            TestContext.Out.WriteLine("messages received: " + string.Join(", ", typesReceived));

            Assert.IsTrue(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(CombinedClassAndInterface).FullName));
            Assert.IsFalse(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(IMyEvent).FullName));

        }

        [Test]
        public async Task Subscribing_to_a_interface_that_is_implemented_be_a_class_should_give_the_event_if_the_class_is_published()
        {
            base.SetUp(typeof(IMyEvent));

            Publish<CombinedClassAndInterface>();
            Publish<IMyEvent>();

            var receivedMessages = ReceiveMessages(TIMEOUT, MAXMESSAGES);

            var typesReceived = receivedMessages.Select(s => s.Headers["NServiceBus.CorrelationId"]);
            TestContext.Out.WriteLine("messages received: " + string.Join(", ", typesReceived));

            Assert.IsTrue(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(CombinedClassAndInterface).FullName));
            Assert.IsTrue(receivedMessages.Any(m => m.Headers["NServiceBus.CorrelationId"] == typeof(IMyEvent).FullName));
        }

        [Test]
        public async Task Should_not_receive_events_after_unsubscribing()
        {
            base.SetUp(typeof(MyEvent));
            // await Subscribe<MyEvent>();

            await subscriptionManager.Unsubscribe(typeof(MyEvent), new ContextBag());

            //publish a event that that this publisher isn't subscribed to
            Publish<MyEvent>();

        }

        Task Subscribe<T>() => subscriptionManager.Subscribe(typeof(T), new ContextBag());

        void Publish<T>() where T : class, new()
        {
            var type = typeof(T);
            var m = new T();

            var message = new OutgoingMessageBuilder().WithBody(ObjectToByteArray(m)).CorrelationId(type.FullName).PublishType(type).Build();

            messageDispatcher.Dispatch(message, new TransportTransaction(), new ContextBag()).Wait();

            //return Task.FromResult(0);
        }

        void AssertReceived<T>()
        {
            var receivedMessage = ReceiveMessage();

            AssertReceived<T>(receivedMessage.Result);
        }

        void AssertReceived<T>(IncomingMessage receivedEvent)
        {
            Assert.AreEqual(typeof(T).FullName, receivedEvent.Headers[Headers.CorrelationId]);
        }

        void AssertNoEventReceived()
        {
            var messageWasReceived = TryWaitForMessageReceipt();

            Assert.False(messageWasReceived);
        }

        byte[] ObjectToByteArray(object obj)
        {
            if (obj == null)
                return null;
            BinaryFormatter bf = new BinaryFormatter();
            using (MemoryStream ms = new MemoryStream())
            {
                bf.Serialize(ms, obj);
                return ms.ToArray();
            }
        }
    }

    [Serializable]
    public class MyOtherEvent : IMessage
    {
    }

    [Serializable]
    public class MyEvent : IMessage
    {
    }

    [Serializable]
    public class EventBase : IEvent
    {

    }

    [Serializable]
    public class SubEvent1 : EventBase
    {

    }

    [Serializable]
    public class SubEvent2 : EventBase
    {

    }

    [Serializable]
    public class IMyEvent : IEvent
    {

    }

    [Serializable]
    public class MyEvent1 : IMyEvent
    {

    }

    [Serializable]
    public class MyEvent2 : IMyEvent
    {

    }

    [Serializable]
    public class CombinedClassAndInterface : IMyEvent
    {

    }*/
}