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

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

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
            this.picMain = new System.Windows.Forms.PictureBox();
            this.splitContainer2 = new System.Windows.Forms.SplitContainer();
            this.numLayerSize = new System.Windows.Forms.NumericUpDown();
            this.label2 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.lstLayers = new System.Windows.Forms.ListBox();
            this.numEpochs = new System.Windows.Forms.NumericUpDown();
            this.numGranularity = new System.Windows.Forms.NumericUpDown();
            this.btnDecrement = new System.Windows.Forms.Button();
            this.btnIncrement = new System.Windows.Forms.Button();
            this.lblError = new System.Windows.Forms.Label();
            this.btnEpoch = new System.Windows.Forms.Button();
            this.btnDown = new System.Windows.Forms.Button();
            this.btnUp = new System.Windows.Forms.Button();
            this.btnRemove = new System.Windows.Forms.Button();
            this.btnAdd = new System.Windows.Forms.Button();
            this.splitContainer3 = new System.Windows.Forms.SplitContainer();
            this.picOut = new System.Windows.Forms.PictureBox();
            this.btnReset = new System.Windows.Forms.Button();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
            this.splitContainer1.Panel1.SuspendLayout();
            this.splitContainer1.Panel2.SuspendLayout();
            this.splitContainer1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.picMain)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
            this.splitContainer2.Panel1.SuspendLayout();
            this.splitContainer2.Panel2.SuspendLayout();
            this.splitContainer2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.numLayerSize)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.numEpochs)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.numGranularity)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
            this.splitContainer3.Panel1.SuspendLayout();
            this.splitContainer3.Panel2.SuspendLayout();
            this.splitContainer3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.picOut)).BeginInit();
            this.SuspendLayout();
            //
            // splitContainer1
            //
            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer1.Location = new System.Drawing.Point(0, 0);
            this.splitContainer1.Name = "splitContainer1";
            //
            // splitContainer1.Panel1
            //
            this.splitContainer1.Panel1.Controls.Add(this.picMain);
            //
            // splitContainer1.Panel2
            //
            this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
            this.splitContainer1.Size = new System.Drawing.Size(730, 571);
            this.splitContainer1.SplitterDistance = 498;
            this.splitContainer1.TabIndex = 0;
            //
            // picMain
            //
            this.picMain.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.picMain.Dock = System.Windows.Forms.DockStyle.Fill;
            this.picMain.Location = new System.Drawing.Point(0, 0);
            this.picMain.Name = "picMain";
            this.picMain.Size = new System.Drawing.Size(498, 571);
            this.picMain.TabIndex = 0;
            this.picMain.TabStop = false;
            this.picMain.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picMain_MouseDown);
            this.picMain.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picMain_MouseMove);
            this.picMain.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picMain_MouseUp);
            //
            // 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.numLayerSize);
            this.splitContainer2.Panel1.Controls.Add(this.label2);
            this.splitContainer2.Panel1.Controls.Add(this.label1);
            this.splitContainer2.Panel1.Controls.Add(this.lstLayers);
            //
            // splitContainer2.Panel2
            //
            this.splitContainer2.Panel2.Controls.Add(this.btnReset);
            this.splitContainer2.Panel2.Controls.Add(this.numEpochs);
            this.splitContainer2.Panel2.Controls.Add(this.numGranularity);
            this.splitContainer2.Panel2.Controls.Add(this.btnDecrement);
            this.splitContainer2.Panel2.Controls.Add(this.btnIncrement);
            this.splitContainer2.Panel2.Controls.Add(this.lblError);
            this.splitContainer2.Panel2.Controls.Add(this.btnEpoch);
            this.splitContainer2.Panel2.Controls.Add(this.btnDown);
            this.splitContainer2.Panel2.Controls.Add(this.btnUp);
            this.splitContainer2.Panel2.Controls.Add(this.btnRemove);
            this.splitContainer2.Panel2.Controls.Add(this.btnAdd);
            this.splitContainer2.Size = new System.Drawing.Size(228, 571);
            this.splitContainer2.SplitterDistance = 476;
            this.splitContainer2.TabIndex = 0;
            //
            // numLayerSize
            //
            this.numLayerSize.Location = new System.Drawing.Point(115, 446);
            this.numLayerSize.Maximum = new decimal(new int[] {
            100000,
            0,
            0,
            0});
            this.numLayerSize.Minimum = new decimal(new int[] {
            1,
            0,
            0,
            0});
            this.numLayerSize.Name = "numLayerSize";
            this.numLayerSize.Size = new System.Drawing.Size(102, 20);
            this.numLayerSize.TabIndex = 5;
            this.numLayerSize.Value = new decimal(new int[] {
            1,
            0,
            0,
            0});
            this.numLayerSize.ValueChanged += new System.EventHandler(this.numLayerSize_ValueChanged);
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(3, 454);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(13, 13);
            this.label2.TabIndex = 4;
            this.label2.Text = "1";
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(4, 4);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(13, 13);
            this.label1.TabIndex = 3;
            this.label1.Text = "2";
            //
            // lstLayers
            //
            this.lstLayers.FormattingEnabled = true;
            this.lstLayers.Location = new System.Drawing.Point(7, 19);
            this.lstLayers.Name = "lstLayers";
            this.lstLayers.Size = new System.Drawing.Size(210, 420);
            this.lstLayers.TabIndex = 0;
            this.lstLayers.SelectedIndexChanged += new System.EventHandler(this.lstLayers_SelectedIndexChanged);
            //
            // numEpochs
            //
            this.numEpochs.Location = new System.Drawing.Point(143, 59);
            this.numEpochs.Minimum = new decimal(new int[] {
            1,
            0,
            0,
            0});
            this.numEpochs.Name = "numEpochs";
            this.numEpochs.Size = new System.Drawing.Size(74, 20);
            this.numEpochs.TabIndex = 9;
            this.numEpochs.Value = new decimal(new int[] {
            1,
            0,
            0,
            0});
            //
            // numGranularity
            //
            this.numGranularity.Location = new System.Drawing.Point(10, 59);
            this.numGranularity.Maximum = new decimal(new int[] {
            1000,
            0,
            0,
            0});
            this.numGranularity.Minimum = new decimal(new int[] {
            1,
            0,
            0,
            0});
            this.numGranularity.Name = "numGranularity";
            this.numGranularity.Size = new System.Drawing.Size(74, 20);
            this.numGranularity.TabIndex = 8;
            this.numGranularity.Value = new decimal(new int[] {
            25,
            0,
            0,
            0});
            this.numGranularity.ValueChanged += new System.EventHandler(this.numGranularity_ValueChanged);
            //
            // btnDecrement
            //
            this.btnDecrement.Location = new System.Drawing.Point(187, 4);
            this.btnDecrement.Name = "btnDecrement";
            this.btnDecrement.Size = new System.Drawing.Size(30, 23);
            this.btnDecrement.TabIndex = 7;
            this.btnDecrement.Text = "--";
            this.btnDecrement.UseVisualStyleBackColor = true;
            this.btnDecrement.Click += new System.EventHandler(this.btnDecrement_Click);
            //
            // btnIncrement
            //
            this.btnIncrement.Location = new System.Drawing.Point(151, 4);
            this.btnIncrement.Name = "btnIncrement";
            this.btnIncrement.Size = new System.Drawing.Size(30, 23);
            this.btnIncrement.TabIndex = 6;
            this.btnIncrement.Text = "++";
            this.btnIncrement.UseVisualStyleBackColor = true;
            this.btnIncrement.Click += new System.EventHandler(this.btnIncrement_Click);
            //
            // lblError
            //
            this.lblError.AutoSize = true;
            this.lblError.Location = new System.Drawing.Point(7, 34);
            this.lblError.Name = "lblError";
            this.lblError.Size = new System.Drawing.Size(65, 13);
            this.lblError.TabIndex = 5;
            this.lblError.Text = "No Error Yet";
            //
            // btnEpoch
            //
            this.btnEpoch.Location = new System.Drawing.Point(143, 30);
            this.btnEpoch.Name = "btnEpoch";
            this.btnEpoch.Size = new System.Drawing.Size(74, 23);
            this.btnEpoch.TabIndex = 4;
            this.btnEpoch.Text = "0";
            this.btnEpoch.UseVisualStyleBackColor = true;
            this.btnEpoch.Click += new System.EventHandler(this.btnEpoch_Click);
            //
            // btnDown
            //
            this.btnDown.Location = new System.Drawing.Point(115, 4);
            this.btnDown.Name = "btnDown";
            this.btnDown.Size = new System.Drawing.Size(30, 23);
            this.btnDown.TabIndex = 3;
            this.btnDown.Text = ">";
            this.btnDown.UseVisualStyleBackColor = true;
            this.btnDown.Click += new System.EventHandler(this.btnDown_Click);
            //
            // btnUp
            //
            this.btnUp.Location = new System.Drawing.Point(79, 4);
            this.btnUp.Name = "btnUp";
            this.btnUp.Size = new System.Drawing.Size(30, 23);
            this.btnUp.TabIndex = 2;
            this.btnUp.Text = "<";
            this.btnUp.UseVisualStyleBackColor = true;
            this.btnUp.Click += new System.EventHandler(this.btnUp_Click);
            //
            // btnRemove
            //
            this.btnRemove.Location = new System.Drawing.Point(43, 4);
            this.btnRemove.Name = "btnRemove";
            this.btnRemove.Size = new System.Drawing.Size(30, 23);
            this.btnRemove.TabIndex = 1;
            this.btnRemove.Text = "-";
            this.btnRemove.UseVisualStyleBackColor = true;
            this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
            //
            // btnAdd
            //
            this.btnAdd.Location = new System.Drawing.Point(7, 4);
            this.btnAdd.Name = "btnAdd";
            this.btnAdd.Size = new System.Drawing.Size(30, 23);
            this.btnAdd.TabIndex = 0;
            this.btnAdd.Text = "+";
            this.btnAdd.UseVisualStyleBackColor = true;
            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
            //
            // splitContainer3
            //
            this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer3.Location = new System.Drawing.Point(0, 0);
            this.splitContainer3.Name = "splitContainer3";
            //
            // splitContainer3.Panel1
            //
            this.splitContainer3.Panel1.Controls.Add(this.splitContainer1);
            //
            // splitContainer3.Panel2
            //
            this.splitContainer3.Panel2.Controls.Add(this.picOut);
            this.splitContainer3.Size = new System.Drawing.Size(1232, 571);
            this.splitContainer3.SplitterDistance = 730;
            this.splitContainer3.TabIndex = 1;
            //
            // picOut
            //
            this.picOut.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
            this.picOut.Dock = System.Windows.Forms.DockStyle.Fill;
            this.picOut.Location = new System.Drawing.Point(0, 0);
            this.picOut.Name = "picOut";
            this.picOut.Size = new System.Drawing.Size(498, 571);
            this.picOut.TabIndex = 0;
            this.picOut.TabStop = false;
            //
            // btnReset
            //
            this.btnReset.Location = new System.Drawing.Point(90, 59);
            this.btnReset.Name = "btnReset";
            this.btnReset.Size = new System.Drawing.Size(47, 20);
            this.btnReset.TabIndex = 10;
            this.btnReset.Text = "Reset";
            this.btnReset.UseVisualStyleBackColor = true;
            this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(1232, 571);
            this.Controls.Add(this.splitContainer3);
            this.Name = "Form1";
            this.Text = "Form1";
            this.Load += new System.EventHandler(this.Form1_Load);
            this.splitContainer1.Panel1.ResumeLayout(false);
            this.splitContainer1.Panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
            this.splitContainer1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.picMain)).EndInit();
            this.splitContainer2.Panel1.ResumeLayout(false);
            this.splitContainer2.Panel1.PerformLayout();
            this.splitContainer2.Panel2.ResumeLayout(false);
            this.splitContainer2.Panel2.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
            this.splitContainer2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.numLayerSize)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.numEpochs)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.numGranularity)).EndInit();
            this.splitContainer3.Panel1.ResumeLayout(false);
            this.splitContainer3.Panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
            this.splitContainer3.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.picOut)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.SplitContainer splitContainer1;
        private System.Windows.Forms.PictureBox picMain;
        private System.Windows.Forms.SplitContainer splitContainer2;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.ListBox lstLayers;
        private System.Windows.Forms.Label lblError;
        private System.Windows.Forms.Button btnEpoch;
        private System.Windows.Forms.Button btnDown;
        private System.Windows.Forms.Button btnUp;
        private System.Windows.Forms.Button btnRemove;
        private System.Windows.Forms.Button btnAdd;
        private System.Windows.Forms.Button btnDecrement;
        private System.Windows.Forms.Button btnIncrement;
        private System.Windows.Forms.NumericUpDown numGranularity;
        private System.Windows.Forms.SplitContainer splitContainer3;
        private System.Windows.Forms.PictureBox picOut;
        private System.Windows.Forms.NumericUpDown numEpochs;
        private System.Windows.Forms.NumericUpDown numLayerSize;
        private System.Windows.Forms.Button btnReset;
    }
}


text:
Input field for chips using material design lite.
Requires and uses MDL.

redpajama_set_name: RedPajamaGithub


text:
#ifndef _XT_BPF_H
#define _XT_BPF_H

#include <linux/filter.h>
#include <linux/types.h>

#define XT_BPF_MAX_NUM_INSTR	64

struct xt_bpf_info {
	__u16 bpf_program_num_elem;
	struct sock_filter bpf_program[XT_BPF_MAX_NUM_INSTR];

	/* only used in the kernel */
	struct sk_filter *filter __attribute__((aligned(8)));
};

#endif /*_XT_BPF_H */


text:
package com.jdon.sample.test.bankaccount.infras;

import com.jdon.annotation.Component;
import com.jdon.annotation.Introduce;
import com.jdon.annotation.pointcut.Around;
import com.jdon.sample.test.bankaccount.aggregates.BankAccount;

import java.util.concurrent.atomic.AtomicInteger;

@Component()
@Introduce("modelCache")
public class AccountRepository implements AccountRepositoryIF {
	private final AtomicInteger sequenceId = new AtomicInteger(0);

	/*
	 * (non-Javadoc)
	 *
	 * @see com.jdon.sample.test.cqrs.ABRepositoryIF#loadA(java.lang.String)
	 */
	@Around
	public BankAccount getBankAccount(String id) {
		BankAccount model = new BankAccount(id, 100);
		return model;

	}

	public int loadSequencId(){
		return sequenceId.incrementAndGet();
	}

}


text:
package com.google.cloud.functions.v2beta.samples;

// [START cloudfunctions_v2beta_generated_FunctionService_ListRuntimes_sync]
import com.google.cloud.functions.v2beta.FunctionServiceClient;
import com.google.cloud.functions.v2beta.ListRuntimesRequest;
import com.google.cloud.functions.v2beta.ListRuntimesResponse;
import com.google.cloud.functions.v2beta.LocationName;

public class SyncListRuntimes {

  public static void main(String[] args) throws Exception {
    syncListRuntimes();
  }

  public static void syncListRuntimes() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (FunctionServiceClient functionServiceClient = FunctionServiceClient.create()) {
      ListRuntimesRequest request =
          ListRuntimesRequest.newBuilder()
              .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
              .setFilter("filter-1274492040")
              .build();
      ListRuntimesResponse response = functionServiceClient.listRuntimes(request);
    }
  }
}
// [END cloudfunctions_v2beta_generated_FunctionService_ListRuntimes_sync]


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Bulletin of the Biogeogr. Soc. Jap. 9: 165 (1939)

#### Original name
Cordyceps sobolifera var. takaoensis Kobayasi

### Remarks
null


text:
using System;

namespace Discovery.Slp.Services
{
	/// <summary>
	/// Default implementation for service location
	/// </summary>
	internal class DefaultProvider : IServiceProvider
	{
		public T GetInstance<T>(params object[] arguments)
		{
			return (T)GetInstance(typeof(T), arguments);
		}

		public object GetInstance(Type type, params object[] arguments)
		{
			var result = GetStaticInstance(type);
			if (result != null)
				return result;

			result = UseFactory(type, arguments);
			if (result != null)
				return result;

			type = MatchInterface(type);
			return Activator.CreateInstance(type, arguments);
		}

		private object GetStaticInstance(Type type)
		{
			if (type == typeof(Messages.MessageFactory))
				return Messages.MessageFactory.Instance;

			if (type == typeof(Configuration.SlpSection))
				return Configuration.SlpSection.Instance;

			if (type == typeof(MessageCounter))
				return MessageCounter.Instance;

			return null;
		}

		private object UseFactory(Type type, params object[] arguments)
		{
			if (type == typeof(AttributeCollection))
				return EntityFactory.Instance.CreateAttributeCollection((SlpReader)arguments[0]);
			if (type == typeof(ServiceEntry))
				return EntityFactory.Instance.CreateServiceEntry((SlpReader)arguments[0]);
			if (type == typeof(Security.AuthenticationBlock))
				return EntityFactory.Instance.CreateAuthenticationBlock((SlpReader)arguments[0]);

			return null;
		}

		private Type MatchInterface(Type type)
		{
			if (!type.IsInterface)
				return type;

			throw new ApplicationException("Unsupported interface requested");
		}
	}
}


text:
<?php

// autoload.php @generated by Composer

require_once __DIR__ . '/composer' . '/autoload_real.php';

return ComposerAutoloaderInitf53986bb0fe63006eb7d9081cfb41bb7::getLoader();


text:
package org.pepstock.charba.client.events;

import org.pepstock.charba.client.configuration.Axis;
import org.pepstock.charba.client.dom.events.NativeAbstractMouseEvent;
import org.pepstock.charba.client.items.ScaleItem;
import org.pepstock.charba.client.items.ScaleValueItem;

/**
 * Event which is fired when the user clicks on the axis of the chart.
 *
 * @author Andrea "Stock" Stocchero
 */
public final class AxisClickEvent extends AbstractAxisEvent {

	/**
	 * Event type
	 */
	public static final EventType TYPE = EventType.create(AxisClickEvent.class);
	// value selected on axis
	private final ScaleValueItem value;

	/**
	 * Creates the event with axis related to the click
	 *
	 * @param nativeEvent native event of this custom event
	 * @param item scale item related to the click
	 * @param axis axis configuration instance
	 * @param value value instance selected on axis
	 */
	public AxisClickEvent(NativeAbstractMouseEvent nativeEvent, ScaleItem item, Axis axis, ScaleValueItem value) {
		super(nativeEvent, TYPE, item, axis);
		this.value = value;
	}

	/**
	 * Returns the scale value related to the click, or null if not consistent.
	 *
	 * @return the scale value related to the click, or null if not consistent
	 */
	public ScaleValueItem getValue() {
		return value;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see org.pepstock.charba.client.events.Event#dispatch(org.pepstock.charba.client.events.EventHandler)
	 */
	@Override
	protected void dispatch(EventHandler handler) {
		// checks if handler is a correct instance
		if (handler instanceof AxisClickEventHandler) {
			// casts handler
			AxisClickEventHandler myHandler = (AxisClickEventHandler) handler;
			// invokes
			myHandler.onClick(this);
		}
	}

}


text:
package kieker.analysis.plugin.reader.filesystem;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.channels.Channels;
import java.nio.channels.ReadableByteChannel;
import java.util.zip.ZipInputStream;

import kieker.analysis.plugin.reader.util.ByteBufferDeserializer;
import kieker.analysis.plugin.reader.util.IMonitoringRecordReceiver;
import kieker.common.logging.Log;
import kieker.common.logging.LogFactory;
import kieker.common.util.filesystem.FSUtil;
import kieker.common.util.filesystem.FileExtensionFilter;
import kieker.common.util.registry.reader.ReaderRegistry;

/**
 * Reads the contents of a single file system log directory and passes the records to the registered receiver of type {@link IMonitoringRecordReceiver}.
 *
 * @author Matthias Rohr, Andre van Hoorn, Jan Waller
 *
 * @since 1.2
 */
class BinaryLogReaderThread extends AbstractLogReaderThread {

	private static final Log LOG = LogFactory.getLog(BinaryLogReaderThread.class);

	private final ReaderRegistry<String> readerRegistry = new ReaderRegistry<String>();
	private final IMonitoringRecordReceiver recordReceiver;
	private final File inputDir;
	private final boolean shouldDecompress;
	private final ByteBufferDeserializer deserializer;

	/**
	 * Creates a new instance of this class.
	 *
	 * @param inputDir
	 *            The File object for the input directory.
	 * @param recordReceiver
	 *            The receiver handling the records.
	 * @param ignoreUnknownRecordTypes
	 *            select only records of this type; null selects all
	 * @param shouldDecompress
	 *            true if each log file is compressed, otherwise false
	 */
	public BinaryLogReaderThread(final File inputDir, final IMonitoringRecordReceiver recordReceiver, final boolean shouldDecompress) {
		super(LOG, inputDir);
		if ((inputDir == null) || !inputDir.isDirectory()) {
			throw new IllegalArgumentException("Invalid or empty inputDir");
		}
		this.inputDir = inputDir;
		this.recordReceiver = recordReceiver;
		this.shouldDecompress = shouldDecompress;
		this.deserializer = new ByteBufferDeserializer(this.readerRegistry, LOG, 8192);
		this.deserializer.register(recordReceiver);
	}

	@Override
	protected FileExtensionFilter getFileExtensionFilter() {
		return (this.shouldDecompress) ? FileExtensionFilter.ZIP : FileExtensionFilter.BIN; // NOCS // NOPMD
	}

	/**
	 * Reads the mapping file located in the directory.
	 */
	@Override
	protected void readMappingFile() {
		File mappingFile = new File(this.inputDir.getAbsolutePath() + File.separator + FSUtil.MAP_FILENAME);
		if (!mappingFile.exists()) {
			// No mapping file found. Check whether we find a legacy tpmon.map file!
			mappingFile = new File(this.inputDir.getAbsolutePath() + File.separator + FSUtil.LEGACY_MAP_FILENAME);
			if (mappingFile.exists()) {
				LOG.info("Directory '" + this.inputDir + "' contains no file '" + FSUtil.MAP_FILENAME + "'. Found '" + FSUtil.LEGACY_MAP_FILENAME
						+ "' ... switching to legacy mode");
			} else {
				// no {kieker|tpmon}.map exists. This is valid for very old monitoring logs. Hence, only dump a log.warn
				if (LOG.isWarnEnabled()) {
					LOG.warn("No mapping file in directory '" + this.inputDir.getAbsolutePath() + "'");
				}
				return;
			}
		}
		// found any kind of mapping file
		BufferedReader in = null;
		try {
			in = new BufferedReader(new InputStreamReader(new FileInputStream(mappingFile), FSUtil.ENCODING));
			String line;
			while ((line = in.readLine()) != null) { // NOPMD (assign)
				if (line.length() == 0) {
					continue; // ignore empty lines
				}
				if (LOG.isDebugEnabled()) {
					LOG.debug("Read line: " + line);
				}
				final int split = line.indexOf('=');
				if (split == -1) {
					LOG.error("Failed to parse line: {" + line + "} from file " + mappingFile.getAbsolutePath()
							+ ". Each line must contain ID=VALUE pairs.");
					continue; // continue on errors
				}
				final String key = line.substring(0, split);
				final String value = FSUtil.decodeNewline(line.substring(split + 1));
				// the leading $ is optional
				final Integer id;
				try {
					id = Integer.valueOf((key.charAt(0) == '$') ? key.substring(1) : key); // NOCS
				} catch (final NumberFormatException ex) {
					LOG.error("Error reading mapping file, id must be integer", ex);
					continue; // continue on errors
				}
				final String prevVal = this.readerRegistry.register(id, value);
				if (prevVal != null) {
					LOG.error("Found addional entry for id='" + id + "', old value was '" + prevVal + "' new value is '" + value + "'");
				}
			}
		} catch (final IOException e) {
			LOG.error("Error reading " + mappingFile, e);
		} finally {
			if (in != null) {
				try {
					in.close();
				} catch (final IOException ex) {
					LOG.error("Exception while closing input stream for mapping file", ex);
				}
			}
		}
	}

	/**
	 * Reads the records contained in the given normal file and passes them to the registered {@link #recordReceiver}.
	 *
	 * @param inputFile
	 *            The input file which should be processed.
	 */
	@Override
	protected void processNormalInputFile(final File inputFile) {
		ReadableByteChannel channel = null;
		try {
			InputStream fileInputStream = new FileInputStream(inputFile);
			if (this.shouldDecompress) {
				@SuppressWarnings("resource")
				final ZipInputStream zipInputStream = new ZipInputStream(fileInputStream);
				zipInputStream.getNextEntry();
				fileInputStream = zipInputStream;
			}

			channel = Channels.newChannel(fileInputStream);

			this.deserializer.deserialize(channel);

		} catch (final FileNotFoundException e) {
			LOG.error("The binary input file could not be found.", e);
		} catch (final IOException e) {
			LOG.error("An exception occurred", e);
		} finally {
			if (channel != null) {
				try {
					channel.close();
				} catch (final IOException e) {
					LOG.warn("An exception occurred", e);
				}
			}
		}
	}

	@Override
	protected void onEndOfRun() {
		this.recordReceiver.newEndOfFileRecord();
	}

}


text:
namespace Ui {
    class OverviewPage;
}

class OverviewPage : public QWidget
{
    Q_OBJECT

public:
    explicit OverviewPage(QWidget *parent, BitcoinGUI *_gui);
    ~OverviewPage();

public slots:
    void gotoSendCoinsPage();
    void gotoVanityGenPage();
    void gotoMiningInfoPage();
    void gotoSettings();

signals:

private:
    Ui::OverviewPage *ui;
    BitcoinGUI *gui;

private slots:

};

#endif // OVERVIEWPAGE_H


text:
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model modulprj\master\models\TimetableLevel */
/* @var $form yii\widgets\ActiveForm */
?>

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'LVL_NM')->textInput(['maxlength' => true]) ?>

        <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

    <?php ActiveForm::end(); ?>


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="app_name">ActivityTest27AsyncTask</string>
    <string name="hello_world">Hello world!</string>
    <string name="action_settings">Settings</string>

</resources>


text:
/**
 * Provides utilities for a Beam runner to interact with a client using the Fn API.
 */
@DefaultAnnotation(NonNull.class)
package org.apache.beam.runners.core.fn;

import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
import edu.umd.cs.findbugs.annotations.NonNull;


text:
'''An HTML conversion action for the Coda Plugin Skeleton'''

import cp_actions as cp

from markdown import markdown
from textile import textile
from html2text import html2text
from html2textile import html2textile
from rest2html import rest2html
from html2rest_wrapper import html2rest

def act(controller, bundle, options):
    '''
    Required action method
    '''

    context = cp.get_context(controller)

    from_lang = cp.get_option(options, 'from', 'markdown').lower()
    to_lang = cp.get_option(options, 'to', 'html').lower()

    selection, range = cp.selection_and_range(context)

    # grab the whole document if they haven't selected anything...
    if range.length == 0:
        selection = context.string()
        range = cp.new_range(0, len(selection))

    # what are we coming from?
    if from_lang == 'markdown':
        html = markdown(selection)
    elif from_lang == 'textile':
        html = textile(selection)
    elif from_lang == 'rest':
        html = rest2html(selection)
    elif from_lang == 'html':
    	html = selection
    else:
    	return

    # what are we going to?
    if to_lang == 'markdown':
    	text = html2text(html)
    elif to_lang == 'textile':
    	text = html2textile(html)
    elif to_lang == 'rest':
        text = html2rest(html)
    elif to_lang == 'html':
    	text = html
    else:
    	return

    cp.insert_text(context, text, range)


text:
using System;
using System.Data;
using System.Collections;
using System.Threading.Tasks;
using System.Collections.Generic;
using Mono.Data.Sqlite;
using Erasme.Json;
using Erasme.Http;
using Erasme.Cloud.Utils;

namespace KJing.Directory
{
	public class VideoMediaInfoPlugin: IFilePlugin
	{
		static string[] supportedMimeTypes = new string[] {
			"video/x-ms-asf",
			"video/avi",
			"video/x-dv",
			"video/mpeg",
			"video/mp4",
			"video/x-motion-jpeg",
			"video/quicktime",
			"video/vnd.rn-realvideo",
			"video/webm"
		};

		FileService fileService;
		object instanceLock = new object();
		Dictionary<string,LongTask> runningTasks = new Dictionary<string, LongTask>();

		public VideoMediaInfoPlugin(FileService fileService)
		{
			this.fileService = fileService;
		}

		public string Name {
			get {
				return "videoMediaInfo";
			}
		}

		public string[] MimeTypes {
			get {
				return supportedMimeTypes;
			}
		}

		public void Init(IDbConnection dbcon)
		{
			// create the videoMediaInfo table
			using(IDbCommand dbcmd = dbcon.CreateCommand()) {
				string sql = "CREATE TABLE videoMediaInfo (id VARCHAR PRIMARY KEY, fails INTEGER(1), "+
					"width INTEGER, height INTEGER, durationMilliseconds INTEGER)";
				dbcmd.CommandText = sql;
				dbcmd.ExecuteNonQuery();
			}
		}

		public void ProcessContent(JsonValue data, JsonValue diff, string contentFilePath)
		{
			if(contentFilePath == null)
				return;

			int width = 0;
			int height = 0;
			long durationMilliseconds = 0;
			bool fails = true;

			double doubleWidth;
			double doubleHeight;
			Erasme.Cloud.Preview.ImageVideoPreview.GetVideoSize(contentFilePath, out doubleWidth, out doubleHeight);
			if((doubleWidth != 0) || (doubleHeight != 0)) {
				width = (int)doubleWidth;
				height = (int)doubleHeight;

				double doubleDuration = Erasme.Cloud.Preview.ImageVideoPreview.GetVideoDuration(contentFilePath);
				if(doubleDuration != 0) {
					durationMilliseconds = (long)(doubleDuration * 1000);
					fails = false;
				}
			}

			JsonValue videoMediaInfo = new JsonObject();
			if(diff != null)
				diff["videoMediaInfo"] = videoMediaInfo;
			else
				data["videoMediaInfo"] = videoMediaInfo;
			videoMediaInfo["width"] = width;
			videoMediaInfo["height"] = height;
			videoMediaInfo["durationMilliseconds"] = durationMilliseconds;
			videoMediaInfo["fails"] = fails;
		}

		public void Get(IDbConnection dbcon, IDbTransaction transaction, string id, JsonValue value, string filterBy, List<string> groups, Rights heritedRights, List<ResourceContext> parents, ResourceContext context)
		{
			// contentRev == 0 => no file content
			if(value.ContainsKey("contentRev") && ((long)value["contentRev"] == 0))
				return;

			bool found = false;
			bool fails = true;
			int width = 0;
			int height = 0;
			long durationMilliseconds = 0;

			// select from the videoMediaInfo table
			using(IDbCommand dbcmd = dbcon.CreateCommand()) {
				dbcmd.CommandText = "SELECT fails,width,height,durationMilliseconds FROM videoMediaInfo WHERE id=@id";
				dbcmd.Transaction = transaction;
				dbcmd.Parameters.Add(new SqliteParameter("id", id));
				using(IDataReader reader = dbcmd.ExecuteReader()) {
					if(reader.Read()) {
						found = true;
						if(!reader.IsDBNull(0))
							fails = reader.GetBoolean(0);
						if(!reader.IsDBNull(1))
							width = reader.GetInt32(1);
						if(!reader.IsDBNull(2))
							height = reader.GetInt32(2);
						if(!reader.IsDBNull(3))
							durationMilliseconds = reader.GetInt64(3);
					}
					reader.Close();
				}
			}

			// if videoMediaInfo not found, try to build it now
			if(!found) {
				lock(instanceLock) {
					if(!runningTasks.ContainsKey(id)) {
						LongTask task = new LongTask(delegate {
							try {
								JsonValue diff = new JsonObject();
								ProcessContent(value, diff, fileService.GetLocalFile(id));
								fileService.Directory.ChangeResource(id, diff);
							}
							finally {
								lock(instanceLock) {
									runningTasks.Remove(id);
								}
							}
						}, null, "Get videoMediaInfo for "+id, LongTaskPriority.High);
						fileService.Directory.LongRunningTaskScheduler.Start(task);
						runningTasks[id] = task;
					}
				}
			}

			if(found && !fails) {
				JsonObject videoMediaInfo = new JsonObject();
				videoMediaInfo["width"] = width;
				videoMediaInfo["height"] = height;
				videoMediaInfo["durationMilliseconds"] = durationMilliseconds;
				value["videoMediaInfo"] = videoMediaInfo;
			}
		}

		public void Create(IDbConnection dbcon, IDbTransaction transaction, JsonValue data, Dictionary<string, ResourceChange> changes)
		{
			Change(dbcon, transaction, data["id"], null, data, changes);
		}

		public void Change(IDbConnection dbcon, IDbTransaction transaction, string id, JsonValue data, JsonValue diff, Dictionary<string, ResourceChange> changes)
		{
			bool found = false;
			bool fails = false;
			int width = 0;
			int height = 0;
			long durationMilliseconds = 0;

			if(!diff.ContainsKey("videoMediaInfo"))
				return;

			// select from the videoMediaInfo table
			using(IDbCommand dbcmd = dbcon.CreateCommand()) {
				dbcmd.CommandText = "SELECT fails,width,height,durationMilliseconds FROM videoMediaInfo WHERE id=@id";
				dbcmd.Transaction = transaction;
				dbcmd.Parameters.Add(new SqliteParameter("id", id));
				using(IDataReader reader = dbcmd.ExecuteReader()) {
					if(reader.Read()) {
						found = true;
						if(!reader.IsDBNull(0))
							fails = reader.GetBoolean(0);
						if(!reader.IsDBNull(1))
							width = reader.GetInt32(1);
						if(!reader.IsDBNull(2))
							height = reader.GetInt32(2);
						if(!reader.IsDBNull(3))
							durationMilliseconds = reader.GetInt64(3);
					}
					reader.Close();
				}
			}

			JsonValue videoMediaInfo = diff["videoMediaInfo"];
			if(videoMediaInfo.ContainsKey("width"))
				width = videoMediaInfo["width"];
			if(videoMediaInfo.ContainsKey("height"))
				height = videoMediaInfo["height"];
			if(videoMediaInfo.ContainsKey("fails"))
				fails = videoMediaInfo["fails"];
			if(videoMediaInfo.ContainsKey("durationMilliseconds"))
				durationMilliseconds = videoMediaInfo["durationMilliseconds"];

			// if videoMediaInfo not found, insert it
			if(!found) {
				// cache the result in the database
				using(IDbCommand dbcmd = dbcon.CreateCommand()) {
					dbcmd.Transaction = transaction;
					dbcmd.CommandText = "INSERT INTO videoMediaInfo (id,fails,width,height,durationMilliseconds) VALUES (@id,@fails,@width,@height,@durationMilliseconds)";
					dbcmd.Parameters.Add(new SqliteParameter("id", id));
					dbcmd.Parameters.Add(new SqliteParameter("fails", fails));
					dbcmd.Parameters.Add(new SqliteParameter("width", width));
					dbcmd.Parameters.Add(new SqliteParameter("height", height));
					dbcmd.Parameters.Add(new SqliteParameter("durationMilliseconds", durationMilliseconds));
					if(dbcmd.ExecuteNonQuery() != 1)
						throw new Exception("videoMediaInfo create fails");
				}
			}
			// else update it
			else {
				// cache the result in the database
				using(IDbCommand dbcmd = dbcon.CreateCommand()) {
					dbcmd.Transaction = transaction;
					dbcmd.CommandText = "UPDATE durationMilliseconds fails=@fails,width=@width,height=@height,durationMilliseconds=@durationMilliseconds WHERE id=@id";
					dbcmd.Parameters.Add(new SqliteParameter("id", id));
					dbcmd.Parameters.Add(new SqliteParameter("fails", fails));
					dbcmd.Parameters.Add(new SqliteParameter("width", width));
					dbcmd.Parameters.Add(new SqliteParameter("height", height));
					dbcmd.Parameters.Add(new SqliteParameter("durationMilliseconds", durationMilliseconds));
					if(dbcmd.ExecuteNonQuery() != 1)
						throw new Exception("videoMediaInfo update fails");
				}
			}

		}

		public void Delete(IDbConnection dbcon, IDbTransaction transaction, string id, JsonValue data, Dictionary<string, ResourceChange> changes)
		{
			using(IDbCommand dbcmd = dbcon.CreateCommand()) {
				dbcmd.Transaction = transaction;
				dbcmd.CommandText = "DELETE FROM videoMediaInfo WHERE id=@id";
				dbcmd.Parameters.Add(new SqliteParameter("id", id));
				dbcmd.ExecuteNonQuery();
			}
		}

		public Task ProcessRequestAsync(HttpContext context)
		{
			return Task.FromResult<Object>(null);
		}
	}
}


text:
namespace VsChromium.Core.Files {
  ///
  /// Information associated to a file or directory change notification,
  /// given its <see cref="FullPath"/>.
  ///
  public struct PathChangeEntry {
    private readonly FullPath _basePath;
    private readonly RelativePath _entryPath;
    private readonly PathChangeKind _changeKind;
    private readonly PathKind _pathKind;

    public PathChangeEntry(FullPath basePath, RelativePath entryPath, PathChangeKind changeKind, PathKind pathKind) {
      _basePath = basePath;
      _entryPath = entryPath;
      _changeKind = changeKind;
      _pathKind = pathKind;
    }

    public FullPath BasePath { get { return _basePath; } }
    public RelativePath RelativePath { get { return _entryPath; } }
    public FullPath Path { get { return _basePath.Combine(_entryPath); } }
    public PathChangeKind ChangeKind { get { return _changeKind; } }
    public PathKind PathKind { get { return _pathKind; } }

    public override string ToString() {
      return string.Format("Change: Path=\"{0}\", PathKind={1}, ChangeKind={2}", Path.Value, PathKind, ChangeKind);
    }
  }

  public enum PathKind {
    /// The path is *either* a file or a directory, i.e. we don't know which one, but it is not both.
    FileOrDirectory,
    /// The path is definitely a file path
    File,
    /// The path is definitely a directory path
    Directory,
    ///
    /// The path is *both* a directory and a file path, probably because it was a file path at some point
    /// in time, then became a directory path later on, or vice versa.
    ///
    FileAndDirectory,
  }
}


text:
namespace Envoy {
namespace Router {
namespace {

class VhdsTest : public testing::Test {
public:
  void SetUp() override {
    default_vhds_config_ = R"EOF(
name: my_route
vhds:
  config_source:
    api_config_source:
      api_type: DELTA_GRPC
      grpc_services:
        envoy_grpc:
          cluster_name: xds_cluster
)EOF";
  }

  envoy::config::route::v3::VirtualHost buildVirtualHost(const std::string& name,
                                                         const std::string& domain) {
    return TestUtility::parseYaml<envoy::config::route::v3::VirtualHost>(fmt::format(R"EOF(
      name: {}
      domains: [{}]
      routes:
      - match: {{ prefix: "/" }}
        route: {{ cluster: "my_service" }}
    )EOF",
                                                                                name, domain));
  }

  Protobuf::RepeatedPtrField<envoy::service::discovery::v3::Resource>
  buildAddedResources(const std::vector<envoy::config::route::v3::VirtualHost>& added_or_updated) {
    Protobuf::RepeatedPtrField<envoy::service::discovery::v3::Resource> to_ret;

    for (const auto& vhost : added_or_updated) {
      auto* resource = to_ret.Add();
      resource->set_name(vhost.name());
      resource->set_version("1");
      resource->mutable_resource()->PackFrom(vhost);
    }

    return to_ret;
  }

  Protobuf::RepeatedPtrField<std::string>
  buildRemovedResources(const std::vector<std::string>& removed) {
    return Protobuf::RepeatedPtrField<std::string>{removed.begin(), removed.end()};
  }
  RouteConfigUpdatePtr
  makeRouteConfigUpdate(const envoy::config::route::v3::RouteConfiguration& rc) {
    RouteConfigUpdatePtr config_update_info = std::make_unique<RouteConfigUpdateReceiverImpl>(
        factory_context_.timeSource(), factory_context_.messageValidationVisitor());
    config_update_info->onRdsUpdate(rc, "1");
    return config_update_info;
  }

  NiceMock<Server::Configuration::MockServerFactoryContext> factory_context_;
  Init::ExpectableWatcherImpl init_watcher_;
  Init::TargetHandlePtr init_target_handle_;
  const std::string context_ = "vhds_test";
  std::unordered_set<Envoy::Router::RouteConfigProvider*> providers_;
  Protobuf::util::MessageDifferencer messageDifferencer_;
  std::string default_vhds_config_;
  NiceMock<Envoy::Config::MockSubscriptionFactory> subscription_factory_;
};

// verify that api_type: DELTA_GRPC passes validation
TEST_F(VhdsTest, VhdsInstantiationShouldSucceedWithDELTA_GRPC) {
  const auto route_config =
      TestUtility::parseYaml<envoy::config::route::v3::RouteConfiguration>(default_vhds_config_);
  RouteConfigUpdatePtr config_update_info = makeRouteConfigUpdate(route_config);

  EXPECT_NO_THROW(VhdsSubscription(config_update_info, factory_context_, context_, providers_));
}

// verify that api_type: GRPC fails validation
TEST_F(VhdsTest, VhdsInstantiationShouldFailWithoutDELTA_GRPC) {
  const auto route_config =
      TestUtility::parseYaml<envoy::config::route::v3::RouteConfiguration>(R"EOF(
name: my_route
vhds:
  config_source:
    api_config_source:
      api_type: GRPC
      grpc_services:
        envoy_grpc:
          cluster_name: xds_cluster
  )EOF");
  RouteConfigUpdatePtr config_update_info = makeRouteConfigUpdate(route_config);

  EXPECT_THROW(VhdsSubscription(config_update_info, factory_context_, context_, providers_),
               EnvoyException);
}

// verify addition/updating of virtual hosts
TEST_F(VhdsTest, VhdsAddsVirtualHosts) {
  const auto route_config =
      TestUtility::parseYaml<envoy::config::route::v3::RouteConfiguration>(default_vhds_config_);
  RouteConfigUpdatePtr config_update_info = makeRouteConfigUpdate(route_config);

  VhdsSubscription subscription(config_update_info, factory_context_, context_, providers_);
  EXPECT_EQ(0UL, config_update_info->routeConfiguration().virtual_hosts_size());

  auto vhost = buildVirtualHost("vhost1", "vhost.first");
  const auto& added_resources = buildAddedResources({vhost});
  const Protobuf::RepeatedPtrField<std::string> removed_resources;
  factory_context_.cluster_manager_.subscription_factory_.callbacks_->onConfigUpdate(
      added_resources, removed_resources, "1");

  EXPECT_EQ(1UL, config_update_info->routeConfiguration().virtual_hosts_size());
  EXPECT_TRUE(
      messageDifferencer_.Equals(vhost, config_update_info->routeConfiguration().virtual_hosts(0)));
}

// verify that an RDS update of virtual hosts leaves VHDS virtual hosts intact
TEST_F(VhdsTest, RdsUpdatesVirtualHosts) {
  const auto route_config =
      TestUtility::parseYaml<envoy::config::route::v3::RouteConfiguration>(R"EOF(
name: my_route
virtual_hosts:
- name: vhost_rds1
  domains: ["vhost.rds.first"]
  routes:
  - match: { prefix: "/rdsone" }
    route: { cluster: my_service }
vhds:
  config_source:
    api_config_source:
      api_type: DELTA_GRPC
      grpc_services:
        envoy_grpc:
          cluster_name: xds_cluster
  )EOF");
  const auto updated_route_config =
      TestUtility::parseYaml<envoy::config::route::v3::RouteConfiguration>(R"EOF(
name: my_route
virtual_hosts:
- name: vhost_rds1
  domains: ["vhost.rds.first"]
  routes:
  - match: { prefix: "/rdsone" }
    route: { cluster: my_service }
- name: vhost_rds2
  domains: ["vhost.rds.second"]
  routes:
  - match: { prefix: "/rdstwo" }
    route: { cluster: my_other_service }
vhds:
  config_source:
    api_config_source:
      api_type: DELTA_GRPC
      grpc_services:
        envoy_grpc:
          cluster_name: xds_cluster
  )EOF");
  RouteConfigUpdatePtr config_update_info = makeRouteConfigUpdate(route_config);

  VhdsSubscription subscription(config_update_info, factory_context_, context_, providers_);
  EXPECT_EQ(1UL, config_update_info->routeConfiguration().virtual_hosts_size());
  EXPECT_EQ("vhost_rds1", config_update_info->routeConfiguration().virtual_hosts(0).name());

  auto vhost = buildVirtualHost("vhost_vhds1", "vhost.first");
  const auto& added_resources = buildAddedResources({vhost});
  const Protobuf::RepeatedPtrField<std::string> removed_resources;
  factory_context_.cluster_manager_.subscription_factory_.callbacks_->onConfigUpdate(
      added_resources, removed_resources, "1");
  EXPECT_EQ(2UL, config_update_info->routeConfiguration().virtual_hosts_size());

  config_update_info->onRdsUpdate(updated_route_config, "2");

  EXPECT_EQ(3UL, config_update_info->routeConfiguration().virtual_hosts_size());
  auto actual_vhost_0 = config_update_info->routeConfiguration().virtual_hosts(0);
  auto actual_vhost_1 = config_update_info->routeConfiguration().virtual_hosts(1);
  auto actual_vhost_2 = config_update_info->routeConfiguration().virtual_hosts(2);
  EXPECT_TRUE("vhost_rds1" == actual_vhost_0.name() || "vhost_rds1" == actual_vhost_1.name() ||
              "vhost_rds1" == actual_vhost_2.name());
  EXPECT_TRUE("vhost_rds2" == actual_vhost_0.name() || "vhost_rds2" == actual_vhost_1.name() ||
              "vhost_rds2" == actual_vhost_2.name());
  EXPECT_TRUE("vhost_vhds1" == actual_vhost_0.name() || "vhost_vhds1" == actual_vhost_1.name() ||
              "vhost_vhds1" == actual_vhost_2.name());
}

// verify vhds validates VirtualHosts in added_resources
TEST_F(VhdsTest, VhdsValidatesAddedVirtualHosts) {
  const auto route_config =
      TestUtility::parseYaml<envoy::config::route::v3::RouteConfiguration>(default_vhds_config_);
  RouteConfigUpdatePtr config_update_info = makeRouteConfigUpdate(route_config);

  VhdsSubscription subscription(config_update_info, factory_context_, context_, providers_);

  auto vhost = TestUtility::parseYaml<envoy::config::route::v3::VirtualHost>(R"EOF(
        name: invalid_vhost
        domains: []
        routes:
        - match: { prefix: "/" }
          route: { cluster: "my_service" }
)EOF");

  const auto& added_resources = buildAddedResources({vhost});
  const Protobuf::RepeatedPtrField<std::string> removed_resources;

  EXPECT_THROW(factory_context_.cluster_manager_.subscription_factory_.callbacks_->onConfigUpdate(
                   added_resources, removed_resources, "1"),
               ProtoValidationException);
}

} // namespace
} // namespace Router
} // namespace Envoy


text:
description("Test for chromium's canvas bug where fillText resets the current context https://bugs.webkit.org/show_bug.cgi?id=26436 . You must see green box with message 'This text should be seen', and black box below the green box.")

function pixelValueAt(context, x, y) {
    var imageData = context.getImageData(x, y, 1, 1);
    return imageData.data;
}

function pixelToString(p) {
    return "[" + p[0] + ", " + p[1] + ", " + p[2] + ", " + p[3] + "]"
}

function pixelShouldBe(context, x, y, expectedPixelString) {
    var pixel = pixelValueAt(context, x, y);
    var expectedPixel = eval(expectedPixelString);

    var pixelString = "pixel " + x + ", " + y;
    if (areArraysEqual(pixel, expectedPixel)) {
        testPassed(pixelString + " is " + pixelToString(pixel));
    } else {
        testFailed(pixelString + " should be " + pixelToString(expectedPixel) + " was " + pixelToString(pixel));
    }
}

var canvas = document.createElement("canvas");
canvas.height = 100;
canvas.width = 500;
canvas.style.height = "100";
canvas.style.width = "500";

document.body.appendChild(canvas);

var ctx = canvas.getContext('2d');
ctx.fillStyle = 'rgb(0,255,0)';
ctx.fillRect(0, 0, 500, 100);
ctx.fillStyle = 'rgb(0,0,0)';
ctx.fillText("This text should be seen", 20, 20);
ctx.translate(0, 50);
ctx.font = "10pt Arial";
ctx.fillText("This text should NOT be seen", 20, 20);
// If fillText resets the current context, this rectangle won't hide the text.
ctx.fillStyle = 'rgb(0,0,0)';
ctx.fillRect(0, 0, 500, 50);

pixelShouldBe(ctx, 0, 0, "[0,255,0,255]");


text:
using namespace std;

static inline void devToHost(void *host, void *dev, int size)
{
  //cout << "H: " << host << " | D: " << dev << " | S: " << size << endl;
  checkCudaErrors(cudaMemcpy(host, dev, size, cudaMemcpyDeviceToHost));
}

static inline void hostToDev(void *dev, void *host, int size)
{
  checkCudaErrors(cudaMemcpy(dev, host, size, cudaMemcpyHostToDevice));
}

int align_pow2(int a)
{
    if (a == (a & (1 << (ffs(a) - 1))))
        return a;
    else
        return 1 << ((int)ceil(log2((double)a)));
}

gmpz_array::
gmpz_array() : maxSize(0), numElements(0), elementSize(0), isAllocated(false)
{}

gmpz_array::
~gmpz_array()
{
    if (isAllocated) {
        checkCudaErrors(cudaFree(data));
        free(host_mem_pool);
    }
}

int gmpz_array::
arraySize() const
{
    //cout << "arraySize. ES: " << elementSize << " | NE: " << numElements << endl;
    return sizeof(gmp_limb_t) * elementSize * numElements;
}

void gmpz_array::
alloc(int n_elems, int elem_size, bool free_old)
{
    if (isAllocated && n_elems <= maxSize && elem_size <= elementSize)
      return;

    // Force a max elementSize.
    elem_size = max(elem_size, elementSize);

    if (isAllocated && free_old) {
        checkCudaErrors(cudaFree(data));
        free(host_mem_pool);
    }

    maxSize = n_elems;
    elementSize = align_pow2(elem_size);
    numElements = n_elems;
    checkCudaErrors(cudaMalloc((void **)&data, arraySize()));
    host_mem_pool = (gmp_limb_t *)malloc(arraySize());
    isAllocated = true;

    //cout << "ALLOC. H: " << host_mem_pool << " | D: " << data << " | S: " << arraySize() << endl;

    setSize(maxSize);
}

void gmpz_array::
alloc(int n_elems, int elem_size)
{
    alloc(n_elems, elem_size, true);
}

void gmpz_array::
resize(int elem_size)
{
    if (isAllocated && (elementSize < elem_size)) {
        gmp_limb_t* old_data = data;
        int old_elem_size = elementSize;

        alloc(numElements, elem_size, false);

        int size = min(old_elem_size, elem_size);

        for (int i = 0; i < numElements; i++) {
            checkCudaErrors(cudaMemcpy(
                  (char*)(old_data + i * old_elem_size),
                  (char*)(data + i * elementSize),
                  sizeof(gmp_limb_t) * size,
                  cudaMemcpyDeviceToDevice));
        }

        checkCudaErrors(cudaFree(old_data));
    }
}

void gmpz_array::
writeToDevice()
{
    hostToDev(data, host_mem_pool, arraySize());
}

void gmpz_array::
readFromDevice()
{
    devToHost(host_mem_pool, data, arraySize());
}

void gmpz_array::
fromMPZ(const mpz_t n, int size, bool write_to_dev)
{
    const int elemSize = n->_mp_size * sizeof(n->_mp_d[0]) / sizeof(gmp_limb_t);
    alloc(size, elemSize);

    size_t count;
    mpz_export(host_mem_pool, &count, -1, sizeof(gmp_limb_t), -1, 0, n);
    memset(host_mem_pool + count, 0, (elementSize - count) * sizeof(gmp_limb_t));

    gmp_limb_t* hostData = host_mem_pool + elementSize;
    for (int i = 0; i < size; i++) {
        memcpy(hostData, host_mem_pool, elementSize * sizeof(gmp_limb_t));
        hostData += elementSize;
    }

    if (write_to_dev)
        writeToDevice();
}

void gmpz_array::
fromMPZArray(const mpz_t *array, int size, int stride, bool write_to_dev)
{
    int max_elem_size = compute_num_limbs(array, size, stride);

    alloc(size, max_elem_size);
    to_gpu_format(host_mem_pool, array, size, elementSize, stride);
    setSize(size);

    if (write_to_dev)
      writeToDevice();
}

void gmpz_array::
toMPZArray(mpz_t *array, int stride, bool read_from_dev)
{
    gmp_limb_t* host_data = host_mem_pool;

    if (read_from_dev)
      readFromDevice();

    for (int i = 0; i < numElements; i++) {
        mpz_import(array[i * stride], elementSize, -1, sizeof(gmp_limb_t), -1, 0, host_data);
        host_data += elementSize;
    }
}

int
compute_num_limbs(const mpz_t *array, int size, int stride)
{
    int num_limbs = 1;
    for (int i = 0; i < size; i++) {
        num_limbs = max(num_limbs, array[stride * i]->_mp_size);
    }
    return num_limbs * sizeof(array[0]->_mp_d[0]) / sizeof(gmp_limb_t);
}

void
to_gpu_format(gmp_limb_t* data, const mpz_t *array, int size, int num_limbs, int stride)
{
    size_t count;
    for (int i = 0; i < size; i++) {
        mpz_export(data, &count, -1, sizeof(gmp_limb_t), -1, 0, array[stride * i]);
        assert((int) count <= num_limbs);
        memset(data + count, 0, (num_limbs - count) * sizeof(gmp_limb_t));
        data += num_limbs;
    }
}

WORD*
to_gpu_format(int arr_size, const mpz_t *n, int num_limbs)
{
  WORD *gpu_n = (WORD*)malloc(num_limbs * sizeof(WORD) * arr_size);
  to_gpu_format(gpu_n, n, arr_size, num_limbs);
  return gpu_n;
}

WORD*
to_gpu_format(const mpz_t n, int num_limbs)
{
  size_t count;
  WORD *gpu_n = (WORD*)malloc(num_limbs * sizeof(WORD));
  mpz_export(gpu_n, &count, -1, sizeof(WORD), -1, 0, n);
  memset(&gpu_n[count], 0, (num_limbs - count) * sizeof(WORD));
  return gpu_n;
}

WORD*
to_gpu_format_ui(const WORD n, int num_limbs)
{
  size_t count;

  WORD *gpu_n = (WORD*)malloc(num_limbs * sizeof(WORD));
  memset(gpu_n, 0, num_limbs * sizeof(WORD));
  gpu_n[0] = n;
  return gpu_n;
}

WORD*
to_dev_memory(const mpz_t n, int num_limbs)
{
  WORD *dev_mem, *host_mem;
  const int array_size = num_limbs * sizeof(WORD);

  host_mem = to_gpu_format(n, num_limbs);
  assert(host_mem);

  checkCudaErrors(cudaMalloc((void**)&dev_mem, array_size));
  hostToDev(dev_mem, host_mem, array_size);
  free(host_mem);

  return dev_mem;
}


text:
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';

moduleForComponent('paper-radio', 'Integration | Component | paper radio', {
  integration: true
});

test('should set and remove checked css class', function(assert) {
  assert.expect(2);

  this.set('groupValue', '1');
  this.render(hbs`
    {{#paper-radio value="1" groupValue=groupValue onChange=(action (mut groupValue))}}
      Radio button 1
    {{/paper-radio}}
    {{#paper-radio value="2" groupValue=groupValue onChange=(action (mut groupValue))}}
      Radio button 2
    {{/paper-radio}}
  `);
  assert.ok(this.$('md-radio-button').hasClass('md-checked'));

  this.set('groupValue', null);
  assert.ok(!this.$('md-radio-button').hasClass('md-checked'));
});

test('should trigger an action when checking', function(assert) {
  assert.expect(1);

  this.set('handleChange', (value) => {
    assert.equal(value, '1');
  });

  this.render(hbs`
    {{#paper-radio value="1" groupValue=groupValue onChange=handleChange}}
      Radio button 1
    {{/paper-radio}}
    {{#paper-radio value="2" groupValue=groupValue onChange=handleChange}}
      Radio button 2
    {{/paper-radio}}
  `);

  this.$('md-radio-button').first().click();
});

test('should trigger an action when unchecking (toggle is true)', function(assert) {
  assert.expect(1);

  this.set('groupValue', '1');
  this.set('handleChange', (value) => {
    assert.equal(value, null);
  });

  this.render(hbs`
    {{#paper-radio toggle=true value="1" groupValue=groupValue onChange=handleChange}}
      Radio button 1
    {{/paper-radio}}
  `);

  this.$('md-radio-button').click();
});

test('shouldn\'t trigger an action when disabled', function(assert) {
  assert.expect(0);

  this.set('handleChange', (checked) => {
    assert.equal(checked, '1');
  });

  this.render(hbs`
    {{#paper-radio disabled=true value="1" groupValue=groupValue onChange=handleChange}}
      Radio button 1
    {{/paper-radio}}
  `);

  this.$('md-radio-button').click();
});

test('blockless version should set label inside', function(assert) {
  assert.expect(1);

  this.render(hbs`{{paper-radio value="1" onChange=(action (mut value)) label="çup?"}}`);

  assert.equal(this.$('.md-label > span').text().trim(), 'çup?');
});

test('block version should set label inside', function(assert) {
  assert.expect(1);

  this.render(hbs`
    {{#paper-radio value="1" onChange=(action (mut value))}}
      çup?
    {{/paper-radio}}
  `);

  assert.equal(this.$('.md-label > span').text().trim(), 'çup?');
});

/* test('the `onChange` action is mandatory for paper-radio', function(assert) {
  assert.expect(1);

  assert.throws(() => {
    this.render(hbs`{{paper-radio value="1"}}`);
  }, /requires an `onChange` action/);
});*/


text:
class AddFlagColumnToWriters < ActiveRecord::Migration
  def change
  	add_column :writers, :flagged, :boolean, default: false
  end
end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
org.jivesoftware.openfire.resultsetmanager (Openfire 3.8.1 Javadoc)
</TITLE>

<META NAME="keywords" CONTENT="org.jivesoftware.openfire.resultsetmanager package">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

org.jivesoftware.openfire.resultsetmanager

Interfaces

Result

Classes

ResultSet

ResultSetImpl


text:
//
//  KDILabel.h
//  Ditko
//
//  Created by William Towe on 3/10/17.
//  Copyright © 2021 Kosoku Interactive, LLC. All rights reserved.
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.

#import <Ditko/KDIBorderedView.h>

NS_ASSUME_NONNULL_BEGIN

/**
 KDILabel is a UILabel subclass adds an edgeInsets property to add padding around its text. It also conforms to KDIBorderedView, allowing it to display borders.
 */
@interface KDILabel : UILabel <KDIBorderedView>

/**
 Set and get whether the receiver can copy the value of its text property to the pasteboard. If YES, when the receiver is long pressed on, it will show the edit menu via UIMenuController with the Copy item.

 The default is NO.
 */
#if (TARGET_OS_IOS)
@property (assign,nonatomic,getter=isCopyable) BOOL copyable;
#endif

/**
 Set and get the edge insets of the receiver. They affect how text is drawn using drawTextInRect:.

 The default is UIEdgeInsetsZero.
 */
@property (assign,nonatomic) UIEdgeInsets edgeInsets UI_APPEARANCE_SELECTOR;

- (void)layoutSubviews NS_REQUIRES_SUPER;
- (CGSize)intrinsicContentSize NS_REQUIRES_SUPER;
- (CGSize)sizeThatFits:(CGSize)size NS_REQUIRES_SUPER;
- (void)drawTextInRect:(CGRect)rect NS_REQUIRES_SUPER;

@end

NS_ASSUME_NONNULL_END


text:
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */

/*************************************************************************
 * Copyright (c) 2011 AT&T Intellectual Property
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors: See CVS logs. Details at http://www.graphviz.org/
 *************************************************************************/

#ifndef GV_COLORPROCS_H
#define GV_COLORPROCS_H

#include "color.h"

#ifdef __cplusplus
extern "C" {
#endif

extern void setColorScheme (char* s);
extern int colorxlate(char *str, gvcolor_t * color, color_type_t target_type);
extern char *canontoken(char *str);
extern int colorCvt(gvcolor_t *ocolor, gvcolor_t *ncolor);

#ifdef __cplusplus
}
#endif
#endif


text:
function joinvec(embed::WordEmbedding, words::Vector, fn::Function, wv::Array=[])
    for word in words
        if !haskey(embed.embedding, word)
            warn("'$word' not present in the vocabulary")
            return wv
        end
        if isempty(wv)
            wv = vec(embed.embedding[word])
        else
            wv = fn(wv, vec(embed.embedding[word]))
        end
    end
    wv
end

function find_nearest_words(embed::WordEmbedding, words::AbstractString; k=5)
    positive_words = AbstractString[]
    negative_words = AbstractString[]
    wordlist = positive_words
    for tok in split(words)
        tok = strip(tok)
        isempty(tok) && continue
        if tok == "+"
            wordlist = positive_words
        elseif tok == "-"
            wordlist = negative_words
        else
            push!(wordlist, tok)
        end
    end
    find_nearest_words(embed, positive_words, negative_words; k=k)
end

function find_nearest_words(embed::WordEmbedding, positive_words::Vector, negative_words::Vector; k=5)
    pq = PriorityQueue(Base.Order.Reverse)

    wv = joinvec(embed, positive_words, .+, Array[])
    wv = joinvec(embed, negative_words, .-, wv)

    if !isempty(wv)
        for (w, embed_w) in embed.embedding
            ((w in positive_words) || (w in negative_words)) && continue
            dist = cosine_dist(wv, vec(embed_w))
            enqueue!(pq, w, dist)
            (length(pq) > k) && dequeue!(pq)
        end
    end
    sort(collect(pq), by = t -> t[2])
end


text:
{% extends 'base.html' %}
{% load i18n %}
{% block title %}{% trans "Container Details" %}{% endblock %}

{% block page_header %}
  {% include "horizon/common/_page_header.html" with title=_("Container Details") %}
{% endblock page_header %}

{% block main %}

    {% include 'project/containers/_container_detail.html' %}

{% endblock %}


text:
package com.mejorandola.ejemplo;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.widget.TextView;

public class MainActivity extends
		Activity {
	private static final String TAG = "DEBUG";
	private String status_message = "";
	private TextView txt_msg;

	@Override
	protected void onCreate(
			Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		status_message = "Estado: onCreate";
		txt_msg.setText(status_message);
		Log.e(TAG, status_message);
	}

	@Override
	protected void onDestroy() {
		// TODO Auto-generated method stub
		super.onDestroy();
		status_message = "Estado: onDestroy";
		txt_msg.setText(status_message);
		Log.e(TAG, status_message);
	}

	@Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
		status_message = "Estado: onPause";
		txt_msg.setText(status_message);
		Log.e(TAG, status_message);
	}

	@Override
	protected void onRestart() {
		// TODO Auto-generated method stub
		super.onRestart();
		status_message = "Estado: onRestart";
		txt_msg.setText(status_message);
		Log.e(TAG, status_message);
	}

	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		status_message = "Estado: onResume";
		txt_msg.setText(status_message);
		Log.e(TAG, status_message);
	}

	@Override
	protected void onStart() {
		super.onStart();
		status_message = "Estado: onStart";
		txt_msg.setText(status_message);
		Log.e(TAG, status_message);
	}

	@Override
	protected void onStop() {
		super.onStop();
		status_message = "Estado: onStop";
		txt_msg.setText(status_message);
		Log.e(TAG, status_message);
	}

	@Override
	public boolean onCreateOptionsMenu(
			Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(
				R.menu.main, menu);
		return true;
	}

}


text:
package org.apache.servicecomb.foundation.common.utils.json;

import java.io.IOException;

import javax.servlet.http.Part;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;

public class JavaxServletPartDeserializer extends JsonDeserializer<Part> {
  @Override
  public Part deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
    final Object currentValue = p.getEmbeddedObject();
    return (Part) currentValue;
  }
}


text: import report_membership


text:
{% extends 'spectator_events/base.html' %}
{% load spectator_events %}

{% comment %}
Displays a paginated list of Movies, Plays, ClassicalWorks or DancePieces.
{% endcomment %}

{% block head_page_title %}{{ page_title }}{% endblock %}
{% block content_title %}{{ page_title }}{% endblock %}

{% block breadcrumbs %}
  {{ block.super }}

{{ breadcrumb_list_title }}

{% endblock %}

{% block content %}

{{ page_obj.paginator.count }} {% if page_obj.paginator.count == 1 %}{{ work_kind_name|lower }}{% else %}{{ work_kind_name_plural|lower }}{% endif %}.

  {% include 'spectator_events/includes/works_paginated.html' with work_list=object_list page_obj=page_obj only %}

{% endblock content %}

{% block sidebar_content %}

  {% most_seen_works_card kind=work_kind num=10 %}

  {{ block.super }}
{% endblock sidebar_content %}


text:
<!doctype html>

	<meta charset="utf-8">
	<title>jQuery UI Menu - Default functionality</title>
	<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">

	<link rel="stylesheet" href="../demos.css">

Aberdeen

Ada

Adamsville

Addyston

Adelphi

Adena

Adrian

Akron

Albany

Alexandria

Alger

Alledonia

Alliance

Alpha

Alvada

A menu with the default configuration. A list is transformed, adding theming, mouse and keyboard navigation support. Try to tab to the menu then use the cursor keys to navigate.


text:
/**
 * @file /include/teleop_core/keyop_core.hpp
 *
 * @brief The controlling node for remote operations on robot_core.
 *
 **/

/*****************************************************************************
 ** Ifdefs
 *****************************************************************************/

#ifndef KEYOP_CORE_NODE_HPP_
#define KEYOP_CORE_NODE_HPP_

/*****************************************************************************
 ** Includes
 *****************************************************************************/

#include <ros/ros.h>
#include <termios.h> // for keyboard input
#include <ecl/threads.hpp>
#include <geometry_msgs/Twist.h>  // for velocity commands
#include <geometry_msgs/TwistStamped.h>  // for velocity commands
#include <kobuki_msgs/KeyboardInput.h> // keycodes from remote teleops.

/*****************************************************************************
 ** Namespaces
 *****************************************************************************/

namespace keyop_core
{

/*****************************************************************************
 ** Interface
 *****************************************************************************/
/**
 * @brief Keyboard remote control for our robot core (mobile base).
 *
 */
class KeyOpCore
{
public:
  /*********************
   ** C&D
   **********************/
  KeyOpCore();
  ~KeyOpCore();
  bool init();

  /*********************
   ** Runtime
   **********************/
  void spin();

private:
  ros::Subscriber keyinput_subscriber;
  ros::Publisher velocity_publisher_;
  ros::Publisher motor_power_publisher_;
  bool last_zero_vel_sent;
  bool accept_incoming;
  bool power_status;
  bool wait_for_connection_;
  geometry_msgs::TwistPtr cmd;
  geometry_msgs::TwistStampedPtr cmd_stamped;
  double linear_vel_step, linear_vel_max;
  double angular_vel_step, angular_vel_max;
  std::string name;

  /*********************
   ** Commands
   **********************/
  void enable();
  void disable();
  void incrementLinearVelocity();
  void decrementLinearVelocity();
  void incrementAngularVelocity();
  void decrementAngularVelocity();
  void resetVelocity();

  /*********************
   ** Keylogging
   **********************/

  void keyboardInputLoop();
  void processKeyboardInput(char c);
  void remoteKeyInputReceived(const kobuki_msgs::KeyboardInput& key);
  void restoreTerminal();
  bool quit_requested;
  int key_file_descriptor;
  struct termios original_terminal_state;
  ecl::Thread thread;
};

} // namespace keyop_core

#endif /* KEYOP_CORE_NODE_HPP_ */


text:
package org.apache.camel.catalog;

import java.net.URISyntaxException;
import java.util.Map;

import org.apache.camel.CamelContextAware;
import org.apache.camel.StaticService;
import org.apache.camel.component.extension.ComponentVerifierExtension;
import org.apache.camel.spi.EndpointUriFactory;
import org.apache.camel.spi.SendDynamicAware;

/**
 * Runtime catalog which limited API needed by components that supports {@link ComponentVerifierExtension} or
 * {@link SendDynamicAware}.
 */
public interface RuntimeCamelCatalog extends StaticService, CamelContextAware {

    /**
     * Service factory key.
     */
    String FACTORY = "runtime-camelcatalog";

    /**
     * Factory key for {@link EndpointUriFactory}
     */
    String ENDPOINT_URI_ASSEMBLER_FACTORY = "runtime-camelcatalog-endpointuriassembler";

    /**
     * Returns the component information as JSON format.
     *

     * This API is needed by {@link ComponentVerifierExtension}.
     *
     * @param  name the component name
     * @return      component details in JSon
     */
    String componentJSonSchema(String name);

    /**
     * Parses the endpoint uri and constructs a key/value properties of each option.
     *

     * This API is needed by {@link SendDynamicAware}.
     *
     * @param  uri the endpoint uri
     * @return     properties as key value pairs of each endpoint option
     */
    Map<String, String> endpointProperties(String uri) throws URISyntaxException;

    /**
     * Parses the endpoint uri and constructs a key/value properties of only the lenient properties (eg custom options)
     *

     * For example using the HTTP components to provide query parameters in the endpoint uri.
     *

     * This API is needed by {@link SendDynamicAware}.
     *
     * @param  uri the endpoint uri
     * @return     properties as key value pairs of each lenient properties
     */
    Map<String, String> endpointLenientProperties(String uri) throws URISyntaxException;

    /**
     * Validates the properties for the given scheme against component and endpoint
     *

     * This API is needed by {@link ComponentVerifierExtension}.
     *
     * @param  scheme     the endpoint scheme
     * @param  properties the endpoint properties
     * @return            validation result
     */
    EndpointValidationResult validateProperties(String scheme, Map<String, String> properties);

    /**
     * Creates an endpoint uri in Java style from the information from the properties
     *

     * This API is needed by {@link SendDynamicAware}.
     *
     * @param  scheme                      the endpoint schema
     * @param  properties                  the properties as key value pairs
     * @param  encode                      whether to URL encode the returned uri or not
     * @return                             the constructed endpoint uri
     * @throws java.net.URISyntaxException is thrown if there is encoding error
     */
    String asEndpointUri(String scheme, Map<String, String> properties, boolean encode) throws URISyntaxException;

}


text:
'use strict';

var _ = require('lodash');
var chalk = require('chalk');
var Command = require('../lib/command');
var env = require('../lib/env');
var getProjectId = require('../lib/getProjectId');
var requireAccess = require('../lib/requireAccess');
var scopes = require('../lib/scopes');
var utils = require('../lib/utils');

module.exports = new Command('env:unset [keys...]')
  .description('unset environment config at the specified path(s)')
  .before(requireAccess, [scopes.CLOUD_PLATFORM])
  .action(function(args, options) {
    if (!args.length) {
      return utils.reject('Must supply at least one key, e.g. ' + chalk.bold('app.name'));
    }

    for (var i = 0; i < args.length; i++) {
      var namespace = args[i].split('.')[0];
      if (_.includes(env.RESERVED_NAMESPACES, namespace)) {
        return utils.reject('Cannot unset reserved namespace ' + chalk.bold(namespace));
      }
    }

    var projectId = getProjectId(options);
    var existed;
    var data;
    return env.get(projectId).then(function(latest) {
      data = latest.data;
      existed = env.applyUnsetArgs(data, args);
      return env.set(projectId, data, env.nextVersion(latest.version));
    }).then(function() {
      var message = 'Environment updated.';
      if (existed.length > 0) {
        message += ' Removed: ' + chalk.bold(existed.join(','));
      }

      utils.logSuccess(message);
      return data;
    });
  });