text:
namespace {

const int kViewerProcessConnectionTimeoutSecs = 60;

}  // namespace

namespace win8 {

// static
MetroViewerProcessHost* MetroViewerProcessHost::instance_ = NULL;

MetroViewerProcessHost::InternalMessageFilter::InternalMessageFilter(
    MetroViewerProcessHost* owner)
    : owner_(owner) {
}

void MetroViewerProcessHost::InternalMessageFilter::OnChannelConnected(
    int32 peer_pid) {
  owner_->NotifyChannelConnected();
}

MetroViewerProcessHost::InternalMessageFilter::~InternalMessageFilter() {
}

MetroViewerProcessHost::MetroViewerProcessHost(
    const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) {
  DCHECK(!instance_);
  instance_ = this;

  channel_ = IPC::ChannelProxy::Create(kMetroViewerIPCChannelName,
                                       IPC::Channel::MODE_NAMED_SERVER,
                                       this,
                                       ipc_task_runner);
}

MetroViewerProcessHost::~MetroViewerProcessHost() {
  if (!channel_) {
    instance_ = NULL;
    return;
  }

  base::ProcessId viewer_process_id = GetViewerProcessId();
  channel_->Close();
  if (message_filter_.get()) {
    // Wait for the viewer process to go away.
    if (viewer_process_id != base::kNullProcessId) {
      base::Process viewer_process =
          base::Process::OpenWithAccess(
              viewer_process_id,
              PROCESS_QUERY_INFORMATION | SYNCHRONIZE);
      if (viewer_process.IsValid()) {
        int exit_code;
        viewer_process.WaitForExit(&exit_code);
      }
    }
    channel_->RemoveFilter(message_filter_.get());
  }
  instance_ = NULL;
}

base::ProcessId MetroViewerProcessHost::GetViewerProcessId() {
  if (channel_)
    return channel_->GetPeerPID();
  return base::kNullProcessId;
}

bool MetroViewerProcessHost::LaunchViewerAndWaitForConnection(
    const base::string16& app_user_model_id) {
  DCHECK_EQ(base::kNullProcessId, channel_->GetPeerPID());

  channel_connected_event_.reset(new base::WaitableEvent(false, false));

  message_filter_ = new InternalMessageFilter(this);
  channel_->AddFilter(message_filter_.get());

  if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
    base::win::ScopedComPtr<IApplicationActivationManager> activator;
    HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager);
    if (SUCCEEDED(hr)) {
      DWORD pid = 0;
      // Use the "connect" verb to
      hr = activator->ActivateApplication(
          app_user_model_id.c_str(), kMetroViewerConnectVerb, AO_NONE, &pid);
    }

    LOG_IF(ERROR, FAILED(hr)) << "Tried and failed to launch Metro Chrome. "
                              << "hr=" << std::hex << hr;
  } else {
    // For Windows 7 we need to launch the viewer ourselves.
    base::FilePath chrome_path;
    if (!PathService::Get(base::DIR_EXE, &chrome_path))
      return false;
    // TODO(cpu): launch with "-ServerName:DefaultBrowserServer"
    // note that the viewer might try to launch chrome again.
    CHECK(false);
  }

  // Having launched the viewer process, now we wait for it to connect.
  bool success =
      channel_connected_event_->TimedWait(base::TimeDelta::FromSeconds(
          kViewerProcessConnectionTimeoutSecs));
  channel_connected_event_.reset();
  return success;
}

bool MetroViewerProcessHost::Send(IPC::Message* msg) {
  return channel_->Send(msg);
}

bool MetroViewerProcessHost::OnMessageReceived(
    const IPC::Message& message) {
  DCHECK(CalledOnValidThread());
  bool handled = true;
  IPC_BEGIN_MESSAGE_MAP(MetroViewerProcessHost, message)
    IPC_MESSAGE_HANDLER(MetroViewerHostMsg_FileSaveAsDone,
                        OnFileSaveAsDone)
    IPC_MESSAGE_HANDLER(MetroViewerHostMsg_FileOpenDone,
                        OnFileOpenDone)
    IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MultiFileOpenDone,
                        OnMultiFileOpenDone)
    IPC_MESSAGE_HANDLER(MetroViewerHostMsg_OpenURL, OnOpenURL)
    IPC_MESSAGE_HANDLER(MetroViewerHostMsg_SearchRequest, OnHandleSearchRequest)
    IPC_MESSAGE_HANDLER(MetroViewerHostMsg_SelectFolderDone,
                        OnSelectFolderDone)
    IPC_MESSAGE_HANDLER(MetroViewerHostMsg_SetTargetSurface, OnSetTargetSurface)
    IPC_MESSAGE_HANDLER(MetroViewerHostMsg_WindowSizeChanged,
                        OnWindowSizeChanged)
    IPC_MESSAGE_UNHANDLED(handled = false)
  IPC_END_MESSAGE_MAP()
  return handled ? true :
      aura::RemoteWindowTreeHostWin::Instance()->OnMessageReceived(message);
}

// static
void MetroViewerProcessHost::HandleActivateDesktop(
    const base::FilePath& path,
    bool ash_exit) {
  if (instance_) {
    instance_->Send(
        new MetroViewerHostMsg_ActivateDesktop(path, ash_exit));
  }
}

// static
void MetroViewerProcessHost::HandleMetroExit() {
  if (instance_)
    instance_->Send(new MetroViewerHostMsg_MetroExit());
}

// static
void MetroViewerProcessHost::HandleOpenFile(
    const base::string16& title,
    const base::FilePath& default_path,
    const base::string16& filter,
    const OpenFileCompletion& on_success,
    const FileSelectionCanceled& on_failure) {
  if (instance_) {
    instance_->HandleOpenFileImpl(title, default_path, filter, on_success,
                                  on_failure);
  }
}

// static
void MetroViewerProcessHost::HandleOpenMultipleFiles(
    const base::string16& title,
    const base::FilePath& default_path,
    const base::string16& filter,
    const OpenMultipleFilesCompletion& on_success,
    const FileSelectionCanceled& on_failure) {
  if (instance_) {
    instance_->HandleOpenMultipleFilesImpl(title, default_path, filter,
                                           on_success, on_failure);
  }
}

// static
void MetroViewerProcessHost::HandleSaveFile(
    const base::string16& title,
    const base::FilePath& default_path,
    const base::string16& filter,
    int filter_index,
    const base::string16& default_extension,
    const SaveFileCompletion& on_success,
    const FileSelectionCanceled& on_failure) {
  if (instance_) {
    instance_->HandleSaveFileImpl(title, default_path, filter, filter_index,
                                  default_extension, on_success, on_failure);
  }
}

// static
void MetroViewerProcessHost::HandleSelectFolder(
    const base::string16& title,
    const SelectFolderCompletion& on_success,
    const FileSelectionCanceled& on_failure) {
  if (instance_)
    instance_->HandleSelectFolderImpl(title, on_success, on_failure);
}

void MetroViewerProcessHost::HandleOpenFileImpl(
    const base::string16& title,
    const base::FilePath& default_path,
    const base::string16& filter,
    const OpenFileCompletion& on_success,
    const FileSelectionCanceled& on_failure) {
  // Can only have one of these operations in flight.
  DCHECK(file_open_completion_callback_.is_null());
  DCHECK(failure_callback_.is_null());

  file_open_completion_callback_ = on_success;
  failure_callback_ = on_failure;

  Send(new MetroViewerHostMsg_DisplayFileOpen(title, filter, default_path,
                                              false));
}

void MetroViewerProcessHost::HandleOpenMultipleFilesImpl(
    const base::string16& title,
    const base::FilePath& default_path,
    const base::string16& filter,
    const OpenMultipleFilesCompletion& on_success,
    const FileSelectionCanceled& on_failure) {
  // Can only have one of these operations in flight.
  DCHECK(multi_file_open_completion_callback_.is_null());
  DCHECK(failure_callback_.is_null());
  multi_file_open_completion_callback_ = on_success;
  failure_callback_ = on_failure;

  Send(new MetroViewerHostMsg_DisplayFileOpen(title, filter, default_path,
                                              true));
}

void MetroViewerProcessHost::HandleSaveFileImpl(
    const base::string16& title,
    const base::FilePath& default_path,
    const base::string16& filter,
    int filter_index,
    const base::string16& default_extension,
    const SaveFileCompletion& on_success,
    const FileSelectionCanceled& on_failure) {
  MetroViewerHostMsg_SaveAsDialogParams params;
  params.title = title;
  params.default_extension = default_extension;
  params.filter = filter;
  params.filter_index = filter_index;
  params.suggested_name = default_path;

  // Can only have one of these operations in flight.
  DCHECK(file_saveas_completion_callback_.is_null());
  DCHECK(failure_callback_.is_null());
  file_saveas_completion_callback_ = on_success;
  failure_callback_ = on_failure;

  Send(new MetroViewerHostMsg_DisplayFileSaveAs(params));
}

void MetroViewerProcessHost::HandleSelectFolderImpl(
    const base::string16& title,
    const SelectFolderCompletion& on_success,
    const FileSelectionCanceled& on_failure) {
  // Can only have one of these operations in flight.
  DCHECK(select_folder_completion_callback_.is_null());
  DCHECK(failure_callback_.is_null());
  select_folder_completion_callback_ = on_success;
  failure_callback_ = on_failure;

  Send(new MetroViewerHostMsg_DisplaySelectFolder(title));
}

void MetroViewerProcessHost::NotifyChannelConnected() {
  if (channel_connected_event_)
    channel_connected_event_->Signal();
}

void MetroViewerProcessHost::OnFileSaveAsDone(bool success,
                                              const base::FilePath& filename,
                                              int filter_index) {
  if (success)
    file_saveas_completion_callback_.Run(filename, filter_index, NULL);
  else
    failure_callback_.Run(NULL);
  file_saveas_completion_callback_.Reset();
  failure_callback_.Reset();
}

void MetroViewerProcessHost::OnFileOpenDone(bool success,
                                            const base::FilePath& filename) {
  if (success)
    file_open_completion_callback_.Run(base::FilePath(filename), 0, NULL);
  else
    failure_callback_.Run(NULL);
  file_open_completion_callback_.Reset();
  failure_callback_.Reset();
}

void MetroViewerProcessHost::OnMultiFileOpenDone(
    bool success,
    const std::vector<base::FilePath>& files) {
  if (success)
    multi_file_open_completion_callback_.Run(files, NULL);
  else
    failure_callback_.Run(NULL);
  multi_file_open_completion_callback_.Reset();
  failure_callback_.Reset();
}

void MetroViewerProcessHost::OnSelectFolderDone(
    bool success,
    const base::FilePath& folder) {
  if (success)
    select_folder_completion_callback_.Run(base::FilePath(folder), 0, NULL);
  else
    failure_callback_.Run(NULL);
  select_folder_completion_callback_.Reset();
  failure_callback_.Reset();
}

}  // namespace win8


text:
'use strict';

// Load the libraries and modules

let config = {
    libraries: {
        express: require('express')
    },
    directory: __dirname + '/',
    modules: [
        ['modules/app', { port: process.env.PORT || 80 }],
        ['modules/helloworld', {}]
    ]
};
require('dragonnodejs')(config);

redpajama_set_name: RedPajamaGithub


text:
            <button type="button" data-toggle="collapse" data-target=".navbar-collapse" class="navbar-toggle">
                Toggle navigation

            </button>
             Project name

path() == "/" ? 'active' : 'n' }}">Home

path() == "api" ? 'active' : 'n' }}">API Examples

path() == "contact" ? 'active' : 'n' }}">Contact

            @if (Auth::guest())

path() == "login" ? 'active' : 'n' }}">Login

path() == "signup" ? 'active' : 'n' }}">Create Account

            @else

                    getAvatarUrl() }}" width="25" height="25" /> {{ Auth::user()->fullname }}

 My Account

 Logout

            @endif


text:
package com.pocketbeer.presentation.features.beeradd;

public interface BeerAddContract {

  interface Presenter {

    void onAddBeerButtonTapped(String beerName, String beerDesc);

    void onDetachedFromWindow();
  }

  interface View {
    void toastBeerAdded();

    void showBeerNameInTitle(String beerName);
  }
}


text:
import Ember from 'ember';

export default Ember.Component.extend({
    data : [],
    init(){
        this._super(...arguments);
        if (this.get('chartType') === 'recentlyAdded') {
            var data = this.get('data.hits.hits').map(function(hits, index) {
                return {
                    number: index + 1,
                    name: hits._source.title,
                    id: hits._source.id
                }
            });
            this.set('data', data);
        } else if (this.get('chartType') == 'highlightedCollections') {
            data = [
              {
                number: 1,
                name: 'CAVEcam Virtual Reality Photography Collection',
                id: '46002-874-0B4'
              },
              {
                number: 2,
                name: 'Data from: Carbonic Anhydrases, EPF2 and a Novel Protease Mediate CO2 Control of Stomatal Development',
                id: '4619D-B54-28E'
              },
              {
                number: 3,
                name: 'Heavy Metals in the Ocean Insect, Halobates',
                id: '4612B-AF0-7FB'
              },
              {
                number: 4,
                name: 'Keith Rayner Eye Movements in Reading Data Collection',
                id: '4601B-68A-696'
              },
              {
                number: 5,
                name: 'Stack Gas and Plume Aerosol Measurements from Renewable Diesel and Ultra Low Sulfur Diesel in At-Sea Operation of Research Vessel Robert Gordon Sproul',
                id: '4607A-27C-FB9'
              }
            ];
            this.set('data', data);
        } else if (this.get('chartType') === 'topContributors') {
            this.fetchAgentDetails(this.get('aggregations.listWidgetData.buckets'));
        } else {
            this.processData(this.get('aggregations.listWidgetData.buckets'));
        }
    },
    processData (data) {
        this.set('data', data.map((raw_datum) => {
            return {
                number: raw_datum.doc_count,
                name: raw_datum.key
            };
        }));
    },

    fetchAgentDetails: async function(data) {
        let agent_details = await Ember.$.ajax({
            url: 'https://dev-labs.cos.io/bulk_get_agents',
            crossDomain: true,
            data: JSON.stringify(data),
            type: 'POST',
            contentType: 'application/json'
        });
        this.set("data", JSON.parse(agent_details));
    },

    actions: {
        transitionToFacet(item) { //Two different items here; one refers to the widget; one refers to the datum.
            let queryParams = {};
            var facet = this.get("item.facetDashParameter");
            let facetDash = this.get("item.facetDash");
            if (facet) {
                queryParams[facet] = item.name;
                if (facetDash === "objectDetail" || facetDash === "agentDetail" || facet === 'contributors' || facet === 'publishers') {
                    queryParams[facet] = item.id;
                }
                this.attrs.transitionToFacet(this.get('item.facetDash'), queryParams);
            }
        },
        transitionToViewAll(item) {
            this.attrs.transitionToFacet(item.dataType, {});
        }
    }
});


text:
<?php namespace App\Http\Controllers;

use App\Http\Requests;
use App\Http\Controllers\Controller;

use Illuminate\Http\Request;

class PageController extends Controller {

    public function about()
    {
        return view('pages/about');
    }

}


text:
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int64_t_fscanf_postinc_31.c
Label Definition File: CWE190_Integer_Overflow.label.xml
Template File: sources-sinks-31.tmpl.c
*/
/*
 * @description
 * CWE: 190 Integer Overflow
 * BadSource: fscanf Read data from the console using fscanf()
 * GoodSource: Set data to a small, non-zero number (two)
 * Sinks: increment
 *    GoodSink: Ensure there will not be an overflow before incrementing data
 *    BadSink : Increment data, which can cause an overflow
 * Flow Variant: 31 Data flow using a copy of data within the same function
 *
 * */

#include <inttypes.h>
#include "std_testcase.h"

#ifndef OMITBAD

void CWE190_Integer_Overflow__int64_t_fscanf_postinc_31_bad()
{
    int64_t data;
    data = 0LL;
    /* POTENTIAL FLAW: Use a value input from the console */
    fscanf (stdin, "%" SCNd64, &data);
    {
        int64_t dataCopy = data;
        int64_t data = dataCopy;
        {
            /* POTENTIAL FLAW: Incrementing data could cause an overflow */
            data++;
            int64_t result = data;
            printLongLongLine(result);
        }
    }
}

#endif /* OMITBAD */

#ifndef OMITGOOD

/* goodG2B() uses the GoodSource with the BadSink */
static void goodG2B()
{
    int64_t data;
    data = 0LL;
    /* FIX: Use a small, non-zero value that will not cause an overflow in the sinks */
    data = 2;
    {
        int64_t dataCopy = data;
        int64_t data = dataCopy;
        {
            /* POTENTIAL FLAW: Incrementing data could cause an overflow */
            data++;
            int64_t result = data;
            printLongLongLine(result);
        }
    }
}

/* goodB2G() uses the BadSource with the GoodSink */
static void goodB2G()
{
    int64_t data;
    data = 0LL;
    /* POTENTIAL FLAW: Use a value input from the console */
    fscanf (stdin, "%" SCNd64, &data);
    {
        int64_t dataCopy = data;
        int64_t data = dataCopy;
        /* FIX: Add a check to prevent an overflow from occurring */
        if (data < LLONG_MAX)
        {
            data++;
            int64_t result = data;
            printLongLongLine(result);
        }
        else
        {
            printLine("data value is too large to perform arithmetic safely.");
        }
    }
}

void CWE190_Integer_Overflow__int64_t_fscanf_postinc_31_good()
{
    goodG2B();
    goodB2G();
}

#endif /* OMITGOOD */

/* Below is the main(). It is only used when building this testcase on
   its own for testing or for building a binary to use in testing binary
   analysis tools. It is not used when compiling all the testcases as one
   application, which is how source code analysis tools are tested. */
#ifdef INCLUDEMAIN

int main(int argc, char * argv[])
{
    /* seed randomness */
    srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
    printLine("Calling good()...");
    CWE190_Integer_Overflow__int64_t_fscanf_postinc_31_good();
    printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
    printLine("Calling bad()...");
    CWE190_Integer_Overflow__int64_t_fscanf_postinc_31_bad();
    printLine("Finished bad()");
#endif /* OMITBAD */
    return 0;
}

#endif


text:
package cz.jkosnar.backup.common;

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

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.filefilter.DirectoryFileFilter;
import org.apache.commons.io.filefilter.TrueFileFilter;

/**
 * Utility class for operations with local files and directories.
 */
public class BackupTools {

	/**
	 * Deletes files from "dst" if they are not in a "validFiles" list. <br/>
	 * NOTICE: Leaves empty directories behind.
	 *
	 * @param validFiles
	 * @param dst
	 * @return names of deleted files
	 */
	public static List<String> deleteUnlistedFiles(List<File> validFiles, File dst) {
		List<String> result = new ArrayList<>();
		List<File> dstFiles = new ArrayList<>(FileUtils.listFilesAndDirs(dst, TrueFileFilter.INSTANCE, DirectoryFileFilter.DIRECTORY));

		for (File file : dstFiles) {
			if (!file.isDirectory()) {
				// TODO: This can be optimized
				if (!validFiles.contains(file)) {
					result.add(file.getAbsolutePath());
					file.delete();
				}
			}
		}
		return result;
	}

	/**
	 * Propagates the deletions from "src" to "dst". If the file or directory no
	 * longer exists in "src" it is deleted from "dst".
	 *
	 * @param src
	 * @param dst
	 * @return names of deleted files
	 * @throws IOException
	 */
	public static List<String> propagateDeletions(File src, File dst) throws IOException {
		List<String> result = new ArrayList<>();
		List<File> dstFiles = new ArrayList<>(FileUtils.listFilesAndDirs(dst, TrueFileFilter.INSTANCE, DirectoryFileFilter.DIRECTORY));
		Collections.sort(dstFiles);
		Collections.reverse(dstFiles);

		int dstPathLength = dst.getAbsolutePath().length();
		for (File f : dstFiles) {
			String dstFileRelativePath = f.getAbsolutePath().substring(dstPathLength);
			if (f.exists()) {
				File expectedSrcFile = new File(src.getAbsolutePath() + "\\" + dstFileRelativePath);
				if (!expectedSrcFile.exists()) {
					result.add(f.getAbsolutePath());
					f.delete();
				}
			}
		}
		return result;
	}

	/**
	 * Copies new files from "src" to "dst". Files that do not exist in "dst"
	 * are copied there from "src".
	 *
	 * @param src
	 * @param dst
	 * @return dst names of copied files
	 * @throws IOException
	 */
	public static List<String> copyNew(File src, File dst) throws IOException {
		List<String> result = new ArrayList<>();
		List<File> srcFiles = new ArrayList<>(FileUtils.listFilesAndDirs(src, TrueFileFilter.INSTANCE, DirectoryFileFilter.DIRECTORY));
		Collections.sort(srcFiles);
		Collections.reverse(srcFiles);

		int srcPathLength = src.getAbsolutePath().length();
		for (File f : srcFiles) {
			String srcFileRelativePath = f.getAbsolutePath().substring(srcPathLength);
			if (f.exists()) {
				File expectedDstFile = new File(dst.getAbsolutePath() + "\\" + srcFileRelativePath);
				if (!expectedDstFile.exists()) {
					if (!f.isDirectory()) {
						result.add(expectedDstFile.getAbsolutePath());
						FileUtils.copyFile(f, expectedDstFile);
					} else {
						result.add(expectedDstFile.getAbsolutePath());
						FileUtils.copyDirectory(f, expectedDstFile);
					}
				}
			}
		}
		return result;
	}

	/**
	 * Overwrites files with different file sizes from "src" to "dst".
	 *
	 * @param src
	 * @param dst
	 * @return dst names of overridden files
	 * @throws IOException
	 */
	public static List<String> overwriteFilesWithDifferentSize(File src, File dst) throws IOException {
		List<String> result = new ArrayList<>();
		List<File> srcFiles = new ArrayList<>(FileUtils.listFilesAndDirs(src, TrueFileFilter.INSTANCE, DirectoryFileFilter.DIRECTORY));

		int srcPathLength = src.getAbsolutePath().length();
		for (File f : srcFiles) {
			if (!f.isDirectory()) {
				String srcFileRelativePath = f.getAbsolutePath().substring(srcPathLength);
				if (f.exists()) {
					File expectedDstFile = new File(dst.getAbsolutePath() + "\\" + srcFileRelativePath);
					if (expectedDstFile.exists()) {
						long sizeSrc = FileUtils.sizeOf(f);
						long sizeDst = FileUtils.sizeOf(expectedDstFile);

						if (sizeSrc != sizeDst) {
							result.add(expectedDstFile.getAbsolutePath());
							FileUtils.copyFile(f, expectedDstFile);
						}
					}
				}
			}
		}
		return result;
	}

	/**
	 * Returns latest modification timestamp of a file or a directory subtree.
	 *
	 * @param src
	 * @return 0 or timestamp
	 */
	public static long getModificationTimestampOfSubtree(File src) {
		long result = 0;

		if (src.isFile()) {
			result = src.lastModified();
		} else if (src.isDirectory()) {

			for (File f : FileUtils.listFilesAndDirs(src, TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE)) {
				long current = f.lastModified();
				if (result < current) {
					result = current;
				}
			}

		}

		return result;
	}

}


text:
require 'puppet/module_tool'
require 'puppet/module_tool/errors'

module Puppet
  module ModuleTool
    # Control the install location for modules.
    class InstallDirectory
      include Puppet::ModuleTool::Errors

      attr_reader :target
      def initialize(target)
        @target = target
      end

      # prepare the module install location. This will create the location if
      # needed.
      def prepare(module_name, version)
        return if @target.directory?

        begin
          @target.mkpath
          Puppet.notice "Created target directory #{@target}"
        rescue SystemCallError => orig_error
          raise converted_to_friendly_error(module_name, version, orig_error)
        end
      end

    private

      ERROR_MAPPINGS = {
        Errno::EACCES => PermissionDeniedCreateInstallDirectoryError,
        Errno::EEXIST => InstallPathExistsNotDirectoryError,
      }

      def converted_to_friendly_error(module_name, version, orig_error)
        return orig_error if not ERROR_MAPPINGS.include?(orig_error.class)

        ERROR_MAPPINGS[orig_error.class].new(orig_error,
          :requested_module  => module_name,
          :requested_version => version,
          :directory         => @target.to_s)
      end
    end
  end
end


text:
package org.apache.hadoop.util;

import org.apache.hadoop.corona.CoronaConf;
import org.codehaus.jackson.JsonEncoding;
import org.codehaus.jackson.JsonFactory;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;
import org.codehaus.jackson.impl.DefaultPrettyPrinter;
import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.ObjectMapper;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;

public class CoronaSerializer {
  /**
   * The JsonParser instance contained within a CoronaSerializer instance.
   */
  public JsonParser jsonParser;

  /**
   * Constructor for the CoronaSerializer class.
   *
   * @param conf The CoronaConf instance to be used
   * @throws IOException
   */
  public CoronaSerializer(CoronaConf conf) throws IOException {
    InputStream inputStream = new FileInputStream(conf.getCMStateFile());
    if (conf.getCMCompressStateFlag()) {
      inputStream = new GZIPInputStream(inputStream);
    }
    ObjectMapper mapper = new ObjectMapper();
    mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES,
      false);
    JsonFactory jsonFactory = new JsonFactory();
    jsonFactory.setCodec(mapper);
    jsonParser = jsonFactory.createJsonParser(inputStream);
  }

  /**
   * This is a helper method that reads a JSON token using a JsonParser
   * instance, and throws an exception if the next token is not START_OBJECT.
   *
   * @param parentFieldName The name of the field
   * @throws IOException
   */
  public void readStartObjectToken(String parentFieldName)
    throws IOException {
    readToken(parentFieldName, JsonToken.START_OBJECT);
  }

  /**
   * This is a helper method that reads a JSON token using a JsonParser
   * instance, and throws an exception if the next token is not START_ARRAY.
   *
   * @param parentFieldName The name of the field
   * @throws IOException
   */
  public void readStartArrayToken(String parentFieldName)
    throws IOException {
    readToken(parentFieldName, JsonToken.START_ARRAY);
  }

  /**
   * This is a helper method that reads a JSON token using a JsonParser
   * instance, and throws an exception if the next token is not END_OBJECT.
   *
   * @param parentFieldName The name of the field
   * @throws IOException
   */
  public void readEndObjectToken(String parentFieldName)
    throws IOException {
    readToken(parentFieldName, JsonToken.END_OBJECT);
  }

  /**
   * This is a helper method that reads a JSON token using a JsonParser
   * instance, and throws an exception if the next token is not END_ARRAY.
   *
   * @param parentFieldName The name of the field
   * @throws IOException
   */
  public void readEndArrayToken(String parentFieldName)
    throws IOException {
    readToken(parentFieldName, JsonToken.END_ARRAY);
  }

  /**
   * This is a helper method that reads a JSON token using a JsonParser
   * instance, and throws an exception if the next token is not the same as
   * the token we expect.
   *
   * @param parentFieldName The name of the field
   * @param expectedToken The expected token
   * @throws IOException
   */
  public void readToken(String parentFieldName, JsonToken expectedToken)
    throws IOException {
    JsonToken currentToken = jsonParser.nextToken();
    if (currentToken != expectedToken) {
      throw new IOException("Expected a " + expectedToken.toString() +
        " token when reading the value of the field: " +
        parentFieldName +
        " but found a " +
        currentToken.toString() + " token");
    }
  }

  /**
   * This is a helper method which creates a JsonGenerator instance, for writing
   * the state of the ClusterManager to the state file. The JsonGenerator
   * instance writes to a compressed file if we have the compression flag
   * turned on.
   *
   * @param conf The CoronaConf instance to be used
   * @return The JsonGenerator instance to be used
   * @throws IOException
   */
  public static JsonGenerator createJsonGenerator(CoronaConf conf)
    throws IOException {
    OutputStream outputStream = new FileOutputStream(conf.getCMStateFile());
    if (conf.getCMCompressStateFlag()) {
      outputStream = new GZIPOutputStream(outputStream);
    }
    ObjectMapper mapper = new ObjectMapper();
    JsonGenerator jsonGenerator =
      new JsonFactory().createJsonGenerator(outputStream, JsonEncoding.UTF8);
    jsonGenerator.setCodec(mapper);
    if (!conf.getCMCompressStateFlag()) {
      jsonGenerator.setPrettyPrinter(new DefaultPrettyPrinter());
    }
    return jsonGenerator;
  }

  /**
   * This is a helper method, which is used to throw an exception when we
   * encounter an unexpected field name.
   *
   * @param fieldName Name of the field
   * @param expectedFieldName Name of the expected field
   * @throws IOException
   */
  public void foundUnknownField(String fieldName,
                                       String expectedFieldName)
    throws IOException {
    throw new IOException("Found an unexpected field: " + fieldName +
      ", instead of field: " + expectedFieldName);
  }

  /**
   * The method reads a field from the JSON stream, and checks if the
   * field read is the same as the expect field.
   *
   * @param expectedFieldName The field name which is expected next
   * @throws IOException
   */
  public void readField(String expectedFieldName) throws IOException {
    readToken(expectedFieldName, JsonToken.FIELD_NAME);
    String fieldName = jsonParser.getCurrentName();
    if (!fieldName.equals(expectedFieldName)) {
      foundUnknownField(fieldName, expectedFieldName);
    }
  }

  /**
   * Moves the JSON parser ahead by one token
   *
   * @return The current JSON token
   * @throws IOException
   */
  public JsonToken nextToken() throws IOException {
    return jsonParser.nextToken();
  }

  /**
   * If the current token is a field name, this method returns the name of
   * the field.
   *
   * @return A String object containing the name of the field
   * @throws IOException
   */
  public String getFieldName() throws IOException {
    if (jsonParser.getCurrentToken() != JsonToken.FIELD_NAME) {
      throw new IOException("Expected a field of type " + JsonToken.FIELD_NAME +
                            ", but found a field of type " +
                            jsonParser.getCurrentToken());
    }
    return jsonParser.getCurrentName();
  }

  /**
   * The JsonParser class exposes a number of methods for reading values, which
   * are named confusingly. They also don't move the current token ahead, which
   * makes us use statements like jsonParser.nextToken() everywhere in the code.
   *
   * This wrapper method abstracts all that.
   *
   * @param valueType The type of the value to be read
   * @param <T>
   * @return
   * @throws IOException
   */
  public <T> T readValueAs(Class<T> valueType)
    throws IOException {
    jsonParser.nextToken();
    if (valueType == String.class) {
      return valueType.cast(jsonParser.getText());
    }
    return jsonParser.readValueAs(valueType);
  }
}


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

<TITLE>
ComparisonHeader
</TITLE>

<META NAME="date" CONTENT="2010-04-30">

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

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.siemens.cmiv.avt.mvt.datatype

Class ComparisonHeader

java.lang.Object
  com.siemens.cmiv.avt.mvt.datatype.ComparisonHeader

public class ComparisonHeader
extends java.lang.Object

Author:

Jie Zheng

Field Summary

(package private)  java.lang.String
comparisonDate

(package private)  java.lang.String
comparisonID

(package private)  java.lang.String
comparisonRefUID

(package private)  java.lang.String
comparisonTime

(package private)  java.lang.String
comparisonUID

Constructor Summary

ComparisonHeader()

Method Summary

 java.lang.String
getComparisonDate()

 java.lang.String
getComparisonID()

 java.lang.String
getComparisonRefUID()

 java.lang.String
getComparisonTime()

 java.lang.String
getComparisonUID()

 void
setComparisonDate(java.lang.String comparisonDate)

 void
setComparisonID(java.lang.String comparisonID)

 void
setComparisonRefUID(java.lang.String comparisonRefUID)

 void
setComparisonTime(java.lang.String comparisonTime)

 void
setComparisonUID(java.lang.String comparisonUID)

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

comparisonID

java.lang.String comparisonID

comparisonDate

java.lang.String comparisonDate

comparisonTime

java.lang.String comparisonTime

comparisonUID

java.lang.String comparisonUID

comparisonRefUID

java.lang.String comparisonRefUID

Constructor Detail

ComparisonHeader

public ComparisonHeader()

Method Detail

getComparisonID

public java.lang.String getComparisonID()

getComparisonDate

public java.lang.String getComparisonDate()

getComparisonTime

public java.lang.String getComparisonTime()

getComparisonUID

public java.lang.String getComparisonUID()

getComparisonRefUID

public java.lang.String getComparisonRefUID()

setComparisonID

public void setComparisonID(java.lang.String comparisonID)

setComparisonDate

public void setComparisonDate(java.lang.String comparisonDate)

setComparisonTime

public void setComparisonTime(java.lang.String comparisonTime)

setComparisonUID

public void setComparisonUID(java.lang.String comparisonUID)

setComparisonRefUID

public void setComparisonRefUID(java.lang.String comparisonRefUID)

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
// Copyright 2007-2011 Chris Patterson, Dru Sellers, Travis Smith, et. al.
//
// 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.
namespace Burrows.Pipeline
{
    using System;
    using Context;

    /// <summary>
	/// Implemented by classes that can be placed in the inbound message pipeline. See
	/// <see cref="IPipelineSink{IConsumeContext}"/> for sink documentation.
	/// </summary>
	public interface IInboundMessagePipeline :
		IPipelineSink<IConsumeContext>
	{
		/// <summary>
		/// Called when the pipeline part is being configured, during the initial setup
		/// of the message bus, allowing the pipeline part to provide a configurator
		/// implementation/instance of its own.
		/// </summary>
		/// <param name="configureCallback">A callback that may be called (directly) from
		/// the implementing method. The pipeline sink may choose the configurator instance to
		/// pass to this action.</param>
		void Configure(Action<IInboundPipelineConfigurator> configureCallback);

		/// <summary>
		/// <see cref="Configure"/>
		/// </summary>
		TResult Configure<TResult>(Func<IInboundPipelineConfigurator, TResult> configureCallback);
	}
}


text:
using DG.Tweening;
using Matcha.Dreadful;
using Matcha.Unity;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Assertions;

public class DisplayXP : BaseBehaviour
{
	private int intToDisplay;
	private string legend = "XP: ";
	private Text textComponent;
	private CanvasScaler canvasScaler;
	private RectTransform rectTrans;
	private Sequence fadeIn;
	private Sequence fadeOutInstant;
	private Sequence fadeOutHUD;
	private float canvasScale;

	void Awake()
	{
		rectTrans = GetComponent<RectTransform>();
		Assert.IsNotNull(rectTrans);

		textComponent = GetComponent<Text>();
		Assert.IsNotNull(textComponent);
	}

	void Start()
	{
		canvasScaler = gameObject.GetComponentInParent<CanvasScaler>();
		Assert.IsNotNull(canvasScaler);

		canvasScale = Camera.main.GetComponent<PixelArtCamera>().CanvasScale;
		Assert.AreNotApproximatelyEqual(0.0f, canvasScale);

		PositionHUDElements();

		// cache & pause tween sequences.
		(fadeOutInstant = MFX.Fade(textComponent, 0, 0, 0)).Pause();
		(fadeIn         = MFX.Fade(textComponent, 1, HUD_FADE_IN_AFTER, HUD_INITIAL_FADE_LENGTH)).Pause();
		(fadeOutHUD     = MFX.Fade(textComponent, 0, HUD_FADE_OUT_AFTER, HUD_INITIAL_FADE_LENGTH)).Pause();
	}

	void OnInitInteger(int initInt)
	{
		textComponent.text = legend + initInt;
		FadeInText();
	}

	void PositionHUDElements()
	{
		canvasScaler.scaleFactor = canvasScale;
		M.PositionInHUD(rectTrans, textComponent, XP_ALIGNMENT, XP_X_POS, XP_Y_POS);
	}

	void FadeInText()
	{
		fadeOutInstant.Restart();
		fadeIn.Restart();
	}

	void OnChangeInteger(int newInt)
	{
		textComponent.text = legend + newInt;
	}

	void OnFadeHud(bool status)
	{
		fadeOutHUD.Restart();
	}

	void OnEnable()
	{
		EventKit.Subscribe<int>("init xp", OnInitInteger);
		EventKit.Subscribe<bool>("fade hud", OnFadeHud);
	}

	void OnDestroy()
	{
		EventKit.Unsubscribe<int>("init xp", OnInitInteger);
		EventKit.Unsubscribe<bool>("fade hud", OnFadeHud);
	}
}


text:
namespace content {

class TapSuppressionController;

class CONTENT_EXPORT TouchpadTapSuppressionControllerClient {
 public:
  virtual ~TouchpadTapSuppressionControllerClient() {}
  virtual void SendMouseEventImmediately(
      const MouseEventWithLatencyInfo& event) = 0;
};

// Controls the suppression of touchpad taps immediately following the dispatch
// of a GestureFlingCancel event.
class TouchpadTapSuppressionController : public TapSuppressionControllerClient {
 public:
  // The |client| must outlive the TouchpadTapSupressionController.
  TouchpadTapSuppressionController(
      TouchpadTapSuppressionControllerClient* client,
      const TapSuppressionController::Config& config);
  virtual ~TouchpadTapSuppressionController();

  // Should be called on arrival of GestureFlingCancel events.
  void GestureFlingCancel();

  // Should be called on arrival of ACK for a GestureFlingCancel event.
  // |processed| is true if the GestureFlingCancel successfully stopped a fling.
  void GestureFlingCancelAck(bool processed);

  // Should be called on arrival of MouseDown events. Returns true if the caller
  // should stop normal handling of the MouseDown. In this case, the caller is
  // responsible for saving the event for later use, if needed.
  bool ShouldDeferMouseDown(const MouseEventWithLatencyInfo& event);

  // Should be called on arrival of MouseUp events. Returns true if the caller
  // should stop normal handling of the MouseUp.
  bool ShouldSuppressMouseUp();

 private:
  friend class MockRenderWidgetHost;

  // TapSuppressionControllerClient implementation.
  virtual void DropStashedTapDown() OVERRIDE;
  virtual void ForwardStashedTapDown() OVERRIDE;

  TouchpadTapSuppressionControllerClient* client_;
  MouseEventWithLatencyInfo stashed_mouse_down_;

  // The core controller of tap suppression.
  TapSuppressionController controller_;

  DISALLOW_COPY_AND_ASSIGN(TouchpadTapSuppressionController);
};

}  // namespace content

#endif  // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHPAD_TAP_SUPPRESSION_CONTROLLER_H_


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

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

import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AddTagsToResourceRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     *

     * Specifies the type of resource you are tagging.
     *

     * <note>
     *

     * The ManagedInstance type for this API action is for on-premises managed instances. You must specify the name of
     * the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * </note>
     */
    private String resourceType;
    /**
     *

     * The resource ID you want to tag.
     *

     *

     * Use the ID of the resource. Here are some examples:
     *

     *

     * ManagedInstance: mi-012345abcde
     *

     *

     * MaintenanceWindow: mw-012345abcde
     *

     *

     * PatchBaseline: pb-012345abcde
     *

     *

     * For the Document and Parameter values, use the name of the resource.
     *

     * <note>
     *

     * The ManagedInstance type for this API action is only for on-premises managed instances. You must specify the name
     * of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * </note>
     */
    private String resourceId;
    /**
     *

     * One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify the
     * parameter with no value, and we set the value to an empty string.
     *

     * <important>
     *

     * Do not enter personally identifiable information in this field.
     *

     * </important>
     */
    private com.amazonaws.internal.SdkInternalList<Tag> tags;

    /**
     *

     * Specifies the type of resource you are tagging.
     *

     * <note>
     *

     * The ManagedInstance type for this API action is for on-premises managed instances. You must specify the name of
     * the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * </note>
     *
     * @param resourceType
     *        Specifies the type of resource you are tagging.
 <note>
     *

     *        The ManagedInstance type for this API action is for on-premises managed instances. You must specify the
     *        name of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * @see ResourceTypeForTagging
     */

    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    /**
     *

     * Specifies the type of resource you are tagging.
     *

     * <note>
     *

     * The ManagedInstance type for this API action is for on-premises managed instances. You must specify the name of
     * the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * </note>
     *
     * @return Specifies the type of resource you are tagging.
 <note>
     *

     *         The ManagedInstance type for this API action is for on-premises managed instances. You must specify the
     *         name of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * @see ResourceTypeForTagging
     */

    public String getResourceType() {
        return this.resourceType;
    }

    /**
     *

     * Specifies the type of resource you are tagging.
     *

     * <note>
     *

     * The ManagedInstance type for this API action is for on-premises managed instances. You must specify the name of
     * the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * </note>
     *
     * @param resourceType
     *        Specifies the type of resource you are tagging.
 <note>
     *

     *        The ManagedInstance type for this API action is for on-premises managed instances. You must specify the
     *        name of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * @return Returns a reference to this object so that method calls can be chained together.
     * @see ResourceTypeForTagging
     */

    public AddTagsToResourceRequest withResourceType(String resourceType) {
        setResourceType(resourceType);
        return this;
    }

    /**
     *

     * Specifies the type of resource you are tagging.
     *

     * <note>
     *

     * The ManagedInstance type for this API action is for on-premises managed instances. You must specify the name of
     * the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * </note>
     *
     * @param resourceType
     *        Specifies the type of resource you are tagging.
 <note>
     *

     *        The ManagedInstance type for this API action is for on-premises managed instances. You must specify the
     *        name of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * @see ResourceTypeForTagging
     */

    public void setResourceType(ResourceTypeForTagging resourceType) {
        withResourceType(resourceType);
    }

    /**
     *

     * Specifies the type of resource you are tagging.
     *

     * <note>
     *

     * The ManagedInstance type for this API action is for on-premises managed instances. You must specify the name of
     * the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * </note>
     *
     * @param resourceType
     *        Specifies the type of resource you are tagging.
 <note>
     *

     *        The ManagedInstance type for this API action is for on-premises managed instances. You must specify the
     *        name of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * @return Returns a reference to this object so that method calls can be chained together.
     * @see ResourceTypeForTagging
     */

    public AddTagsToResourceRequest withResourceType(ResourceTypeForTagging resourceType) {
        this.resourceType = resourceType.toString();
        return this;
    }

    /**
     *

     * The resource ID you want to tag.
     *

     *

     * Use the ID of the resource. Here are some examples:
     *

     *

     * ManagedInstance: mi-012345abcde
     *

     *

     * MaintenanceWindow: mw-012345abcde
     *

     *

     * PatchBaseline: pb-012345abcde
     *

     *

     * For the Document and Parameter values, use the name of the resource.
     *

     * <note>
     *

     * The ManagedInstance type for this API action is only for on-premises managed instances. You must specify the name
     * of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * </note>
     *
     * @param resourceId
     *        The resource ID you want to tag.

     *

     *        Use the ID of the resource. Here are some examples:
     *

     *

     *        ManagedInstance: mi-012345abcde
     *

     *

     *        MaintenanceWindow: mw-012345abcde
     *

     *

     *        PatchBaseline: pb-012345abcde
     *

     *

     *        For the Document and Parameter values, use the name of the resource.
     *

     *        <note>
     *

     *        The ManagedInstance type for this API action is only for on-premises managed instances. You must specify
     *        the name of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     */

    public void setResourceId(String resourceId) {
        this.resourceId = resourceId;
    }

    /**
     *

     * The resource ID you want to tag.
     *

     *

     * Use the ID of the resource. Here are some examples:
     *

     *

     * ManagedInstance: mi-012345abcde
     *

     *

     * MaintenanceWindow: mw-012345abcde
     *

     *

     * PatchBaseline: pb-012345abcde
     *

     *

     * For the Document and Parameter values, use the name of the resource.
     *

     * <note>
     *

     * The ManagedInstance type for this API action is only for on-premises managed instances. You must specify the name
     * of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * </note>
     *
     * @return The resource ID you want to tag.

     *

     *         Use the ID of the resource. Here are some examples:
     *

     *

     *         ManagedInstance: mi-012345abcde
     *

     *

     *         MaintenanceWindow: mw-012345abcde
     *

     *

     *         PatchBaseline: pb-012345abcde
     *

     *

     *         For the Document and Parameter values, use the name of the resource.
     *

     *         <note>
     *

     *         The ManagedInstance type for this API action is only for on-premises managed instances. You must specify
     *         the name of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     */

    public String getResourceId() {
        return this.resourceId;
    }

    /**
     *

     * The resource ID you want to tag.
     *

     *

     * Use the ID of the resource. Here are some examples:
     *

     *

     * ManagedInstance: mi-012345abcde
     *

     *

     * MaintenanceWindow: mw-012345abcde
     *

     *

     * PatchBaseline: pb-012345abcde
     *

     *

     * For the Document and Parameter values, use the name of the resource.
     *

     * <note>
     *

     * The ManagedInstance type for this API action is only for on-premises managed instances. You must specify the name
     * of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * </note>
     *
     * @param resourceId
     *        The resource ID you want to tag.

     *

     *        Use the ID of the resource. Here are some examples:
     *

     *

     *        ManagedInstance: mi-012345abcde
     *

     *

     *        MaintenanceWindow: mw-012345abcde
     *

     *

     *        PatchBaseline: pb-012345abcde
     *

     *

     *        For the Document and Parameter values, use the name of the resource.
     *

     *        <note>
     *

     *        The ManagedInstance type for this API action is only for on-premises managed instances. You must specify
     *        the name of the managed instance in the following format: mi-ID_number. For example, mi-1a2b3c4d5e6f.
     *

     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AddTagsToResourceRequest withResourceId(String resourceId) {
        setResourceId(resourceId);
        return this;
    }

    /**
     *

     * One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify the
     * parameter with no value, and we set the value to an empty string.
     *

     * <important>
     *

     * Do not enter personally identifiable information in this field.
     *

     * </important>
     *
     * @return One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify
     *         the parameter with no value, and we set the value to an empty string.
 <important>
     *

     *         Do not enter personally identifiable information in this field.
     *

     */

    public java.util.List<Tag> getTags() {
        if (tags == null) {
            tags = new com.amazonaws.internal.SdkInternalList<Tag>();
        }
        return tags;
    }

    /**
     *

     * One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify the
     * parameter with no value, and we set the value to an empty string.
     *

     * <important>
     *

     * Do not enter personally identifiable information in this field.
     *

     * </important>
     *
     * @param tags
     *        One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify
     *        the parameter with no value, and we set the value to an empty string.
 <important>
     *

     *        Do not enter personally identifiable information in this field.
     *

     */

    public void setTags(java.util.Collection<Tag> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(tags);
    }

    /**
     *

     * One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify the
     * parameter with no value, and we set the value to an empty string.
     *

     * <important>
     *

     * Do not enter personally identifiable information in this field.
     *

     * </important>
     *

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

     *
     * @param tags
     *        One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify
     *        the parameter with no value, and we set the value to an empty string.
 <important>
     *

     *        Do not enter personally identifiable information in this field.
     *

     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AddTagsToResourceRequest withTags(Tag... tags) {
        if (this.tags == null) {
            setTags(new com.amazonaws.internal.SdkInternalList<Tag>(tags.length));
        }
        for (Tag ele : tags) {
            this.tags.add(ele);
        }
        return this;
    }

    /**
     *

     * One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify the
     * parameter with no value, and we set the value to an empty string.
     *

     * <important>
     *

     * Do not enter personally identifiable information in this field.
     *

     * </important>
     *
     * @param tags
     *        One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify
     *        the parameter with no value, and we set the value to an empty string.
 <important>
     *

     *        Do not enter personally identifiable information in this field.
     *

     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public AddTagsToResourceRequest withTags(java.util.Collection<Tag> tags) {
        setTags(tags);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getResourceType() != null)
            sb.append("ResourceType: ").append(getResourceType()).append(",");
        if (getResourceId() != null)
            sb.append("ResourceId: ").append(getResourceId()).append(",");
        if (getTags() != null)
            sb.append("Tags: ").append(getTags());
        sb.append("}");
        return sb.toString();
    }

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

        if (obj instanceof AddTagsToResourceRequest == false)
            return false;
        AddTagsToResourceRequest other = (AddTagsToResourceRequest) obj;
        if (other.getResourceType() == null ^ this.getResourceType() == null)
            return false;
        if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false)
            return false;
        if (other.getResourceId() == null ^ this.getResourceId() == null)
            return false;
        if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == false)
            return false;
        if (other.getTags() == null ^ this.getTags() == null)
            return false;
        if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
            return false;
        return true;
    }

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

        hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode());
        hashCode = prime * hashCode + ((getResourceId() == null) ? 0 : getResourceId().hashCode());
        hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
        return hashCode;
    }

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

}


text: <# I'm here so build pass #>


text:
/*
 * (c) 2008 MOSA - The Managed Operating System Alliance
 *
 * Licensed under the terms of the New BSD License.
 *
 * Authors:
 *  Michael Ruck (grover) <sharpos@michaelruck.de>
 *  Phil Garcia (tgiphil) <phil@thinkedge.com>
 */

namespace Mosa.Compiler.Metadata.Tables
{
	/// <summary>
	///
	/// </summary>
	public class FieldMarshalRow
	{
		#region Construction

		/// <summary>
		/// Initializes a new instance of the <see cref="FieldMarshalRow" /> struct.
		/// </summary>
		/// <param name="parent">The parent.</param>
		/// <param name="nativeType">Type of the native.</param>
		public FieldMarshalRow(Token parent, HeapIndexToken nativeType)
		{
			Parent = parent;
			NativeType = nativeType;
		}

		#endregion Construction

		#region Properties

		/// <summary>
		/// Gets the parent.
		/// </summary>
		/// <value>The parent.</value>
		public Token Parent { get; private set; }

		/// <summary>
		/// Gets the type of the native.
		/// </summary>
		/// <value>The type of the native.</value>
		public HeapIndexToken NativeType { get; private set; }

		#endregion Properties
	}
}


text:
.gwt-TextBox-ok {
 color:green;
 font-weight:bold;
}

.gwt-TextBox-error {
 color:red;
 font-weight:bold;
## background-color:yellow;
}

.gwt-table {
  border: 1px solid black;
}

.gwt-table tr:nth-child(even) {
  background-color: #EEEEEE;
}


text:
<?php
/**
 * @see \app\controllers\backend\AdminController
 * @see \yii2tech\admin\actions\Update
 */

/* @var $this yii\web\View */
/* @var $model app\models\db\Admin */

$this->title = Yii::t('admin', 'Update Admin: ') . $model->username;
$this->params['breadcrumbs'][] = ['label' => Yii::t('admin', 'Administrators'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->username, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = Yii::t('admin', 'Update');
?>

<?= $this->render('_form', [
    'model' => $model,
]) ?>


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.ascaria.network.central.messages;

import com.jme3.math.Ray;
import com.jme3.network.serializing.Serializer;
import cz.ascaria.network.central.profiles.EntityItem;
import cz.ascaria.network.central.profiles.EntityProfile;
import cz.ascaria.network.central.profiles.ServerProfile;
import cz.ascaria.network.central.profiles.UserProfile;
import cz.ascaria.network.central.profiles.WorldProfile;
import cz.ascaria.network.central.profiles.updaters.EntityUpdater;
import cz.ascaria.network.central.serializers.DestructibleSerializer;
import cz.ascaria.network.central.utils.PropertiesHelper;

/**
 *
 * @author Ascaria Quynn
 */
public class CentralMessagesRegistrator {
    /**
     * Registers all messages.
     */
    public static void registerMessages() {

        // Info messages
        Serializer.registerClass(AlertMessage.class);

        // Login classes
        Serializer.registerClass(CredentialsMessage.class);
        Serializer.registerClass(TokenMessage.class);
        Serializer.registerClass(AuthUserProfileMessage.class);

        // Profile classes
        Serializer.registerClass(WorldProfileMessage.class);
        Serializer.registerClass(EntityProfileMessage.class);
        Serializer.registerClass(EntityUpdaterMessage.class);
        Serializer.registerClass(SelectEntityMessage.class);
        Serializer.registerClass(ServerProfileMessage.class);
        Serializer.registerClass(WorldFleetMessage.class);
        Serializer.registerClass(ServerWorldsMessage.class);
        Serializer.registerClass(UserProfileMessage.class);
        Serializer.registerClass(UserFleetMessage.class);

        // Items
        Serializer.registerClass(EntityItemsByTypeMessage.class);

        // Misc. classes
        Serializer.registerClasses(
            UserProfile.class,
            ServerProfile.class,
            WorldProfile.class,
            EntityProfile.class,
            EntityUpdater.class,
            EntityItem.class
        );

        // Destructible serializers
        Serializer.registerClass(PropertiesHelper.class, new DestructibleSerializer());
    }
}


text:
package com.ait.toolkit.titanium.mobile.client.core.handlers.ui;

import com.ait.toolkit.titanium.mobile.client.core.events.ui.LongClickEvent;
import com.google.gwt.event.shared.EventHandler;

public interface LongClickHandler extends EventHandler {
	public void onLongClick(LongClickEvent event);
}


text:
package com.instaclustr.sstabletools;

import java.util.Collection;
import java.util.List;

/**
 * Proxy to Cassandra backend.
 */
public interface CassandraProxy {
    /**
     * Get list of keyspaces.
     *
     * @return Keyspace names
     */
    List<String> getKeyspaces();

    /**
     *
     * @param ksName Keyspace name.
     * @return Column family names
     */
    List<String> getColumnFamilies(String ksName);

    /**
     * Get metadata about sstables.
     *
     * @param ksName Keyspace name.
     * @param cfName Column family name.
     * @return SSTable metadata.
     */
    List<SSTableMetadata> getSSTableMetadata(String ksName, String cfName);

    /**
     * Get proxy to cassandra column family backend.
     *
     * @param ksName Keyspace name.
     * @param cfName Column family name.
     * @param snapshotName Snapshot name to use, or null to one generated.
     * @param filter List of SSTables to analyse, or null to include all.
     * @return Proxy to cassandra column family backend.
     */
    ColumnFamilyProxy getColumnFamily(String ksName, String cfName, String snapshotName, Collection<String> filter);

    /**
     * Get the compaction class for column family.
     *
     * @param ksName Keyspace name.
     * @param cfName Column family name.
     * @return The compaction class.
     */
    Class<?> getCompactionClass(String ksName, String cfName);
}


text:
#ifndef SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_CLIENT_CONNECTION_LISTENER_H_
#define SRC_COMPONENTS_TRANSPORT_MANAGER_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_CLIENT_CONNECTION_LISTENER_H_

#include "transport_manager/transport_adapter/transport_adapter.h"

namespace transport_manager {

namespace transport_adapter {

/**
 * @brief Abstract class for listener of client connection.
 */
class ClientConnectionListener {
 public:
  /**
   * @brief Run client connection listener.
   *
   * @return Error information about possible reason of starting client listener failure.
   */
  virtual TransportAdapter::Error Init() = 0;

  /**
   * @brief Stop client connection listener.
   */
  virtual void Terminate() = 0;

  /**
   * @brief Check initialization.
   *
   * @return True if initialized.
   * @return False if not initialized.
   */
  virtual bool IsInitialised() const = 0;

  /**
   * @brief Start to listen for connection from client.
   */
  virtual TransportAdapter::Error StartListening() = 0;

  /**
   * @brief Stop to listen for connection from client.
   */
  virtual TransportAdapter::Error StopListening() = 0;

  /**
   * @brief Destructor.
   */
  virtual ~ClientConnectionListener() {
  }
};

}  // namespace transport_adapter
}  // namespace transport_manager

#endif /* CLIENT_CONNECTION_LISTENER_H_ */


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.07.27 at 08:11:57 PM EEST
//

package uk.org.siri.siri;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 * Type for Cancellation of an earlier Vehicle Activity.
 *
 *
Java class for VehicleActivityCancellationStructure complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="VehicleActivityCancellationStructure">
 *   <complexContent>
 *     <extension base="{http://www.siri.org.uk/siri}AbstractReferencingItemStructure">
 *       <sequence>
 *         <group ref="{http://www.siri.org.uk/siri}VehicleActivityCancellationIdentityGroup"/>
 *         <group ref="{http://www.siri.org.uk/siri}JourneyPatternInfoGroup"/>
 *         <element name="Reason" type="{http://www.siri.org.uk/siri}NaturalLanguageStringStructure" minOccurs="0"/>
 *         <element ref="{http://www.siri.org.uk/siri}Extensions" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "VehicleActivityCancellationStructure", propOrder = {
    "vehicleMonitoringRef",
    "vehicleJourneyRef",
    "lineRef",
    "directionRef",
    "journeyPatternRef",
    "vehicleMode",
    "routeRef",
    "publishedLineName",
    "directionName",
    "externalLineRef",
    "reason",
    "extensions"
})
public class VehicleActivityCancellationStructure
    extends AbstractReferencingItemStructure
{

    @XmlElement(name = "VehicleMonitoringRef", required = true)
    protected VehicleMonitoringRefStructure vehicleMonitoringRef;
    @XmlElement(name = "VehicleJourneyRef", required = true)
    protected FramedVehicleJourneyRefStructure vehicleJourneyRef;
    @XmlElement(name = "LineRef", required = true)
    protected LineRefStructure lineRef;
    @XmlElement(name = "DirectionRef", required = true)
    protected DirectionRefStructure directionRef;
    @XmlElement(name = "JourneyPatternRef")
    protected JourneyPatternRefStructure journeyPatternRef;
    @XmlElement(name = "VehicleMode")
    protected List<VehicleModesEnumeration> vehicleMode;
    @XmlElement(name = "RouteRef")
    protected RouteRefStructure routeRef;
    @XmlElement(name = "PublishedLineName")
    protected NaturalLanguageStringStructure publishedLineName;
    @XmlElement(name = "DirectionName")
    protected NaturalLanguageStringStructure directionName;
    @XmlElement(name = "ExternalLineRef")
    protected LineRefStructure externalLineRef;
    @XmlElement(name = "Reason")
    protected NaturalLanguageStringStructure reason;
    @XmlElement(name = "Extensions")
    protected ExtensionsStructure extensions;

    /**
     * Gets the value of the vehicleMonitoringRef property.
     *
     * @return
     *     possible object is
     *     {@link VehicleMonitoringRefStructure }
     *
     */
    public VehicleMonitoringRefStructure getVehicleMonitoringRef() {
        return vehicleMonitoringRef;
    }

    /**
     * Sets the value of the vehicleMonitoringRef property.
     *
     * @param value
     *     allowed object is
     *     {@link VehicleMonitoringRefStructure }
     *
     */
    public void setVehicleMonitoringRef(VehicleMonitoringRefStructure value) {
        this.vehicleMonitoringRef = value;
    }

    /**
     * Gets the value of the vehicleJourneyRef property.
     *
     * @return
     *     possible object is
     *     {@link FramedVehicleJourneyRefStructure }
     *
     */
    public FramedVehicleJourneyRefStructure getVehicleJourneyRef() {
        return vehicleJourneyRef;
    }

    /**
     * Sets the value of the vehicleJourneyRef property.
     *
     * @param value
     *     allowed object is
     *     {@link FramedVehicleJourneyRefStructure }
     *
     */
    public void setVehicleJourneyRef(FramedVehicleJourneyRefStructure value) {
        this.vehicleJourneyRef = value;
    }

    /**
     * Gets the value of the lineRef property.
     *
     * @return
     *     possible object is
     *     {@link LineRefStructure }
     *
     */
    public LineRefStructure getLineRef() {
        return lineRef;
    }

    /**
     * Sets the value of the lineRef property.
     *
     * @param value
     *     allowed object is
     *     {@link LineRefStructure }
     *
     */
    public void setLineRef(LineRefStructure value) {
        this.lineRef = value;
    }

    /**
     * Gets the value of the directionRef property.
     *
     * @return
     *     possible object is
     *     {@link DirectionRefStructure }
     *
     */
    public DirectionRefStructure getDirectionRef() {
        return directionRef;
    }

    /**
     * Sets the value of the directionRef property.
     *
     * @param value
     *     allowed object is
     *     {@link DirectionRefStructure }
     *
     */
    public void setDirectionRef(DirectionRefStructure value) {
        this.directionRef = value;
    }

    /**
     * Gets the value of the journeyPatternRef property.
     *
     * @return
     *     possible object is
     *     {@link JourneyPatternRefStructure }
     *
     */
    public JourneyPatternRefStructure getJourneyPatternRef() {
        return journeyPatternRef;
    }

    /**
     * Sets the value of the journeyPatternRef property.
     *
     * @param value
     *     allowed object is
     *     {@link JourneyPatternRefStructure }
     *
     */
    public void setJourneyPatternRef(JourneyPatternRefStructure value) {
        this.journeyPatternRef = value;
    }

    /**
     * Gets the value of the vehicleMode property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the vehicleMode property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getVehicleMode().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link VehicleModesEnumeration }
     *
     *
     */
    public List<VehicleModesEnumeration> getVehicleMode() {
        if (vehicleMode == null) {
            vehicleMode = new ArrayList<VehicleModesEnumeration>();
        }
        return this.vehicleMode;
    }

    /**
     * Gets the value of the routeRef property.
     *
     * @return
     *     possible object is
     *     {@link RouteRefStructure }
     *
     */
    public RouteRefStructure getRouteRef() {
        return routeRef;
    }

    /**
     * Sets the value of the routeRef property.
     *
     * @param value
     *     allowed object is
     *     {@link RouteRefStructure }
     *
     */
    public void setRouteRef(RouteRefStructure value) {
        this.routeRef = value;
    }

    /**
     * Gets the value of the publishedLineName property.
     *
     * @return
     *     possible object is
     *     {@link NaturalLanguageStringStructure }
     *
     */
    public NaturalLanguageStringStructure getPublishedLineName() {
        return publishedLineName;
    }

    /**
     * Sets the value of the publishedLineName property.
     *
     * @param value
     *     allowed object is
     *     {@link NaturalLanguageStringStructure }
     *
     */
    public void setPublishedLineName(NaturalLanguageStringStructure value) {
        this.publishedLineName = value;
    }

    /**
     * Gets the value of the directionName property.
     *
     * @return
     *     possible object is
     *     {@link NaturalLanguageStringStructure }
     *
     */
    public NaturalLanguageStringStructure getDirectionName() {
        return directionName;
    }

    /**
     * Sets the value of the directionName property.
     *
     * @param value
     *     allowed object is
     *     {@link NaturalLanguageStringStructure }
     *
     */
    public void setDirectionName(NaturalLanguageStringStructure value) {
        this.directionName = value;
    }

    /**
     * Gets the value of the externalLineRef property.
     *
     * @return
     *     possible object is
     *     {@link LineRefStructure }
     *
     */
    public LineRefStructure getExternalLineRef() {
        return externalLineRef;
    }

    /**
     * Sets the value of the externalLineRef property.
     *
     * @param value
     *     allowed object is
     *     {@link LineRefStructure }
     *
     */
    public void setExternalLineRef(LineRefStructure value) {
        this.externalLineRef = value;
    }

    /**
     * Gets the value of the reason property.
     *
     * @return
     *     possible object is
     *     {@link NaturalLanguageStringStructure }
     *
     */
    public NaturalLanguageStringStructure getReason() {
        return reason;
    }

    /**
     * Sets the value of the reason property.
     *
     * @param value
     *     allowed object is
     *     {@link NaturalLanguageStringStructure }
     *
     */
    public void setReason(NaturalLanguageStringStructure value) {
        this.reason = value;
    }

    /**
     * Gets the value of the extensions property.
     *
     * @return
     *     possible object is
     *     {@link ExtensionsStructure }
     *
     */
    public ExtensionsStructure getExtensions() {
        return extensions;
    }

    /**
     * Sets the value of the extensions property.
     *
     * @param value
     *     allowed object is
     *     {@link ExtensionsStructure }
     *
     */
    public void setExtensions(ExtensionsStructure value) {
        this.extensions = value;
    }

}


text:
package org.apache.camel.example.cafe;

import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.example.cafe.stuff.Barista;
import org.apache.camel.example.cafe.stuff.CafeAggregationStrategy;
import org.apache.camel.example.cafe.stuff.DrinkRouter;
import org.apache.camel.example.cafe.stuff.OrderSplitter;
import org.apache.camel.example.cafe.stuff.Waiter;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.impl.JndiRegistry;

/**
 * A simple example router from Cafe Demo
 *
 * @version
 */
public class CafeRouteBuilder extends RouteBuilder {

    public static void main(String[] args) throws Exception {
        CafeRouteBuilder builder = new CafeRouteBuilder();
        builder.runCafeRouteDemo();
    }

    protected JndiRegistry createRegistry() throws Exception {
        JndiRegistry jndi = new JndiRegistry();
        jndi.bind("drinkRouter", new DrinkRouter());
        jndi.bind("orderSplitter", new OrderSplitter());
        jndi.bind("barista", new Barista());
        jndi.bind("waiter", new Waiter());
        jndi.bind("aggregatorStrategy", new CafeAggregationStrategy());
        return jndi;
    }

    public void runCafeRouteDemo() throws Exception {
        // create CamelContext
        DefaultCamelContext camelContext = new DefaultCamelContext();
        camelContext.setRegistry(createRegistry());
        camelContext.addRoutes(this);
        camelContext.start();

        ProducerTemplate template = camelContext.createProducerTemplate();

        Order order = new Order(2);
        order.addItem(DrinkType.ESPRESSO, 2, true);
        order.addItem(DrinkType.CAPPUCCINO, 4, false);
        order.addItem(DrinkType.LATTE, 4, false);
        order.addItem(DrinkType.MOCHA, 2, false);

        template.sendBody("direct:cafe", order);

        Thread.sleep(6000);
        camelContext.stop();

    }
    //START SNIPPET: RouteConfig
    public void configure() {

        from("direct:cafe")
            .split().method("orderSplitter").to("direct:drink");

        from("direct:drink").recipientList().method("drinkRouter");

        from("seda:coldDrinks?concurrentConsumers=2").to("bean:barista?method=prepareColdDrink").to("direct:deliveries");
        from("seda:hotDrinks?concurrentConsumers=3").to("bean:barista?method=prepareHotDrink").to("direct:deliveries");

        from("direct:deliveries")
            .aggregate(new CafeAggregationStrategy()).method("waiter", "checkOrder").completionTimeout(5 * 1000L)
            .to("bean:waiter?method=prepareDelivery")
            .to("bean:waiter?method=deliverCafes");

    }
    //END SNIPPET: RouteConfig

}


text:
//------------------------------------------------------------------------------
//  Copyright (c) 2014-2016 the original author or authors. All Rights Reserved.
//
//  NOTICE: You are permitted to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//------------------------------------------------------------------------------

using System;

namespace Robotlegs.Bender.Extensions.CommandCenter.Support
{
	public class MethodParametersCommand
	{
		/*============================================================================*/
		/* Public Properties                                                          */
		/*============================================================================*/

		[Inject("ReportingFunction")]
		public Action<object> reportingFunc;

		/*============================================================================*/
		/* Public Functions                                                           */
		/*============================================================================*/

		public void Execute(string message, int code)
		{
			reportingFunc(message);
			reportingFunc(code);
		}
	}
}


text:
package org.amc.jooq.main;

import org.apache.commons.io.IOUtils;
import org.jooq.util.GenerationTool;

import java.io.InputStream;

public class GeneratedFromXml {

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

        InputStream is = GeneratedFromXml.class.getClassLoader().getResourceAsStream("library.xml");
        String xml = IOUtils.toString(is);

        GenerationTool.generate(xml);
    }

}