text:
using System;
using UnityEngine;
using LuaInterface;
using Object = UnityEngine.Object;

public class CEventReceiveWrap
{
	public static void Register(IntPtr L)
	{
		LuaMethod[] regs = new LuaMethod[]
		{
			new LuaMethod("OnPointerDown", OnPointerDown),
			new LuaMethod("OnPointerUp", OnPointerUp),
			new LuaMethod("OnBeginDrag", OnBeginDrag),
			new LuaMethod("OnDrag", OnDrag),
			new LuaMethod("OnDrop", OnDrop),
			new LuaMethod("OnPointerClick", OnPointerClick),
			new LuaMethod("OnSelect", OnSelect),
			new LuaMethod("OnCancel", OnCancel),
			new LuaMethod("New", _CreateCEventReceive),
			new LuaMethod("GetClassType", GetClassType),
			new LuaMethod("__eq", Lua_Eq),
		};

		LuaField[] fields = new LuaField[]
		{
		};

		LuaScriptMgr.RegisterLib(L, "CEventReceive", typeof(CEventReceive), regs, fields, typeof(MonoBehaviour));
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int _CreateCEventReceive(IntPtr L)
	{
		LuaDLL.luaL_error(L, "CEventReceive class does not have a constructor function");
		return 0;
	}

	static Type classType = typeof(CEventReceive);

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int GetClassType(IntPtr L)
	{
		LuaScriptMgr.Push(L, classType);
		return 1;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int OnPointerDown(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		CEventReceive obj = (CEventReceive)LuaScriptMgr.GetUnityObjectSelf(L, 1, "CEventReceive");
		UnityEngine.EventSystems.BaseEventData arg0 = (UnityEngine.EventSystems.BaseEventData)LuaScriptMgr.GetNetObject(L, 2, typeof(UnityEngine.EventSystems.BaseEventData));
		obj.OnPointerDown(arg0);
		return 0;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int OnPointerUp(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		CEventReceive obj = (CEventReceive)LuaScriptMgr.GetUnityObjectSelf(L, 1, "CEventReceive");
		UnityEngine.EventSystems.BaseEventData arg0 = (UnityEngine.EventSystems.BaseEventData)LuaScriptMgr.GetNetObject(L, 2, typeof(UnityEngine.EventSystems.BaseEventData));
		obj.OnPointerUp(arg0);
		return 0;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int OnBeginDrag(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		CEventReceive obj = (CEventReceive)LuaScriptMgr.GetUnityObjectSelf(L, 1, "CEventReceive");
		UnityEngine.EventSystems.BaseEventData arg0 = (UnityEngine.EventSystems.BaseEventData)LuaScriptMgr.GetNetObject(L, 2, typeof(UnityEngine.EventSystems.BaseEventData));
		obj.OnBeginDrag(arg0);
		return 0;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int OnDrag(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		CEventReceive obj = (CEventReceive)LuaScriptMgr.GetUnityObjectSelf(L, 1, "CEventReceive");
		UnityEngine.EventSystems.BaseEventData arg0 = (UnityEngine.EventSystems.BaseEventData)LuaScriptMgr.GetNetObject(L, 2, typeof(UnityEngine.EventSystems.BaseEventData));
		obj.OnDrag(arg0);
		return 0;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int OnDrop(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		CEventReceive obj = (CEventReceive)LuaScriptMgr.GetUnityObjectSelf(L, 1, "CEventReceive");
		UnityEngine.EventSystems.BaseEventData arg0 = (UnityEngine.EventSystems.BaseEventData)LuaScriptMgr.GetNetObject(L, 2, typeof(UnityEngine.EventSystems.BaseEventData));
		obj.OnDrop(arg0);
		return 0;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int OnPointerClick(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		CEventReceive obj = (CEventReceive)LuaScriptMgr.GetUnityObjectSelf(L, 1, "CEventReceive");
		UnityEngine.EventSystems.BaseEventData arg0 = (UnityEngine.EventSystems.BaseEventData)LuaScriptMgr.GetNetObject(L, 2, typeof(UnityEngine.EventSystems.BaseEventData));
		obj.OnPointerClick(arg0);
		return 0;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int OnSelect(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		CEventReceive obj = (CEventReceive)LuaScriptMgr.GetUnityObjectSelf(L, 1, "CEventReceive");
		UnityEngine.EventSystems.BaseEventData arg0 = (UnityEngine.EventSystems.BaseEventData)LuaScriptMgr.GetNetObject(L, 2, typeof(UnityEngine.EventSystems.BaseEventData));
		obj.OnSelect(arg0);
		return 0;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int OnCancel(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		CEventReceive obj = (CEventReceive)LuaScriptMgr.GetUnityObjectSelf(L, 1, "CEventReceive");
		UnityEngine.EventSystems.BaseEventData arg0 = (UnityEngine.EventSystems.BaseEventData)LuaScriptMgr.GetNetObject(L, 2, typeof(UnityEngine.EventSystems.BaseEventData));
		obj.OnCancel(arg0);
		return 0;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int Lua_Eq(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		Object arg0 = LuaScriptMgr.GetLuaObject(L, 1) as Object;
		Object arg1 = LuaScriptMgr.GetLuaObject(L, 2) as Object;
		bool o = arg0 == arg1;
		LuaScriptMgr.Push(L, o);
		return 1;
	}
}


text:
using System.Collections.Generic;
using Encog.ML.Data;

namespace Encog.ML
{
    /// <summary>
    /// Defines a cluster. Usually used with the MLClustering method to break input
    /// into clusters.
    /// </summary>
    ///
    public interface IMLCluster
    {
        /// <value>The data in this cluster.</value>
        IList<IMLData> Data { get; }

        /// <summary>
        /// Add data to this cluster.
        /// </summary>
        ///
        /// <param name="pair">The data to add.</param>
        void Add(IMLData pair);

        /// <summary>
        /// Create a machine learning dataset from the data.
        /// </summary>
        ///
        /// <returns>A dataset.</returns>
        IMLDataSet CreateDataSet();

        /// <summary>
        /// Get the specified data item by index.
        /// </summary>
        ///
        /// <param name="pos">The index of the data item to get.</param>
        /// <returns>The data item.</returns>
        IMLData Get(int pos);

        /// <summary>
        /// Remove the specified item.
        /// </summary>
        ///
        /// <param name="data">The item to remove.</param>
        void Remove(IMLData data);

        /// <returns>The number of items.</returns>
        int Count { get; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.thedreamsanctuary.dreamcatcher;

import java.io.File;
import java.io.IOException;

import org.bukkit.plugin.java.JavaPlugin;

import com.thedreamsanctuary.dreamcatcher.commands.VoteKickCommand;
import com.thedreamsanctuary.dreamcatcher.util.Configuration;

public class DreamCatcher extends JavaPlugin
{
    private VoteKickCommand         voteKickCommand;
    private static final VoteConfig config = new VoteConfig();

    @Override
    public void onEnable()
    {
        try
        {
            Configuration.loadConfiguration(new File("plugins" + File.separator + "DreamCatcher" + File.separator + "Config.properties"), config);
        } catch (final IOException e)
        {
            e.printStackTrace();
        }
        this.voteKickCommand = new VoteKickCommand(this);

        this.getCommand("vtkick").setExecutor(this.voteKickCommand);
    }

    public static VoteConfig getVoteConfig()
    {
        return config;
    }

    @Override
    public void onDisable()
    {

    }

}


text:
package containeranalysis

// [START containeranalysis_occurrences_for_note]

import (
	"context"
	"fmt"
	"io"

	containeranalysis "cloud.google.com/go/containeranalysis/apiv1"
	"google.golang.org/api/iterator"
	grafeaspb "google.golang.org/genproto/googleapis/grafeas/v1"
)

// getOccurrencesForNote retrieves all the Occurrences associated with a specified Note.
// Here, all Occurrences are printed and counted.
func getOccurrencesForNote(w io.Writer, noteID, projectID string) (int, error) {
	// noteID := fmt.Sprintf("my-note")
	ctx := context.Background()
	client, err := containeranalysis.NewClient(ctx)
	if err != nil {
		return -1, fmt.Errorf("NewClient: %v", err)
	}
	defer client.Close()

	req := &grafeaspb.ListNoteOccurrencesRequest{
		Name: fmt.Sprintf("projects/%s/notes/%s", projectID, noteID),
	}
	it := client.GetGrafeasClient().ListNoteOccurrences(ctx, req)
	count := 0
	for {
		occ, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			return -1, fmt.Errorf("occurrence iteration error: %v", err)
		}
		// Write custom code to process each Occurrence here.
		fmt.Fprintln(w, occ)
		count = count + 1
	}
	return count, nil
}

// [END containeranalysis_occurrences_for_note]


text:
MODEL_NAME=inception_v1
WEIGHT_LOSS=1
LOG_NAME=kitti_calib_05_05
LIST_PARAM=5,0.5
LIDAR_POOL=4,2

python deep_calib_kitti.py \
    --checkpoint_path=/data/tf/checkpoints/${LOG_NAME}/${MODEL_NAME}/weight_${WEIGHT_LOSS} \
    --list_param=${LIST_PARAM} \
    --lidar_pool=${LIDAR_POOL} \
    --model_name=${MODEL_NAME} \
    --weight_loss=${WEIGHT_LOSS} \
    --dir_image=data_ex/kitti/object/data_object_image_2/testing/image_2 \
    --dir_lidar=data_ex/kitti/object/data_object_velodyne/testing/velodyne \
    --dir_calib=data_ex/kitti/object/data_object_calib/testing/calib \
    --dir_out=data_ex/results/${MODEL_NAME}/weight_${WEIGHT_LOSS}


text:
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNet.Identity;
using Microsoft.Owin.Security;
using TrolleyTracker.Models;

namespace TrolleyTracker.ViewModels
{
    public class BulkStopsViewModel
    {
        [DataType(DataType.MultilineText)]
        public string JSONText { get; set; }
    }

    public class BulkShapesViewModel
    {

        public int RouteID { get; set; }

        [DataType(DataType.MultilineText)]
        public string JSONText { get; set; }

        public virtual Route Route { get; set; }
    }

}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.delegatednetwork.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Represents an instance of a resource. */
@Fluent
public class OrchestratorResource extends Resource {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(OrchestratorResource.class);

    /*
     * The kind of workbook. Choices are user and shared.
     */
    @JsonProperty(value = "kind", required = true)
    private OrchestratorKind kind;

    /*
     * The identity of the orchestrator
     */
    @JsonProperty(value = "identity")
    private OrchestratorIdentity identity;

    /**
     * Get the kind property: The kind of workbook. Choices are user and shared.
     *
     * @return the kind value.
     */
    public OrchestratorKind kind() {
        return this.kind;
    }

    /**
     * Set the kind property: The kind of workbook. Choices are user and shared.
     *
     * @param kind the kind value to set.
     * @return the OrchestratorResource object itself.
     */
    public OrchestratorResource withKind(OrchestratorKind kind) {
        this.kind = kind;
        return this;
    }

    /**
     * Get the identity property: The identity of the orchestrator.
     *
     * @return the identity value.
     */
    public OrchestratorIdentity identity() {
        return this.identity;
    }

    /**
     * Set the identity property: The identity of the orchestrator.
     *
     * @param identity the identity value to set.
     * @return the OrchestratorResource object itself.
     */
    public OrchestratorResource withIdentity(OrchestratorIdentity identity) {
        this.identity = identity;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public OrchestratorResource withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public OrchestratorResource withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (kind() == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property kind in model OrchestratorResource"));
        }
        if (identity() != null) {
            identity().validate();
        }
    }
}


text:
class FacilityOrdersController < ApplicationController

  include SortableColumnController
  include NewInprocessController
  include ProblemOrderDetailsController
  include TabCountHelper

  admin_tab     :all
  before_action :authenticate_user!
  before_action :check_acting_as
  before_action :init_current_facility

  before_action :load_order, only: [:show, :update, :send_receipt]
  before_action :load_merge_orders, only: [:show, :update]
  before_action :load_add_to_order_form, only: [:show, :update]

  load_and_authorize_resource class: Order

  def initialize
    @active_tab = "admin_orders"
    super
  end

  # GET /facility/1/orders
  # Provided by NewInprocessController
  # def index
  # end

  def show
    @order_details = @order.order_details.ordered_by_parents
    @order_details = @order_details.includes(:reservation, :order_status, :product, :order)
    if params[:refresh]
      render partial: "order_table", locals: { order_details: @order_details }
    end
  end

  ## POST /facilities/:facility_id/orders/batch_update
  def batch_update
    redirect_to facility_orders_path

    msg_hash = batch_updater.update!

    # add flash messages if necessary
    flash.merge!(msg_hash) if msg_hash
  end

  def send_receipt
    begin
      PurchaseNotifier.order_receipt(order: @order, user: @order.user).deliver_later
      flash[:notice] = "Receipt sent successfully."
    rescue => e
      flash[:error] = "There was a problem while sending the receipt: #{e.message}"
    end

    redirect_fallback = @order ? facility_order_path(current_facility, @order) : root_path
    redirect_back(fallback_location: redirect_fallback)
  end

  # PUT/PATCH /facilities/:facility_id/orders/:id
  def update
    @add_to_order_form.assign_attributes(add_to_order_params.merge(created_by: current_user))
    if @add_to_order_form.save
      if @add_to_order_form.notifications?
        flash[:error] = @add_to_order_form.notifications_message
      else
        flash[:notice] = @add_to_order_form.success_message
      end
      redirect_to facility_order_path(current_facility, @order)
    else
      flash.now[:error] = @add_to_order_form.error_message
      show # set @order_details
      render :show
    end
  end

  protected

  def show_problems_path
    show_problems_facility_orders_path
  end

  private

  def add_to_order_params
    params.require(:add_to_order_form).permit(:quantity, :product_id, :order_status_id, :note, :fulfilled_at, :duration, :account_id, :reference_id)
  end

  def batch_updater
    @batch_updater ||= OrderDetailBatchUpdater.new(params[:order_detail_ids], current_facility, session_user, params)
  end

  def load_order
    @order = current_facility.orders.find params[:id]
  end

  def load_merge_orders
    @merge_orders = Order.where(merge_with_order_id: @order.id, created_by: current_user.id)
  end

  def load_add_to_order_form
    @add_to_order_form = AddToOrderForm.new(@order)
  end

  def new_or_in_process_orders
    # will never include instrument order details
    current_facility.order_details
                    .new_or_inprocess
                    .item_and_service_orders
  end

  def problem_order_details
    current_facility.problem_plain_order_details
  end

end


text:
package com.google.auto.value;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Specifies that AutoValue should
 * generate an implementation class for the annotated abstract class, implementing the standard
 * {@link Object} methods like {@link Object#equals equals} to have conventional value semantics. A
 * simple example:

 *
 *   @AutoValue
 *   abstract class Person {
 *     static Person create(String name, int id) {
 *       return new AutoValue_Person(name, id);
 *     }
 *
 *     abstract String name();
 *     abstract int id();
 *   }

 *
 * @author Éamonn McManus
 * @author Kevin Bourrillion
 * @see AutoValue User's Guide
 */
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface AutoValue {

    /**
     * Specifies that AutoValue should generate an implementation of the annotated class or interface,
     * to serve as a builder for the value-type class it is nested within. As a simple example,
     * here is an alternative way to write the {@code Person} class mentioned in the {@link AutoValue}
     * example:

     *

     *   @AutoValue
     *   abstract class Person {
     *     static Builder builder() {
     *       return new AutoValue_Person.Builder();
     *     }
     *

     *     abstract String name();
     *     abstract int id();
     *

     *     @AutoValue.Builder
     *     interface Builder {
     *       Builder name(String x);
     *       Builder id(int x);
     *       Person build();
     *     }
     *   }

     *
     * @author Éamonn McManus
     */
    @Retention(RetentionPolicy.SOURCE)
    @Target(ElementType.TYPE)
    public @interface Builder {
    }
}


text:
#ifndef LIEF_PE_IMPORT_ENTRY_CPP_C_API_
#define LIEF_PE_IMPORT_ENTRY_CPP_C_API_

#include "LIEF/PE/Binary.h"
#include "LIEF/PE/Binary.hpp"

#include "LIEF/PE/ImportEntry.h"
#include "LIEF/PE/ImportEntry.hpp"

namespace LIEF {
namespace PE {

void init_c_import_entries(Pe_Import_t* c_import, Import& imp);
void destroy_import_entries(Pe_Import_t* c_import);

}
}

#endif


text:
.bar {
    position: relative;
    margin: 0 6px;
    padding: 2px;
    height: 15px;
    text-align: center;
    border-width: 1px;
    border-color: var(--progress-bar-border-color);
    border-style: solid;
    border-radius: 4px;
}
.bar .progress {
    background-color: var(--progress-bar-color);
    height: 100%;
    display: block;
    border-radius: 4px;
}

.styleTable .stat {
    width : 30%;
}
.bar .percent {
    position: absolute;
    top: 3px;
    line-height: 15px;
    border-radius: 4px;
    color: var(--progress-bar-font-color);
}

.index {
    width: 15px;
    text-align: center;
}

.title {
    text-align : center;
    line-height: 45px;
}


text:
<?php
/**
 * Defines the HomePage page type
 */

class CollectionsPage extends Page {
 static $db = array(

   'CollectionsTitle' => 'Text',
   'CollectionsText' => 'HTMLText',
   'CollectionsImageCaption' => 'HTMLText',

);
   static $has_one = array(

   'CollectionsImage' => 'Image',

   );

   function getCMSFields() {
   $fields = parent::getCMSFields();

   $fields->removeFieldFromTab("Root.Content.Main","Content");

    $fields->addFieldToTab('Root.Content.PageContent', new ImageField('CollectionsImage', 'Collections Image (width must be 348 pixels)'));
 	$fields->addFieldToTab('Root.Content.PageContent', new TextField('CollectionsTitle','Collections Title'));
	$fields->addFieldToTab('Root.Content.PageContent', new HTMLEditorField('CollectionsImageCaption','Collections Image Caption'));
	$fields->addFieldToTab('Root.Content.PageContent', new HTMLEditorField('CollectionsText','Collections HTML Text'));

   return $fields;
}
}

class CollectionsPage_Controller extends Page_Controller {

}
?>


text:
{{sessionInfo.name}}

{{sessionInfo.email}}

chevron_left

homeInicio

personPerfil

peopleUsuarios

account_balanceFacultades

schoolProgramas

book Documentos

      menu

notifications_none

input

Notificaciones

No tienes notificaciones actualmente.


text:
import re
arguments = ["self", "info", "args"]
helpstring = "regex <pattern> <string>"
minlevel = 1

def main(connection, info, args) :
    """Evaluates regex"""
    connection.msg(info["channel"], repr(re.search(args[1], " ".join(args[2:])).groups()))


text:
package com.wesabe.servlet.normalizers;

import javax.servlet.http.Cookie;

import com.wesabe.servlet.normalizers.util.CharacterSet;

/**
 * Normalizes HTTP cookies.
 *
 * @author coda
 */
public class CookieNormalizer implements Normalizer<Cookie> {
	private static class CookieValueNormalizer implements Normalizer<String> {
		private static final CharacterSet VALID_CHARACTERS = CharacterSet.of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-/+=_ ");

		@Override
		public String normalize(String input) throws ValidationException {
			if (VALID_CHARACTERS.composes(input)) {
				return input;
			}

			throw new ValidationException(input, "not a valid cookie value");
		}
	}

	private static class CookieNameNormalizer implements Normalizer<String> {
		private static final CharacterSet VALID_CHARACTERS = CharacterSet.of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-");

		@Override
		public String normalize(String name) throws ValidationException {
			if (VALID_CHARACTERS.composes(name)) {
				return name;
			}

			throw new ValidationException(name, "not a valid cookie name");
		}
	}

	public static class CookiePathNormalizer implements Normalizer<String> {
		private static final CharacterSet VALID_CHARACTERS = CharacterSet.of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789()-=*.?;,+/:&_ ");

		@Override
		public String normalize(String value) throws ValidationException {
			if (VALID_CHARACTERS.composes(value)) {
				return value;
			}

			throw new ValidationException(value, "not a valid cookie path");
		}

	}

	private static final CookieNameNormalizer NAME_NORMALIZER = new CookieNameNormalizer();
	private static final CookieValueNormalizer VALUE_NORMALIZER = new CookieValueNormalizer();
	private static final HostnameNormalizer DOMAIN_NORMALIZER = new HostnameNormalizer();
	private static final CookiePathNormalizer PATH_NORMALIZER = new CookiePathNormalizer();

	@Override
	public Cookie normalize(Cookie cookie) throws ValidationException {
		final Cookie safeCookie = new Cookie(
			NAME_NORMALIZER.normalize(cookie.getName()),
			VALUE_NORMALIZER.normalize(cookie.getValue())
		);

		// safe attributes
		safeCookie.setMaxAge(cookie.getMaxAge());
		safeCookie.setSecure(cookie.getSecure());
		safeCookie.setVersion(cookie.getVersion());

		// unsafe attributes
		if (cookie.getDomain() != null) {
			safeCookie.setDomain(DOMAIN_NORMALIZER.normalize(cookie.getDomain()));
		}

		if (cookie.getPath() != null) {
			safeCookie.setPath(PATH_NORMALIZER.normalize(cookie.getPath()));
		}

		// REVIEW coda@wesabe.com -- Apr 8, 2009: Should we be dropping cookie comments?

		return safeCookie;
	}

}


text:
#!/usr/bin/env python

##########################################################
# A python module to access data from WFDB
# Copyright (C) 2009, 2010  Raja Selvaraj <rajajs@gmail.com>

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
##########################################################

"""
A pure python module for accessing and using the waveform data in `Physiobank <http://www.physionet.org/physiobank/>`_.
Provides `rdsamp` and `rdann` which are the python equivalents of the wfdb applications
of similar names.
A deliberate attempt is made to try to keep names and usage similar to the
original wfdb applications for simplicity of use.

The only dependency that will need to be installed is numpy. However, to use the function
`plot_data`, which is an utility function for interactive use, you need to have matplotlib
also installed.

Example Usage::

    >> from wfdbtools import rdsamp, rdann, plot_data
    >> from pprint import pprint

    # Record is a format 212 record from physiobank.
    # Note that name of record does not include extension.
    >> record  = 'samples/format212/100'

    # Read in the data from 0 to 10 seconds
    >> data, info = rdsamp(record, 0, 10)

    # returned data is an array. The columns are time(samples),
    # time(seconds), signal1, signal2
    >> print data.shape
    (3600, 4)

    # info is a dictionary containing header information
    >> pprint info
    {'first_values': [995, 1011],
    'gains': [200, 200],
    'samp_count': 650000,
    'samp_freq': 360,
    'signal_names': ['MLII', 'V5'],
    'zero_values': [1024, 1024]}

    # And now read the annotation
    >> ann = rdann(record, 'atr', 0, 10)

    # ann has 3 columns - sample number, time (sec) and annotation code
    >> print(ann[:4,:])
       array([[  18.   ,    0.05 ,   28.   ],
              [  77.   ,    0.214,    1.   ],
              [ 370.   ,    1.028,    1.   ],
              [ 662.   ,    1.839,    1.   ]])

    # Plot the data and the mark the annotations
    >> plot_data(data, info, ann)

"""

# rdsamp based on rddata.m for matlab written by Robert Tratnig
# available at http://physionet.org/physiotools/matlab/rddata.m

from __future__ import division
import re
import warnings
import numpy
#import pylab
#from pprint import pprint

__author__ = 'Raja Selvaraj <rajajs@gmail.com>'
__version__ = '0.2'

## Annotation codes
CODEDICT = {
    0 : 'NOTQRS',	# not-QRS (not a getann/putann codedict) */
    1 : 'NORMAL',	# normal beat */
    2 : 'LBBB',	# left bundle branch block beat */
    3 : 'RBBB',	# right bundle branch block beat */
    4 : 'ABERR',	# aberrated atrial premature beat */
    5 : 'PVC',	# premature ventricular contraction */
    6 : 'FUSION',	# fusion of ventricular and normal beat */
    7 : 'NPC',	# nodal (junctional) premature beat */
    8 : 'APC',	# atrial premature contraction */
    9 : 'SVPB',	# premature or ectopic supraventricular beat */
    10 : 'VESC',	# ventricular escape beat */
    11 : 'NESC',	# nodal (junctional) escape beat */
    12 : 'PACE',	# paced beat */
    13 : 'UNKNOWN',	# unclassifiable beat */
    14 : 'NOISE',	# signal quality change */
    16 : 'ARFCT',	# isolated QRS-like artifact */
    18 : 'STCH',	# ST change */
    19 : 'TCH',	# T-wave change */
    20 : 'SYSTOLE',	# systole */
    21 : 'DIASTOLE',	# diastole */
    22 : 'NOTE',	# comment annotation */
    23 : 'MEASURE',	# measurement annotation */
    24 : 'PWAVE',	# P-wave peak */
    25 : 'BBB',	# left or right bundle branch block */
    26 : 'PACESP',	# non-conducted pacer spike */
    27 : 'TWAVE',	# T-wave peak */
    28 : 'RHYTHM',	# rhythm change */
    29 : 'UWAVE',	# U-wave peak */
    30 : 'LEARN',	# learning */
    31 : 'FLWAV',	# ventricular flutter wave */
    32 : 'VFON',	# start of ventricular flutter/fibrillation */
    33 : 'VFOFF',	# end of ventricular flutter/fibrillation */
    34 : 'AESC',	# atrial escape beat */
    35 : 'SVESC',	# supraventricular escape beat */
    36 : 'LINK',	# link to external data (aux contains URL) */
    37 : 'NAPC',	# non-conducted P-wave (blocked APB) */
    38 : 'PFUS',	# fusion of paced and normal beat */
    39 : 'WFON',	# waveform onset */
    #WFON : 'PQ',	# PQ junction (beginning of QRS) */
    40 : 'WFOFF',	# waveform end */
    #WFOFF : 'JPT',	# J point (end of QRS) */
    41 : 'RONT'	# R-on-T premature ventricular contraction */
    }

def rdsamp(record, start=0, end=-1, interval=-1):
    """
    Read signals from a format 212 record from Physionet database.

    Only 2 channel records in format 212 are supported.
    This is the most common record in the
    Physionet database(http://www.physionet.org/physiobank/).

    Parameters
    ----------
    record : str
            Full path to record. No extension to be used for record name.
    start  : int, optional
            time to begin in seconds, default 0
    end    : int, optional
            time to end in seconds, defaults to end of record
    interval : int, optional
            interval of data to be read in seconds
            If both interval and end are given, earlier limit is used.

    Returns
    -------
    data : (N, 4) ndarray
          numpy array with 4 columns
          col 1 - Elapsed time in samples
          col 2 - Elapsed time in milliseconds
          col 3,4 - The two signals
          Signal amplitude is in physical units (mV)
    info : dict
          Dictionary containing header information
          keys :
          'signal_names' - Names of each signal
          'samp_freq' - Sampling freq (samples / second)
          'samp_count' - Total samples in record
          'first_values' - First value of each signal
          'gains' - Gain for each signal
          'zero_values' - Zero value for each signal

    """
    # read the header file - output is a dict
    info = rdhdr(record)
    # establish start and end in samples
    start, end = _get_read_limits(start, end, interval, info)
    # read the data
    data = _read_data(record, start, end, info)
    return data, info

def rdann(record, annotator, start=0, end=-1, types=[]):
    """
    Reads annotations for given record by specified annotator.

    Parameters
    ----------
    record : str
            Full path to record. Record name has no extension.
    annotator : str
            Name of annotator, eg. 'atr'.
            This is the extension for the annotation file.
    start  : int, optional
            time to begin in seconds, default 0
    end    : int, optional
            time to end in seconds, defaults to end of record
    types   : list, optional
            list of annotation types that will be returned.
            Types are input as annotation code (integer from 0 to 49)
            Annotation types not in list will be ignored.
            Default is empty list, which results in all types being read.

    Returns
    -------
    data : (N, 3) ndarray
          numpy array with 3 columns
          col 1 - Elapsed time in samples for each annotation.
          col 2 - Elapsed time in seconds for each annotation.
          col 3 - The annotation code.

    """
    # get header data
    info = rdhdr(record)

    annfile = ''.join((record, '.', annotator))
    with open(annfile, 'rb') as f:
        arr = numpy.fromstring(f.read(), dtype = numpy.uint8).reshape((-1, 2))

    rows = arr.shape[0]
    annot = []
    annot_time = []
    i = 0

    while i < rows:
        anntype = arr[i, 1] >> 2
        if anntype == 59:
            annot.append(arr[i+3, 1] >> 2)
            annot_time.append(arr[i+2, 0] + (arr[i+2, 1] << 8) +
                              (arr[i+1, 0] << 16) + arr[i+1, 1] << 24)
            i += 3
        elif anntype in [60, 61, 62]:
            pass
        elif anntype == 63:
            hilfe = arr[i, 0] + ((arr[i, 1] & 3) << 8)
            hilfe += hilfe % 2
            i += hilfe / 2
        else:
            annot_time.append(arr[i, 0] + ((arr[i, 1] & 3) << 8))
            annot.append(arr[i, 1] >> 2)
        i += 1

    # last values are EOF indicator
    annot_time = annot_time[:-1]
    annot = annot[:-1]

    # annot_time should be total elapsed samples
    annot_time = numpy.cumsum(annot_time)
    annot_time_ms = annot_time / info['samp_freq'] # in seconds

    # limit to requested interval
    start, end = _get_read_limits(start, end, -1, info)
    ann = numpy.array([annot_time, annot_time_ms, annot]).transpose()

    # filter by annot_time in interval
    ann =  ann[start <= ann[:, 0]]
    ann = ann[ann[:, 0] <= end]

    # filter by type
    if types != []:
        ann = ann[numpy.logical_or.reduce([ann[:, 2] == x for x in types])]
        #ann = ann[numpy.array([ann[x, 2] in types for x in range(len(ann))])]

    return ann

def plot_data(data, info, ann=None):
    """
    Plot the signal with annotations if available.

    Parameters
    ----------
    data : (N, 4) ndarray
         Output array from rdsamp.
    info : dict
         Header information as a dictionary.
         Output from rdsamp
    ann : (N, 2) ndarray, optional
         Output from rdann

    Returns
    -------
    None
    Matplotlib figure is plotted with the signals and annotations.
    """
    try:
        import pylab
    except ImportError:
        warnings.warn("Could not import pylab. Abandoning plotting")
        return

    time = data[:, 1] #in seconds. use data[:, 0] to use sample no.
    sig1 = data[:, 2]
    sig2 = data[:, 3]

    pylab.subplot(211)
    pylab.plot(time, sig1, 'k')
    pylab.xticks([])
    pylab.ylabel('%s (mV)' %(info['signal_names'][0]))

    pylab.subplot(212)
    pylab.plot(time, sig2, 'k')
    pylab.ylabel('%s (mV)' %(info['signal_names'][1]))
    pylab.xlabel('Time (seconds)')

    if ann != None:
        # annotation time in samples from start
        ann_x = (ann[:, 0] - data[0, 0]).astype('int')
        pylab.plot(ann[:, 1], data[ann_x, 3], 'xr')
        pylab.subplot(211)
        pylab.plot(ann[:, 1], data[ann_x, 2], 'xr')

    pylab.show()

def rdhdr(record):
    """
    Returns the information read from the header file

    Header file for each record has suffix '.hea' and
    contains information about the record and each signal.

    Parameters
    ----------
    record : str
            Full path to record. Record name has no extension.

    Returns
    -------
    info : dict
          Information read from the header as a dictionary.
          keys :
          'signal_names' - Names of each signal
          'samp_freq' - Sampling freq (samples / second)
          'samp_count' - Total samples in record
          'first_values' - First value of each signal
          'gains' - Gain for each signal
          'zero_values' - Zero value for each signal
          'signal_names' - Name/Descr for each signal

    """
    info = {'signal_names':[], 'gains':[], 'units':[],
            'first_values':[], 'zero_values':[]}

    RECORD_REGEX = re.compile(r''.join([
            "(?P<record>\d+)\/*(?P<seg_ct>\d*)\s",
            "(?P<sig_ct>\d+)\s*",
            "(?P<samp_freq>\d*)\/?(?P<counter_freq>\d*)\(?(?P<base_counter>\d*)\)?\s*",
            "(?P<samp_count>\d*)\s*",
            "(?P<base_time>\d{,2}:*\d{,2}:*\d{,2})\s*",
            "(?P<base_date>\d{,2}\/*\d{,2}\/*\d{,4})"]))

    SIGNAL_REGEX = re.compile(r''.join([
            "(?P<file_name>[0-9a-zA-Z\._/-]+)\s+",
            "(?P<format>\d+)x{,1}(?P<samp_per_frame>\d*):*",
            "(?P<skew>\d*)\+*(?P<byte_offset>\d*)\s*",
            "(?P<adc_gain>\d*)\(?(?P<baseline>\d*)\)?\/?",
            "(?P<units>\w*)\s*(?P<resolution>\d*)\s*",
            "(?P<adc_zero>\d*)\s*(?P<init_value>[\d-]*)\s*",
            "(?P<checksum>[0-9-]*)\s*(?P<block_size>\d*)\s*",
            "(?P<description>[a-zA-Z0-9\s]*)"]))

    header_lines, comment_lines = _getheaderlines(record)
    (record_name, seg_count, signal_count, samp_freq,
     counter_freq, base_counter, samp_count,
     base_time, base_date) = RECORD_REGEX.findall(header_lines[0])[0]

    # use 250 if missing
    if samp_freq == '':
        samp_freq = 250
    if samp_count == '':
        samp_count = 0

    info['samp_freq'] = float(samp_freq)
    info['samp_count'] = int(samp_count)

    for sig in range(2):
        (file_name, file_format, samp_per_frame, skew,
         byte_offset, gain, baseline, units,
         resolution, zero_value, first_value,
         checksum, blocksize, signal_name) = SIGNAL_REGEX.findall(
                                             header_lines[sig+1])[0]

        # replace with defaults for missing values
        if gain == '' or gain == 0:
            gain = 200
        if units == '':
            units = 'mV'
        if zero_value == '':
            zero_value = 0
        if first_value == '':
            first_value = 0   # do not use to check

        info['gains'].append(float(gain))
        info['units'].append(units)
        info['zero_values'].append(float(zero_value))
        info['first_values'].append(float(first_value))
        info['signal_names'].append(signal_name)

    return info

def _getheaderlines(record):
    """Read the header file and separate comment lines
    and header lines"""
    hfile = record + '.hea'
    all_lines = open(hfile, 'r').readlines()
    comment_lines = []
    header_lines = []
    # strip newlines
    all_lines = [l.rstrip('\n').rstrip('\r') for l in all_lines]
    # comments
    for l in all_lines:
        if l.startswith('#'):
            comment_lines.append(l)
        elif l.strip() != '':
            header_lines.append(l)

    return header_lines, comment_lines

def _get_read_limits(start, end, interval, info):
    """
    Given start time, end time and interval
    for reading data, determines limits to use.
    info is the dict returned by rdhdr
    end of -1 means end of record.
    If both end and interval are given, choose
    earlier limit of two.
    start and end are returned as samples.
    Example:
    >>> _get_read_limits(0, 2, -1, {'samp_count':100, 'samp_freq':10})
    (0, 20)
    >>> _get_read_limits(0, 2, 3, {'samp_count':100, 'samp_freq':10})
    (0, 20)
    >>> _get_read_limits(0, 4, 2, {'samp_count':100, 'samp_freq':10})
    (0, 20)
    >>> _get_read_limits(0, 105, -1, {'samp_count':100, 'samp_freq':10})
    (0, 100)
    >>> _get_read_limits(-1, -1, -1, {'samp_count':100, 'samp_freq':10})
    (0, 100)
    """
    start *= info['samp_freq']
    end *= info['samp_freq']

    if start < 0:         # If start is negative, start at 0
        start = 0
    if end < 0:           # if end is negative, use end of record
        end = info['samp_count']
    if end < start:       # if end is before start, swap them
        start, end = end, start
    interval_end = start + interval * info['samp_freq'] # end det by interval
    if interval_end < start:
        interval_end = info['samp_count']
    end = min(end, interval_end, info['samp_count']) # use earlier end
    return int(start), int(end)

def _read_data(record, start, end, info):
    """Read the binary data for each signal"""
    datfile = record + '.dat'
    samp_to_read = end - start

    # verify against first value in header
    with open(datfile, 'rb') as f:
        data = _arr_to_data(numpy.fromstring(f.read(3),
                        dtype=numpy.uint8).reshape(1,3))

    if [data[0, 2], data[0, 3]] != info['first_values']:
        warnings.warn(
            'First value from dat file does not match value in header')

    # read into an array with 3 bytes in each row
    with open(datfile, 'rb') as f:
        f.seek(start*3)
        arr = numpy.fromstring(f.read(3*samp_to_read),
                dtype=numpy.uint8).reshape((samp_to_read, 3))

    data = _arr_to_data(arr)

    # adjust zerovalue and gain
    data[:, 2] = (data[:, 2] - info['zero_values'][0]) / info['gains'][0]
    data[:, 3] = (data[:, 3] - info['zero_values'][1]) / info['gains'][1]

    # time columns
    data[:, 0] = numpy.arange(start, end)  # elapsed time in samples
    data[:, 1] = (numpy.arange(samp_to_read) + start
                  ) / info['samp_freq'] # in sec
    return data

def _arr_to_data(arr):
    """From the numpy array read from the dat file
    using bit level operations, extract the 12-bit data"""
    second_col = arr[:, 1].astype('int')
    bytes1 = second_col & 15 # bytes belonging to first sample
    bytes2 = second_col >> 4 # belongs to second sample
    sign1 = (second_col & 8) << 9 # sign bit for first sample
    sign2 = (second_col & 128) << 5 # sign bit for second sample
    # data has columns - samples, time(ms), signal1 and signal2
    data = numpy.zeros((arr.shape[0], 4), dtype='float')
    data[:, 2] = (bytes1 << 8) + arr[:, 0] - sign1
    data[:, 3] = (bytes2 << 8) + arr[:, 2] - sign2
    return data

def get_annotation_code(code=None):
    """Returns the symbolic definition for the wfdb annotation code.

    See http://www.physionet.org/physiotools/wpg/wpg_31.htm for details.
    Based on ecgcodes.h from wfdb.

    Parameters
    ----------
    code : int
           Integer from 0 to 49 (ACMAX).

    Returns
    -------
    Definition : str
                 The definition for the code.

    """
    return CODEDICT[code]

def main():
    """Run tests when called directly"""
    import nose
    print("-----------------")
    print("Running the tests")
    print("-----------------")
    nose.main()

if __name__ == '__main__':
    main()


text:
<!--

    Copyright (C) ${project.inceptionYear} Richard Jackson (rdjack21@gmail.com)

    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.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>net.rslt</groupId>
	<artifactId>DirectoryWatcher</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>jar</packaging>

	<name>DirectoryWatcher</name>
	<url>http://maven.apache.org</url>

	<licenses>
		<license>
			<name>Apache 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<asciidoclet.version>1.5.2</asciidoclet.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>3.8.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.12</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<configuration>
					<source>1.7</source>
					<doclet>org.asciidoctor.Asciidoclet</doclet>
					<docletArtifact>
						<groupId>org.asciidoctor</groupId>
						<artifactId>asciidoclet</artifactId>
						<version>${asciidoclet.version}</version>
					</docletArtifact>
					<!-- <overview>/src/main/java/overview.adoc</overview> -->
					<additionalparam>
						--base-dir ${project.basedir}
						--attribute "name=${project.name}"
						--attribute "version=${project.version}"
						--attribute "title-link=http://example.com[${project.name} ${project.version}]"
					</additionalparam>
				</configuration>
			</plugin>
			<plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.11</version>
                <configuration>
                    <header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
                    <properties>
                        <owner>Richard Jackson</owner>
                        <email>rdjack21@gmail.com</email>
                    </properties>
                    <excludes>
                        <exclude>**/README</exclude>
                        <exclude>src/test/resources/**</exclude>
                        <exclude>src/main/resources/**</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
			</plugin>
		</plugins>
	</build>

</project>


text:
"""List virtual servers."""
# :license: MIT, see LICENSE for more details.

import SoftLayer
from SoftLayer.CLI import columns as column_helper
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting
from SoftLayer.CLI import helpers

import click

# pylint: disable=unnecessary-lambda

COLUMNS = [
    column_helper.Column('guid', ('globalIdentifier',)),
    column_helper.Column('primary_ip', ('primaryIpAddress',)),
    column_helper.Column('backend_ip', ('primaryBackendIpAddress',)),
    column_helper.Column('datacenter', ('datacenter', 'name')),
    column_helper.Column('action', lambda guest: formatting.active_txn(guest),
                         mask='''
                         activeTransaction[
                            id,transactionStatus[name,friendlyName]
                         ]'''),
    column_helper.Column('power_state', ('powerState', 'name')),
    column_helper.Column(
        'created_by',
        ('billingItem', 'orderItem', 'order', 'userRecord', 'username')),
    column_helper.Column(
        'tags',
        lambda server: formatting.tags(server.get('tagReferences')),
        mask="tagReferences.tag.name"),
]

DEFAULT_COLUMNS = [
    'id',
    'hostname',
    'primary_ip',
    'backend_ip',
    'datacenter',
    'action',
]

@click.command()
@click.option('--cpu', '-c', help='Number of CPU cores', type=click.INT)
@click.option('--domain', '-D', help='Domain portion of the FQDN')
@click.option('--datacenter', '-d', help='Datacenter shortname')
@click.option('--hostname', '-H', help='Host portion of the FQDN')
@click.option('--memory', '-m', help='Memory in mebibytes', type=click.INT)
@click.option('--network', '-n', help='Network port speed in Mbps')
@click.option('--hourly', is_flag=True, help='Show only hourly instances')
@click.option('--monthly', is_flag=True, help='Show only monthly instances')
@helpers.multi_option('--tag', help='Filter by tags')
@click.option('--sortby', help='Column to sort by', default='hostname')
@click.option('--columns',
              callback=column_helper.get_formatter(COLUMNS),
              help='Columns to display. Options: %s'
              % ', '.join(column.name for column in COLUMNS),
              default=','.join(DEFAULT_COLUMNS))
@environment.pass_env
def cli(env, sortby, cpu, domain, datacenter, hostname, memory, network,
        hourly, monthly, tag, columns):
    """List virtual servers."""

    vsi = SoftLayer.VSManager(env.client)
    guests = vsi.list_instances(hourly=hourly,
                                monthly=monthly,
                                hostname=hostname,
                                domain=domain,
                                cpus=cpu,
                                memory=memory,
                                datacenter=datacenter,
                                nic_speed=network,
                                tags=tag,
                                mask=columns.mask())

    table = formatting.Table(columns.columns)
    table.sortby = sortby

    for guest in guests:
        table.add_row([value or formatting.blank()
                       for value in columns.row(guest)])

    env.fout(table)


text:
package com.groupon.jenkins.dynamic.build.api;

import com.google.common.collect.Lists;
import com.groupon.jenkins.dynamic.build.cause.BuildCause;
import hudson.model.Cause;
import hudson.model.ParameterValue;
import hudson.model.Queue;
import org.apache.commons.lang.StringUtils;

import java.util.List;

public class QueuedBuild extends Build {
    private Queue.Item item;
    private int number;

    public QueuedBuild(Queue.Item item, int number) {
        this.item = item;
        this.number = number;
    }

    @Override
    public int getNumber() {
        return number;
    }

    @Override
    public String getResult() {
        return "QUEUED";
    }

    @Override
    public BuildCause.CommitInfo getCommit() {
        String[] buildParams = StringUtils.split(item.getParams(), "\n");
        String branch = "";
        for(String buildParam : buildParams ){
           if(buildParam.startsWith("BRANCH=")){
              branch = StringUtils.split(buildParam,"=")[1];
           }
        }
        return new BuildCause.CommitInfo("Queued: " + item.getWhy(),item.getInQueueForString(), branch);
    }

    @Override
    public String getDisplayTime() {
        return "-";
    }

    @Override
    public long getDuration() {
        return -1;
    }

    @Override
    public String getDurationString() {
        return "-"  ;
    }

    @Override
    public boolean isCancelable() {
        return true;
    }

    @Override
    public String getCancelUrl() {
        return "/queue/cancelItem?id="+item.getId();
    }

    @Override
    public BuildCause getCause() {
        for (Cause cause: item.getCauses()){
           if(cause instanceof  BuildCause) {
               return (BuildCause) cause;
           }
        }
        return BuildCause.NULL_BUILD_CAUSE;
    }

    @Override
    public List<ParameterValue> getParameters() {
        return Lists.newArrayList();
    }

    @Override
    public long getEstimatedDuration() {
        return -1;
    }

}


text:
package ch.theband.benno.probeplaner.service;

import ch.theband.benno.probeplaner.model.ProbePlanerData;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.StaxDriver;
import javafx.beans.property.Property;
import javafx.beans.property.SimpleObjectProperty;
import javafx.concurrent.Task;

import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class SaveService extends ErrorHandlingService<Void> {
    private final Property<ProbePlanerData> probePlanerData = new SimpleObjectProperty<>();
    private final Property<File> file = new SimpleObjectProperty<>();

    @Override
    protected Task<Void> createTask() {
        return new Task<Void>() {

            @Override
            protected Void call() throws IOException {
                Path path = file.getValue().toPath();
                System.out.println("Saving file " + path);

                XStream xstream = new XStream(new StaxDriver());
                String xml = xstream.toXML(probePlanerData.getValue());
                Files.write(path, xml.getBytes(StandardCharsets.UTF_8));
                System.out.println("Saved file");
                return null;
            }

        };
    }

    public void setProbePlanerData(ProbePlanerData play) {
        this.probePlanerData.setValue(play);
    }

    public ProbePlanerData getProbePlanerData() {
        return probePlanerData.getValue();
    }

    public Property<ProbePlanerData> probePlanerDataProperty() {
        return probePlanerData;
    }

    public void setFile(File file) {
        this.file.setValue(file);
    }

}


text:
#ifndef _UUID_H_
#define	_UUID_H_

#include <sys/types.h>
#include <sys/uuid.h>

/*
 * This implementation mostly conforms to the DCE 1.1 specification.
 * See Also:
 *	uuidgen(1), uuidgen(2), uuid(3)
 */

/* Status codes returned by the functions. */
#define	uuid_s_ok			0
#define	uuid_s_bad_version		1
#define	uuid_s_invalid_string_uuid	2
#define	uuid_s_no_memory		3

__BEGIN_DECLS
int32_t	uuid_compare(const uuid_t *, const uuid_t *, uint32_t *);
void	uuid_create(uuid_t *, uint32_t *);
void	uuid_create_nil(uuid_t *, uint32_t *);
int32_t	uuid_equal(const uuid_t *, const uuid_t *, uint32_t *);
void	uuid_from_string(const char *, uuid_t *, uint32_t *);
uint16_t uuid_hash(const uuid_t *, uint32_t *);
int32_t	uuid_is_nil(const uuid_t *, uint32_t *);
void	uuid_to_string(const uuid_t *, char **, uint32_t *);
void	uuid_enc_le(void *, const uuid_t *);
void	uuid_dec_le(const void *, uuid_t *);
void	uuid_enc_be(void *, const uuid_t *);
void	uuid_dec_be(const void *, uuid_t *);
__END_DECLS

#endif	/* _UUID_H_ */


text:
<!DOCTYPE html>

  <meta charset="UTF-8">
  <link rel="icon" href="favicon.png" type="image/png" sizes="32x32">
  <title>Timeless</title>

  <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'>

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

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

			</button>
      Timeless

Malaysia

Hong Kong

Korea

          Welcome to my photography portfolio! This is where I will post pictures and stories about the places that I have traveled to! Please enjoy!

          Lorem ipsum dolor sit amet, fugit incorrupte at nec. Elit mutat iusto vim ut, case putent reprehendunt mei no. Quot accusamus temporibus vis no, affert propriae cu per, ut his fugit iudicabit concludaturque. Soleat timeam repudiare nec ex, his et noluisse liberavisse.

          Welcome to my photography portfolio! This is where I will post pictures and stories about the places that I have traveled to! Please enjoy!

          Lorem ipsum dolor sit amet, fugit incorrupte at nec. Elit mutat iusto vim ut, case putent reprehendunt mei no. Quot accusamus temporibus vis no, affert propriae cu per, ut his fugit iudicabit concludaturque. Soleat timeam repudiare nec ex, his et noluisse liberavisse.

An tale consequuntur duo, solet laudem sapientem cu his, id persius alterum reprehendunt sed. Cetero ancillae imperdiet ex duo, nec et magna option voluptaria, at per munere dolore noluisse. Tale legimus ex vel, tation voluptua molestiae per ut. Saperet contentiones id eos. Dictas causae eirmod ea mei. Pri id autem dolor ancillae, assum nihil ad his, facete gubergren eu cum.

Cibo ornatus accusata mel in. Ut sale option pro, mel doctus alienum maluisset id. Consul placerat ius at. Luptatum atomorum id eos. Nonumy voluptatibus ius ei. Vix ut summo cetero, ea per rebum dolore abhorreant.

Vix id omnis eripuit vituperatoribus, adhuc populo duo no, qui option commodo

          Welcome to my photography portfolio! This is where I will post pictures and stories about the places that I have traveled to! Please enjoy!

          Lorem ipsum dolor sit amet, fugit incorrupte at nec. Elit mutat iusto vim ut, case putent reprehendunt mei no. Quot accusamus temporibus vis no, affert propriae cu per, ut his fugit iudicabit concludaturque. Soleat timeam repudiare nec ex, his et noluisse liberavisse.

An tale consequuntur duo, solet laudem sapientem cu his, id persius alterum reprehendunt sed. Cetero ancillae imperdiet ex duo, nec et magna option voluptaria, at per munere dolore noluisse. Tale legimus ex vel, tation voluptua molestiae per ut. Saperet contentiones id eos. Dictas causae eirmod ea mei. Pri id autem dolor ancillae, assum nihil ad his, facete gubergren eu cum.

Cibo ornatus accusata mel in. Ut sale option pro, mel doctus alienum maluisset id. Consul placerat ius at. Luptatum atomorum id eos. Nonumy voluptatibus ius ei. Vix ut summo cetero, ea per rebum dolore abhorreant.

Vix id omnis eripuit vituperatoribus, adhuc populo duo no, qui option commodo

          Welcome to my photography portfolio! This is where I will post pictures and stories about the places that I have traveled to! Please enjoy!

          Lorem ipsum dolor sit amet, fugit incorrupte at nec. Elit mutat iusto vim ut, case putent reprehendunt mei no. Quot accusamus temporibus vis no, affert propriae cu per, ut his fugit iudicabit concludaturque. Soleat timeam repudiare nec ex, his et noluisse liberavisse.

An tale consequuntur duo, solet laudem sapientem cu his, id persius alterum reprehendunt sed. Cetero ancillae imperdiet ex duo, nec et magna option voluptaria, at per munere dolore noluisse. Tale legimus ex vel, tation voluptua molestiae per ut. Saperet contentiones id eos. Dictas causae eirmod ea mei. Pri id autem dolor ancillae, assum nihil ad his, facete gubergren eu cum.

Cibo ornatus accusata mel in. Ut sale option pro, mel doctus alienum maluisset id. Consul placerat ius at. Luptatum atomorum id eos. Nonumy voluptatibus ius ei. Vix ut summo cetero, ea per rebum dolore abhorreant.

Vix id omnis eripuit vituperatoribus, adhuc populo duo no, qui option commodo

            ©2016 Brandon Wong


text:
package leeon.mobile.BBSBrowser;

import java.io.File;
import java.io.FileFilter;
import java.util.ArrayList;
import java.util.List;

import leeon.mobile.BBSBrowser.actions.HttpConfig;
import leeon.mobile.BBSBrowser.models.BoardObject;
import leeon.mobile.BBSBrowser.models.DocObject;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.TextView;
import android.widget.Toast;

public class ContentDetailActivity extends Activity {

	private Button postButton;
	private Button delButton;
	private Button attButton;
	private CheckBox anonyCheckBox;

	private EditText postTitle;
	private EditText postContent;
	private TextView postLabe;
	private RadioGroup sigGroup;

	private DocObject doc;
	private DocObject newDoc;
	private BoardObject board;
	private boolean edit = false;
	private int sig = 1;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(SettingActivity.displayHd(this)?R.layout.content_detail_hd:R.layout.content_detail);

		postButton = (Button)this.findViewById(R.id.postButton);
		delButton = (Button)this.findViewById(R.id.delButton);
		attButton = (Button)this.findViewById(R.id.attButton);
		anonyCheckBox = (CheckBox)this.findViewById(R.id.anonyCheckBox);

		postTitle = (EditText)this.findViewById(R.id.postTitle);
		postContent = (EditText)this.findViewById(R.id.postContent);
		postLabe = (TextView)this.findViewById(R.id.postLabel);
		sigGroup = (RadioGroup)this.findViewById(R.id.postSig);

		doc = (DocObject)this.getIntent().getSerializableExtra("doc");
		board = (BoardObject)this.getIntent().getSerializableExtra("board");
		edit = this.getIntent().getBooleanExtra("edit", false);

		if ((board != null && board.isAnony()) || (doc != null && doc.getBoard().isAnony())) {
			anonyCheckBox.setEnabled(true);
			anonyCheckBox.setChecked(true);
		} else {
			anonyCheckBox.setEnabled(false);
		}

		UIUtil.runActionInThread(ContentDetailActivity.this, new UIUtil.ActionInThread<Object>() {
			@Override
			public void action() throws NetworkException, ContentException {
				if (doc != null) {
					newDoc = ActionFactory.newInstance().newPostAction().inPostDoc(doc.getBoard(), doc);
				} else {
					newDoc = ActionFactory.newInstance().newPostAction().inPostDoc(board);
					if (newDoc == null) newDoc = new DocObject("", "", board);
				}
			}
			@Override
			public void actionFinish() {
				if (doc != null) {
					postLabe.setText("回复:" + doc.getTitle());
					edit = edit && (doc.getAuthor().startsWith(UserUtil.CURRENT_USER_ID));

					if (!edit) {
						postTitle.setText(newDoc.getTitle());
						postContent.setText("\n" + newDoc.getContent());

						delButton.setEnabled(false);
					} else {
						postTitle.setText(doc.getTitle());
						postContent.setText(doc.getContent());

						postTitle.setEnabled(false);
						delButton.setEnabled(true);
					}
					postContent.requestFocus();
				} else {
					postLabe.setText("新作");
					delButton.setEnabled(false);
				}
			}
		});

		postButton.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				postAction();
			}
		});

		delButton.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				deleteAction();
			}
		});

		attButton.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				showDialog(DIALOG_ATT);
			}
		});

		sigGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {
			public void onCheckedChanged(RadioGroup group, int checkedId) {
				if (checkedId == View.NO_ID) sig = 1;
				else {
					RadioButton r = (RadioButton)ContentDetailActivity.this.findViewById(checkedId);
					sig = Integer.parseInt(r.getText().toString().substring(2));
				}
			}
		});
	}

	@Override
	public void onConfigurationChanged(Configuration newConfig) {
		super.onConfigurationChanged(newConfig);
		if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
		} else if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
		}
	}

	private static final int SELECT_IMG = 0;
	private static final int CAP_IMG = 1;
	private static final int DRAW_IMG = 2;
	private static final int DIALOG_ATT = 0;
	private static final String[] DIALOG_ATT_ITEM = {"从媒体库选择", "立刻拍照", "涂鸦", "从文件系统选择"};
	private static final int[] DIALOG_ATT_ITEM_IMAGE =
		{R.drawable.thumbnail, R.drawable.ksnapshot, R.drawable.krita, R.drawable.folder};
	static final File tmp = new File(Environment.getExternalStorageDirectory() + "/tmp.jpg");
    @Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		if (resultCode == Activity.RESULT_OK) {
			List<File> list = new ArrayList<File>();
			if (requestCode == SELECT_IMG) {
				list.add(new File(UIUtil.getAbsoluteImagePath(data.getData(), this)));
			} else if (requestCode == CAP_IMG) {
				list.add(tmp);
			} else if (requestCode == DRAW_IMG) {
				list.add(tmp);
			}
			uploadAction(list);
		}

	}

    @Override
    protected Dialog onCreateDialog(int id) {
		switch (id) {
		case DIALOG_ATT:
			return UIUtil.createContextItem(this, DIALOG_ATT_ITEM, DIALOG_ATT_ITEM_IMAGE,
				new DialogInterface.OnClickListener() {
					public void onClick(DialogInterface dialog, int which) {
						switch (which) {
							case SELECT_IMG:
								imgAction();
								break;
							case CAP_IMG:
								capAction();
								break;
							case DRAW_IMG:
								drawAction();
								break;
							default:
								batAction();
						}
				}
			}).setTitle("选择图片来源")
			.setIcon(R.drawable.kpaint)
			.create();
		default:
			return null;
		}
    }

    static final String POST_ACTION_NEW = "newPost";
    static final String POST_ACTION_EDIT = "newPost";
    static final String POST_ACTION_RE = "rePost";
    static final String POST_ACTION_DEL = "delPost";
	private void postAction() {
		UIUtil.runActionInThread(ContentDetailActivity.this, new UIUtil.ActionInThread<Object>() {
			@Override
			public void action() throws NetworkException, ContentException {
				if (doc != null && edit) {
					doc.setContent(postContent.getText().toString());
					ActionFactory.newInstance().newPostAction().sendPostDoc(null, doc, false, true, sig);
				} else {
					newDoc.setTitle(postTitle.getText().toString());
					newDoc.setContent(postContent.getText().toString());
					ActionFactory.newInstance().newPostAction().sendPostDoc(newDoc, doc, (anonyCheckBox.isEnabled()&&anonyCheckBox.isChecked()), edit, sig);
				}
			}
			@Override
			public void actionFinish() {
				postTitle.setEnabled(false);
				postContent.setEnabled(false);
				postButton.setEnabled(false);
				attButton.setEnabled(false);
				Toast.makeText(ContentDetailActivity.this, "发表成功", Toast.LENGTH_SHORT).show();
				postSuccess();
			}
		});
	}

	private void postSuccess() {
		if (doc != null) {
			if (!edit)
				setResult(RESULT_OK, (new Intent()).setAction(POST_ACTION_RE).putExtra("doc", newDoc));
			else
				setResult(RESULT_OK, (new Intent()).setAction(POST_ACTION_EDIT).putExtra("doc", doc));
		} else {
			setResult(RESULT_OK, (new Intent()).setAction(POST_ACTION_NEW).putExtra("doc", newDoc));
		}
		finish();
	}

	private void deleteAction() {
		UIUtil.runActionInThread(ContentDetailActivity.this, new UIUtil.ActionInThread<Object>() {
			@Override
			public void action() throws NetworkException, ContentException {
				if (doc != null && edit) {
					ActionFactory.newInstance().newPostAction().delPostDoc(doc);
				}
			}
			@Override
			public void actionFinish() {
				postTitle.setEnabled(false);
				postContent.setEnabled(false);
				postButton.setEnabled(false);
				attButton.setEnabled(false);
				delButton.setEnabled(false);
				Toast.makeText(ContentDetailActivity.this, "删帖成功", Toast.LENGTH_SHORT).show();
				deleteSuccess();
			}
		});
	}

	private void deleteSuccess() {
		if (doc != null && edit) {
			setResult(RESULT_OK, (new Intent()).setAction(POST_ACTION_DEL).putExtra("doc", doc));
		}
		finish();
	}

	private void uploadAction (final List<File> choosedList) {
		UIUtil.runActionInThread(ContentDetailActivity.this, new UIUtil.ActionInThread<Object>() {
			private String msg = "";
			@Override
			public void action() throws NetworkException, ContentException {
				BoardObject b = (board!=null?board:doc.getBoard());
				for (File f : choosedList) {
					if (f.exists() && !f.isDirectory()) {
						String m = ActionFactory.newInstance().newPostAction().sendAttFile(
							f, b.isAttach()?b:HttpConfig.DEFAULT_UPLOAD_BOARD, GIFOpenHelper.getImageFileMimeType(f));
						msg += m + "\n\n";
					}
				}
			}
			@Override
			public void actionFinish() {
				Toast.makeText(ContentDetailActivity.this, "上传成功", Toast.LENGTH_SHORT).show();
				postContent.setText("\n" + msg + postContent.getText());
				if (tmp.exists()) tmp.delete();
			}
		});
	}

	private void batAction() {
		UIUtil.fileChooseDialog(ContentDetailActivity.this,
			Environment.getExternalStorageDirectory().getAbsolutePath(), false,
			new UIUtil.FileChooseHandle() {
				public void chooseFileCallback(final List<File> choosedList) {
					uploadAction(choosedList);
				}
			},
			new FileFilter() {
				public boolean accept(File file) {
					return (file.isDirectory() ||
						file.getName().toLowerCase().endsWith(".jpg") ||
						file.getName().toLowerCase().endsWith(".png") ||
						file.getName().toLowerCase().endsWith(".gif") ||
						file.getName().toLowerCase().endsWith(".jpeg")
					);
				}

			}
		).show();
	}

	private void imgAction() {
		Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
		intent.setType("image/*");
		startActivityForResult(Intent.createChooser(intent, "Select Pic"), SELECT_IMG);
	}

	private void capAction() {
		Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
		intent.putExtra(MediaStore.EXTRA_OUTPUT,
			Uri.fromFile(tmp));
		startActivityForResult(intent, CAP_IMG);
	}

	private void drawAction() {
		Intent intent = new Intent(this, ContentDrawingActivity.class);
		intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(tmp));
		startActivityForResult(intent, DRAW_IMG);
	}

}


text:
package org.apache.camel.component.properties;

import java.util.Properties;

import org.apache.camel.CamelContext;
import org.apache.camel.ContextTestSupport;
import org.apache.camel.builder.RouteBuilder;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class OptionalPropertyPlaceholderTest extends ContextTestSupport {

    @Override
    public boolean isUseRouteBuilder() {
        return false;
    }

    @Test
    public void testQueryOptionalNotPresent() throws Exception {
        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                        .to("mock:result?retainFirst={{?maxKeep}}");
            }
        });
        context.start();

        getMockEndpoint("mock:result").expectedMessageCount(2);

        template.sendBody("direct:start", "Hello World");
        template.sendBody("direct:start", "Bye World");

        assertMockEndpointsSatisfied();

        assertEquals(2, getMockEndpoint("mock:result").getReceivedExchanges().size());
    }

    @Test
    public void testQueryOptionalPresent() throws Exception {
        Properties prop = new Properties();
        prop.put("maxKeep", "1");
        context.getPropertiesComponent().setInitialProperties(prop);

        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                        .to("mock:result?retainFirst={{?maxKeep}}");
            }
        });
        context.start();

        getMockEndpoint("mock:result?retainFirst=1").expectedMessageCount(2);

        template.sendBody("direct:start", "Hello World");
        template.sendBody("direct:start", "Bye World");

        assertMockEndpointsSatisfied();

        assertEquals(1, getMockEndpoint("mock:result?retainFirst=1").getReceivedExchanges().size());
    }

    @Test
    public void testPathOptionalNotPresent() throws Exception {
        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                        .to("mock:res{{?unknown}}ult");
            }
        });
        context.start();

        getMockEndpoint("mock:result").expectedMessageCount(2);

        template.sendBody("direct:start", "Hello World");
        template.sendBody("direct:start", "Bye World");

        assertMockEndpointsSatisfied();
    }

    @Test
    public void testPathOptionalPresent() throws Exception {
        Properties prop = new Properties();
        prop.put("whereTo", "result");
        context.getPropertiesComponent().setInitialProperties(prop);

        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                        .to("mock:{{?whereTo}}");
            }
        });
        context.start();

        getMockEndpoint("mock:result").expectedMessageCount(2);

        template.sendBody("direct:start", "Hello World");
        template.sendBody("direct:start", "Bye World");

        assertMockEndpointsSatisfied();
    }

    @Test
    public void testQueryAndPathOptionalNotPresent() throws Exception {
        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                        .to("mock:res{{?unknown}}ult?retainFirst={{?maxKeep}}");
            }
        });
        context.start();

        getMockEndpoint("mock:result").expectedMessageCount(2);

        template.sendBody("direct:start", "Hello World");
        template.sendBody("direct:start", "Bye World");

        assertMockEndpointsSatisfied();

        assertEquals(2, getMockEndpoint("mock:result").getReceivedExchanges().size());
    }

    @Test
    public void testQueryAndPathOptionalPresent() throws Exception {
        Properties prop = new Properties();
        prop.put("maxKeep", "1");
        prop.put("whereTo", "result");
        context.getPropertiesComponent().setInitialProperties(prop);

        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                        .to("mock:{{?whereTo}}?retainFirst={{?maxKeep}}");
            }
        });
        context.start();

        getMockEndpoint("mock:result?retainFirst=1").expectedMessageCount(2);

        template.sendBody("direct:start", "Hello World");
        template.sendBody("direct:start", "Bye World");

        assertMockEndpointsSatisfied();

        assertEquals(1, getMockEndpoint("mock:result?retainFirst=1").getReceivedExchanges().size());
    }

    @Test
    public void testQueryAndPathOptionalMixed() throws Exception {
        Properties prop = new Properties();
        prop.put("maxKeep", "1");
        context.getPropertiesComponent().setInitialProperties(prop);

        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                        .to("mock:res{{?unknown}}ult?retainFirst={{?maxKeep}}");
            }
        });
        context.start();

        getMockEndpoint("mock:result?retainFirst=1").expectedMessageCount(2);

        template.sendBody("direct:start", "Hello World");
        template.sendBody("direct:start", "Bye World");

        assertMockEndpointsSatisfied();

        assertEquals(1, getMockEndpoint("mock:result?retainFirst=1").getReceivedExchanges().size());
    }

    @Test
    public void testQueryAndPathOptionalMixedTwo() throws Exception {
        Properties prop = new Properties();
        prop.put("whereTo", "result");
        context.getPropertiesComponent().setInitialProperties(prop);

        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                        .to("mock:{{?whereTo}}?retainFirst={{?maxKeep}}");
            }
        });
        context.start();

        getMockEndpoint("mock:result").expectedMessageCount(2);

        template.sendBody("direct:start", "Hello World");
        template.sendBody("direct:start", "Bye World");

        assertMockEndpointsSatisfied();
    }

    @Override
    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = super.createCamelContext();
        context.getPropertiesComponent().setLocation("classpath:org/apache/camel/component/properties/myproperties.properties");
        return context;
    }

}


text:
Test fmod() - wrong params test fmod()
--INI--
precision=14
--FILE--
<?php
fmod();
fmod(23);
fmod(23,2,true);
?>
--EXPECTF--

Warning: fmod() expects exactly 2 parameters, 0 given in %s on line 2

Warning: fmod() expects exactly 2 parameters, 1 given in %s on line 3

Warning: fmod() expects exactly 2 parameters, 3 given in %s on line 4


text:
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// 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.

/**
 * PolicyViolationErrorPart.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
 */

package com.google.api.ads.adwords.axis.v201809.rm;

/**
 * Points to a substring within an ad field or criterion.
 */
public class PolicyViolationErrorPart  implements java.io.Serializable {
    /* Index of the starting position of the violating text within
     * the line. */
    private java.lang.Integer index;

    /* The length of the violating text. */
    private java.lang.Integer length;

    public PolicyViolationErrorPart() {
    }

    public PolicyViolationErrorPart(
           java.lang.Integer index,
           java.lang.Integer length) {
           this.index = index;
           this.length = length;
    }

    @Override
    public String toString() {
        return com.google.common.base.MoreObjects.toStringHelper(this.getClass())
            .omitNullValues()
            .add("index", getIndex())
            .add("length", getLength())
            .toString();
    }

    /**
     * Gets the index value for this PolicyViolationErrorPart.
     *
     * @return index   * Index of the starting position of the violating text within
     * the line.
     */
    public java.lang.Integer getIndex() {
        return index;
    }

    /**
     * Sets the index value for this PolicyViolationErrorPart.
     *
     * @param index   * Index of the starting position of the violating text within
     * the line.
     */
    public void setIndex(java.lang.Integer index) {
        this.index = index;
    }

    /**
     * Gets the length value for this PolicyViolationErrorPart.
     *
     * @return length   * The length of the violating text.
     */
    public java.lang.Integer getLength() {
        return length;
    }

    /**
     * Sets the length value for this PolicyViolationErrorPart.
     *
     * @param length   * The length of the violating text.
     */
    public void setLength(java.lang.Integer length) {
        this.length = length;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof PolicyViolationErrorPart)) return false;
        PolicyViolationErrorPart other = (PolicyViolationErrorPart) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
            ((this.index==null && other.getIndex()==null) ||
             (this.index!=null &&
              this.index.equals(other.getIndex()))) &&
            ((this.length==null && other.getLength()==null) ||
             (this.length!=null &&
              this.length.equals(other.getLength())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getIndex() != null) {
            _hashCode += getIndex().hashCode();
        }
        if (getLength() != null) {
            _hashCode += getLength().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(PolicyViolationErrorPart.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/rm/v201809", "PolicyViolationError.Part"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("index");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/rm/v201809", "index"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("length");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/rm/v201809", "length"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}


text:
#define MSGPACK_EMBED_STACK_SIZE  (1024)
#include "unpack_define.h"

typedef struct unpack_user {
    int use_list;
    PyObject *object_hook;
    bool has_pairs_hook;
    PyObject *list_hook;
    PyObject *ext_hook;
    const char *encoding;
    const char *unicode_errors;
} unpack_user;

typedef PyObject* msgpack_unpack_object;
struct unpack_context;
typedef struct unpack_context unpack_context;
typedef int (*execute_fn)(unpack_context *ctx, const char* data, size_t len, size_t* off);

static inline msgpack_unpack_object unpack_callback_root(unpack_user* u)
{
    return NULL;
}

static inline int unpack_callback_uint16(unpack_user* u, uint16_t d, msgpack_unpack_object* o)
{
    PyObject *p = PyInt_FromLong((long)d);
    if (!p)
        return -1;
    *o = p;
    return 0;
}
static inline int unpack_callback_uint8(unpack_user* u, uint8_t d, msgpack_unpack_object* o)
{
    return unpack_callback_uint16(u, d, o);
}

static inline int unpack_callback_uint32(unpack_user* u, uint32_t d, msgpack_unpack_object* o)
{
    PyObject *p;
#if UINT32_MAX > LONG_MAX
    if (d > LONG_MAX) {
        p = PyLong_FromUnsignedLong((unsigned long)d);
    } else
#endif
    {
        p = PyInt_FromLong((long)d);
    }
    if (!p)
        return -1;
    *o = p;
    return 0;
}

static inline int unpack_callback_uint64(unpack_user* u, uint64_t d, msgpack_unpack_object* o)
{
    PyObject *p;
    if (d > LONG_MAX) {
        p = PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)d);
    } else {
        p = PyInt_FromLong((long)d);
    }
    if (!p)
        return -1;
    *o = p;
    return 0;
}

static inline int unpack_callback_int32(unpack_user* u, int32_t d, msgpack_unpack_object* o)
{
    PyObject *p = PyInt_FromLong(d);
    if (!p)
        return -1;
    *o = p;
    return 0;
}

static inline int unpack_callback_int16(unpack_user* u, int16_t d, msgpack_unpack_object* o)
{
    return unpack_callback_int32(u, d, o);
}

static inline int unpack_callback_int8(unpack_user* u, int8_t d, msgpack_unpack_object* o)
{
    return unpack_callback_int32(u, d, o);
}

static inline int unpack_callback_int64(unpack_user* u, int64_t d, msgpack_unpack_object* o)
{
    PyObject *p;
    if (d > LONG_MAX || d < LONG_MIN) {
        p = PyLong_FromLongLong((unsigned PY_LONG_LONG)d);
    } else {
        p = PyInt_FromLong((long)d);
    }
    *o = p;
    return 0;
}

static inline int unpack_callback_double(unpack_user* u, double d, msgpack_unpack_object* o)
{
    PyObject *p = PyFloat_FromDouble(d);
    if (!p)
        return -1;
    *o = p;
    return 0;
}

static inline int unpack_callback_float(unpack_user* u, float d, msgpack_unpack_object* o)
{
    return unpack_callback_double(u, d, o);
}

static inline int unpack_callback_nil(unpack_user* u, msgpack_unpack_object* o)
{ Py_INCREF(Py_None); *o = Py_None; return 0; }

static inline int unpack_callback_true(unpack_user* u, msgpack_unpack_object* o)
{ Py_INCREF(Py_True); *o = Py_True; return 0; }

static inline int unpack_callback_false(unpack_user* u, msgpack_unpack_object* o)
{ Py_INCREF(Py_False); *o = Py_False; return 0; }

static inline int unpack_callback_array(unpack_user* u, unsigned int n, msgpack_unpack_object* o)
{
    PyObject *p = u->use_list ? PyList_New(n) : PyTuple_New(n);

    if (!p)
        return -1;
    *o = p;
    return 0;
}

static inline int unpack_callback_array_item(unpack_user* u, unsigned int current, msgpack_unpack_object* c, msgpack_unpack_object o)
{
    if (u->use_list)
        PyList_SET_ITEM(*c, current, o);
    else
        PyTuple_SET_ITEM(*c, current, o);
    return 0;
}

static inline int unpack_callback_array_end(unpack_user* u, msgpack_unpack_object* c)
{
    if (u->list_hook) {
        PyObject *new_c = PyObject_CallFunctionObjArgs(u->list_hook, *c, NULL);
        if (!new_c)
            return -1;
        Py_DECREF(*c);
        *c = new_c;
    }
    return 0;
}

static inline int unpack_callback_map(unpack_user* u, unsigned int n, msgpack_unpack_object* o)
{
    PyObject *p;
    if (u->has_pairs_hook) {
        p = PyList_New(n); // Or use tuple?
    }
    else {
        p = PyDict_New();
    }
    if (!p)
        return -1;
    *o = p;
    return 0;
}

static inline int unpack_callback_map_item(unpack_user* u, unsigned int current, msgpack_unpack_object* c, msgpack_unpack_object k, msgpack_unpack_object v)
{
    if (u->has_pairs_hook) {
        msgpack_unpack_object item = PyTuple_Pack(2, k, v);
        if (!item)
            return -1;
        Py_DECREF(k);
        Py_DECREF(v);
        PyList_SET_ITEM(*c, current, item);
        return 0;
    }
    else if (PyDict_SetItem(*c, k, v) == 0) {
        Py_DECREF(k);
        Py_DECREF(v);
        return 0;
    }
    return -1;
}

static inline int unpack_callback_map_end(unpack_user* u, msgpack_unpack_object* c)
{
    if (u->object_hook) {
        PyObject *new_c = PyObject_CallFunctionObjArgs(u->object_hook, *c, NULL);
        if (!new_c)
            return -1;

        Py_DECREF(*c);
        *c = new_c;
    }
    return 0;
}

static inline int unpack_callback_raw(unpack_user* u, const char* b, const char* p, unsigned int l, msgpack_unpack_object* o)
{
    PyObject *py;
    if(u->encoding) {
        py = PyUnicode_Decode(p, l, u->encoding, u->unicode_errors);
    } else {
        py = PyBytes_FromStringAndSize(p, l);
    }
    if (!py)
        return -1;
    *o = py;
    return 0;
}

static inline int unpack_callback_bin(unpack_user* u, const char* b, const char* p, unsigned int l, msgpack_unpack_object* o)
{
    PyObject *py = PyBytes_FromStringAndSize(p, l);
    if (!py)
        return -1;
    *o = py;
    return 0;
}

static inline int unpack_callback_ext(unpack_user* u, const char* base, const char* pos,
                                      unsigned int lenght, msgpack_unpack_object* o)
{
    PyObject *py;
    int8_t typecode = (int8_t)*pos++;
    if (!u->ext_hook) {
        PyErr_SetString(PyExc_AssertionError, "u->ext_hook cannot be NULL");
        return -1;
    }
    // length also includes the typecode, so the actual data is lenght-1
#if PY_MAJOR_VERSION == 2
    py = PyObject_CallFunction(u->ext_hook, "(is#)", typecode, pos, lenght-1);
#else
    py = PyObject_CallFunction(u->ext_hook, "(iy#)", typecode, pos, lenght-1);
#endif
    if (!py)
        return -1;
    *o = py;
    return 0;
}

#include "unpack_template.h"


text:
<?php namespace Radic\Tests\BladeExtensions\Directives;

use Collective\Html\HtmlServiceProvider;
use Mockery as m;

use Radic\Tests\BladeExtensions\TestCase;

/**
 * Class ViewTest
 *
 * @author     Robin Radic
 * @group blade-extensions
 */
class GeneralDirectivesTest extends TestCase
{

    public function setUp()
    {
        parent::setUp();
        $this->loadViewTesting();
        $this->registerHtml();
        $this->registerBlade();
    }

    public function testGeneral()
    {
        $this->assertTrue(true);
    }
}


text:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using NuGetPackageExplorer.Types;
using NuGetPe;

namespace PackageExplorerViewModel
{
    internal class PublishSourceSettings : ISourceSettings
    {
        private readonly ISettingsManager _settingsManager;

        public PublishSourceSettings(ISettingsManager settingsManager)
        {
            Debug.Assert(settingsManager != null);
            _settingsManager = settingsManager;
        }

        #region ISourceSettings Members

        public IList<string> GetSources()
        {
            var sources = _settingsManager.GetPublishSources();
            for (var i = 0; i < sources.Count; i++)
            {
                sources[i] = MigrateOfficialNuGetSource(sources[i]);
            }

            return sources;
        }

        public void SetSources(IEnumerable<string> sources)
        {
            _settingsManager.SetPublishSources(sources);
        }

        public string DefaultSource
        {
            get { return NuGetConstants.NuGetPublishFeed; }
        }

        public string ActiveSource
        {
            get
            {
                return MigrateOfficialNuGetSource(_settingsManager.ActivePublishSource);
            }
            set { _settingsManager.ActivePublishSource = value; }
        }

        #endregion

        private static string MigrateOfficialNuGetSource(string source)
        {
            if (NuGetConstants.V2LegacyNuGetPublishFeed.Equals(source, StringComparison.OrdinalIgnoreCase))
            {
                return NuGetConstants.NuGetPublishFeed;
            }

            return source;
        }
    }
}


text:
Article 393
----
Sans préjudice des dispositions de l'article 392, la tutelle prend fin à
l'émancipation du mineur ou à sa majorité. Elle prend également fin en cas de
jugement de mainlevée passé en force de chose jugée ou en cas de décès de
l'intéressé.


text:
<?php
$playerStatus = [];
$output = [];
// Get status and current track details. Note: a more PHPish version with fsockopen etc.
// fails if mpd is busy e.g. loading a playlist.
$status = trim( shell_exec("echo 'status\ncurrentsong\nclose' | nc -w 1 localhost 6600 ") );
/**
if($debug == "true") {
    print "<pre>"; print $status; print "</pre>";
}
/**/
// Playout status
preg_match('/\nstate: (.*)\n/', $status, $output);
$playerStatus['state'] = $output[1];
// Playlist repeat
preg_match('/\nrepeat: (.*)\n/', $status, $output);
$playerStatus['repeat'] = $output[1];
// Single repeat
preg_match('/\nsingle: (.*)\n/', $status, $output);
$playerStatus['single'] = $output[1];
// Current track name (file name)
preg_match('/\nfile: (.*)\n/', $status, $output);
$playerStatus['file'] = $output[1];
// Current track playlist position
preg_match('/\nPos: (.*)\n/', $status, $output);
$playerStatus['pos'] = $output[1];
// Current track elapsed time
preg_match('/\nelapsed: (.*)\n/', $status, $output);
$playerStatus['elapsed'] = $output[1];
// Title of track
preg_match('/\nTitle: (.*)\n/', $status, $output);
$playerStatus['title'] = $output[1];
// Album of track
preg_match('/\nAlbum: (.*)\n/', $status, $output);
$playerStatus['album'] = $output[1];
// Artist of track
preg_match('/\nArtist: (.*)\n/', $status, $output);
$playerStatus['artist'] = $output[1];
// Year of track
preg_match('/\nDate: (.*)\n/', $status, $output);
$playerStatus['date'] = $output[1];

$plFile=[];
$plTime=[];

$playlist = trim( shell_exec("echo 'playlistinfo\nclose' | nc -w 1 localhost 6600 ") );
// File names of all tracks in the loaded playlist
preg_match_all('/\nfile: (.*)\n/', $playlist, $plFile);
// Time length of all tracks in the loaded playlist
preg_match_all('/\nTime: (.*)\n/', $playlist, $plTime);
// Time length of all tracks in the loaded playlist
preg_match_all('/\nTitle: (.*)\n/', $playlist, $plTitle);
// Time length of all tracks in the loaded playlist
preg_match_all('/\nAlbum: (.*)\n/', $playlist, $plAlbum);
// Time length of all tracks in the loaded playlist
preg_match_all('/\nArtist: (.*)\n/', $playlist, $plArtist);
// Time length of all tracks in the loaded playlist
preg_match_all('/\nDate: (.*)\n/', $playlist, $plDate);

// Overall length of playlist
$playlistOverallTime = array_sum($plTime[1]);

// Determine how much of the playlist is already played
$playlistPlayedTime = $playerStatus['elapsed'];
for ($i = 0; $i < $playerStatus['pos']; $i++) {
    $playlistPlayedTime = $playlistPlayedTime + $plTime[1][$i];
}
?>


text:
export const enum ActionType {
    Command = "command",
    Commands = "commands",
    Bindings = "bindings",
    Transient = "transient",
    Conditional = "conditional",
}

export const enum DisplayOption {
    Hidden = "hidden",
}

export interface CommandItem {
    command?: string;
    commands?: string[];
    args?: any;
}

export interface BindingItem extends CommandItem {
    key: string;
    name: string;
    icon?: string;
    display?: DisplayOption;
    type: ActionType;
    bindings?: BindingItem[];
}

export interface OverrideBindingItem extends CommandItem {
    keys: string | string[];
    position?: number;
    name?: string;
    icon?: string;
    display?: DisplayOption;
    type?: ActionType;
    bindings?: BindingItem[];
}

export interface TransientBindingItem extends CommandItem {
    key: string;
    name: string;
    icon?: string;
    display?: DisplayOption;
    exit?: boolean;
}

export function toBindingItem(o: any): BindingItem | undefined {
    if (typeof o === "object") {
        const config = o as Partial<BindingItem>;
        if (config.key && config.name && config.type) {
            return config as BindingItem;
        }
    }
    return undefined;
}

export function toCommands(b: CommandItem): {
    commands: string[];
    args: any;
} {
    let commands: string[];
    let args;
    if (b.commands) {
        commands = b.commands;
        args = b.args;
    } else if (b.command) {
        commands = [b.command];
        args = [b.args];
    } else {
        commands = [];
        args = [];
    }

    return { commands, args };
}


text:
//
// splitter-standalone.h
//
// Auxiliary functions for standalone splitter
//

#ifndef _SPLITTER_STANDALONE_H
#define _SPLITTER_STANDALONE_H

#include "record.h"
#include "dtreeaux.h"

// prototype definitions
int compareNpKeyWithKey(i64 nKey1, char *pKey1, i64 nKey2,
                        UnpackedRecord *pIdxKey2);
int CellSearchNodeUnpacked(DTreeNode &node, UnpackedRecord *pIdxKey, i64 nkey,
                           int biasRight, int *matches=0);
int GCellSearchNode(DTreeNode &node, i64 nkey, void *pkey, Ptr<RcKeyInfo> prki,
                    int biasRight);

#endif


text:
<?php

namespace agentecho\component;

use agentecho\component\events\EventManager;
use agentecho\knowledge\KnowledgeSource;
use agentecho\grammar\Grammar;

/**
 * This class contains all configurable options of an agent.
 *
 * @author Patrick van Bergen
 */
class AgentConfig
{
	/** @var KnowledgeManager A manager for knowledge sources */
	private $KnowledgeManager;

	/** @var EventManager $EventManager */
	private $EventManager;

	/** @var Grammar[] $grammars A list of grammars that are used to parse a sentence */
	private $grammars = array();

	public function __construct()
	{
		$this->KnowledgeManager = new KnowledgeManager();
		$this->EventManager = new EventManager();
	}

	/**
	 * @return EventManager
	 */
	public function getEventManager()
	{
		return $this->EventManager;
	}

	/**
	 * @return KnowledgeManager
	 */
	public function getKnowledgeManager()
	{
		return $this->KnowledgeManager;
	}

	/**
	 * @return Grammar[]
	 */
	public function getGrammars()
	{
		return $this->grammars;
	}

	/**
	 * Show the agent where to find the data.
	 * A knowledge source is a wrapper around a database.
	 *
	 * @param KnowledgeSource $KnowledgeSource
	 */
	public function addKnowledgeSource(KnowledgeSource $KnowledgeSource)
	{
		$this->KnowledgeManager->addKnowledgeSource($KnowledgeSource);
	}

	/**
	 * Show the agent how to interpret raw semantic data by using the expressions people use.
	 *
	 * @param DataMapper $Interpreter
	 */
	public function addInterpreter(DataMapper $Interpreter)
	{
		$this->KnowledgeManager->addInterpreter($Interpreter);
	}

	/**
	 * @param array $grammars
	 */
	public function setGrammars(array $grammars)
	{
		$this->grammars = $grammars;
	}

	/**
	 * @param Grammar $Grammar
	 */
	public function addGrammar(Grammar $Grammar)
	{
		$this->grammars[] = $Grammar;
	}

	/**
	 * Add a callback function that will be called whenever an agent event occurs.
	 *
	 * @param callable $listener
	 */
	public function addListener(callable $listener)
	{
		$this->EventManager->addListener($listener);
	}
}


text:
from datetime import datetime
from pydantic import BaseModel

from robot_server.service.json_api import (
    ResponseModel, ResponseDataModel, RequestModel
)

class SystemTimeAttributes(BaseModel):
    systemTime: datetime

SystemTimeResponseDataModel = ResponseDataModel[SystemTimeAttributes]

SystemTimeResponse = ResponseModel[SystemTimeAttributes, dict]

SystemTimeRequest = RequestModel[SystemTimeAttributes]