text:
namespace face
{
    partial class Form1
    {
        /// <summary>
        /// 必需的设计器变量。
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows 窗体设计器生成的代码

        /// <summary>
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.textBoxpicturesource = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.textBoxcurrentimage = new System.Windows.Forms.TextBox();
            this.buttoncompare = new System.Windows.Forms.Button();
            this.richTextBox1 = new System.Windows.Forms.RichTextBox();
            this.pictureBoxsource = new System.Windows.Forms.PictureBox();
            this.pictureBoxcurrentimage = new System.Windows.Forms.PictureBox();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.comboBoxcameras = new System.Windows.Forms.ComboBox();
            this.buttoncameracapture = new System.Windows.Forms.Button();
            this.buttoncameraclose = new System.Windows.Forms.Button();
            this.buttoncamera = new System.Windows.Forms.Button();
            this.videoSourcePlayer = new AForge.Controls.VideoSourcePlayer();
            this.buttonchecksource = new System.Windows.Forms.Button();
            this.buttontrain = new System.Windows.Forms.Button();
            this.clear = new System.Windows.Forms.Button();
            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
            this.videoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.openToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.buttonswitchcamera = new System.Windows.Forms.Button();
            this.buttonstopcapture = new System.Windows.Forms.Button();
            this.dataGridView1 = new System.Windows.Forms.DataGridView();
            this.idColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.timeColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.viewColumn = new System.Windows.Forms.DataGridViewButtonColumn();
            this.buttonloadfaces = new System.Windows.Forms.Button();
            this.buttonclearfaces = new System.Windows.Forms.Button();
            this.axWindowsMediaPlayer1 = new AxWMPLib.AxWindowsMediaPlayer();
            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
            this.splitContainer2 = new System.Windows.Forms.SplitContainer();
            this.splitContainer3 = new System.Windows.Forms.SplitContainer();
            this.splitContainer4 = new System.Windows.Forms.SplitContainer();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBoxsource)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBoxcurrentimage)).BeginInit();
            this.groupBox1.SuspendLayout();
            this.menuStrip1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.axWindowsMediaPlayer1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
            this.splitContainer1.Panel1.SuspendLayout();
            this.splitContainer1.Panel2.SuspendLayout();
            this.splitContainer1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
            this.splitContainer2.Panel1.SuspendLayout();
            this.splitContainer2.Panel2.SuspendLayout();
            this.splitContainer2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
            this.splitContainer3.Panel1.SuspendLayout();
            this.splitContainer3.Panel2.SuspendLayout();
            this.splitContainer3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
            this.splitContainer4.Panel1.SuspendLayout();
            this.splitContainer4.Panel2.SuspendLayout();
            this.splitContainer4.SuspendLayout();
            this.SuspendLayout();
            //
            // textBoxpicturesource
            //
            this.textBoxpicturesource.Location = new System.Drawing.Point(119, 24);
            this.textBoxpicturesource.Name = "textBoxpicturesource";
            this.textBoxpicturesource.Size = new System.Drawing.Size(246, 21);
            this.textBoxpicturesource.TabIndex = 0;
            this.textBoxpicturesource.Text = "45";
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(35, 27);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(53, 12);
            this.label1.TabIndex = 1;
            this.label1.Text = "picture1";
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(35, 54);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(53, 12);
            this.label2.TabIndex = 3;
            this.label2.Text = "picture2";
            //
            // textBoxcurrentimage
            //
            this.textBoxcurrentimage.Location = new System.Drawing.Point(119, 51);
            this.textBoxcurrentimage.Name = "textBoxcurrentimage";
            this.textBoxcurrentimage.Size = new System.Drawing.Size(246, 21);
            this.textBoxcurrentimage.TabIndex = 2;
            this.textBoxcurrentimage.Text = "C:\\Emgu\\emgucv-windesktop 3.2.0.2682\\bin\\xiaosy3.jpg";
            this.textBoxcurrentimage.TextChanged += new System.EventHandler(this.textBoxcurrentimage_TextChanged);
            //
            // buttoncompare
            //
            this.buttoncompare.Location = new System.Drawing.Point(425, 54);
            this.buttoncompare.Name = "buttoncompare";
            this.buttoncompare.Size = new System.Drawing.Size(75, 23);
            this.buttoncompare.TabIndex = 4;
            this.buttoncompare.Text = "check";
            this.buttoncompare.UseVisualStyleBackColor = true;
            this.buttoncompare.Click += new System.EventHandler(this.buttoncompare_Click);
            //
            // richTextBox1
            //
            this.richTextBox1.Location = new System.Drawing.Point(779, 32);
            this.richTextBox1.Name = "richTextBox1";
            this.richTextBox1.Size = new System.Drawing.Size(220, 95);
            this.richTextBox1.TabIndex = 5;
            this.richTextBox1.Text = "";
            this.richTextBox1.TextChanged += new System.EventHandler(this.richTextBox1_TextChanged);
            //
            // pictureBoxsource
            //
            this.pictureBoxsource.Dock = System.Windows.Forms.DockStyle.Fill;
            this.pictureBoxsource.Location = new System.Drawing.Point(0, 0);
            this.pictureBoxsource.Name = "pictureBoxsource";
            this.pictureBoxsource.Size = new System.Drawing.Size(524, 312);
            this.pictureBoxsource.TabIndex = 6;
            this.pictureBoxsource.TabStop = false;
            //
            // pictureBoxcurrentimage
            //
            this.pictureBoxcurrentimage.Dock = System.Windows.Forms.DockStyle.Fill;
            this.pictureBoxcurrentimage.Location = new System.Drawing.Point(0, 0);
            this.pictureBoxcurrentimage.Name = "pictureBoxcurrentimage";
            this.pictureBoxcurrentimage.Size = new System.Drawing.Size(502, 312);
            this.pictureBoxcurrentimage.TabIndex = 7;
            this.pictureBoxcurrentimage.TabStop = false;
            //
            // groupBox1
            //
            this.groupBox1.Controls.Add(this.comboBoxcameras);
            this.groupBox1.Controls.Add(this.buttoncameracapture);
            this.groupBox1.Controls.Add(this.buttoncameraclose);
            this.groupBox1.Controls.Add(this.buttoncamera);
            this.groupBox1.Location = new System.Drawing.Point(779, 148);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(232, 154);
            this.groupBox1.TabIndex = 27;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "camera";
            //
            // comboBoxcameras
            //
            this.comboBoxcameras.FormattingEnabled = true;
            this.comboBoxcameras.Location = new System.Drawing.Point(39, 118);
            this.comboBoxcameras.Name = "comboBoxcameras";
            this.comboBoxcameras.Size = new System.Drawing.Size(175, 20);
            this.comboBoxcameras.TabIndex = 28;
            this.comboBoxcameras.SelectedIndexChanged += new System.EventHandler(this.comboBoxcameras_SelectedIndexChanged);
            //
            // buttoncameracapture
            //
            this.buttoncameracapture.Location = new System.Drawing.Point(39, 89);
            this.buttoncameracapture.Name = "buttoncameracapture";
            this.buttoncameracapture.Size = new System.Drawing.Size(136, 23);
            this.buttoncameracapture.TabIndex = 27;
            this.buttoncameracapture.Text = "capture";
            this.buttoncameracapture.UseVisualStyleBackColor = true;
            this.buttoncameracapture.Click += new System.EventHandler(this.buttoncameracapture_Click);
            //
            // buttoncameraclose
            //
            this.buttoncameraclose.Location = new System.Drawing.Point(39, 59);
            this.buttoncameraclose.Name = "buttoncameraclose";
            this.buttoncameraclose.Size = new System.Drawing.Size(136, 23);
            this.buttoncameraclose.TabIndex = 26;
            this.buttoncameraclose.Text = "close";
            this.buttoncameraclose.UseVisualStyleBackColor = true;
            this.buttoncameraclose.Click += new System.EventHandler(this.buttoncameraclose_Click);
            //
            // buttoncamera
            //
            this.buttoncamera.Location = new System.Drawing.Point(39, 25);
            this.buttoncamera.Name = "buttoncamera";
            this.buttoncamera.Size = new System.Drawing.Size(136, 23);
            this.buttoncamera.TabIndex = 25;
            this.buttoncamera.Text = "connect";
            this.buttoncamera.UseVisualStyleBackColor = true;
            this.buttoncamera.Click += new System.EventHandler(this.buttoncamera_Click);
            //
            // videoSourcePlayer
            //
            this.videoSourcePlayer.Location = new System.Drawing.Point(425, 3);
            this.videoSourcePlayer.Name = "videoSourcePlayer";
            this.videoSourcePlayer.Size = new System.Drawing.Size(298, 299);
            this.videoSourcePlayer.TabIndex = 10;
            this.videoSourcePlayer.Text = "videoSourcePlayer";
            this.videoSourcePlayer.VideoSource = null;
            //
            // buttonchecksource
            //
            this.buttonchecksource.Location = new System.Drawing.Point(381, 24);
            this.buttonchecksource.Name = "buttonchecksource";
            this.buttonchecksource.Size = new System.Drawing.Size(164, 23);
            this.buttonchecksource.TabIndex = 28;
            this.buttonchecksource.Text = "display source";
            this.buttonchecksource.UseVisualStyleBackColor = true;
            this.buttonchecksource.Click += new System.EventHandler(this.buttonchecksource_Click);
            //
            // buttontrain
            //
            this.buttontrain.Location = new System.Drawing.Point(425, 83);
            this.buttontrain.Name = "buttontrain";
            this.buttontrain.Size = new System.Drawing.Size(75, 23);
            this.buttontrain.TabIndex = 29;
            this.buttontrain.Text = "train";
            this.buttontrain.UseVisualStyleBackColor = true;
            this.buttontrain.Click += new System.EventHandler(this.buttontrain_Click);
            //
            // clear
            //
            this.clear.Location = new System.Drawing.Point(425, 112);
            this.clear.Name = "clear";
            this.clear.Size = new System.Drawing.Size(75, 23);
            this.clear.TabIndex = 30;
            this.clear.Text = "clear";
            this.clear.UseVisualStyleBackColor = true;
            this.clear.Click += new System.EventHandler(this.clear_Click);
            //
            // menuStrip1
            //
            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.videoToolStripMenuItem,
            this.openToolStripMenuItem});
            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Size = new System.Drawing.Size(1859, 25);
            this.menuStrip1.TabIndex = 32;
            this.menuStrip1.Text = "menuStrip1";
            this.menuStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.menuStrip1_ItemClicked);
            //
            // videoToolStripMenuItem
            //
            this.videoToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.openToolStripMenuItem1});
            this.videoToolStripMenuItem.Name = "videoToolStripMenuItem";
            this.videoToolStripMenuItem.Size = new System.Drawing.Size(52, 21);
            this.videoToolStripMenuItem.Text = "video";
            //
            // openToolStripMenuItem1
            //
            this.openToolStripMenuItem1.Name = "openToolStripMenuItem1";
            this.openToolStripMenuItem1.Size = new System.Drawing.Size(106, 22);
            this.openToolStripMenuItem1.Text = "open";
            this.openToolStripMenuItem1.Click += new System.EventHandler(this.openToolStripMenuItem1_Click);
            //
            // openToolStripMenuItem
            //
            this.openToolStripMenuItem.Name = "openToolStripMenuItem";
            this.openToolStripMenuItem.Size = new System.Drawing.Size(68, 21);
            this.openToolStripMenuItem.Text = "安全退出";
            this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click_1);
            //
            // buttonswitchcamera
            //
            this.buttonswitchcamera.Location = new System.Drawing.Point(37, 93);
            this.buttonswitchcamera.Name = "buttonswitchcamera";
            this.buttonswitchcamera.Size = new System.Drawing.Size(156, 23);
            this.buttonswitchcamera.TabIndex = 33;
            this.buttonswitchcamera.Text = "switch camera";
            this.buttonswitchcamera.UseVisualStyleBackColor = true;
            this.buttonswitchcamera.Click += new System.EventHandler(this.buttonswitchcamera_Click);
            //
            // buttonstopcapture
            //
            this.buttonstopcapture.Location = new System.Drawing.Point(37, 122);
            this.buttonstopcapture.Name = "buttonstopcapture";
            this.buttonstopcapture.Size = new System.Drawing.Size(156, 23);
            this.buttonstopcapture.TabIndex = 34;
            this.buttonstopcapture.Text = "stop capture";
            this.buttonstopcapture.UseVisualStyleBackColor = true;
            this.buttonstopcapture.Click += new System.EventHandler(this.buttonstopcapture_Click);
            //
            // dataGridView1
            //
            this.dataGridView1.AllowUserToAddRows = false;
            this.dataGridView1.AllowUserToOrderColumns = true;
            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.idColumn,
            this.timeColumn,
            this.viewColumn});
            this.dataGridView1.Location = new System.Drawing.Point(3, 3);
            this.dataGridView1.Name = "dataGridView1";
            this.dataGridView1.Size = new System.Drawing.Size(371, 302);
            this.dataGridView1.TabIndex = 35;
            this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
            //
            // idColumn
            //
            this.idColumn.HeaderText = "ID";
            this.idColumn.Name = "idColumn";
            this.idColumn.ReadOnly = true;
            //
            // timeColumn
            //
            this.timeColumn.HeaderText = "Time Stamp";
            this.timeColumn.Name = "timeColumn";
            this.timeColumn.ReadOnly = true;
            //
            // viewColumn
            //
            this.viewColumn.HeaderText = "View";
            this.viewColumn.Name = "viewColumn";
            this.viewColumn.Text = "";
            //
            // buttonloadfaces
            //
            this.buttonloadfaces.Location = new System.Drawing.Point(235, 122);
            this.buttonloadfaces.Name = "buttonloadfaces";
            this.buttonloadfaces.Size = new System.Drawing.Size(130, 23);
            this.buttonloadfaces.TabIndex = 36;
            this.buttonloadfaces.Text = "load faces";
            this.buttonloadfaces.UseVisualStyleBackColor = true;
            this.buttonloadfaces.Click += new System.EventHandler(this.buttonloadfaces_Click);
            //
            // buttonclearfaces
            //
            this.buttonclearfaces.Location = new System.Drawing.Point(235, 93);
            this.buttonclearfaces.Name = "buttonclearfaces";
            this.buttonclearfaces.Size = new System.Drawing.Size(130, 23);
            this.buttonclearfaces.TabIndex = 37;
            this.buttonclearfaces.Text = "clear faces";
            this.buttonclearfaces.UseVisualStyleBackColor = true;
            this.buttonclearfaces.Click += new System.EventHandler(this.buttonclearfaces_Click);
            //
            // axWindowsMediaPlayer1
            //
            this.axWindowsMediaPlayer1.Enabled = true;
            this.axWindowsMediaPlayer1.Location = new System.Drawing.Point(97, 145);
            this.axWindowsMediaPlayer1.Name = "axWindowsMediaPlayer1";
            this.axWindowsMediaPlayer1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWindowsMediaPlayer1.OcxState")));
            this.axWindowsMediaPlayer1.Size = new System.Drawing.Size(441, 402);
            this.axWindowsMediaPlayer1.TabIndex = 31;
            //
            // splitContainer1
            //
            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer1.Location = new System.Drawing.Point(0, 25);
            this.splitContainer1.Name = "splitContainer1";
            //
            // splitContainer1.Panel1
            //
            this.splitContainer1.Panel1.Controls.Add(this.axWindowsMediaPlayer1);
            this.splitContainer1.Panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.splitContainer1_Panel1_Paint);
            //
            // splitContainer1.Panel2
            //
            this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
            this.splitContainer1.Size = new System.Drawing.Size(1859, 851);
            this.splitContainer1.SplitterDistance = 825;
            this.splitContainer1.TabIndex = 38;
            //
            // splitContainer2
            //
            this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer2.Location = new System.Drawing.Point(0, 0);
            this.splitContainer2.Name = "splitContainer2";
            this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
            //
            // splitContainer2.Panel1
            //
            this.splitContainer2.Panel1.Controls.Add(this.splitContainer3);
            //
            // splitContainer2.Panel2
            //
            this.splitContainer2.Panel2.Controls.Add(this.dataGridView1);
            this.splitContainer2.Panel2.Controls.Add(this.richTextBox1);
            this.splitContainer2.Panel2.Controls.Add(this.groupBox1);
            this.splitContainer2.Panel2.Controls.Add(this.videoSourcePlayer);
            this.splitContainer2.Size = new System.Drawing.Size(1030, 851);
            this.splitContainer2.SplitterDistance = 518;
            this.splitContainer2.TabIndex = 0;
            //
            // splitContainer3
            //
            this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer3.Location = new System.Drawing.Point(0, 0);
            this.splitContainer3.Name = "splitContainer3";
            this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
            //
            // splitContainer3.Panel1
            //
            this.splitContainer3.Panel1.Controls.Add(this.clear);
            this.splitContainer3.Panel1.Controls.Add(this.buttonclearfaces);
            this.splitContainer3.Panel1.Controls.Add(this.textBoxpicturesource);
            this.splitContainer3.Panel1.Controls.Add(this.buttonloadfaces);
            this.splitContainer3.Panel1.Controls.Add(this.label1);
            this.splitContainer3.Panel1.Controls.Add(this.textBoxcurrentimage);
            this.splitContainer3.Panel1.Controls.Add(this.buttonstopcapture);
            this.splitContainer3.Panel1.Controls.Add(this.label2);
            this.splitContainer3.Panel1.Controls.Add(this.buttonswitchcamera);
            this.splitContainer3.Panel1.Controls.Add(this.buttoncompare);
            this.splitContainer3.Panel1.Controls.Add(this.buttonchecksource);
            this.splitContainer3.Panel1.Controls.Add(this.buttontrain);
            //
            // splitContainer3.Panel2
            //
            this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
            this.splitContainer3.Size = new System.Drawing.Size(1030, 518);
            this.splitContainer3.SplitterDistance = 202;
            this.splitContainer3.TabIndex = 0;
            //
            // splitContainer4
            //
            this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer4.Location = new System.Drawing.Point(0, 0);
            this.splitContainer4.Name = "splitContainer4";
            //
            // splitContainer4.Panel1
            //
            this.splitContainer4.Panel1.Controls.Add(this.pictureBoxcurrentimage);
            //
            // splitContainer4.Panel2
            //
            this.splitContainer4.Panel2.Controls.Add(this.pictureBoxsource);
            this.splitContainer4.Size = new System.Drawing.Size(1030, 312);
            this.splitContainer4.SplitterDistance = 502;
            this.splitContainer4.TabIndex = 0;
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.AutoSize = true;
            this.ClientSize = new System.Drawing.Size(1859, 876);
            this.ControlBox = false;
            this.Controls.Add(this.splitContainer1);
            this.Controls.Add(this.menuStrip1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
            this.MainMenuStrip = this.menuStrip1;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "Form1";
            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
            this.Text = "满分学习";
            this.TopMost = true;
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBoxsource)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBoxcurrentimage)).EndInit();
            this.groupBox1.ResumeLayout(false);
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.axWindowsMediaPlayer1)).EndInit();
            this.splitContainer1.Panel1.ResumeLayout(false);
            this.splitContainer1.Panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
            this.splitContainer1.ResumeLayout(false);
            this.splitContainer2.Panel1.ResumeLayout(false);
            this.splitContainer2.Panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
            this.splitContainer2.ResumeLayout(false);
            this.splitContainer3.Panel1.ResumeLayout(false);
            this.splitContainer3.Panel1.PerformLayout();
            this.splitContainer3.Panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
            this.splitContainer3.ResumeLayout(false);
            this.splitContainer4.Panel1.ResumeLayout(false);
            this.splitContainer4.Panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
            this.splitContainer4.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.TextBox textBoxpicturesource;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.TextBox textBoxcurrentimage;
        private System.Windows.Forms.Button buttoncompare;
        private System.Windows.Forms.RichTextBox richTextBox1;
        private System.Windows.Forms.PictureBox pictureBoxsource;
        private System.Windows.Forms.PictureBox pictureBoxcurrentimage;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.ComboBox comboBoxcameras;
        private System.Windows.Forms.Button buttoncameracapture;
        private System.Windows.Forms.Button buttoncameraclose;
        private System.Windows.Forms.Button buttoncamera;
        private AForge.Controls.VideoSourcePlayer videoSourcePlayer;
        private System.Windows.Forms.Button buttonchecksource;
        private System.Windows.Forms.Button buttontrain;
        private System.Windows.Forms.Button clear;
        private AxWMPLib.AxWindowsMediaPlayer axWindowsMediaPlayer1;
        private System.Windows.Forms.MenuStrip menuStrip1;
        private System.Windows.Forms.ToolStripMenuItem videoToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem1;
        private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
        private System.Windows.Forms.Button buttonswitchcamera;
        private System.Windows.Forms.Button buttonstopcapture;
        private System.Windows.Forms.DataGridView dataGridView1;
        private System.Windows.Forms.DataGridViewTextBoxColumn idColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn timeColumn;
        private System.Windows.Forms.DataGridViewButtonColumn viewColumn;
        private System.Windows.Forms.Button buttonloadfaces;
        private System.Windows.Forms.Button buttonclearfaces;
        private System.Windows.Forms.SplitContainer splitContainer1;
        private System.Windows.Forms.SplitContainer splitContainer2;
        private System.Windows.Forms.SplitContainer splitContainer3;
        private System.Windows.Forms.SplitContainer splitContainer4;
    }
}


text:
package fv_test

import (
	"context"
	"fmt"
	"os"
	"strings"
	"time"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	api "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
	"github.com/projectcalico/felix/fv/connectivity"
	"github.com/projectcalico/felix/fv/infrastructure"
	"github.com/projectcalico/felix/fv/utils"
	"github.com/projectcalico/felix/fv/workload"
	"github.com/projectcalico/felix/rules"
	"github.com/projectcalico/libcalico-go/lib/apiconfig"
	client "github.com/projectcalico/libcalico-go/lib/clientv3"
	"github.com/projectcalico/libcalico-go/lib/options"
)

var _ = infrastructure.DatastoreDescribe("_BPF-SAFE_ apply on forward tests; with 2 nodes", []apiconfig.DatastoreType{apiconfig.EtcdV3, apiconfig.Kubernetes}, func(getInfra infrastructure.InfraFactory) {

	var (
		bpfEnabled = os.Getenv("FELIX_FV_ENABLE_BPF") == "true"
		infra      infrastructure.DatastoreInfra
		felixes    []*infrastructure.Felix
		client     client.Interface
		w          [2]*workload.Workload
		hostW      [2]*workload.Workload
		cc         *connectivity.Checker
	)

	BeforeEach(func() {
		infra = getInfra()

		options := infrastructure.DefaultTopologyOptions()
		options.IPIPEnabled = false
		felixes, client = infrastructure.StartNNodeTopology(2, options, infra)

		// Install a default profile that allows all ingress and egress, in the absence of any Policy.
		infra.AddDefaultAllow()

		// Create workloads, using that profile.  One on each "host".
		for ii := range w {
			wIP := fmt.Sprintf("10.65.%d.2", ii)
			wName := fmt.Sprintf("w%d", ii)
			w[ii] = workload.Run(felixes[ii], wName, "default", wIP, "8055", "tcp")
			w[ii].ConfigureInInfra(infra)

			hostW[ii] = workload.Run(felixes[ii], fmt.Sprintf("host%d", ii), "", felixes[ii].IP, "8055", "tcp")
		}

		cc = &connectivity.Checker{}
	})

	AfterEach(func() {
		if CurrentGinkgoTestDescription().Failed {
			for _, felix := range felixes {
				felix.Exec("iptables-save", "-c")
				felix.Exec("ipset", "list")
				felix.Exec("ip", "r")
				felix.Exec("ip", "a")
			}
		}

		for _, wl := range w {
			wl.Stop()
		}
		for _, wl := range hostW {
			wl.Stop()
		}
		for _, felix := range felixes {
			felix.Stop()
		}

		if CurrentGinkgoTestDescription().Failed {
			infra.DumpErrorData()
		}
		infra.Stop()
	})

	itShouldHaveWorkloadToWorkloadAndHostConnectivity := func() {
		It("should have workload to workload/host connectivity", func() {
			cc.ExpectSome(w[0], w[1])
			cc.ExpectSome(w[1], w[0])
			cc.ExpectSome(w[0], hostW[1])
			cc.ExpectSome(w[1], hostW[0])
			cc.CheckConnectivity()
		})
	}

	itShouldHaveWorkloadToWorkloadAndHostConnectivity()

	addAllowAllToHostEndpoints := func() {
		policy := api.NewGlobalNetworkPolicy()
		policy.Name = "default-allow"
		policy.Spec.Selector = "host-endpoint=='true'"
		policy.Spec.Egress = []api.Rule{{Action: api.Allow}}
		policy.Spec.Ingress = []api.Rule{{Action: api.Allow}}
		_, err := client.GlobalNetworkPolicies().Create(utils.Ctx, policy, utils.NoOptions)
		Expect(err).NotTo(HaveOccurred())
	}

	// The following tests verify that a HostEndpoint does not block forwarded traffic
	// when there is no applyOnForward policy that applies to that HostEndpoint.  We
	// create a HostEndpoint two hosts (A and B) and then test two cases:
	//
	// 1. Workload on host A -> Workload on host B.  In this case, the traffic is
	// forwarded on both hosts.
	//
	// 2. Workload on host A -> Local process on host B.  In this case, the traffic is
	// forwarded on host A, but _not_ on host B.
	//
	// For case (2), in order to allow the traffic to be received on host B, we have
	// to configure an Allow policy that applies to the endpoint there.  But note that
	// this is _not_ an applyOnForward policy, so it is still the case that there is
	// no applyOnForward policy that applies to the HostEndpoints.
	//
	Context("with host endpoints defined", func() {
		var (
			ctx    context.Context
			cancel context.CancelFunc
		)

		Context("with named host endpoints on eth0", func() {
			BeforeEach(func() {
				addAllowAllToHostEndpoints()

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

				for _, f := range felixes {
					hep := api.NewHostEndpoint()
					hep.Name = "eth0-" + f.Name
					hep.Labels = map[string]string{
						"name":          hep.Name,
						"host-endpoint": "true",
					}
					hep.Spec.Node = f.Hostname
					hep.Spec.ExpectedIPs = []string{f.IP}
					_, err := client.HostEndpoints().Create(ctx, hep, options.SetOptions{})
					Expect(err).NotTo(HaveOccurred())

					// Wait for felix to see and program that host endpoint.
					hostEndpointProgrammed := func() bool {
						if bpfEnabled {
							return f.NumTCBPFProgsEth0() == 2
						} else {
							out, err := f.ExecOutput("iptables-save", "-t", "filter")
							Expect(err).NotTo(HaveOccurred())
							return (strings.Count(out, "cali-thfw-eth0") > 0)
						}
					}
					Eventually(hostEndpointProgrammed, "10s", "1s").Should(BeTrue(),
						"Expected HostEndpoint iptables rules to appear")
				}
			})

			itShouldHaveWorkloadToWorkloadAndHostConnectivity()
		})

		Context("with all-interfaces host endpoints", func() {
			BeforeEach(func() {
				addAllowAllToHostEndpoints()

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

				for _, f := range felixes {
					hep := api.NewHostEndpoint()
					hep.Name = "all-interfaces-" + f.Name
					hep.Labels = map[string]string{
						"name":          hep.Name,
						"host-endpoint": "true",
					}
					hep.Spec.Node = f.Hostname
					hep.Spec.InterfaceName = "*"
					hep.Spec.ExpectedIPs = []string{f.IP}
					_, err := client.HostEndpoints().Create(ctx, hep, options.SetOptions{})
					Expect(err).NotTo(HaveOccurred())

					// Wait for felix to see and program that host endpoint.
					hostEndpointProgrammed := func() bool {
						if bpfEnabled {
							return f.NumTCBPFProgsEth0() == 2
						} else {
							out, err := f.ExecOutput("iptables-save", "-t", "filter")
							Expect(err).NotTo(HaveOccurred())
							expectedName := rules.EndpointChainName("cali-thfw-", "any-interface-at-all")
							return (strings.Count(out, expectedName) > 0)
						}
					}
					Eventually(hostEndpointProgrammed, "10s", "1s").Should(BeTrue(),
						"Expected HostEndpoint iptables rules to appear")
				}
			})

			itShouldHaveWorkloadToWorkloadAndHostConnectivity()
		})
	})
})

redpajama_set_name: RedPajamaGithub


text:
describe "Policies API" do
  let(:zone)        { FactoryGirl.create(:zone, :name => "api_zone") }
  let(:miq_server)  { FactoryGirl.create(:miq_server, :guid => miq_server_guid, :zone => zone) }
  let(:ems)         { FactoryGirl.create(:ems_vmware, :zone => zone) }
  let(:host)        { FactoryGirl.create(:host) }

  let(:p1)          { FactoryGirl.create(:miq_policy, :description => "Policy 1") }
  let(:p2)          { FactoryGirl.create(:miq_policy, :description => "Policy 2") }
  let(:p3)          { FactoryGirl.create(:miq_policy, :description => "Policy 3") }

  let(:ps1)         { FactoryGirl.create(:miq_policy_set, :description => "Policy Set 1") }
  let(:ps2)         { FactoryGirl.create(:miq_policy_set, :description => "Policy Set 2") }

  let(:p_guids)     { [p1.guid, p2.guid] }
  let(:p_all_guids) { [p1.guid, p2.guid, p3.guid] }

  before do
    # Creating:  policy_set_1 = [policy_1, policy_2]  and  policy_set_2 = [policy_3]
    ps1.add_member(p1)
    ps1.add_member(p2)

    ps2.add_member(p3)
  end

  def test_no_policy_query(object_policies_url)
    api_basic_authorize

    run_get object_policies_url

    expect_empty_query_result(:policies)
  end

  def test_no_policy_profile_query(object_policy_profiles_url)
    api_basic_authorize

    run_get object_policy_profiles_url

    expect_empty_query_result(:policy_profiles)
  end

  def test_single_policy_query(object, object_policies_url)
    api_basic_authorize

    object.add_policy(p1)
    object.add_policy(ps2)

    run_get object_policies_url, :expand => "resources"

    expect_query_result(:policies, 1)
    expect_result_resources_to_match_hash([{"name" => p1.name, "description" => p1.description, "guid" => p1.guid}])
  end

  def test_multiple_policy_query(object, object_policies_url)
    api_basic_authorize

    object.add_policy(p1)
    object.add_policy(p2)
    object.add_policy(ps2)

    run_get object_policies_url, :expand => "resources"

    expect_query_result(:policies, 2)
    expect_result_resources_to_include_data("resources", "guid" => p_guids)
  end

  def test_policy_profile_query(object, object_policy_profiles_url)
    api_basic_authorize

    object.add_policy(p1)
    object.add_policy(ps2)

    run_get object_policy_profiles_url, :expand => "resources"

    expect_query_result(:policy_profiles, 1)
    expect_result_resources_to_include_data("resources", "guid" => Array.wrap(ps2.guid))
  end

  context "Policy collection" do
    it "query invalid policy" do
      api_basic_authorize action_identifier(:policies, :read, :resource_actions, :get)

      run_get policies_url(999_999)

      expect(response).to have_http_status(:not_found)
    end

    it "query policies" do
      api_basic_authorize collection_action_identifier(:policies, :read, :get)

      run_get policies_url

      expect_query_result(:policies, 3, 3)
      expect_result_resources_to_include_hrefs("resources",
                                               [policies_url(p1.id), policies_url(p2.id), policies_url(p3.id)])
    end

    it "query policies in expanded form" do
      api_basic_authorize collection_action_identifier(:policies, :read, :get)

      run_get policies_url, :expand => "resources"

      expect_query_result(:policies, 3, 3)
      expect_result_resources_to_include_data("resources", "guid" => p_all_guids)
    end
  end

  context "Policy Profile collection" do
    let(:policy_profile)     { ps1 }
    let(:policy_profile_url) { policy_profiles_url(policy_profile.id) }

    it "query invalid policy profile" do
      api_basic_authorize action_identifier(:policy_profiles, :read, :resource_actions, :get)

      run_get policy_profiles_url(999_999)

      expect(response).to have_http_status(:not_found)
    end

    it "query Policy Profiles" do
      api_basic_authorize collection_action_identifier(:policy_profiles, :read, :get)

      run_get policy_profiles_url

      expect_query_result(:policy_profiles, 2, 2)
      expect_result_resources_to_include_hrefs("resources",
                                               [policy_profiles_url(ps1.id), policy_profiles_url(ps2.id)])
    end

    it "query individual Policy Profile" do
      api_basic_authorize action_identifier(:policy_profiles, :read, :resource_actions, :get)

      run_get policy_profile_url

      expect_single_resource_query(
        "name" => policy_profile.name, "description" => policy_profile.description, "guid" => policy_profile.guid
      )
    end

    it "query Policy Profile policies subcollection" do
      api_basic_authorize

      run_get "#{policy_profile_url}/policies", :expand => "resources"

      expect_query_result(:policies, p_guids.count)
      expect_result_resources_to_include_data("resources", "guid" => p_guids)
    end

    it "query Policy Profile with expanded policies subcollection" do
      api_basic_authorize action_identifier(:policy_profiles, :read, :resource_actions, :get)

      run_get policy_profile_url, :expand => "policies"

      expect_single_resource_query(
        "name" => policy_profile.name, "description" => policy_profile.description, "guid" => policy_profile.guid
      )
      expect_result_resources_to_include_data("policies", "guid" => p_guids)
    end
  end

  context "Provider policies subcollection" do
    let(:provider) { ems }

    let(:provider_url)                 { providers_url(provider.id) }
    let(:provider_policies_url)        { "#{provider_url}/policies" }
    let(:provider_policy_profiles_url) { "#{provider_url}/policy_profiles" }

    it "query Provider policies with no policies defined" do
      test_no_policy_query(provider_policies_url)
    end

    it "query Provider policy profiles with no policy profiles defined" do
      test_no_policy_profile_query(provider_policy_profiles_url)
    end

    it "query Provider policies with one policy defined" do
      test_single_policy_query(provider, provider_policies_url)
    end

    it "query Provider policies with multiple policies defined" do
      test_multiple_policy_query(provider, provider_policies_url)
    end

    it "query Provider policy profiles" do
      test_policy_profile_query(provider, provider_policy_profiles_url)
    end
  end

  context "Host policies subcollection" do
    let(:host_url)                  { hosts_url(host.id) }
    let(:host_policies_url)         { "#{host_url}/policies" }
    let(:host_policy_profiles_url)  { "#{host_url}/policy_profiles" }

    it "query Host policies with no policies defined" do
      test_no_policy_query(host_policies_url)
    end

    it "query Host policy profiles with no policy profiles defined" do
      test_no_policy_profile_query(host_policy_profiles_url)
    end

    it "query Host policies with one policy defined" do
      test_single_policy_query(host, host_policies_url)
    end

    it "query Host policies with multiple policies defined" do
      test_multiple_policy_query(host, host_policies_url)
    end

    it "query Host policy profiles" do
      test_policy_profile_query(host, host_policy_profiles_url)
    end
  end

  context "Resource Pool policies subcollection" do
    let(:rp) { FactoryGirl.create(:resource_pool, :name => "Resource Pool 1") }

    let(:rp_url)                  { resource_pools_url(rp.id) }
    let(:rp_policies_url)         { "#{rp_url}/policies" }
    let(:rp_policy_profiles_url)  { "#{rp_url}/policy_profiles" }

    it "query Resource Pool policies with no policies defined" do
      test_no_policy_query(rp_policies_url)
    end

    it "query Resource Pool policy profiles with no policy profiles defined" do
      test_no_policy_profile_query(rp_policy_profiles_url)
    end

    it "query Resource Pool policies with one policy defined" do
      test_single_policy_query(rp, rp_policies_url)
    end

    it "query Resource Pool policies with multiple policies defined" do
      test_multiple_policy_query(rp, rp_policies_url)
    end

    it "query Resource Pool policy profiles" do
      test_policy_profile_query(rp, rp_policy_profiles_url)
    end
  end

  context "Cluster policies subcollection" do
    let(:cluster) do
      FactoryGirl.create(:ems_cluster,
                         :name => "Cluster 1", :ext_management_system => ems, :hosts => [host], :vms => [])
    end

    let(:cluster_url)                 { clusters_url(cluster.id) }
    let(:cluster_policies_url)        { "#{cluster_url}/policies" }
    let(:cluster_policy_profiles_url) { "#{cluster_url}/policy_profiles" }

    it "query Cluster policies with no policies defined" do
      test_no_policy_query(cluster_policies_url)
    end

    it "query Cluster policy profiles with no policy profiles defined" do
      test_no_policy_profile_query(cluster_policy_profiles_url)
    end

    it "query Cluster policies with one policy defined" do
      test_single_policy_query(cluster, cluster_policies_url)
    end

    it "query Cluster policies with multiple policies defined" do
      test_multiple_policy_query(cluster, cluster_policies_url)
    end

    it "query Cluster policy profiles" do
      test_policy_profile_query(cluster, cluster_policy_profiles_url)
    end
  end

  context "Vms policies subcollection" do
    let(:vm)  { FactoryGirl.create(:vm) }

    let(:vm_url)                  { vms_url(vm.id) }
    let(:vm_policies_url)         { "#{vm_url}/policies" }
    let(:vm_policy_profiles_url)  { "#{vm_url}/policy_profiles" }

    it "query Vm policies with no policies defined" do
      test_no_policy_query(vm_policies_url)
    end

    it "query Vm policy profiles with no policy profiles defined" do
      test_no_policy_profile_query(vm_policy_profiles_url)
    end

    it "query Vm policies with one policy defined" do
      test_single_policy_query(vm, vm_policies_url)
    end

    it "query Vm policies with multiple policies defined" do
      test_multiple_policy_query(vm, vm_policies_url)
    end

    it "query Vm policy profiles" do
      test_policy_profile_query(vm, vm_policy_profiles_url)
    end
  end

  context "Template policies subcollection" do
    let(:template)  do
      FactoryGirl.create(:miq_template,
                         :name => "Template 1", :vendor => "vmware", :location => "template_1.vmtx")
    end

    let(:template_url)                  { templates_url(template.id) }
    let(:template_policies_url)         { "#{template_url}/policies" }
    let(:template_policy_profiles_url)  { "#{template_url}/policy_profiles" }

    it "query Template policies with no policies defined" do
      test_no_policy_query(template_policies_url)
    end

    it "query Template policy profiles with no policy profiles defined" do
      test_no_policy_profile_query(template_policy_profiles_url)
    end

    it "query Template policies with one policy defined" do
      test_single_policy_query(template, template_policies_url)
    end

    it "query Template policies with multiple policies defined" do
      test_multiple_policy_query(template, template_policies_url)
    end

    it "query Template policy profile" do
      test_policy_profile_query(template, template_policy_profiles_url)
    end
  end
end


text:
module Doing
  class WikiExport

    def self.settings
      {
        trigger: 'wiki',
        templates: [
          { name: 'wiki_page', trigger: 'wiki.?page', format: 'haml', filename: 'wiki.haml' },
          { name: 'wiki_index', trigger: 'wiki.?index', format: 'haml', filename: 'wiki_index.haml' },
          { name: 'wiki_css', trigger: 'wiki.?css', format: 'css', filename: 'wiki.css' }
        ]
      }
    end

    def self.template(trigger)
      if trigger =~ /css/
        IO.read(File.join(File.dirname(__FILE__), 'templates/wiki.css'))
      elsif trigger =~ /index/
        IO.read(File.join(File.dirname(__FILE__), 'templates/wiki_index.haml'))
      else
        IO.read(File.join(File.dirname(__FILE__), 'templates/wiki.haml'))
      end
    end

    def self.render(wwid, items, variables: {})
      return if items.nil?

      opt = variables[:options]

      items_out = []
      items.each do |i|
        # if i.has_key?('note')
        #   note = '' + i.note.map{|n| n.strip }.join('
') + ''
        # else
        #   note = ''
        # end
        if String.method_defined? :force_encoding
          title = i.title.force_encoding('utf-8').link_urls
          note = i.note.map { |line| line.force_encoding('utf-8').strip.link_urls } if i.note
        else
          title = i.title.link_urls
          note = i.note.map { |line| line.strip.link_urls } if i.note
        end

        interval = wwid.get_interval(i) if i.title =~ /@done\((\d{4}-\d\d-\d\d \d\d:\d\d.*?)\)/ && opt[:times]
        interval ||= false

        title.gsub!(/(@([^ (]+)(\(.*?\))?)/im, '\1').strip

        items_out << {
          date: i.date.strftime('%a %-I:%M%p'),
          title: title, #+ " #{note}"
          note: note,
          time: interval,
          section: i.section
        }
      end

      template = if wwid.config['export_templates']['wiki_page'] && File.exist?(File.expand_path(wwid.config['export_templates']['wiki_haml']))
                   IO.read(File.expand_path(wwid.config['export_templates']['wiki_page']))
                 else
                   self.template('wiki_html')
                 end

      style = if wwid.config['export_templates']['wiki_css'] && File.exist?(File.expand_path(wwid.config['export_templates']['wiki_css']))
                IO.read(File.expand_path(wwid.config['export_templates']['wiki_css']))
              else
                self.template('wiki_css')
              end

      totals = opt[:totals] ? wwid.tag_times(format: :html, sort_by: opt[:sort_tags], sort_order: opt[:tag_order]) : ''
      engine = Haml::Engine.new(template)
      Doing.logger.debug('Wiki Export:', "#{items_out.count} items output to #{variables[:page_title]} wiki page")
      @out = engine.render(Object.new,
                         { :@items => items_out, :@page_title => variables[:page_title], :@style => style, :@totals => totals })
    end

    Doing::Plugins.register 'wiki', :export, self
  end
end


text:
using System;
using UnityEngine.SceneManagement;
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;

namespace droid.Editor.Utilities {
  /// <summary>
  ///   Class used to serialize a reference to a scene asset that can be used
  ///   at runtime in a build, when the asset can no longer be directly
  ///   referenced. This caches the scene name based on the SceneAsset to use
  ///   at runtime to load.
  /// </summary>
  [Serializable]
  public class SceneReference : ISerializationCallbackReceiver {
    #if UNITY_EDITOR
    /// <summary>
    /// </summary>
    public SceneAsset scene;
    #endif

    [SerializeField] bool sceneEnabled;

    [SerializeField] int sceneIndex = -1;

    /// <summary>
    /// </summary>
    [Tooltip("The name of the referenced scene. This may be used at runtime to load the scene.")]
    public string sceneName;

    /// <inheritdoc />
    /// <summary>
    /// </summary>
    public void OnBeforeSerialize() {
      #if UNITY_EDITOR
      if (this.scene != null) {
        var scene_asset_path = AssetDatabase.GetAssetPath(this.scene);
        var scene_asset_guid = AssetDatabase.AssetPathToGUID(scene_asset_path);

        var scenes = EditorBuildSettings.scenes;

        this.sceneIndex = -1;
        for (var i = 0; i < scenes.Length; i++) {
          if (scenes[i].guid.ToString() == scene_asset_guid) {
            this.sceneIndex = i;
            this.sceneEnabled = scenes[i].enabled;
            if (scenes[i].enabled) {
              this.sceneName = this.scene.name;
            }

            break;
          }
        }
      } else {
        this.sceneName = "";
      }
      #endif
    }

    /// <inheritdoc />
    /// <summary>
    /// </summary>
    public void OnAfterDeserialize() { }

    void ValidateScene() {
      if (string.IsNullOrEmpty(this.sceneName)) {
        throw new SceneLoadException("No scene specified.");
      }

      if (this.sceneIndex < 0) {
        throw new SceneLoadException("Scene " + this.sceneName + " is not in the build settings");
      }

      if (!this.sceneEnabled) {
        throw new SceneLoadException("Scene " + this.sceneName + " is not enabled in the build settings");
      }
    }

    /// <summary>
    /// </summary>
    /// <param name="mode"></param>
    public void LoadScene(LoadSceneMode mode = LoadSceneMode.Single) {
      this.ValidateScene();
      SceneManager.LoadScene(this.sceneName, mode);
    }

    /// <summary>
    ///   Exception that is raised when there is an issue resolving and
    ///   loading a scene reference.
    /// </summary>
    public class SceneLoadException : Exception {
      public SceneLoadException(string message) : base(message) { }
    }
  }
}
#endif


text:
import { subtracting } from "../tools/subtracting.fn";

describe("subtraction: binary", () => {
    describe("full subtraction", () => {
        subtracting("even").by("even").shouldBe(true);
    });
});


text:
//
//  Generated by the J2ObjC translator.  DO NOT EDIT!
//  source: android/libcore/luni/src/main/java/java/nio/channels/DatagramChannel.java
//

#include "../../../J2ObjC_header.h"

#pragma push_macro("INCLUDE_ALL_JavaNioChannelsDatagramChannel")
#ifdef RESTRICT_JavaNioChannelsDatagramChannel
#define INCLUDE_ALL_JavaNioChannelsDatagramChannel 0
#else
#define INCLUDE_ALL_JavaNioChannelsDatagramChannel 1
#endif
#undef RESTRICT_JavaNioChannelsDatagramChannel

#pragma clang diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

#if !defined (JavaNioChannelsDatagramChannel_) && (INCLUDE_ALL_JavaNioChannelsDatagramChannel || defined(INCLUDE_JavaNioChannelsDatagramChannel))
#define JavaNioChannelsDatagramChannel_

#define RESTRICT_JavaNioChannelsSpiAbstractSelectableChannel 1
#define INCLUDE_JavaNioChannelsSpiAbstractSelectableChannel 1
#include "../../../java/nio/channels/spi/AbstractSelectableChannel.h"

#define RESTRICT_JavaNioChannelsByteChannel 1
#define INCLUDE_JavaNioChannelsByteChannel 1
#include "../../../java/nio/channels/ByteChannel.h"

#define RESTRICT_JavaNioChannelsScatteringByteChannel 1
#define INCLUDE_JavaNioChannelsScatteringByteChannel 1
#include "../../../java/nio/channels/ScatteringByteChannel.h"

#define RESTRICT_JavaNioChannelsGatheringByteChannel 1
#define INCLUDE_JavaNioChannelsGatheringByteChannel 1
#include "../../../java/nio/channels/GatheringByteChannel.h"

#define RESTRICT_JavaNioChannelsNetworkChannel 1
#define INCLUDE_JavaNioChannelsNetworkChannel 1
#include "../../../java/nio/channels/NetworkChannel.h"

@class IOSObjectArray;
@class JavaNetDatagramSocket;
@class JavaNetSocketAddress;
@class JavaNioByteBuffer;
@class JavaNioChannelsSpiSelectorProvider;
@protocol JavaNetSocketOption;
@protocol JavaUtilSet;

/*!
 @brief A DatagramChannel is a selectable channel that represents a partial
 abstraction of a datagram socket.
 The socket method of this class can
 return the related DatagramSocket instance, which can handle the
 socket.

 A datagram channel is open but not connected when created with the
 open() method. After it is connected, it will keep the connected
 status until it is disconnected or closed. The benefit of a connected channel
 is the reduced effort of security checks during send and receive. When
 invoking read or write, a connected channel is required.

 Datagram channels are thread-safe; only one thread can read or write at the
 same time.
 */
@interface JavaNioChannelsDatagramChannel : JavaNioChannelsSpiAbstractSelectableChannel < JavaNioChannelsByteChannel, JavaNioChannelsScatteringByteChannel, JavaNioChannelsGatheringByteChannel, JavaNioChannelsNetworkChannel >

#pragma mark Public

/*!
  Until ready for a public API change
 */
- (JavaNioChannelsDatagramChannel *)bindWithJavaNetSocketAddress:(JavaNetSocketAddress *)local;

/*!
 @brief Connects the socket of this channel to a remote address, which is the
 only communication peer for getting and sending datagrams after being
 connected.

 This method can be called at any time without affecting the read and
 write operations being processed at the time the method is called. The
 connection status does not change until the channel is disconnected or
 closed.

 This method executes the same security checks as the connect method of
 the DatagramSocket class.
 @param address
 the address to be connected to.
 @return this channel.
 @throws ClosedChannelException
 if the channel is already closed.
 @throws AsynchronousCloseException
 if the channel is closed by another thread while this method
 is in operation.
 @throws ClosedByInterruptException
 if another thread interrupts the calling thread while the
 operation is in progress. The calling thread will have the
 interrupt state set and the channel will be closed.
 @throws IOException
 if some other I/O error occurs.
 */
- (JavaNioChannelsDatagramChannel *)connectWithJavaNetSocketAddress:(JavaNetSocketAddress *)address;

/*!
 @brief Disconnects the socket of this channel, which has been connected before
 in order to send and receive datagrams.

 This method can be called at any time without affecting the read and
 write operations being underway. It does not have any effect if the
 socket is not connected or the channel is closed.
 @return this channel.
 @throws IOException
 some other I/O error occurs.
 */
- (JavaNioChannelsDatagramChannel *)disconnect;

/*!
  Until ready for a public API change
 */
- (JavaNetSocketAddress *)getLocalAddress;

/*!
  Until ready for a public API change
 */
- (id)getOptionWithJavaNetSocketOption:(id<JavaNetSocketOption>)option;

/*!
 @brief Returns whether this channel's socket is connected or not.
 @return true if this channel's socket is connected;
 false otherwise.
 */
- (jboolean)isConnected;

/*!
 @brief Creates an opened and not-connected datagram channel.

 This channel is created by calling the openDatagramChannel
 method of the default SelectorProvider instance.
 @return the new channel which is open but not connected.
 @throws IOException
 if some I/O error occurs.
 */
+ (JavaNioChannelsDatagramChannel *)open;

/*!
 @brief Reads a datagram from this channel into the byte buffer.

 The precondition for calling this method is that the channel is connected
 and the incoming datagram is from the connected address. If the buffer is
 not big enough to store the datagram, the part of the datagram that does
 not fit in the buffer is discarded. Otherwise, this method has the same
 behavior as the read method in the ReadableByteChannel
 interface.
 - seealso: java.nio.channels.ReadableByteChannel#read(java.nio.ByteBuffer)
 @param target
 the byte buffer to store the received datagram.
 @return a non-negative number as the number of bytes read, or -1 as the
 read operation reaches the end of stream.
 @throws NotYetConnectedException
 if the channel is not connected yet.
 @throws ClosedChannelException
 if the channel is already closed.
 @throws AsynchronousCloseException
 if the channel is closed by another thread while this method
 is in operation.
 @throws ClosedByInterruptException
 if another thread interrupts the calling thread while the
 operation is in progress. The calling thread will have the
 interrupt state set and the channel will be closed.
 @throws IOException
 some other I/O error occurs.
 */
- (jint)readWithJavaNioByteBuffer:(JavaNioByteBuffer *)target;

/*!
 @brief Reads a datagram from this channel into an array of byte buffers.

 The precondition for calling this method is that the channel is connected
 and the incoming datagram is from the connected address. If the buffers
 do not have enough remaining space to store the datagram, the part of the
 datagram that does not fit in the buffers is discarded. Otherwise, this
 method has the same behavior as the read method in the
 ScatteringByteChannel interface.
 - seealso: java.nio.channels.ScatteringByteChannel#read(java.nio.ByteBuffer[])
 @param targets
 the byte buffers to store the received datagram.
 @return a non-negative number as the number of bytes read, or -1 if the
 read operation reaches the end of stream.
 @throws NotYetConnectedException
 if the channel is not connected yet.
 @throws ClosedChannelException
 if the channel is already closed.
 @throws AsynchronousCloseException
 if the channel is closed by another thread while this method
 is in operation.
 @throws ClosedByInterruptException
 if another thread interrupts the calling thread while the
 operation is in progress. The calling thread will have the
 interrupt state set and the channel will be closed.
 @throws IOException
 some other I/O error occurs.
 */
- (jlong)readWithJavaNioByteBufferArray:(IOSObjectArray *)targets;

/*!
 @brief Reads a datagram from this channel into an array of byte buffers.

 The precondition for calling this method is that the channel is connected
 and the incoming datagram is from the connected address. If the buffers
 do not have enough remaining space to store the datagram, the part of the
 datagram that does not fit in the buffers is discarded. Otherwise, this
 method has the same behavior as the read method in the
 ScatteringByteChannel interface.
 - seealso: java.nio.channels.ScatteringByteChannel#read(java.nio.ByteBuffer[],int,int)
 @param targets
 the byte buffers to store the received datagram.
 @param offset
 a non-negative offset in the array of buffers, pointing to the
 starting buffer to store the bytes transferred, must not be
 bigger than targets.length.
 @param length
 a non-negative length to indicate the maximum number of
 buffers to be filled, must not be bigger than
 targets.length - offset.
 @return a non-negative number as the number of bytes read, or -1 if the
 read operation reaches the end of stream.
 @throws NotYetConnectedException
 if the channel is not connected yet.
 @throws ClosedChannelException
 if the channel is already closed.
 @throws AsynchronousCloseException
 if the channel is closed by another thread while this method
 is in operation.
 @throws ClosedByInterruptException
 if another thread interrupts the calling thread while the
 operation is in progress. The calling thread will have the
 interrupt state set and the channel will be closed.
 @throws IOException
 some other I/O error occurs.
 */
- (jlong)readWithJavaNioByteBufferArray:(IOSObjectArray *)targets
                                withInt:(jint)offset
                                withInt:(jint)length;

/*!
 @brief Gets a datagram from this channel.

 This method transfers a datagram from the channel into the target byte
 buffer. If this channel is in blocking mode, it waits for the datagram
 and returns its address when it is available. If this channel is in
 non-blocking mode and no datagram is available, it returns null
 immediately. The transfer starts at the current position of the buffer,
 and if there is not enough space remaining in the buffer to store the
 datagram then the part of the datagram that does not fit is discarded.

 This method can be called at any time and it will block if there is
 another thread that has started a read operation on the channel.

 This method executes the same security checks as the receive method of
 the DatagramSocket class.
 @param target
 the byte buffer to store the received datagram.
 @return the address of the datagram if the transfer is performed, or null
 if the channel is in non-blocking mode and no datagram is
 available.
 @throws ClosedChannelException
 if the channel is already closed.
 @throws AsynchronousCloseException
 if the channel is closed by another thread while this method
 is in operation.
 @throws ClosedByInterruptException
 if another thread interrupts the calling thread while the
 operation is in progress. The calling thread will have the
 interrupt state set and the channel will be closed.
 @throws IOException
 some other I/O error occurs.
 */
- (JavaNetSocketAddress *)receiveWithJavaNioByteBuffer:(JavaNioByteBuffer *)target;

/*!
 @brief Sends a datagram through this channel.
 The datagram consists of the
 remaining bytes in source.

 If this channel is in blocking mode then the datagram is sent as soon as
 there is enough space in the underlying output buffer. If this channel is
 in non-blocking mode then the datagram is only sent if there is enough
 space in the underlying output buffer at that moment. The transfer action
 is just like a regular write operation.

 This method can be called at any time and it will block if another thread
 has started a send operation on this channel.

 This method executes the same security checks as the send method of the
 DatagramSocket class.
 @param source
 the byte buffer with the datagram to be sent.
 @param address
 the destination address for the datagram.
 @return the number of bytes sent. This is the number of bytes remaining
 in source or zero if the channel is in non-blocking mode
 and there is not enough space for the datagram in the underlying
 output buffer.
 @throws ClosedChannelException
 if the channel is already closed.
 @throws AsynchronousCloseException
 if the channel is closed by another thread while this method
 is in operation.
 @throws ClosedByInterruptException
 if another thread interrupts the calling thread while the
 operation is in progress. The calling thread will have the
 interrupt state set and the channel will be closed.
 @throws IOException
 some other I/O error occurs.
 */
- (jint)sendWithJavaNioByteBuffer:(JavaNioByteBuffer *)source
         withJavaNetSocketAddress:(JavaNetSocketAddress *)address;

/*!
  Until ready for a public API change
 */
- (JavaNioChannelsDatagramChannel *)setOptionWithJavaNetSocketOption:(id<JavaNetSocketOption>)option
                                                              withId:(id)value;

/*!
 @brief Returns the related datagram socket of this channel, which does not
 define additional public methods to those defined by
 DatagramSocket.
 @return the related DatagramSocket instance.
 */
- (JavaNetDatagramSocket *)socket;

/*!
  Until ready for a public API change
 */
- (id<JavaUtilSet>)supportedOptions;

/*!
 @brief Gets the valid operations of this channel.
 Datagram channels support read
 and write operations, so this method returns (
 SelectionKey.OP_READ | SelectionKey.OP_WRITE ).
 - seealso: java.nio.channels.SelectableChannel#validOps()
 @return valid operations in bit-set.
 */
- (jint)validOps;

/*!
 @brief Writes a datagram from the byte buffer to this channel.

 The precondition of calling this method is that the channel is connected
 and the datagram is sent to the connected address. Otherwise, this method
 has the same behavior as the write method in the
 WritableByteChannel interface.
 - seealso: java.nio.channels.WritableByteChannel#write(java.nio.ByteBuffer)
 @param source
 the byte buffer as the source of the datagram.
 @return a non-negative number of bytes written.
 @throws NotYetConnectedException
 if the channel is not connected yet.
 @throws ClosedChannelException
 if the channel is already closed.
 @throws AsynchronousCloseException
 if the channel is closed by another thread while this method
 is in operation.
 @throws ClosedByInterruptException
 if another thread interrupts the calling thread while the
 operation is in progress. The calling thread will have the
 interrupt state set and the channel will be closed.
 @throws IOException
 some other I/O error occurs.
 */
- (jint)writeWithJavaNioByteBuffer:(JavaNioByteBuffer *)source;

/*!
 @brief Writes a datagram from the byte buffers to this channel.

 The precondition of calling this method is that the channel is connected
 and the datagram is sent to the connected address. Otherwise, this method
 has the same behavior as the write method in the
 GatheringByteChannel interface.
 - seealso: java.nio.channels.GatheringByteChannel#write(java.nio.ByteBuffer[])
 @param sources
 the byte buffers as the source of the datagram.
 @return the number of bytes written. If this method is called, it returns
 the number of bytes that where remaining in the byte buffer. If
 the channel is in non-blocking mode and there was not enough
 space for the datagram in the buffer, it may return zero.
 @throws NotYetConnectedException
 if the channel is not connected yet.
 @throws ClosedChannelException
 if the channel is already closed.
 @throws AsynchronousCloseException
 if the channel is closed by another thread while this method
 is in operation.
 @throws ClosedByInterruptException
 if another thread interrupts the calling thread while the
 operation is in progress. The calling thread will have the
 interrupt state set and the channel will be closed.
 @throws IOException
 some other I/O error occurs.
 */
- (jlong)writeWithJavaNioByteBufferArray:(IOSObjectArray *)sources;

/*!
 @brief Writes a datagram from the byte buffers to this channel.

 The precondition of calling this method is that the channel is connected
 and the datagram is sent to the connected address. Otherwise, this method
 has the same behavior as the write method in the
 GatheringByteChannel interface.
 - seealso: java.nio.channels.GatheringByteChannel#write(java.nio.ByteBuffer[],int,int)
 @param sources
 the byte buffers as the source of the datagram.
 @param offset
 a non-negative offset in the array of buffers, pointing to the
 starting buffer to be retrieved, must be no larger than
 sources.length.
 @param length
 a non-negative length to indicate the maximum number of
 buffers to be submitted, must be no bigger than
 sources.length - offset.
 @return the number of bytes written. If this method is called, it returns
 the number of bytes that where remaining in the byte buffers. If
 the channel is in non-blocking mode and there was not enough
 space for the datagram in the buffer, it may return zero.
 @throws NotYetConnectedException
 if the channel is not connected yet.
 @throws ClosedChannelException
 if the channel is already closed.
 @throws AsynchronousCloseException
 if the channel is closed by another thread while this method
 is in operation.
 @throws ClosedByInterruptException
 if another thread interrupts the calling thread while the
 operation is in progress. The calling thread will have the
 interrupt state set and the channel will be closed.
 @throws IOException
 some other I/O error occurs.
 */
- (jlong)writeWithJavaNioByteBufferArray:(IOSObjectArray *)sources
                                 withInt:(jint)offset
                                 withInt:(jint)length;

#pragma mark Protected

/*!
 @brief Constructs a new DatagramChannel.
 @param selectorProvider
 an instance of SelectorProvider.
 */
- (instancetype)initWithJavaNioChannelsSpiSelectorProvider:(JavaNioChannelsSpiSelectorProvider *)selectorProvider;

@end

J2OBJC_EMPTY_STATIC_INIT(JavaNioChannelsDatagramChannel)

FOUNDATION_EXPORT void JavaNioChannelsDatagramChannel_initWithJavaNioChannelsSpiSelectorProvider_(JavaNioChannelsDatagramChannel *self, JavaNioChannelsSpiSelectorProvider *selectorProvider);

FOUNDATION_EXPORT JavaNioChannelsDatagramChannel *JavaNioChannelsDatagramChannel_open();

J2OBJC_TYPE_LITERAL_HEADER(JavaNioChannelsDatagramChannel)

#endif

#pragma clang diagnostic pop
#pragma pop_macro("INCLUDE_ALL_JavaNioChannelsDatagramChannel")


text:
namespace Microsoft.Azure.Management.Monitor.Models
{
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// Definition of ARM tracked top level resource properties for update
    /// operation.
    /// </summary>
    public partial class ResourceForUpdate
    {
        /// <summary>
        /// Initializes a new instance of the ResourceForUpdate class.
        /// </summary>
        public ResourceForUpdate()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the ResourceForUpdate class.
        /// </summary>
        /// <param name="tags">Resource tags.</param>
        public ResourceForUpdate(IDictionary<string, string> tags = default(IDictionary<string, string>))
        {
            Tags = tags;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets resource tags.
        /// </summary>
        [JsonProperty(PropertyName = "tags")]
        public IDictionary<string, string> Tags { get; set; }

    }
}


text:
ACCEPTED

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

#### Published in
Aust. Syst. Bot. 5(5): 622 (1992)

#### Original name
Inoderma ingratissimum Berk., 1881

### Remarks
null


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

  <title>failure_message_for_should_not (Spec::Matchers::SimpleMatcher)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />

# File lib/spec/matchers/simple_matcher.rb, line 30
      def failure_message_for_should_not
        @negative_failure_message || (@description.nil? ? explanation : %[expected not to get #{@description.inspect}, but got #{@given.inspect}])
      end


text:
package configflag_test

import (
	"flag"
	"fmt"

	"github.com/m3db/m3/src/x/config"
	"github.com/m3db/m3/src/x/config/configflag"
)

// The FlagStringSlice allows for multiple values when used as a flag variable.
func ExampleFlagStringSlice() {
	var configFiles configflag.FlagStringSlice
	fs := flag.NewFlagSet("config", flag.PanicOnError)
	fs.Var(&configFiles, "f", "config files")
	noError(fs.Parse([]string{"-f", "file1.yaml", "-f", "file2.yaml", "-f", "file3.yaml"}))

	fmt.Println("Config files:", configFiles.Value)
	// Output:
	// Config files: [file1.yaml file2.yaml file3.yaml]
}

// Options supports registration of config related flags, followed by config
// loading.
func ExampleOptionsRegister() {
	var cfgOpts configflag.Options

	var flags flag.FlagSet

	// normal use would use Register() (default flagset)
	cfgOpts.RegisterFlagSet(&flags)

	noError(flags.Parse([]string{"-f", "./testdata/config1.yaml", "-f", "./testdata/config2.yaml"}))

	var cfg struct {
		Foo int    `yaml:"foo"`
		Bar string `yaml:"bar"`
	}
	noError(cfgOpts.MainLoad(&cfg, config.Options{}))

	fmt.Println(cfg)
	// Output: {1 bar}
}

func noError(err error) {
	if err != nil {
		panic(err.Error())
	}
}


text:
package com.intellij.ui.popup;

import com.intellij.ide.DataManager;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.ui.popup.JBPopup;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.Key;
import com.intellij.psi.PsiElement;
import com.intellij.ui.ListUtil;
import com.intellij.ui.components.JBList;
import com.intellij.ui.table.JBTable;
import com.intellij.ui.treeStructure.Tree;
import com.intellij.util.Function;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.TreePath;

/**
 * Use this class to make various hints like QuickDocumentation, ShowImplementations, etc.
 * respond to the selection change in the original component like ProjectView, various GoTo popups, etc.
 *
 * @author gregsh
 */
public abstract class HintUpdateSupply {
  private static final Key<HintUpdateSupply> HINT_UPDATE_MARKER = Key.create("HINT_UPDATE_MARKER");

  @Nullable
  private JBPopup myHint;
  private JComponent myComponent;

  @Nullable
  public static HintUpdateSupply getSupply(@NotNull JComponent component) {
    return (HintUpdateSupply)component.getClientProperty(HINT_UPDATE_MARKER);
  }

  public static void hideHint(@NotNull JComponent component) {
    HintUpdateSupply supply = getSupply(component);
    if (supply != null) supply.hideHint();
  }

  public static void installSimpleHintUpdateSupply(@NotNull JComponent component) {
    installHintUpdateSupply(component, o -> o instanceof PsiElement ? (PsiElement)o : null);
  }

  public static void installDataContextHintUpdateSupply(@NotNull JComponent component) {
    installHintUpdateSupply(component, o ->
      o instanceof PsiElement ? (PsiElement)o :
      CommonDataKeys.PSI_ELEMENT.getData(DataManager.getInstance().getDataContext(component)));
  }

  public static void installHintUpdateSupply(@NotNull final JComponent component, final Function<Object, ? extends PsiElement> provider) {
    HintUpdateSupply supply = new HintUpdateSupply(component) {
      @Nullable
      @Override
      protected PsiElement getPsiElementForHint(@Nullable Object selectedValue) {
        return provider.fun(selectedValue);
      }
    };
    if (component instanceof JList) supply.installListListener((JList)component);
    if (component instanceof JTree) supply.installTreeListener((JTree)component);
    if (component instanceof JTable) supply.installTableListener((JTable)component);
  }

  protected HintUpdateSupply(@NotNull JComponent component) {
    installSupply(component);
  }

  public HintUpdateSupply(@NotNull JBTable table) {
    installSupply(table);
    installTableListener(table);
  }

  public HintUpdateSupply(@NotNull Tree tree) {
    installSupply(tree);
    installTreeListener(tree);
  }

  public HintUpdateSupply(@NotNull JBList list) {
    installSupply(list);
    installListListener(list);
  }

  protected void installTableListener(@NotNull final JTable table) {
    ListSelectionListener listener = new ListSelectionListener() {
      @Override
      public void valueChanged(final ListSelectionEvent e) {
        if (!shouldUpdateHint()) return;

        int selected = ((ListSelectionModel)e.getSource()).getLeadSelectionIndex();
        int rowCount = table.getRowCount();
        if (selected == -1 || rowCount == 0) return;

        PsiElement element = getPsiElementForHint(table.getValueAt(Math.min(selected, rowCount - 1), 0));
        if (element != null && element.isValid()) {
          updateHint(element);
        }
      }
    };
    table.getSelectionModel().addListSelectionListener(listener);
    table.getColumnModel().getSelectionModel().addListSelectionListener(listener);
  }

  protected void installTreeListener(@NotNull final JTree tree) {
    tree.addTreeSelectionListener(new TreeSelectionListener() {
      @Override
      public void valueChanged(final TreeSelectionEvent e) {
        if (!shouldUpdateHint()) return;

        TreePath path = tree.getSelectionPath();
        if (path != null) {
          final PsiElement psiElement = getPsiElementForHint(path.getLastPathComponent());
          if (psiElement != null && psiElement.isValid()) {
            updateHint(psiElement);
          }
        }
      }
    });
  }

  protected void installListListener(@NotNull JList list) {
    list.addListSelectionListener(new ListSelectionListener() {
      @Override
      public void valueChanged(final ListSelectionEvent e) {
        if (!shouldUpdateHint()) return;

        Object[] selectedValues = ((JList)e.getSource()).getSelectedValues();
        if (selectedValues.length != 1) return;

        PsiElement element = getPsiElementForHint(selectedValues[0]);
        if (element != null && element.isValid()) {
          updateHint(element);
        }
      }
    });
  }

  @Nullable
  protected abstract PsiElement getPsiElementForHint(@Nullable Object selectedValue);

  private void installSupply(@NotNull JComponent component) {
    component.putClientProperty(HINT_UPDATE_MARKER, this);
    myComponent = component;
  }

  public void registerHint(JBPopup hint) {
    hideHint();
    myHint = hint;
    Disposer.register(hint, () -> myHint = null);
  }

  public void hideHint() {
    if (isHintVisible(myHint)) {
      myHint.cancel();
    }

    myHint = null;
  }

  public void updateHint(PsiElement element) {
    if (!isHintVisible(myHint)) return;

    PopupUpdateProcessorBase updateProcessor = myHint.getUserData(PopupUpdateProcessorBase.class);
    if (updateProcessor != null) {
      updateProcessor.updatePopup(element);
    }
  }

  public boolean shouldUpdateHint() {
    return isHintVisible(myHint) && !isSelectedByMouse(myComponent);
  }

  @Contract("!null->true")
  private static boolean isHintVisible(JBPopup hint) {
    return hint != null && hint.isVisible();
  }

  private static boolean isSelectedByMouse(@NotNull JComponent c) {
    return Boolean.TRUE.equals(c.getClientProperty(ListUtil.SELECTED_BY_MOUSE_EVENT));
  }
}


text:
function smell = calculateMfcFlowRates(trialNum, smell,errorType)
% calculateMfcFlowRates(trialNum, smell,errorType) calculates the flow rate
% for the two mass flow controllers, given the desired final concentration
% of odorant and the desired total rate of flow. The function updates the
% global smell structure.
%
% errorType;
% 'popUp' - popup giving warning that the desired concentration can't be
% achieved.
% 'error' - function throws an error if the desired concentration can't be
% achieved
%
% To do:
% - Fix error handling: if desired concentration cannot be reached because
% the Nitrogen mfc only has a limited range, give an error and return
% without triggering the trial.
% - How should we deal with the problem: Which of the two pieces of
% information should be used to calculate flow rates?
% olfactometerInstructions.flowRateMfcAir/N or
% smell.trial(i).concentrationAtPresentation?
%
% lorenzpammer July, 2012

%% Do the calculation and update smell

flowRateMfcN = smell.trial(trialNum).concentrationAtPresentation * smell.olfactometerSettings.slave(1).maxFlowRateMfcNitrogen / smell.trial(trialNum).odorantDilution;
flowRateMfcAir = smell.olfactometerSettings.slave(1).maxFlowRateMfcNitrogen - flowRateMfcN;

totalFlow = flowRateMfcN + flowRateMfcAir;

% Find the index of the MfcTotalFlow field in the olfactometerInstructions:
index = find(strcmp({smell.trial(trialNum).olfactometerInstructions.name},'mfcTotalFlow'));

ratio = smell.trial(trialNum).olfactometerInstructions(index).value / totalFlow;
flowRateMfcN = flowRateMfcN * ratio;
flowRateMfcAir = flowRateMfcAir * ratio;

% Round the flow rates to 5 digits
flowRateMfcAir = round(flowRateMfcAir*10e5)/10e5;
flowRateMfcN = round(flowRateMfcN*10e5)/10e5;

% Check if the desired flow rates can be reached given the maximum flow
% rates of the MFCs. If not give an error:
if flowRateMfcN > smell.olfactometerSettings.slave(1).maxFlowRateMfcNitrogen || ...
        flowRateMfcAir > smell.olfactometerSettings.slave(1).maxFlowRateMfcAir
    if strmatch(errorType,'error')
        errormsg = sprintf('Concentration can not be reached. Please enter a lower value or reduce the total flow.\nDesired: flowRateMfcAir = %f\nflowRateMfcN=%f.',flowRateMfcAir,flowRateMfcN);
        error(errormsg)
        clear errormsg
    elseif strmatch(errorType,'popUp')
        selection = warndlg('The desired concentration cannot be achieved. Please enter a lower value or reduce the total flow.',...
            'Concentration too high',...
            'OK');
    end

else
    % Update smell structure:
    smell.trial(trialNum).flowRateMfcN = flowRateMfcN;
    smell.trial(trialNum).flowRateMfcAir = flowRateMfcAir;
end

% Give warning, if the Nitrogen Mfc is set to less than 2% of its maximal
% flow rate, as it becomes inaccurate around that point
if flowRateMfcN < smell.olfactometerSettings.slave(1).maxFlowRateMfcNitrogen/50
    if strmatch(errorType,'error')
        warningmsg = sprintf('The Nitrogen MFC is set to less than 2%% of its maximal flow rate.\nAs the MFC isn''t accurate below 2%% flow rate, please consider diluting the odorant.')
        warning(warningmsg)
        clear warningmsg;
    elseif strmatch(errorType,'popUp')
        selection = warndlg('Nitrogen MFC is set to less than 2% of its maximal flow rate.As the MFC isn''t accurate below 2% flow rate, please consider diluting the odorant.',...
            'Concentration too low',...
            'OK');
    end
end

end


text:
The PARSE-TIMESTAMP directive parses column values representing unix timestamp as date.

## Syntax
```
parse-timestamp :<column> '<timeunit>'
```

## Usage Notes

The PARSE-TIMESTAMP directive will parse a column representing Unix timestamp. The column type can be string or long.
 long or string as date objects. The directive also has optional parameter timeunit which can be seconds, milliseconds
 or microseconds. The default timeunit is milliseconds. If the column is `null` or has already been parsed as a date,
 applying this directive is a no-op. The column to be parsed as a date should be of type string.

## Examples
if the column has unix timestamp 1536332271894 or "1536332271894", then after applying this directive,
the column value represents date equivalent of UTC: Friday, September 7, 2018 2:57:51.894 PM.


text:
package de.qaware.showcase.spock.spring;

import java.util.Collection;

/**
 * The user repository. We will mock this interface later.
 */
public interface UserRepository {
    /**
     * Find a user by its username.
     *
     * @param username the username
     * @return the User or NULL
     */
    User findByUsername(String username);

    /**
     * FInd and return all users.
     *
     * @return a lis of users
     */
    Collection<User> all();

    /**
     * Store the given user.
     *
     * @param user the user
     */
    void store(User user);
}


text:
import atheris
import sys
import io

# All code is instrumented by calling atheris.instrument_all below
from google.resumable_media import _upload

def test_simple(data):
  upload = _upload.SimpleUpload("localhost:8008/index.html")
  upload._prepare_request(data, None)

def test_multipart(data):
  fdp = atheris.FuzzedDataProvider(data)
  headers = {"spin": "doctors"}
  upload = _upload.MultipartUpload(
    "localhost:8008/index.html",
    headers=headers,
    checksum="md5"
  )
  try:
    upload._prepare_request(
      fdp.ConsumeBytes(200),
      {},
      fdp.ConsumeString(200)
    )
  except UnicodeEncodeError:
    pass

def _upload_in_flight(data, headers=None, checksum=None):
  upload = _upload.ResumableUpload(
    "localhost:8008://heyo",
    1024 * 1024,
    headers=headers,
    checksum=checksum
  )
  upload._stream = io.BytesIO(data)
  upload._content_type = "text/plain"
  upload._total_bytes = len(data)
  upload._resumable_url = "localhost:8009/test.invalid?upload_id=not-none"
  return upload

def test_checksum(data):
  fdp = atheris.FuzzedDataProvider(data)
  for cs in ["md5", "crc32"]:
    upload = _upload_in_flight(fdp.ConsumeBytes(200), checksum=cs)
    try:
      start_byte, payload, _ = _upload.get_next_chunk(
        upload._stream,
        fdp.ConsumeIntInRange(1, 250),
        fdp.ConsumeIntInRange(1, 250)
      )
    except ValueError:
      pass

def TestOneInput(data):
  test_simple(data)
  test_multipart(data)
  test_checksum(data)

def main():
  atheris.instrument_all()
  atheris.Setup(sys.argv, TestOneInput, enable_python_coverage=True)
  atheris.Fuzz()

if __name__ == "__main__":
  main()


text:
namespace OrigoDB.Core
{
    public sealed class NeverCloneStrategy : CloneStrategy {
        internal override void Apply(ref Command command)
        {

        }

        internal override void Apply(ref object result, object producer)
        {
        }
    }
}


text:
from __future__ import print_function
import argparse
import random
import tempfile
import time
import sys
from collections import Counter

import numpy
import pylab

import crosscat.tests.enumerate_utils as eu
import crosscat.tests.plot_utils as pu
import crosscat.utils.sample_utils as su
import crosscat.utils.data_utils as du

import crosscat.cython_code.State as State

def get_next_seed(rng, max_val=32767):
    return rng.randint(max_val)

def run_test(seed, n=1000, d_type='continuous', observed=False):
    if d_type == 'continuous':
        run_test_continuous(n, observed, seed)
    elif d_type == 'multinomial':
        run_test_multinomial(n, observed, seed)

def generate_multinomial_data(seed, n_cols, n_rows, n_views):
    rng = numpy.random.RandomState(seed)

    cols_to_views = [0 for _ in range(n_cols)]
    rows_in_views_to_cols = []
    for view in range(n_views):
        partition = eu.CRP(n_rows, 2.0, get_next_seed(rng))
        random.shuffle(partition, rng.uniform)
        rows_in_views_to_cols.append(partition)

    # generate the data
    data = numpy.zeros((n_rows,n_cols),dtype=float)
    for col in range(n_cols):
        view = cols_to_views[col]
        for row in range(n_rows):
            cluster = rows_in_views_to_cols[view][row]
            data[row,col] = cluster

    T = data.tolist()
    M_r = du.gen_M_r_from_T(T)
    M_c = du.gen_M_c_from_T(T)

    T, M_c = du.convert_columns_to_multinomial(T, M_c, list(range(n_cols)))

    return T, M_r, M_c

def run_test_continuous(n, observed, seed):
    rng = numpy.random.RandomState(seed)

    n_rows = 40
    n_cols = 40

    if observed:
        query_row = 10
    else:
        query_row = n_rows

    query_column = 1

    Q = [(query_row, query_column)]

    # do the test with multinomial data
    T, M_r, M_c= du.gen_factorial_data_objects(get_next_seed(rng),2,2,n_rows,1)

    state = State.p_State(M_c, T)

    T_array = numpy.array(T)

    X_L = state.get_X_L()
    X_D = state.get_X_D()

    Y = [] # no constraints

    # pull n samples
    gns = lambda: get_next_seed(rng)
    samples = su.simple_predictive_sample(M_c, X_L, X_D, Y, Q, gns, n=n)

    X_array = numpy.sort(numpy.array(samples))

    std_X = numpy.std(X_array)
    mean_X = numpy.mean(X_array)

    # filter out extreme values
    X_filter_low = numpy.nonzero(X_array < mean_X-2.*std_X)[0]
    X_filter_high = numpy.nonzero(X_array > mean_X+2.*std_X)[0]
    X_filter = numpy.hstack((X_filter_low, X_filter_high))
    X_array = numpy.delete(X_array, X_filter)

    # sort for area calculation later on
    X_array = numpy.sort(X_array)

    X = X_array.tolist()

    # build the queries
    Qs = [];
    for x in X:
        Qtmp = (query_row, query_column, x)
        Qs.append(Qtmp)

    # get pdf values
    densities = numpy.exp(su.simple_predictive_probability(M_c, X_L, X_D, Y, Qs))

    # test that the area under Ps2 and pdfs is about 1
    # calculated using the trapezoid rule
    area_density = 0;
    for i in range(len(X)-1):
        area_density += (X[i+1]-X[i])*(densities[i+1]+densities[i])/2.0

    print("Area of PDF (should be close to, but not greater than, 1): " + str(area_density))
    print("*Note: The area will be less than one because the range (integral) is truncated.")

    pylab.figure(facecolor='white')

    # PLOT: probability vs samples distribution
    # scale all histograms to be valid PDFs (area=1)
    pdf, bins, patches = pylab.hist(X,100,normed=1, histtype='stepfilled',label='samples', alpha=.5, color=[.5,.5,.5])
    pylab.scatter(X,densities, c="red", label="pdf", edgecolor='none')

    pylab.legend(loc='upper left',fontsize='x-small')
    pylab.xlabel('value')
    pylab.ylabel('frequency/density')
    pylab.title('TEST: PDF (not scaled)')

    pylab.show()
    fd, fig_filename = tempfile.mkstemp(prefix='run_test_continuous_',
            suffix='.png', dir='.')
    pylab.savefig(fig_filename)

def run_test_multinomial(n, observed, seed):
    rng = numpy.random.RandomState(seed)

    n_rows = 40
    n_cols = 40

    if observed:
        query_row = 10
    else:
        query_row = n_rows

    query_column = 1

    Q = [(query_row, query_column)]

    # do the test with multinomial data
    T, M_r, M_c = generate_multinomial_data(get_next_seed(rng),2,n_rows,1)

    state = State.p_State(M_c, T)

    X_L = state.get_X_L()
    X_D = state.get_X_D()

    Y = []

    # pull n samples
    gns = lambda: get_next_seed(rng)
    samples = su.simple_predictive_sample(M_c, X_L, X_D, Y, Q, gns, n=n)
    X_array = numpy.sort(numpy.array(samples))
    X = numpy.unique(X_array)
    X = X.tolist()

    # build the queries
    Qs = [];
    for x in X:
        # Qtmp = (query_row, query_column, x[0])
        Qtmp = (query_row, query_column, x)
        Qs.append(Qtmp)

    # get pdf values
    densities = numpy.exp(su.simple_predictive_probability(M_c, X_L, X_D, Y, Qs))

    print("Sum of densities (should be 1): %f" % (numpy.sum(densities)))

    pylab.clf()

    # PLOT: probability vs samples distribution
    # scale all histograms to be valid PDFs (area=1)
    mbins = numpy.unique(X_array)

    mbins = numpy.append(mbins,max(mbins)+1)

    pdf, bins = numpy.histogram(X_array,mbins)

    pdf = pdf/float(numpy.sum(pdf))
    pylab.bar(mbins[0:-1],pdf,label="samples",alpha=.5)
    pylab.scatter(X,densities, c="red", label="pdf", edgecolor='none')

    pylab.legend(loc='upper left',fontsize='x-small')
    pylab.xlabel('value')
    pylab.ylabel('frequency/density')
    pylab.title('TEST: PDF (not scaled)')

    pylab.show()

    fd, fig_filename = tempfile.mkstemp(prefix='run_test_multinomial_',
            suffix='.png', dir='.')
    pylab.savefig(fig_filename)

rng = numpy.random.RandomState()

run_test(seed=get_next_seed(rng), n=5000, d_type='continuous', observed=False)
run_test(seed=get_next_seed(rng), n=5000, d_type='continuous', observed=True)
run_test(seed=get_next_seed(rng), n=5000, d_type='multinomial', observed=False)
run_test(seed=get_next_seed(rng), n=5000, d_type='multinomial', observed=True)