text:
package org.jetbrains.plugins.gradle.execution.test.runner.events;

import org.jetbrains.annotations.NotNull;

/**
 * Created by eugene.petrenko@gmail.com
 */
public interface TestEventXmlView {
  @NotNull
  String getTestEventType() throws XmlParserException;

  @NotNull
  String getTestName() throws XmlParserException;

  @NotNull
  String getTestDisplayName() throws XmlParserException;

  @NotNull
  String getTestParentId() throws XmlParserException;

  @NotNull
  String getTestId() throws XmlParserException;

  @NotNull
  String getTestClassName() throws XmlParserException;

  @NotNull
  String getTestEventResultType() throws XmlParserException;

  @NotNull
  String getEventTitle() throws XmlParserException;

  boolean isEventOpenSettings() throws XmlParserException;

  @NotNull
  String getEventMessage() throws XmlParserException;

  @NotNull
  String getTestEventTest() throws XmlParserException;

  @NotNull
  String getTestEventTestDescription() throws XmlParserException;

  @NotNull
  String getEventTestReport() throws XmlParserException;

  @NotNull
  String getEventTestResultActualFilePath() throws XmlParserException;

  @NotNull
  String getEventTestResultFilePath() throws XmlParserException;

  @NotNull
  String getEventTestResultExpected() throws XmlParserException;

  @NotNull
  String getEventTestResultActual() throws XmlParserException;

  @NotNull
  String getEventTestResultFailureType() throws XmlParserException;

  @NotNull
  String getEventTestResultStackTrace() throws XmlParserException;

  @NotNull
  String getEventTestResultErrorMsg() throws XmlParserException;

  @NotNull
  String getEventTestResultEndTime() throws XmlParserException;

  @NotNull
  String getEventTestResultStartTime() throws XmlParserException;

  /**
   * {@link XmlParserException} indicates errors during xml processing.
   */
  class XmlParserException extends Exception {
    public XmlParserException(final Throwable cause) {
      super(cause);
    }

    public XmlParserException(final String message, final Throwable cause) {
      super(message, cause);
    }

    public XmlParserException(final String message) {
      super(message);
    }
  }
}


text:
//
//  scene.h
//  RayTracer
//
//  Created by ZhaoYuhan on 4/20/15.
//  Copyright (c) 2015 ZhaoYuhan. All rights reserved.
//

#ifndef __RayTracer__scene__
#define __RayTracer__scene__

#include <memory>
#include <vector>
#include "object.h"
#include "light.h"

class Scene
{
public:
    Object rootObject;
    std::vector<std::shared_ptr<Light>> lights;

    void prepareForRender();
};

#endif /* defined(__RayTracer__scene__) */

redpajama_set_name: RedPajamaGithub


text:
namespace dbus {
const char kDBusInterface[] = "org.freedesktop.DBus";
const char kDBusServiceName[] = "org.freedesktop.DBus";
const char kDBusServicePath[] = "/org/freedesktop/DBus";

// Object Manager interface
const char kDBusObjectManagerInterface[] = "org.freedesktop.DBus.ObjectManager";
// Methods
const char kDBusObjectManagerGetManagedObjects[] = "GetManagedObjects";
// Signals
const char kDBusObjectManagerInterfacesAddedSignal[] = "InterfacesAdded";
const char kDBusObjectManagerInterfacesRemovedSignal[] = "InterfacesRemoved";

// Properties interface
const char kDBusPropertiesInterface[] = "org.freedesktop.DBus.Properties";
// Methods
const char kDBusPropertiesGet[] = "Get";
const char kDBusPropertiesSet[] = "Set";
const char kDBusPropertiesGetAll[] = "GetAll";
// Signals
const char kDBusPropertiesChangedSignal[] = "PropertiesChanged";
}  // namespace dbus

namespace imageburn {
const char kImageBurnServiceName[] = "org.chromium.ImageBurner";
const char kImageBurnServicePath[] = "/org/chromium/ImageBurner";
const char kImageBurnServiceInterface[] = "org.chromium.ImageBurnerInterface";
// Methods
const char kBurnImage[] = "BurnImage";
// Signals
const char kSignalBurnFinishedName[] = "burn_finished";
const char kSignalBurnUpdateName[] = "burn_progress_update";
}  // namespace imageburn

namespace speech_synthesis {
const char kSpeechSynthesizerInterface[] =
    "org.chromium.SpeechSynthesizerInterface";
const char kSpeechSynthesizerServicePath[] = "/org/chromium/SpeechSynthesizer";
const char kSpeechSynthesizerServiceName[] = "org.chromium.SpeechSynthesizer";
// Methods
const char kSpeak[] = "Speak";
const char kStop[] = "Stop";
const char kIsSpeaking[] = "IsSpeaking";
const char kShutdown[] = "Shutdown";
}  // namespace speech_synthesis

namespace chromium {
const char kChromiumInterface[] = "org.chromium.Chromium";
// Text-to-speech service signals.
const char kTTSReadySignal[] = "TTSReady";
const char kTTSFailedSignal[] = "TTSFailed";
}  // namespace chromium

namespace chromeos {
const char kLibCrosServiceName[] = "org.chromium.LibCrosService";
const char kLibCrosServicePath[] = "/org/chromium/LibCrosService";
const char kLibCrosServiceInterface[] = "org.chromium.LibCrosServiceInterface";
// Methods
const char kResolveNetworkProxy[] = "ResolveNetworkProxy";
const char kCheckLiveness[] = "CheckLiveness";
const char kLockScreen[] = "LockScreen";
const char kSetDisplayPower[] = "SetDisplayPower";
const char kSetDisplaySoftwareDimming[] = "SetDisplaySoftwareDimming";
const char kTakeDisplayOwnership[] = "TakeDisplayOwnership";
const char kReleaseDisplayOwnership[] = "ReleaseDisplayOwnership";
// Values
enum DisplayPowerState {
  DISPLAY_POWER_ALL_ON = 0,
  DISPLAY_POWER_ALL_OFF = 1,
  DISPLAY_POWER_INTERNAL_OFF_EXTERNAL_ON = 2,
  DISPLAY_POWER_INTERNAL_ON_EXTERNAL_OFF = 3,
};
}  // namespace chromeos

namespace cromo {
// cromo D-Bus service identifiers
const char kCromoServiceName[] = "org.chromium.ModemManager";
const char kCromoServicePath[] = "/org/chromium/ModemManager";

// cromo D-Bus interfaces
const char kModemInterface[] = "org.freedesktop.ModemManager.Modem";
const char kModemSimpleInterface[] =
    "org.freedesktop.ModemManager.Modem.Simple";
const char kModemCdmaInterface[] = "org.freedesktop.ModemManager.Modem.Cdma";
const char kModemGsmInterface[] = "org.freedesktop.ModemManager.Modem.Gsm";
const char kModemGsmCardInterface[] =
    "org.freedesktop.ModemManager.Modem.Gsm.Card";
const char kModemGsmNetworkInterface[] =
    "org.freedesktop.ModemManager.Modem.Gsm.Network";
const char kModemGobiInterface[] = "org.chromium.ModemManager.Modem.Gobi";
}  // namespace cromo

namespace modemmanager {
// ModemManager D-Bus service identifiers
const char kModemManagerSMSInterface[] =
    "org.freedesktop.ModemManager.Modem.Gsm.SMS";

// ModemManager function names.
const char kSMSGetFunction[] = "Get";
const char kSMSDeleteFunction[] = "Delete";
const char kSMSListFunction[] = "List";

// ModemManager monitored signals
const char kSMSReceivedSignal[] = "SmsReceived";

// ModemManager1 interfaces and signals
// The canonical source for these constants is:
//   /usr/include/ModemManager/ModemManager-names.h
const char kModemManager1ServiceName[] = "org.freedesktop.ModemManager1";
const char kModemManager1ServicePath[] = "/org/freedesktop/ModemManager1";
const char kModemManager1MessagingInterface[] =
    "org.freedesktop.ModemManager1.Modem.Messaging";
const char kModemManager1SmsInterface[] =
    "org.freedesktop.ModemManager1.Sms";
const char kSMSAddedSignal[] = "Added";
}  // namespace modemmanager

namespace wimax_manager {
// WiMaxManager D-Bus service identifiers
const char kWiMaxManagerServiceName[] = "org.chromium.WiMaxManager";
const char kWiMaxManagerServicePath[] = "/org/chromium/WiMaxManager";
const char kWiMaxManagerServiceError[] = "org.chromium.WiMaxManager.Error";
const char kWiMaxManagerInterface[] = "org.chromium.WiMaxManager";
const char kWiMaxManagerDeviceInterface[] = "org.chromium.WiMaxManager.Device";
const char kWiMaxManagerNetworkInterface[] =
    "org.chromium.WiMaxManager.Network";
const char kDeviceObjectPathPrefix[] = "/org/chromium/WiMaxManager/Device/";
const char kNetworkObjectPathPrefix[] = "/org/chromium/WiMaxManager/Network/";
const char kDevicesProperty[] = "Devices";
const char kNetworksProperty[] = "Networks";
const char kEAPAnonymousIdentity[] = "EAPAnonymousIdentity";
const char kEAPUserIdentity[] = "EAPUserIdentity";
const char kEAPUserPassword[] = "EAPUserPassword";

enum DeviceStatus {
  kDeviceStatusUninitialized,
  kDeviceStatusDisabled,
  kDeviceStatusReady,
  kDeviceStatusScanning,
  kDeviceStatusConnecting,
  kDeviceStatusConnected
};
}  // namespace wimax_manager

namespace bluetooth_plugin {
// Service identifiers for the plugin interface added to the /org/bluez object.
const char kBluetoothPluginServiceName[] = "org.bluez";
const char kBluetoothPluginInterface[] = "org.chromium.Bluetooth";

// Bluetooth plugin properties.
const char kSupportsLEServices[] = "SupportsLEServices";
const char kSupportsConnInfo[] = "SupportsConnInfo";
}  // namespace bluetooth_plugin

namespace bluetooth_plugin_device {
// Service identifiers for the plugin interface added to Bluetooth Device
// objects.
const char kBluetoothPluginServiceName[] = "org.bluez";
const char kBluetoothPluginInterface[] = "org.chromium.BluetoothDevice";

// Bluetooth Device plugin methods.
const char kGetConnInfo[] = "GetConnInfo";
}  // namespace bluetooth_plugin_device

namespace bluetooth_adapter {
// Bluetooth Adapter service identifiers.
const char kBluetoothAdapterServiceName[] = "org.bluez";
const char kBluetoothAdapterInterface[] = "org.bluez.Adapter1";

// Bluetooth Adapter methods.
const char kStartDiscovery[] = "StartDiscovery";
const char kSetDiscoveryFilter[] = "SetDiscoveryFilter";
const char kStopDiscovery[] = "StopDiscovery";
const char kRemoveDevice[] = "RemoveDevice";

// Bluetooth Adapter properties.
const char kAddressProperty[] = "Address";
const char kNameProperty[] = "Name";
const char kAliasProperty[] = "Alias";
const char kClassProperty[] = "Class";
const char kPoweredProperty[] = "Powered";
const char kDiscoverableProperty[] = "Discoverable";
const char kPairableProperty[] = "Pairable";
const char kPairableTimeoutProperty[] = "PairableTimeout";
const char kDiscoverableTimeoutProperty[] = "DiscoverableTimeout";
const char kDiscoveringProperty[] = "Discovering";
const char kUUIDsProperty[] = "UUIDs";
const char kModaliasProperty[] = "Modalias";

// Bluetooth Adapter errors.
const char kErrorNotReady[] = "org.bluez.Error.NotReady";
const char kErrorFailed[] = "org.bluez.Error.Failed";
const char kErrorNotAuthorized[] = "org.bluez.Error.NotAuthorized";
const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";

// Bluetooth Adapter parameters supplied to SetDiscoveryFilter request.
const char kDiscoveryFilterParameterUUIDs[] = "UUIDs";
const char kDiscoveryFilterParameterRSSI[] = "RSSI";
const char kDiscoveryFilterParameterPathloss[] = "Pathloss";
const char kDiscoveryFilterParameterTransport[] = "Transport";
}  // namespace bluetooth_adapter

namespace bluetooth_agent_manager {
// Bluetooth Agent Manager service indentifiers
const char kBluetoothAgentManagerServiceName[] = "org.bluez";
const char kBluetoothAgentManagerServicePath[] = "/org/bluez";
const char kBluetoothAgentManagerInterface[] = "org.bluez.AgentManager1";

// Bluetooth Agent Manager methods.
const char kRegisterAgent[] = "RegisterAgent";
const char kUnregisterAgent[] = "UnregisterAgent";
const char kRequestDefaultAgent[] = "RequestDefaultAgent";

// Bluetooth capabilities.
const char kNoInputNoOutputCapability[] = "NoInputNoOutput";
const char kDisplayOnlyCapability[] = "DisplayOnly";
const char kKeyboardOnlyCapability[] = "KeyboardOnly";
const char kDisplayYesNoCapability[] = "DisplayYesNo";
const char kKeyboardDisplayCapability[] = "KeyboardDisplay";

// Bluetooth Agent Manager errors.
const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";
const char kErrorAlreadyExists[] = "org.bluez.Error.AlreadyExists";
const char kErrorDoesNotExist[] = "org.bluez.Error.DoesNotExist";
}  // namespace bluetooth_agent_manager

namespace bluetooth_agent {
// Bluetooth Agent service indentifiers
const char kBluetoothAgentInterface[] = "org.bluez.Agent1";

// Bluetooth Agent methods.
const char kRelease[] = "Release";
const char kRequestPinCode[] = "RequestPinCode";
const char kDisplayPinCode[] = "DisplayPinCode";
const char kRequestPasskey[] = "RequestPasskey";
const char kDisplayPasskey[] = "DisplayPasskey";
const char kRequestConfirmation[] = "RequestConfirmation";
const char kRequestAuthorization[] = "RequestAuthorization";
const char kAuthorizeService[] = "AuthorizeService";
const char kCancel[] = "Cancel";

// Bluetooth Agent errors.
const char kErrorRejected[] = "org.bluez.Error.Rejected";
const char kErrorCanceled[] = "org.bluez.Error.Canceled";
}  // namespace bluetooth_agent

namespace bluetooth_device {
// Bluetooth Device service identifiers.
const char kBluetoothDeviceServiceName[] = "org.bluez";
const char kBluetoothDeviceInterface[] = "org.bluez.Device1";

// Bluetooth Device methods.
const char kConnect[] = "Connect";
const char kDisconnect[] = "Disconnect";
const char kConnectProfile[] = "ConnectProfile";
const char kDisconnectProfile[] = "DisconnectProfile";
const char kPair[] = "Pair";
const char kCancelPairing[] = "CancelPairing";
// TODO(tengs): Remove deprecated constants after they are removed in the Chrome
// codebase. (See crbug.com/430665).
const char kStartConnectionMonitor[] = "StartConnectionMonitor";  // DEPRECATED
const char kStopConnectionMonitor[] = "StopConnectionMonitor";    // DEPRECATED

// Bluetooth Device properties.
const char kAddressProperty[] = "Address";
const char kNameProperty[] = "Name";
const char kIconProperty[] = "Icon";
const char kClassProperty[] = "Class";
const char kAppearanceProperty[] = "Appearance";
const char kUUIDsProperty[] = "UUIDs";
const char kPairedProperty[] = "Paired";
const char kConnectedProperty[] = "Connected";
const char kTrustedProperty[] = "Trusted";
const char kBlockedProperty[] = "Blocked";
const char kAliasProperty[] = "Alias";
const char kAdapterProperty[] = "Adapter";
const char kLegacyPairingProperty[] = "LegacyPairing";
const char kModaliasProperty[] = "Modalias";
const char kRSSIProperty[] = "RSSI";
const char kTxPowerProperty[] = "TxPower";
const char kManufacturerDataProperty[] = "ManufacturerData";
const char kServiceDataProperty[] = "ServiceData";
const char kGattServicesProperty[] = "GattServices";
// TODO(tengs): Remove deprecated constants after they are removed in the Chrome
// codebase. (See crbug.com/430665).
const char kConnectionRSSI[] = "ConnectionRSSI";             // DEPRECATED
const char kConnectionTXPower[] = "ConnectionTXPower";       // DEPRECATED
const char kConnectionTXPowerMax[] = "ConnectionTXPowerMax"; // DEPRECATED

// Bluetooth Device errors.
const char kErrorNotReady[] = "org.bluez.Error.NotReady";
const char kErrorFailed[] = "org.bluez.Error.Failed";
const char kErrorInProgress[] = "org.bluez.Error.InProgress";
const char kErrorAlreadyConnected[] = "org.bluez.Error.AlreadyConnected";
const char kErrorNotConnected[] = "org.bluez.Error.NotConnected";
const char kErrorDoesNotExist[] = "org.bluez.Error.DoesNotExist";
const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";

// Undocumented errors that we know BlueZ returns for Bluetooth Device methods.
const char kErrorNotSupported[] = "org.bluez.Error.NotSupported";
const char kErrorAuthenticationCanceled[] =
    "org.bluez.Error.AuthenticationCanceled";
const char kErrorAuthenticationFailed[] =
    "org.bluez.Error.AuthenticationFailed";
const char kErrorAuthenticationRejected[] =
    "org.bluez.Error.AuthenticationRejected";
const char kErrorAuthenticationTimeout[] =
    "org.bluez.Error.AuthenticationTimeout";
const char kErrorConnectionAttemptFailed[] =
    "org.bluez.Error.ConnectionAttemptFailed";
}  // namespace bluetooth_device

namespace bluetooth_gatt_characteristic {
// Bluetooth GATT Characteristic service identifiers. The service name is used
// only for characteristic objects hosted by bluetoothd.
const char kBluetoothGattCharacteristicServiceName[] = "org.bluez";
const char kBluetoothGattCharacteristicInterface[] =
    "org.bluez.GattCharacteristic1";

// Bluetooth GATT Characteristic methods.
const char kReadValue[] = "ReadValue";
const char kWriteValue[] = "WriteValue";
const char kStartNotify[] = "StartNotify";
const char kStopNotify[] = "StopNotify";

// Bluetooth GATT Characteristic signals.
const char kValueUpdatedSignal[] = "ValueUpdated";

// Bluetooth GATT Characteristic properties.
const char kUUIDProperty[] = "UUID";
const char kServiceProperty[] = "Service";
const char kValueProperty[] = "Value";
const char kFlagsProperty[] = "Flags";
const char kNotifyingProperty[] = "Notifying";
const char kDescriptorsProperty[] = "Descriptors";

// Possible values for the "Flags" property.
const char kFlagBroadcast[] = "broadcast";
const char kFlagRead[] = "read";
const char kFlagWriteWithoutResponse[] = "write-without-response";
const char kFlagWrite[] = "write";
const char kFlagNotify[] = "notify";
const char kFlagIndicate[] = "indicate";
const char kFlagAuthenticatedSignedWrites[] = "authenticated-signed-writes";
const char kFlagExtendedProperties[] = "extended-properties";
const char kFlagReliableWrite[] = "reliable-write";
const char kFlagWritableAuxiliaries[] = "writable-auxiliaries";
}  // namespace bluetooth_gatt_characteristic

namespace bluetooth_gatt_descriptor {
// Bluetooth GATT Descriptor service identifiers. The service name is used
// only for descriptor objects hosted by bluetoothd.
const char kBluetoothGattDescriptorServiceName[] = "org.bluez";
const char kBluetoothGattDescriptorInterface[] = "org.bluez.GattDescriptor1";

// Bluetooth GATT Descriptor methods.
const char kReadValue[] = "ReadValue";
const char kWriteValue[] = "WriteValue";

// Bluetooth GATT Descriptor properties.
const char kUUIDProperty[] = "UUID";
const char kCharacteristicProperty[] = "Characteristic";
const char kValueProperty[] = "Value";
}  // namespace bluetooth_gatt_descriptor

namespace bluetooth_gatt_manager {
// Bluetooth GATT Manager service identifiers.
const char kBluetoothGattManagerServiceName[] = "org.bluez";
const char kBluetoothGattManagerInterface[] = "org.bluez.GattManager1";

// Bluetooth GATT Manager methods.
const char kRegisterService[] = "RegisterService";
const char kUnregisterService[] = "UnregisterService";

// Bluetooth GATT Manager errors.
const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";
const char kErrorAlreadyExists[] = "org.bluez.Error.AlreadyExists";
const char kErrorDoesNotExist[] = "org.bluez.Error.DoesNotExist";
}  // namespace bluetooth_gatt_manager

namespace bluetooth_gatt_service {
// Bluetooth GATT Service service identifiers. The service name is used
// only for service objects hosted by bluetoothd.
const char kBluetoothGattServiceServiceName[] = "org.bluez";
const char kBluetoothGattServiceInterface[] = "org.bluez.GattService1";

// Bluetooth GATT Service properties.
const char kUUIDProperty[] = "UUID";
const char kDeviceProperty[] = "Device";
const char kPrimaryProperty[] = "Primary";
const char kIncludesProperty[] = "Includes";
const char kCharacteristicsProperty[] = "Characteristics";

// Bluetooth GATT Service errors.
const char kErrorFailed[] = "org.bluez.Error.Failed";
const char kErrorInProgress[] = "org.bluez.Error.InProgress";
const char kErrorInvalidValueLength[] = "org.bluez.Error.InvalidValueLength";
const char kErrorNotAuthorized[] = "org.bluez.Error.NotAuthorized";
const char kErrorNotPaired[] = "org.bluez.Error.NotPaired";
const char kErrorNotSupported[] = "org.bluez.Error.NotSupported";
const char kErrorReadNotPermitted[] = "org.bluez.Error.ReadNotPermitted";
const char kErrorWriteNotPermitted[] = "org.bluez.Error.WriteNotPermitted";
}  // namespace bluetooth_gatt_service

namespace bluetooth_input {
// Bluetooth Input service identifiers.
const char kBluetoothInputServiceName[] = "org.bluez";
const char kBluetoothInputInterface[] = "org.bluez.Input1";

// Bluetooth Input properties.
const char kReconnectModeProperty[] = "ReconnectMode";

// Bluetooth Input property values.
const char kNoneReconnectModeProperty[] = "none";
const char kHostReconnectModeProperty[] = "host";
const char kDeviceReconnectModeProperty[] = "device";
const char kAnyReconnectModeProperty[] = "any";
}  // namespace bluetooth_input

namespace bluetooth_media {
// Bluetooth Media service identifiers
const char kBluetoothMediaServiceName[] = "org.bluez";
const char kBluetoothMediaInterface[] = "org.bluez.Media1";

// Bluetooth Media methods
const char kRegisterEndpoint[] = "RegisterEndpoint";
const char kUnregisterEndpoint[] = "UnregisterEndpoint";
const char kRegisterPlayer[] = "RegisterPlayer";
const char kUnregisterPlayer[] = "UnregisterPlayer";

// Bluetooth Media errors
const char kErrorFailed[] = "org.bluez.Error.Failed";
const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";
const char kErrorNotSupported[] = "org.bluez.Error.NotSupported";
}  // namespace bluetooth_media

namespace bluetooth_media_endpoint {
// Bluetooth Media Endpoint service identifiers
const char kBluetoothMediaEndpointServiceName[] = "org.bluez";
const char kBluetoothMediaEndpointInterface[] = "org.bluez.MediaEndpoint1";

// Bluetooth Media Endpoint methods
const char kSetConfiguration[] = "SetConfiguration";
const char kSelectConfiguration[] = "SelectConfiguration";
const char kClearConfiguration[] = "ClearConfiguration";
const char kRelease[] = "Release";
}  // namespace bluetooth_media_endpoint

namespace bluetooth_media_transport {
// Bluetooth Media Transport service identifiers
const char kBluetoothMediaTransportServiceName[] = "org.bluez";
const char kBluetoothMediaTransportInterface[] = "org.bluez.MediaTransport1";

// Bluetooth Media Transport methods
const char kAcquire[] = "Acquire";
const char kTryAcquire[] = "TryAcquire";
const char kRelease[] = "Release";

// Bluetooth Media Transport property names.
const char kDeviceProperty[] = "Device";
const char kUUIDProperty[] = "UUID";
const char kCodecProperty[] = "Codec";
const char kConfigurationProperty[] = "Configuration";
const char kStateProperty[] = "State";
const char kDelayProperty[] = "Delay";
const char kVolumeProperty[] = "Volume";

// Possible states for the "State" property
const char kStateIdle[] = "idle";
const char kStatePending[] = "pending";
const char kStateActive[] = "active";

// Bluetooth Media Transport errors.
const char kErrorFailed[] = "org.bluez.Error.Failed";
const char kErrorNotAuthorized[] = "org.bluez.Error.NotAuthorized";
const char kErrorNotAvailable[] = "org.bluez.Error.NotAvailable";
}  // namespace bluetooth_media_transport

namespace bluetooth_object_manager {
// Bluetooth daemon Object Manager service identifiers.
const char kBluetoothObjectManagerServiceName[] = "org.bluez";
const char kBluetoothObjectManagerServicePath[] = "/";
}  // namespace bluetooth_object_manager

namespace bluetooth_profile_manager {
// Bluetooth Profile Manager service identifiers.
const char kBluetoothProfileManagerServiceName[] = "org.bluez";
const char kBluetoothProfileManagerServicePath[] = "/org/bluez";
const char kBluetoothProfileManagerInterface[] = "org.bluez.ProfileManager1";

// Bluetooth Profile Manager methods.
const char kRegisterProfile[] = "RegisterProfile";
const char kUnregisterProfile[] = "UnregisterProfile";

// Bluetooth Profile Manager option names.
const char kNameOption[] = "Name";
const char kServiceOption[] = "Service";
const char kRoleOption[] = "Role";
const char kChannelOption[] = "Channel";
const char kPSMOption[] = "PSM";
const char kRequireAuthenticationOption[] = "RequireAuthentication";
const char kRequireAuthorizationOption[] = "RequireAuthorization";
const char kAutoConnectOption[] = "AutoConnect";
const char kServiceRecordOption[] = "ServiceRecord";
const char kVersionOption[] = "Version";
const char kFeaturesOption[] = "Features";

// Bluetooth Profile Manager option values.
const char kClientRoleOption[] = "client";
const char kServerRoleOption[] = "server";

// Bluetooth Profile Manager errors.
const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";
const char kErrorAlreadyExists[] = "org.bluez.Error.AlreadyExists";
const char kErrorDoesNotExist[] = "org.bluez.Error.DoesNotExist";
}  // namespace bluetooth_profile_manager

namespace bluetooth_profile {
// Bluetooth Profile service identifiers.
const char kBluetoothProfileInterface[] = "org.bluez.Profile1";

// Bluetooth Profile methods.
const char kRelease[] = "Release";
const char kNewConnection[] = "NewConnection";
const char kRequestDisconnection[] = "RequestDisconnection";
const char kCancel[] = "Cancel";

// Bluetooth Profile property names.
const char kVersionProperty[] = "Version";
const char kFeaturesProperty[] = "Features";

// Bluetooth Profile errors.
const char kErrorRejected[] = "org.bluez.Error.Rejected";
const char kErrorCanceled[] = "org.bluez.Error.Canceled";
}  // namespace bluetooth_profile

namespace bluetooth_advertisement {
// Bluetooth LE Advertisement service identifiers.
const char kBluetoothAdvertisementServiceName[] = "org.bluez";
const char kBluetoothAdvertisementInterface[] =
    "org.bluez.LEAdvertisement1";

// Bluetooth Advertisement methods.
const char kRelease[] = "Release";

// Bluetooth Advertisement properties.
const char kManufacturerDataProperty[] = "ManufacturerData";
const char kServiceUUIDsProperty[] = "ServiceUUIDs";
const char kServiceDataProperty[] = "ServiceData";
const char kSolicitUUIDsProperty[] = "SolicitUUIDs";
const char kTypeProperty[] = "Type";
const char kIncludeTxPowerProperty[] = "IncludeTxPower";

// Possible values for the "Type" property.
const char kTypeBroadcast[] = "broadcast";
const char kTypePeripheral[] = "peripheral";

}  // namespace bluetooth_advertisement

namespace bluetooth_advertising_manager {
// Bluetooth LE Advertising Manager service identifiers.
const char kBluetoothAdvertisingManagerServiceName[] = "org.bluez";
const char kBluetoothAdvertisingManagerInterface[] =
    "org.bluez.LEAdvertisingManager1";

// Bluetooth LE Advertising Manager methods.
const char kRegisterAdvertisement[] = "RegisterAdvertisement";
const char kUnregisterAdvertisement[] = "UnregisterAdvertisement";

// Bluetooth LE Advertising Manager errors.
const char kErrorAlreadyExists[] = "org.bluez.Error.AlreadyExists";
const char kErrorDoesNotExist[] = "org.bluez.Error.DoesNotExist";
const char kErrorFailed[] = "org.bluez.Error.Failed";
const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";
const char kErrorInvalidLength[] = "org.bluez.Error.InvalidLength";
}  // namespace bluetooth_advertising_manager

namespace nfc_adapter {
// NFC Adapter service identifiers.
const char kNfcAdapterServiceName[] = "org.neard";
const char kNfcAdapterInterface[] = "org.neard.Adapter";

// NFC Adapter methods.
const char kStartEmulation[] = "StartEmulation";
const char kStartPollLoop[] = "StartPollLoop";
const char kStopEmulation[] = "StopEmulation";
const char kStopPollLoop[] = "StopPollLoop";

// NFC Adapter signals.
const char kTagFoundSignal[] = "TagFound";
const char kTagLostSignal[] = "TagLost";

// NFC Adapter properties.
const char kDevicesProperty[] = "Devices";
const char kModeProperty[] = "Mode";
const char kPollingProperty[] = "Polling";
const char kPoweredProperty[] = "Powered";
const char kProtocolsProperty[] = "Protocols";
const char kTagsProperty[] = "Tags";

// NFC Adapter mode values.
const char kModeInitiator[] = "Initiator";
const char kModeTarget[] = "Target";
const char kModeIdle[] = "Idle";

}  // namespace nfc_adapter

namespace nfc_device {
// NFC Device service identifiers.
const char kNfcDeviceServiceName[] = "org.neard";
const char kNfcDeviceInterface[] = "org.neard.Device";

// NFC Device methods.
const char kPush[] = "Push";

// NFC Device properties.
const char kRecordsProperty[] = "Records";

}  // namespace nfc_device

namespace nfc_manager {
// NFC Manager service identifiers.
const char kNfcManagerServiceName[] = "org.neard";
const char kNfcManagerServicePath[] = "/";
const char kNfcManagerInterface[] = "org.neard.Manager";

// NFC Manager methods.
const char kRegisterHandoverAgent[] = "RegisterHandoverAgent";
const char kUnregisterHandoverAgent[] = "UnregisterHandoverAgent";
const char kRegisterNDEFAgent[] = "RegisterNDEFAgent";
const char kUnregisterNDEFAgent[] = "UnregisterNDEFAgent";

// NFC Manager signals.
const char kAdapterAddedSignal[] = "AdapterAdded";
const char kAdapterRemovedSignal[] = "AdapterRemoved";

// NFC Manager properties.
const char kAdaptersProperty[] = "Adapters";

// NFC Manager handover carrier values.
const char kCarrierBluetooth[] = "bluetooth";
const char kCarrierWifi[] = "wifi";
}  // namespace nfc_manager

namespace nfc_tag {
// NFC Tag service identifiers.
const char kNfcTagServiceName[] = "org.neard";
const char kNfcTagInterface[] = "org.neard.Tag";

// NFC Tag methods.
const char kWrite[] = "Write";

// NFC Tag properties.
const char kProtocolProperty[] = "Protocol";
const char kReadOnlyProperty[] = "ReadOnly";
const char kRecordsProperty[] = "Records";
const char kTypeProperty[] = "Type";

// NFC Tag type values.
const char kTagType1[] = "Type 1";
const char kTagType2[] = "Type 2";
const char kTagType3[] = "Type 3";
const char kTagType4[] = "Type 4";

}  // namespace nfc_tag

namespace nfc_record {
// NFC Record service identifiers.
const char kNfcRecordServiceName[] = "org.neard";
const char kNfcRecordInterface[] = "org.neard.Record";

// NFC Record properties.
const char kTypeProperty[] = "Type";
const char kEncodingProperty[] = "Encoding";
const char kLanguageProperty[] = "Language";
const char kRepresentationProperty[] = "Representation";
const char kUriProperty[] = "URI";
const char kMimeTypeProperty[] = "MIMEType";
const char kSizeProperty[] = "Size";
const char kActionProperty[] = "Action";

// NFC Record type values.
const char kTypeSmartPoster[] = "SmartPoster";
const char kTypeText[] = "Text";
const char kTypeUri[] = "URI";
const char kTypeHandoverRequest[] = "HandoverRequest";
const char kTypeHandoverSelect[] = "HandoverSelect";
const char kTypeHandoverCarrier[] = "HandoverCarrier";

// NFC Record encoding values.
const char kEncodingUtf8[] = "UTF-8";
const char kEncodingUtf16[] = "UTF-16";
}  // namespace nfc_record

namespace nfc_handover_agent {
// NFC Handover Agent service identifiers.
// TODO(armansito): Add the correct service name once the HandoverAgent feature
// is fully implemented.
const char kNfcHandoverAgentServiceName[] = "";
const char kNfcHandoverInterface[] = "org.neard.HandoverAgent";

// NFC Handover Agent methods.
const char kRequestOOB[] = "RequestOOB";
const char kPushOOB[] = "PushOOB";
const char kRelease[] = "Release";

// NFC Handover Agent properties.
const char kEIRProperty[] = "EIR";
const char kNokiaDotComBtProperty[] = "nokia.com:bt";
const char kWSCProperty[] = "WSC";
const char kStateProperty[] = "State";
}  // namespace nfc_handover_agent

namespace nfc_ndef_agent {
// NFC NDEF Agent service identifiers.
// TODO(armansito): Add the correct service name once the NDEFAgent feature
// is fully implemented.
const char kNfcNdefAgentServiceName[] = "";
const char kNfcNdefAgentInterface[] = "org.neard.NDEFAgent";

// NFC NDEF Agent methods.
const char kGetNDEF[] = "GetNDEF";
const char kRelease[] = "Release";

// NFC NDEF properties.
const char kNDEFProperty[] = "NDEF";
const char kRecordProperty[] = "Record";
}  // namespace nfc_ndef_agent

namespace nfc_common {
// NFC Adapter/Tag protocol values.
const char kProtocolFelica[] = "Felica";
const char kProtocolMifare[] = "MIFARE";
const char kProtocolJewel[] = "Jewel";
const char kProtocolIsoDep[] = "ISO-DEP";
const char kProtocolNfcDep[] = "NFC-DEP";

// Common methods for NFC property access and signals.
const char kGetProperties[] = "GetProperties";
const char kSetProperty[] = "SetProperty";
const char kPropertyChangedSignal[] = "PropertyChanged";
}  // namespace nfc_common

namespace nfc_error {
// NFC errors.
const char kAlreadyExists[] = "org.neard.Error.AlreadyExists";
const char kDoesNotExist[] = "org.neard.Error.DoesNotExist";
const char kFailed[] = "org.neard.Error.Failed";
const char kInProgress[] = "org.neard.Error.InProgress";
const char kInvalidArguments[] = "org.neard.Error.InvalidArguments";
const char kNotReady[] = "org.neard.Error.NotReady";
const char kNotSupported[] = "org.neard.Error.NotSupported";
const char kPermissionDenied[] = "org.neard.Error.PermissionDenied";

// NFC Handover Agent errors.
const char kHandoverAgentFailed[] = "org.neard.HandoverAgent.Error.Failed";
const char kHandoverAgentInProgress[] =
    "org.neard.HandoverAgent.Error.InProgress";
}  // namespace nfc_error

namespace mtpd {
const char kMtpdInterface[] = "org.chromium.Mtpd";
const char kMtpdServicePath[] = "/org/chromium/Mtpd";
const char kMtpdServiceName[] = "org.chromium.Mtpd";
const char kMtpdServiceError[] = "org.chromium.Mtpd.Error";

// Methods.
const char kEnumerateStorages[] = "EnumerateStorages";
const char kGetStorageInfo[] = "GetStorageInfo";
const char kGetStorageInfoFromDevice[] = "GetStorageInfoFromDevice";
const char kOpenStorage[] = "OpenStorage";
const char kCloseStorage[] = "CloseStorage";
const char kReadDirectoryEntryIds[] = "ReadDirectoryEntryIds";
const char kGetFileInfo[] = "GetFileInfo";
const char kReadFileChunk[] = "ReadFileChunk";
const char kCopyFileFromLocal[] = "CopyFileFromLocal";
const char kDeleteObject[] = "DeleteObject";
const char kRenameObject[] = "RenameObject";
const char kCreateDirectory[] = "CreateDirectory";

// Signals.
const char kMTPStorageAttached[] = "MTPStorageAttached";
const char kMTPStorageDetached[] = "MTPStorageDetached";

// For FileEntry struct:
const uint32_t kInvalidFileId = 0xffffffff;

// For OpenStorage method:
const char kReadOnlyMode[] = "ro";
const char kReadWriteMode[] = "rw";

// For GetFileInfo() method:
// The id of the root node in a storage, as defined by the PTP/MTP standards.
// Use this when referring to the root node in the context of GetFileInfo().
const uint32_t kRootFileId = 0;
}  // namespace mtpd

namespace system_clock {
const char kSystemClockInterface[] = "org.torproject.tlsdate";
const char kSystemClockServicePath[] = "/org/torproject/tlsdate";
const char kSystemClockServiceName[] = "org.torproject.tlsdate";

// Methods.
const char kSystemClockCanSet[] = "CanSetTime";
const char kSystemClockSet[] = "SetTime";

// Signals.
const char kSystemClockUpdated[] = "TimeUpdated";
}  // namespace system_clock

namespace cras {
const char kCrasServicePath[] = "/org/chromium/cras";
const char kCrasServiceName[] = "org.chromium.cras";
const char kCrasControlInterface[] = "org.chromium.cras.Control";

// Methods.
const char kSetOutputVolume[] = "SetOutputVolume";
const char kSetOutputNodeVolume[] = "SetOutputNodeVolume";
const char kSwapLeftRight[] = "SwapLeftRight";
const char kSetOutputMute[] = "SetOutputMute";
const char kSetOutputUserMute[] = "SetOutputUserMute";
const char kSetSuspendAudio[] = "SetSuspendAudio";
const char kSetInputGain[] = "SetInputGain";
const char kSetInputNodeGain[] = "SetInputNodeGain";
const char kSetInputMute[] = "SetInputMute";
const char kGetVolumeState[] = "GetVolumeState";
const char kGetNodes[] = "GetNodes";
const char kSetActiveOutputNode[] = "SetActiveOutputNode";
const char kSetActiveInputNode[] = "SetActiveInputNode";
const char kAddActiveOutputNode[] = "AddActiveOutputNode";
const char kAddActiveInputNode[] = "AddActiveInputNode";
const char kRemoveActiveOutputNode[] = "RemoveActiveOutputNode";
const char kRemoveActiveInputNode[] = "RemoveActiveInputNode";
const char kGetNumberOfActiveStreams[] = "GetNumberOfActiveStreams";
const char kGetNumberOfActiveInputStreams[] = "GetNumberOfActiveInputStreams";
const char kGetNumberOfActiveOutputStreams[] = "GetNumberOfActiveOutputStreams";

// Names of properties returned by GetNodes()
const char kIsInputProperty[] = "IsInput";
const char kIdProperty[] = "Id";
const char kTypeProperty[] = "Type";
const char kNameProperty[] = "Name";
const char kDeviceNameProperty[] = "DeviceName";
const char kActiveProperty[] = "Active";
const char kPluggedTimeProperty[] = "PluggedTime";
const char kMicPositionsProperty[] = "MicPositions";
const char kStableDeviceIdProperty[] = "StableDeviceId";

// Signals.
const char kOutputVolumeChanged[] = "OutputVolumeChanged";
const char kOutputMuteChanged[] = "OutputMuteChanged";
const char kNodeLeftRightSwappedChanged[] = "NodeLeftRightSwappedChanged";
const char kInputGainChanged[] = "InputGainChanged";
const char kInputMuteChanged[] = "InputMuteChanged";
const char kNodesChanged[] = "NodesChanged";
const char kActiveOutputNodeChanged[] = "ActiveOutputNodeChanged";
const char kActiveInputNodeChanged[] = "ActiveInputNodeChanged";
const char kNumberOfActiveStreamsChanged[] = "NumberOfActiveStreamsChanged";
}  // namespace cras

namespace feedback {
const char kFeedbackServicePath[] = "/org/chromium/feedback";
const char kFeedbackServiceName[] = "org.chromium.feedback";

// Methods.
const char kSendFeedback[] = "SendFeedback";
}  // namespace feedback

namespace easy_unlock {
const char kEasyUnlockServicePath[] = "/org/chromium/EasyUnlock";
const char kEasyUnlockServiceName[] = "org.chromium.EasyUnlock";
const char kEasyUnlockServiceInterface[] = "org.chromium.EasyUnlock";

// Values supplied as enrcryption type to CreateSecureMessage and
// UnwrapSecureMessage methods.
const char kEncryptionTypeNone[] = "NONE";
const char kEncryptionTypeAES256CBC[] = "AES_256_CBC";

// Values supplied as signature type to CreateSecureMessage and
// UnwrapSecureMessage methods.
const char kSignatureTypeECDSAP256SHA256[] = "ECDSA_P256_SHA256";
const char kSignatureTypeHMACSHA256[] = "HMAC_SHA256";

// Values supplied as key algorithm to WrapPublicKey method.
const char kKeyAlgorithmRSA[] = "RSA";
const char kKeyAlgorithmECDSA[] = "ECDSA";

// Methods
const char kPerformECDHKeyAgreementMethod[] = "PerformECDHKeyAgreement";
const char kWrapPublicKeyMethod[] = "WrapPublicKey";
const char kGenerateEcP256KeyPairMethod[] = "GenerateEcP256KeyPair";
const char kCreateSecureMessageMethod[] = "CreateSecureMessage";
const char kUnwrapSecureMessageMethod[] = "UnwrapSecureMessage";
}  // namespace easy_unlock

#endif  // SYSTEM_API_DBUS_SERVICE_CONSTANTS_H_


text:
package android.hardware.camera2.dispatch;

import java.lang.reflect.Method;

import static com.android.internal.util.Preconditions.*;

/**
 * A dispatcher that replaces one argument with another; replaces any argument at an index
 * with another argument.
 *
 *
For example, we can override an {@code void onSomething(int x)} calls to have {@code x} always
 * equal to 1. Or, if using this with a duck typing dispatcher, we could even overwrite {@code x} to
 * be something
 * that's not an {@code int}.

 *
 * @param <T>
 *          source dispatch type, whose methods with {@link #dispatch} will be called
 * @param <TArg>
 *          argument replacement type, args in {@link #dispatch} matching {@code argumentIndex}
 *          will be overriden to objects of this type
 */
public class ArgumentReplacingDispatcher<T, TArg> implements Dispatchable<T> {

    private final Dispatchable<T> mTarget;
    private final int mArgumentIndex;
    private final TArg mReplaceWith;

    /**
     * Create a new argument replacing dispatcher; dispatches are forwarded to {@code target}
     * after the argument is replaced.
     *
     *
For example, if a method {@code onAction(T1 a, Integer b, T2 c)} is invoked, and we wanted
     * to replace all occurrences of {@code b} with {@code 0xDEADBEEF}, we would set
     * {@code argumentIndex = 1} and {@code replaceWith = 0xDEADBEEF}.

     *
     *
If a method dispatched has less arguments than {@code argumentIndex}, it is
     * passed through with the arguments unchanged.

     *
     * @param target destination dispatch type, methods will be redirected to this dispatcher
     * @param argumentIndex the numeric index of the argument {@code >= 0}
     * @param replaceWith arguments matching {@code argumentIndex} will be replaced with this object
     */
    public ArgumentReplacingDispatcher(Dispatchable<T> target, int argumentIndex,
            TArg replaceWith) {
        mTarget = checkNotNull(target, "target must not be null");
        mArgumentIndex = checkArgumentNonnegative(argumentIndex,
                "argumentIndex must not be negative");
        mReplaceWith = checkNotNull(replaceWith, "replaceWith must not be null");
    }

    @Override
    public Object dispatch(Method method, Object[] args) throws Throwable {

        if (args.length > mArgumentIndex) {
            args = arrayCopy(args); // don't change in-place since it can affect upstream dispatches
            args[mArgumentIndex] = mReplaceWith;
        }

        return mTarget.dispatch(method, args);
    }

    private static Object[] arrayCopy(Object[] array) {
        int length = array.length;
        Object[] newArray = new Object[length];
        for (int i = 0; i < length; ++i) {
            newArray[i] = array[i];
        }
        return newArray;
    }
}


text:
package autostoppista.core.restcall;
import java.util.HashMap;
import autostoppista.core.http.HTTPCalls;
import autostoppista.core.http.HTTPInput;
import autostoppista.core.http.HTTPStartListener;
import autostoppista.core.http.HTTPonCompleteListener;
public class RestCalls {
	private static String DOMINE;
	public static final String PASSENGER = "PASSENGER";
	public static final String DRIVER = "DRIVER";
	public static String getDOMINE() {
		return DOMINE;
	}
	public static void setDOMINE(String domine) {
		DOMINE = domine;
	}
	public static void MiServeUnPassaggio(double Latitude, double Longitude, String Comment, HTTPStartListener s, HTTPonCompleteListener c, Login l) {
        HashMap<String, String> param = new HashMap<String, String>();
        param.put("Latitude",Double.toString(Latitude));
        param.put("Longitude",Double.toString(Longitude));
        param.put("Text",Comment);
        HTTPInput restInput = new HTTPInput(DOMINE + "/api/autostop/MiServeUnPassaggio/", "POST", param,l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void Accetto(String DriverName, HTTPStartListener s, HTTPonCompleteListener c, Login l) {
        HashMap<String, String> param = new HashMap<String, String>();
        param.put("UserName", DriverName);
        HTTPInput restInput = new HTTPInput(DOMINE + "/api/autostop/Accetto", "POST", param,l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void GetPassengersList(double Latitude, double Longitude, HTTPStartListener s, HTTPonCompleteListener c, Login l){
        HashMap<String, String> param = new HashMap<String, String>();
        param.put("Latitude",Double.toString(Latitude));
        param.put("Longitude",Double.toString(Longitude));
        HTTPInput restInput = new HTTPInput(DOMINE + "/api/autostop/GetPassengersList", "POST", param, l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void GetFeedbackListPassenger(String Passenger, HTTPStartListener s, HTTPonCompleteListener c, Login l) {
		HashMap<String, String> param = new HashMap<String, String>();
	    param.put("UserName",Passenger);
		HTTPInput restInput = new HTTPInput(DOMINE + "/api/autostop/GetFeedbackListPassenger", "POST", param, l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void GetFeedbackListDriver(String Driver, HTTPStartListener s, HTTPonCompleteListener c, Login l) {
		HashMap<String, String> param = new HashMap<String, String>();
	    param.put("UserName", Driver);
        HTTPInput restInput = new HTTPInput(DOMINE + "/api/autostop/GetFeedbackListDriver", "POST", param,l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void GetFeedbackToEditPassenger(HTTPStartListener s, HTTPonCompleteListener c, Login l) {
		HTTPInput restInput = new HTTPInput(DOMINE + "/api/autostop/GetFeedbackToEditPassenger", "POST", null,l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void GetFeedbackToEditDriver(HTTPStartListener s, HTTPonCompleteListener c, Login l) {
		HTTPInput restInput = new HTTPInput(DOMINE + "/api/autostop/GetFeedbackToEditDriver", "POST", null,l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void DriverSavePassengerFeedback(int FeedbackID, String Comment, float Rate, HTTPStartListener s, HTTPonCompleteListener c, Login l) {
		HashMap<String, String> param = new HashMap<String, String>();
	    param.put("FeedbackID", Integer.toString(FeedbackID));
	    param.put("Comment", Comment);
	    param.put("Rate",Float.toString(Rate));
		HTTPInput restInput = new HTTPInput(DOMINE + "/api/autostop/DriverSavePassengerFeedback", "POST", param, l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void PassengerSaveDriverFeedback(int FeedbackID, String Comment, float Rate, HTTPStartListener s, HTTPonCompleteListener c, Login l) {
		HashMap<String, String> param = new HashMap<String, String>();
	    param.put("FeedbackID", Integer.toString(FeedbackID));
	    param.put("Comment", Comment);
	    param.put("Rate",Float.toString(Rate));
		HTTPInput restInput = new HTTPInput(DOMINE + "/api/autostop/PassengerSaveDriverFeedback", "POST", param, l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void miSonoConnesso(String GCM_ID, HTTPStartListener s, HTTPonCompleteListener c, Login l) {
        HashMap<String, String> param = new HashMap<String, String>();
        param.put("GCM_ID",GCM_ID);
        HTTPInput restInput = new HTTPInput(DOMINE + "/api/autostop/miSonoConnesso", "POST", param,l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void miSonoDisconnesso(HTTPStartListener s, HTTPonCompleteListener c, Login l) {
        HTTPInput restInput = new HTTPInput(DOMINE + "/api/autostop/miSonoDisconnesso", "POST", null,l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void getProfileInfo(HTTPStartListener s, HTTPonCompleteListener c, Login l) {
        HTTPInput restInput = new HTTPInput(DOMINE + "/api/profiles/getprofileinfo/", "POST", null, l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void deleteUserAndAccount(HTTPStartListener s, HTTPonCompleteListener c, Login l){
        HTTPInput restInput = new HTTPInput(DOMINE + "/api/Profiles/deleteUserAndAccount", "POST", null,l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void editAccount(String UserName, String Password, String Role, String Name, String Surname, HTTPStartListener s, HTTPonCompleteListener c, Login l) {
        HashMap<String, String> param = new HashMap<String, String>();
        param.put("UserName", UserName);
        param.put("Password", Password);
        param.put("Role", Role);
        param.put("Name", Name);
        param.put("Surname", Surname);
        HTTPInput restInput = new HTTPInput(DOMINE + "/api/Profiles/editAccount", "POST", param,l);
        HTTPCalls.start(restInput,s,c);
	}
	public static void createAccount(String UserName, String Password, String Role, String Name, String Surname, HTTPStartListener s, HTTPonCompleteListener c, Login l) {
        HashMap<String, String> param = new HashMap<String, String>();
        param.put("UserName", UserName);
        param.put("Password", Password);
        param.put("Role", Role);
        param.put("Name", Name);
        param.put("Surname", Surname);
        HTTPInput restInput = new HTTPInput(DOMINE + "/api/Profiles/createAccount", "POST", param,l);
        HTTPCalls.start(restInput,s,c);
	}
}


text:
Sensing Ratios interactive application for the [Math Moves exhibit](http://mathmoves.org/) at the Science Museum of Minnesota.

## Disclaimer
This code is offered here for example and reference. The compiled application is not intended for public consumption outside of the exhibit. This repository is lacking the media files and hardware that make up the full application.

## Technical highlights
Arduino controller inputs adjust graph drawing and audio tone generation on the screen. HTML5 application, which replaced an [old version of the software written in Open Frameworks](https://github.com/scimusmn/mm-0102-sensing-ratios-old).

## Install instructions
If you are using a fresh out-of-box machine, start with the [official exhibit computer setup](http://projects.smm.org/atrium/media/node/280246).

Once base Boxen is successfully installed, run the custom Partner Motion install.

    boxen mm-0102-sensingRatios

Go to System Preferences > Cursorcerer. Set "Hide idle cursor after" to 5 seconds.

## Run the application
The application should start correctly after rebooting the computer.


text:
package com.github.tkurz.sparqlmm.function.temporal.aggregation;

import com.github.tkurz.media.fragments.base.MediaFragment;
import com.github.tkurz.media.ontology.function.TemporalFunction;
import com.github.tkurz.media.ontology.type.TemporalEntity;
import com.github.tkurz.sparqlmm.Constants;
import com.github.tkurz.sparqlmm.doc.FunctionDoc;
import com.github.tkurz.sparqlmm.utils.FunctionHelper;
import org.openrdf.model.URI;
import org.openrdf.model.Value;
import org.openrdf.model.ValueFactory;
import org.openrdf.query.algebra.evaluation.ValueExprEvaluationException;
import org.openrdf.query.algebra.evaluation.function.Function;

/**
 * ...
 * <p/>
 * Author: Thomas Kurz (tkurz@apache.org)
 */
@FunctionDoc(title = "temporalBoundingBox", properties = {TemporalEntity.class, TemporalEntity.class}, reference = FunctionDoc.Reference.temporal, description = "returns new MediaFragment / MediaFragmentURI with temporal fragment ( Min( p1.start, p2.start ), Max( p1.end, p2.end ) ).", type = FunctionDoc.Type.extensionAggregate)
public class BoundingBoxFunction implements Function {

    /**
     * return the URI
     */
    public String getURI() {
        return Constants.NAMESPACE + "temporalBoundingBox";
    }

    @Override
    public Value evaluate(ValueFactory valueFactory, Value... values) throws ValueExprEvaluationException {
        try {
            //check preconditions
            if(values.length < 2 || !FunctionHelper.isComparable(values)) return null;

            //check if values are correct
            TemporalEntity[] entities = FunctionHelper.toTemporalEntities(values);

            //evaluate
            String box = TemporalFunction.getBoundingBox(entities).stringValue();

            if(values[0] instanceof URI) {
                String uri = FunctionHelper.getCleanURI(values[0]);
                return  valueFactory.createURI(uri + MediaFragment.DEFAULT_TYPE.getDelimiter() + box);
            } else {
                //evaluate
                return valueFactory.createLiteral(box);
            }

        } catch (IllegalArgumentException e) {
            return null;
        }
    }
}


text:
package org.apache.lucene.analysis.el;

import java.io.IOException;

import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; // for javadoc
import org.apache.lucene.analysis.TokenFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.KeywordAttribute;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;

/**
 * A {@link TokenFilter} that applies {@link GreekStemmer} to stem Greek
 * words.
 *

 * To prevent terms from being stemmed use an instance of
 * {@link KeywordMarkerFilter} or a custom {@link TokenFilter} that sets
 * the {@link KeywordAttribute} before this {@link TokenStream}.
 *

 *

 * NOTE: Input is expected to be casefolded for Greek (including folding of final
 * sigma to sigma), and with diacritics removed. This can be achieved by using
 * either {@link GreekLowerCaseFilter} or ICUFoldingFilter before GreekStemFilter.
 * @lucene.experimental
 */
public final class GreekStemFilter extends TokenFilter {
  private final GreekStemmer stemmer = new GreekStemmer();
  private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class);
  private final KeywordAttribute keywordAttr = addAttribute(KeywordAttribute.class);

  public GreekStemFilter(TokenStream input) {
    super(input);
  }

  @Override
  public boolean incrementToken() throws IOException {
    if (input.incrementToken()) {
      if(!keywordAttr.isKeyword()) {
        final int newlen = stemmer.stem(termAtt.buffer(), termAtt.length());
        termAtt.setLength(newlen);
      }
      return true;
    } else {
      return false;
    }
  }
}


text:
{{serviceDirectory.title}}

            Title

                {{serviceDirectory.title}}

            Image:

            Attending Schedule

            Location

            Published

                {{serviceDirectory.published}}

            Service URL

                {{serviceDirectory.URL}}

            GMaps URL

                {{serviceDirectory.gmapsURL}}

            Phone

                {{serviceDirectory.phoneNumber}}

            Email

                {{serviceDirectory.email}}

            Description

            Created:
{{serviceDirectory.created | date:'medium'}}

            Last Modified:
{{serviceDirectory.lastUpdate | date:'medium'}}

            By:
{{serviceDirectory.user.name}}


text:
qemu -boot a -vga std -fda grub/floppy.img -hda harddisk.img
#qemu -boot a -fda grub/floppy.img -hda harddisk.img -nographic
#applications.iso


text:
package org.zstack.header.identity;

import org.zstack.header.configuration.PythonClassInventory;
import org.zstack.header.search.Inventory;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
@Inventory(mappingVOClass = AccountVO.class)
@PythonClassInventory
public class AccountInventory {
    private String uuid;
    private String name;
    private Timestamp createDate;
    private Timestamp lastOpDate;

    public static AccountInventory valueOf(AccountVO vo) {
        AccountInventory inv = new AccountInventory();
        inv.setUuid(vo.getUuid());
        inv.setName(vo.getName());
        inv.setCreateDate(vo.getCreateDate());
        inv.setLastOpDate(vo.getLastOpDate());
        return inv;
    }

    public static List<AccountInventory> valueOf(Collection<AccountVO> vos) {
        List<AccountInventory> lst = new ArrayList<AccountInventory>(vos.size());
        for (AccountVO vo : vos) {
            lst.add(AccountInventory.valueOf(vo));
        }
        return lst;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getName() {
        return name;
    }

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

    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    public Timestamp getLastOpDate() {
        return lastOpDate;
    }

    public void setLastOpDate(Timestamp lastOpDate) {
        this.lastOpDate = lastOpDate;
    }
}


text:
@interface XAxisGraphLabel : UILabel

-(instancetype)initWithText:(NSString *)labelText textAlignement:(NSTextAlignment)textAlignment andTextColor:(UIColor *)textColor;
@property (nonatomic, strong) UIView *dotView;
@property (nonatomic) int position;
@property (nonatomic) int yPosition;
@property (nonatomic) float dotPading;

@end


text:
table {
	border-collapse: collapse;
}
th,td {
	border: 2px solid #000000;
	padding: 5px 5px;
	font-size:10px;
	font-family:Times New Roman;
	vertical-align: middle;

}
th {
	background-color: #007bff;
	border: 2px solid #cecfd5;
	font-size:10px;
	font-family:Times New Roman;
	font-weight:bold;
	color:#ffffff;
}

.valglb {
	background-color: #FFFF99;
}

.valauth {
	background-color: #00FFFF;
}

.valres {
	background-color: #8F47B2;
}

th:first-child {
	border-top-left-radius: 5px;
	text-align: left;
}
th:last-child {
	border-top-right-radius: 5px;
}
td {
	border-bottom: 1px solid #cecfd5;
	border-right: 1px solid #cecfd5;
}
td:first-child {
	border-left: 1px solid #cecfd5;
}
tfoot {
	text-align: right;
}
tfoot tr:last-child td:first-child {
	border-bottom-left-radius: 5px;
}
tfoot tr:last-child td:last-child {
	border-bottom-right-radius: 5px;
}


text:
<?php
/**
 * includes/library/INSTALL.php
 * $ID$
 * check for new installation, If true, begin new install proceedures.
 * @todo proceedure to block install if not a new instance
 *
 * @license http://opensource.org/licenses/mit-license.php MIT License
 * @package MSC Assets
 *
 */
defined('_MSC') or die('Unauthorized');
$debug->log("Install check initiating...");

class install
{

}
?>


text:
//
//  JTabBarController.m
//  JKitDemo
//
//  Created by Zebra on 16/6/7.
//  Copyright © 2016年 陈杰. All rights reserved.
//

#import "JTabBarController.h"
#import "JTabBarButton.h"

@interface JTabBarController ()<UIAlertViewDelegate>{
    NSInteger count;
    NSMutableArray * btnArray;
}

@end

@implementation JTabBarController

- (instancetype)init{
    self = [super init];
    if (self) {

        // Custom initialization
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hideTabBar:) name:JTabBarHidden object:nil];

        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mTabSelectIndex:) name:JTabBarSelectIndex object:nil];
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.

    btnArray = [[NSMutableArray alloc] initWithCapacity:0];

    [self hideOriginalTab];
    self.tabBarView = [[UIView alloc]init];
    self.tabBarView.frame = CGRectMake(0, [UIScreen mainScreen].bounds.size.height-49, [UIScreen mainScreen].bounds.size.width, 49);
    self.tabBarView.backgroundColor = JColorWithHex(0xffffff);
    UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, JScreenWidth, 0.5)];
    lineView.backgroundColor = JColorWithHex(0xebe8e8);
    [self.tabBarView addSubview:lineView];
    [self.view addSubview:self.tabBarView];
}

- (void)backBtnClick:(NSNotification *)notif {
    [self.navigationController popViewControllerAnimated:YES];
}

//隐藏tabbar  yes 隐藏  no 显示
- (void)hideTabBar:(NSNotification *)notify {

    BOOL value = [notify.object boolValue];

    self.tabBar.translucent = value;

    [UIView animateWithDuration:0.2
                          delay:0.00
                        options:UIViewAnimationOptionTransitionCurlUp animations:^(void){
                            if (value) {
                                self.tabBarView.frame = CGRectMake(0, [UIScreen mainScreen].bounds.size.height, [UIScreen mainScreen].bounds.size.width, 49);
                            }else{
                                self.tabBarView.frame = CGRectMake(0, [UIScreen mainScreen].bounds.size.height-49, [UIScreen mainScreen].bounds.size.width, 49);
                            }
                        }completion:nil];
}

//给tabbar自定义按钮或其他控件
- (void)setTabWithArray:(NSArray *)tabArray
    andNormalImageArray:(NSArray *)normalImages
  andSelectedImageArray:(NSArray *)selectedImages
              andTitles:(NSArray *)titles{

    self.viewControllers = tabArray;
    count = [tabArray count];
    if([btnArray count]==0)
    {
        if (tabArray.count > 0) {

            for (int i = 0; i < [tabArray count]; i ++) {
                JTabBarButton *btn = [JTabBarButton buttonWithType:UIButtonTypeCustom];
                btn.adjustsImageWhenHighlighted = NO;
                [btn setBackgroundImage:[UIImage imageNamed:[selectedImages objectAtIndex:i]] forState:UIControlStateSelected];
                [btn setBackgroundImage:[UIImage imageNamed:[normalImages objectAtIndex:i]] forState:UIControlStateNormal];
                [btn setBackgroundColor:[UIColor clearColor]];
                [btn setTitle:[titles objectAtIndex:i] forState:UIControlStateNormal];
                btn.titleEdgeInsets = UIEdgeInsetsMake(30, 0, 0, 0);
                btn.titleLabel.font = [UIFont systemFontOfSize:10];
                btn.tag = i ;
                if (btn.tag == self.selectedIndex){
                    btn.selected = YES;
                }else{
                    btn.selected = NO;
                }
                btn.frame = CGRectMake([UIScreen mainScreen].bounds.size.width/[tabArray count]*i, 0, [UIScreen mainScreen].bounds.size.width/[tabArray count], 49);

                [btn addTarget:self action:@selector(selectTab:) forControlEvents:UIControlEventTouchUpInside];
                [self.tabBarView addSubview:btn];
                [btnArray addObject:btn];
            }
        }
    }
}

- (void)setTabWithArray:(NSArray *)tabArray
         andNomalTitles:(NSArray *)nomalTitles
      andSelectedTitles:(NSArray *)selectedTitles
     andNomalTitleColor:(UIColor *)nomalTitleColor
  andSelectedTitleColor:(UIColor *)selectedTitleColor
    andNormalImageArray:(NSArray *)normalImages
  andSelectedImageArray:(NSArray *)selectedImages
      andNomalBackimage:(NSArray *)nomalBackImages
   andSelectedBackimage:(NSArray *)selectedBackImages
{
    self.viewControllers = tabArray;
    count = [tabArray count];
    if([btnArray count] == 0)
    {
        if (tabArray.count > 0) {

            for (int i = 0; i < [tabArray count]; i ++) {
                UIButton *btn;
                if ([UIImage imageNamed:[nomalBackImages objectAtIndex:i]]) {
                    btn = [UIButton buttonWithType:UIButtonTypeCustom];
                    [btn setImage:[UIImage imageNamed:[nomalBackImages objectAtIndex:i]] forState:UIControlStateNormal];
                    [btn setImage:[UIImage imageNamed:[selectedBackImages objectAtIndex:i]] forState:UIControlStateSelected];
                }else{
                    btn = [JTabBarButton buttonWithType:UIButtonTypeCustom];
                    [btn setImage:[UIImage imageNamed:[selectedImages objectAtIndex:i]] forState:UIControlStateSelected];
                    [btn setImage:[UIImage imageNamed:[normalImages objectAtIndex:i]] forState:UIControlStateNormal];
                    [btn setTitle:[nomalTitles objectAtIndex:i] forState:UIControlStateNormal];
                    [btn setTitle:[selectedTitles objectAtIndex:i] forState:UIControlStateSelected];
                    [btn setTitleColor:nomalTitleColor forState:UIControlStateNormal];
                    [btn setTitleColor:selectedTitleColor forState:UIControlStateSelected];
                }

                btn.titleLabel.font = [UIFont boldSystemFontOfSize:10.0f];
                btn.adjustsImageWhenHighlighted = NO;

                btn.frame = CGRectMake([UIScreen mainScreen].bounds.size.width/[tabArray count]*i, 0, [UIScreen mainScreen].bounds.size.width/[tabArray count], 49);
                [btn setBackgroundColor:[UIColor clearColor]];
                btn.titleLabel.textAlignment = NSTextAlignmentCenter;
                btn.tag = i;
                if (btn.tag == self.selectedIndex){
                    btn.selected = YES;
                }else{
                    btn.selected = NO;
                }

                [btn addTarget:self action:@selector(selectTab:) forControlEvents:UIControlEventTouchUpInside];
                [self.tabBarView addSubview:btn];
                [btnArray addObject:btn];

            }
        }

    }

}

- (void)setBlock:(JTabBarSelectIndexBlock)block {

    _block = block;

}

- (void)selectTab:(UIButton *)selectBtn {

    if (_block) {

        BOOL isDelegate = _block(selectBtn.tag);

        if(selectBtn.selected == NO && isDelegate == YES)
        {
            NSInteger selectTag = selectBtn.tag;
            selectBtn.selected = YES;

            UIViewController *selectVC = [self.viewControllers objectAtIndex:selectTag];

            self.selectedViewController = selectVC;

            for(int i = 0; i < count; i++)
            {
                UIButton *btn = (UIButton *)[btnArray objectAtIndex:i];
                if (btn.tag != selectTag){
                    btn.selected = NO;
                }
                else{
                    btn.selected = YES;
                }
            }
        }

    } else if(selectBtn.selected == NO) {
        NSInteger selectTag = selectBtn.tag;
        selectBtn.selected = YES;

        UIViewController *selectVC = [self.viewControllers objectAtIndex:selectTag];

        self.selectedViewController = selectVC;

        for(int i = 0; i < count; i++)
        {
            UIButton *btn = (UIButton *)[btnArray objectAtIndex:i];
            if (btn.tag != selectTag){
                btn.selected = NO;
            }
            else{
                btn.selected = YES;
            }
        }
    }
}

- (void)hideOriginalTab {
    NSArray *array = [self.view subviews];
    for (int i = 0; i < array.count; i++) {
        UIView *originalTabView = [array objectAtIndex:i];
        originalTabView.frame = CGRectMake(0,[UIScreen mainScreen].bounds.size.height, [UIScreen mainScreen].bounds.size.width, 49);
        originalTabView.backgroundColor = [UIColor clearColor];
        UIView *newTabView = [array objectAtIndex:0];
        newTabView.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height);
    }

}

- (void)mTabSelectIndex:(NSNotification *)notify{
    NSInteger value = [notify.object integerValue];
    UIViewController *selectVC = [self.viewControllers objectAtIndex:value];
    self.selectedViewController = selectVC;
    for(int i = 0; i < count; i++) {
        UIButton *btn = (UIButton *)[btnArray objectAtIndex:i];
        if (btn.tag != value)
            btn.selected = NO;
        else
            btn.selected = YES;
    }
}

- (void)selectIndex:(int)index
{
    UIViewController *selectVC = [self.viewControllers objectAtIndex:index];
    self.selectedViewController = selectVC;
    for(int i = 0; i < count; i++) {
        UIButton *btn = (UIButton *)[btnArray objectAtIndex:i];
        if (btn.tag != index)
            btn.selected = NO;
        else
            btn.selected = YES;
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation

 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end


text:
package anvers

import (
	"fmt"
	"html/template"
	"net/http"

	"github.com/go-chi/chi"
)

// Config contains configuration options for the cms.
type Config struct {
	Plugins []Plugin
}

// Anvers is our main struct. It wraps the cms.
type Anvers struct {
	plugins   []Plugin
	AdminMenu *AdminMenuEntry
	Router    *chi.Mux
}

// NewAnvers creates a new cms.
func NewAnvers(config *Config) *Anvers {
	a := &Anvers{
		plugins:   []Plugin{},
		AdminMenu: newAdminMenu(),
		Router:    chi.NewRouter(),
	}

	for _, p := range config.Plugins {
		p.Install(a)
		a.plugins = append(a.plugins, p)
	}

	return a
}

// Start starts the cms.
func (a *Anvers) Start() {
	for _, p := range a.plugins {
		p.Register(a)
	}

	a.Router.Get("/admin", func(w http.ResponseWriter, r *http.Request) {
		t := template.Must(template.ParseFiles("../../assets/templates/admin/dashboard.html"))
		fmt.Println(t.Execute(w, map[string]interface{}{
			"Anvers": a,
		}))
	})

	http.ListenAndServe(":3000", a.Router)
}


text:
/**
 * Audit specific code.
 */
package de.tum.in.www1.artemis.config.audit;


text:
#ifndef REWRITE_HEAP_H
#define REWRITE_HEAP_H

#include "access/htup.h"
#include "storage/itemptr.h"
#include "storage/relfilenode.h"
#include "utils/relcache.h"

/* struct definition is private___ to rewriteheap.c */
typedef struct RewriteStateData *RewriteState;

extern RewriteState begin_heap_rewrite(Relation OldHeap, Relation NewHeap,
				   TransactionId OldestXmin, TransactionId FreezeXid,
				   MultiXactId MultiXactCutoff, bool use_wal);
extern void end_heap_rewrite(RewriteState state);
extern void rewrite_heap_tuple(RewriteState state, HeapTuple oldTuple,
				   HeapTuple newTuple);
extern bool rewrite_heap_dead_tuple(RewriteState state, HeapTuple oldTuple);

/*
 * On-Disk data format for an individual logical rewrite mapping.
 */
typedef struct LogicalRewriteMappingData
{
	RelFileNode old_node;
	RelFileNode new_node;
	ItemPointerData old_tid;
	ItemPointerData new_tid;
} LogicalRewriteMappingData;

/* ---
 * The filename consists of the following, dash separated,
 * components:
 * 1) database oid or InvalidOid for shared relations
 * 2) the oid of the relation
 * 3) xid we are mapping for
 * 4) upper 32bit of the LSN at which a rewrite started
 * 5) lower 32bit of the LSN at which a rewrite started
 * 6) xid of the xact performing the mapping
 * ---
 */
#define LOGICAL_REWRITE_FORMAT "map-%x-%x-%X_%X-%x-%x"
void		CheckPointLogicalRewriteHeap(void);

#endif   /* REWRITE_HEAP_H */


text:
require 'net/http'

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module Ecommpay
        class Notification < ActiveMerchant::Billing::Integrations::Notification

          %w( type_id
              status_id
              transaction_id
              external_id
              acquirer_id
              payment_type_id
              site_id
              amount
              currency
              real_amount
              real_currency
              email
              extended_info_enabled
              customer_purse
              completed_at
              processor_date
              source_type
              holder_name
              expiry_date
              phone
              authcode
              billing_country
              billing_region
              billing_city
              billing_address
              billing_postal
              parent_transaction_id
              recurring_allowed
              recurring_valid_thru
              recurring_registration_id
              processor_id
              processor_code
              processor_message
              signature).each do |param_name|
            define_method(param_name.underscore){ params[param_name] }
          end

          alias_method :order, :external_id

          def params_select
            params.except('signature').map{|k, v| "#{k}:#{v}" if v.present? && v != 'NULL'}.compact
          end

          def amount
            params['amount'].to_i / 100.0
          end

          def acknowledge
            signature == generate_signature
          end

          def generate_signature_string
            params_select.sort.push(@options[:secret]).join(';')
          end

          def generate_signature
            Digest::SHA1.hexdigest(generate_signature_string)
          end

        end
      end
    end
  end
end


text:
const doPing = (req, res, next) => {
  res.send({message: 'Ping!'});
  next();
};

module.exports = function () {
  return {
    respondTo: 'GET',
    authMethod: 'alwaysReject',
    endpoint: '/api/ping',
    handledBy: doPing,
  };
};


text:
package edu.harvard.iq.dataverse.dataaccess;

// java core imports:
import java.io.IOException;
import java.io.File;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
// NIO imports:
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.Iterator;

// Dataverse imports:
import edu.harvard.iq.dataverse.DataFile;
import edu.harvard.iq.dataverse.datavariable.DataVariable;
import java.io.FileNotFoundException;
import java.nio.channels.Channel;
import java.nio.file.StandardCopyOption;

public class FileAccessIO extends DataFileIO {

    public FileAccessIO () throws IOException {
        this(null);
    }

    public FileAccessIO(DataFile dataFile) throws IOException {
        this (dataFile, null);

    }

    public FileAccessIO(DataFile dataFile, DataAccessRequest req) throws IOException {

        super(dataFile, req);

        this.setIsLocalFile(true);
    }

    private boolean isReadAccess = false;
    private boolean isWriteAccess = false;
    private Path physicalPath = null;

    @Override
    public boolean canRead () {
        return isReadAccess;
    }

    @Override
    public boolean canWrite () {
        return isWriteAccess;
    }

    @Override
    public void open (DataAccessOption... options) throws IOException {

        DataFile dataFile = this.getDataFile();
        DataAccessRequest req = this.getRequest();

        if (req != null && req.getParameter("noVarHeader") != null) {
            this.setNoVarHeader(true);
        }

        if (isWriteAccessRequested(options)) {
            isWriteAccess = true;
            isReadAccess = false;
        } else {
            isWriteAccess = false;
            isReadAccess = true;
        }

        if (isReadAccess) {
            FileInputStream fin = openLocalFileAsInputStream();

            if (fin == null) {
                throw new IOException ("Failed to open local file "+getStorageLocation());
            }

            this.setInputStream(fin);
            setChannel(fin.getChannel());
            this.setSize(getLocalFileSize());

            if (dataFile.getContentType() != null
                    && dataFile.getContentType().equals("text/tab-separated-values")
                    && dataFile.isTabularData()
                    && dataFile.getDataTable() != null
                    && (!this.noVarHeader())) {

                List datavariables = dataFile.getDataTable().getDataVariables();
                String varHeaderLine = generateVariableHeader(datavariables);
                this.setVarHeader(varHeaderLine);
            }
        } else if (isWriteAccess) {
            FileOutputStream fout = openLocalFileAsOutputStream();

            if (fout == null) {
                throw new IOException ("Failed to open local file "+getStorageLocation()+" for writing.");
            }

            this.setOutputStream(fout);
            setChannel(fout.getChannel());
        }

        this.setMimeType(dataFile.getContentType());
        this.setFileName(dataFile.getFileMetadata().getLabel());

        // This "status" is a leftover from 3.6; we don't have a use for it
        // in 4.0 yet; and we may not need it at all.
        // -- L.A. 4.0.2
        this.setStatus(200);
    }

    @Override
    public Channel openAuxChannel(String auxItemTag, DataAccessOption... options) throws IOException {

        Path auxPath = getAuxFilePath(auxItemTag);

        if (isWriteAccessRequested(options)) {
            FileOutputStream auxOut = new FileOutputStream(auxPath.toFile());

            if (auxOut == null) {
                throw new IOException("Failed to open Auxiliary File " + this.getDataFile().getStorageIdentifier() + "." + auxItemTag + " for writing.");
            }

            return auxOut.getChannel();
        }

        // Read access requested.
        // Check if this Aux object is cached; and if so, open for reading:

        if (!auxPath.toFile().exists()) {
            throw new FileNotFoundException("Auxiliary File " + this.getDataFile().getStorageIdentifier() + "." + auxItemTag + " does not exist.");
        }

        FileInputStream auxIn = new FileInputStream(auxPath.toFile());

        if (auxIn == null) {
            throw new IOException("Failed to open Auxiliary File " + this.getDataFile().getStorageIdentifier() + "." + auxItemTag + " for reading");
        }

        return auxIn.getChannel();

    }

    @Override
    public boolean isAuxObjectCached(String auxItemTag) throws IOException {
        // Check if the file exists:

        Path auxPath = getAuxFilePath(auxItemTag);

        if (auxPath.toFile().exists()) {
            return true;
        }

        return false;
    }

    @Override
    public long getAuxObjectSize(String auxItemTag) throws IOException {
        Path auxPath = getAuxFilePath(auxItemTag);

        if (!auxPath.toFile().exists()) {
            throw new FileNotFoundException ("Aux file does not exist.");
        }

        return auxPath.toFile().length();
    }

    @Override
    public void backupAsAux(String auxItemTag) throws IOException {
        Path auxPath = getAuxFilePath(auxItemTag);

        Files.move(getFileSystemPath(), auxPath, StandardCopyOption.REPLACE_EXISTING);
    }

    @Override
    public String getStorageLocation() {
        // For a local file, the "storage location" is a complete, absolute
        // filesystem path, with the "file://" prefix:

        try {
            Path testPath = getFileSystemPath();
            if (testPath != null) {
                return "file://" + testPath.toString();
            }
        } catch (IOException ioex) {
            // just return null, below:
        }

        return null;
    }

    @Override
    public Path getFileSystemPath() throws IOException {
        if (physicalPath != null) {
            return physicalPath;
        }

        String datasetDirectory = getDatasetDirectory();

        if (this.getDataFile().getStorageIdentifier() == null || "".equals(this.getDataFile().getStorageIdentifier())) {
            throw new IOException("Data Access: No local storage identifier defined for this datafile.");
        }

        physicalPath = Paths.get(datasetDirectory, this.getDataFile().getStorageIdentifier());
        return physicalPath;

    }

    @Override
    public void delete() throws IOException {
        Path victim = getFileSystemPath();

        if (victim != null) {
            Files.delete(victim);
        } else {
            throw new IOException("Could not locate physical file location for the Filesystem object.");
        }
    }

    // Auxilary helper methods, filesystem access-specific:

    private long getLocalFileSize () {
        long fileSize = -1;
        File testFile = null;

        try {
            testFile = getFileSystemPath().toFile();
            if (testFile != null) {
                fileSize = testFile.length();
            }
        } catch (Exception ex) {
            return -1;
        }

        return fileSize;
    }

    public FileInputStream openLocalFileAsInputStream () {
        FileInputStream in;

        try {
            in = new FileInputStream(getFileSystemPath().toFile());
        } catch (Exception ex) {
            // We don't particularly care what the reason why we have
            // failed to access the file was.
            // From the point of view of the download subsystem, it's a
            // binary operation -- it's either successfull or not.
            // If we can't access it for whatever reason, we are saying
            // it's 404 NOT FOUND in our HTTP response.
            // TODO: no, we should probably provide some kind of diagnostics.
            // -- L.A. 4.0.2
            return null;
        }

        return in;
    }

    public FileOutputStream openLocalFileAsOutputStream () {
        FileOutputStream out;

        try {
            out = new FileOutputStream(getFileSystemPath().toFile());
        } catch (Exception ex) {
            // We don't particularly care what the reason why we have
            // failed to access the file was.
            // From the point of view of the download subsystem, it's a
            // binary operation -- it's either successfull or not.
            // If we can't access it for whatever reason, we are saying
            // it's 404 NOT FOUND in our HTTP response.
            // TODO: no, we should probably provide some kind of diagnostics.
            // -- L.A. 4.0.2
            return null;
        }

        return out;
    }

    private String getDatasetDirectory() throws IOException {
        if (this.getDataFile() == null) {
            throw new IOException("No datafile defined in the Data Access Object");
        }

        if (this.getDataFile().getOwner() == null) {
            throw new IOException("Data Access: no parent dataset defined for this datafile");
        }

        Path datasetDirectoryPath = this.getDataFile().getOwner().getFileSystemDirectory();

        if (datasetDirectoryPath == null) {
            throw new IOException("Could not determine the filesystem directory of the parent dataset.");
        }
        String datasetDirectory = datasetDirectoryPath.toString();

        if (this.getDataFile().getStorageIdentifier() == null || "".equals(this.getDataFile().getStorageIdentifier())) {
            throw new IOException("Data Access: No local storage identifier defined for this datafile.");
        }

        return datasetDirectory;
    }

    private Path getAuxFilePath(String auxItemTag) throws IOException {

        if (auxItemTag == null || "".equals(auxItemTag)) {
            throw new IOException("Null or invalid Auxiliary Object Tag.");
        }

        String datasetDirectory = getDatasetDirectory();

        if (this.getDataFile().getStorageIdentifier() == null || "".equals(this.getDataFile().getStorageIdentifier())) {
            throw new IOException("Data Access: No local storage identifier defined for this datafile.");
        }

        Path auxPath = Paths.get(datasetDirectory, this.getDataFile().getStorageIdentifier() + "." + auxItemTag);

        if (auxPath == null) {
            throw new IOException("Invalid Path location for the auxiliary file " + this.getDataFile().getStorageIdentifier() + "." + auxItemTag);
        }

        return auxPath;
    }

    private boolean isWriteAccessRequested (DataAccessOption... options) throws IOException {

        for (DataAccessOption option: options) {
            // In the future we may need to be able to open read-write
            // Channels; no support, or use case for that as of now.

            if (option == DataAccessOption.READ_ACCESS) {
                return false;
            }

            if (option == DataAccessOption.WRITE_ACCESS) {
                return true;
            }
        }

        // By default, we open the file in read mode:

        return false;
    }

    private String generateVariableHeader(List dvs) {
        String varHeader = null;

        if (dvs != null) {
            Iterator iter = dvs.iterator();
            DataVariable dv;

            if (iter.hasNext()) {
                dv = (DataVariable) iter.next();
                varHeader = dv.getName();
            }

            while (iter.hasNext()) {
                dv = (DataVariable) iter.next();
                varHeader = varHeader + "\t" + dv.getName();
            }

            varHeader = varHeader + "\n";
        }

        return varHeader;
    }

}


text:
Title: Contact Us
---

For support please use the [Slack](/slack) or [GitHub Discussions](https://github.com/reactiveui/ReactiveUI/discussions).

The ReactiveUI set of projects is supported by the `ReactiveUI Association Inc` a non-profit.

The contact details are:

| Type | Details |
| --- | --- |
| Email | hello@reactiveui.net |
| Phone | +1 (713) 376-5516 |
| Address | 8210 Terrace Brook Dr, Houston Texas 77040, United States |


text:
var g_sheetid;
var g_checked=0;//已审核通过数
var g_cnum=0;//证照总数
var init = function(type,sheetid){
	g_sheetid = sheetid;
	setLoading( true );
	var parms = new Array();
	parms.push("action=show");
	parms.push("sheetid="+sheetid);
	var url  = "../DaemonCertificate?"+parms.join('&');
	var table = new AW.XML.Table;
	table.setURL((url));
	table.request();
	table.response = function(text){
		table.setXML(text);
		var xcode = table.getErrCode();
		if( xcode != '0' ){//处理xml中的错误消息
			alert( xcode+table.getErrNote());
		}else{
			var headFlag = table.getXMLText( "/xdoc/xout/detail/head/row/flag" );
			$("txt_sheetid").value=sheetid;
			$("txt_flag").value =parseHeadFlag(headFlag);
			$('txt_contact').value = table.getXMLText( "/xdoc/xout/detail/head/row/contact" );
			$('txt_contacttel').value = table.getXMLText( "/xdoc/xout/detail/head/row/telno" );
			if(type==1){
				var venderType = table.getXMLText( "/xdoc/xout/detail/head/row/vendertype" );
				if(venderType==2){
					$('voteoption2').checked='checked';
					$('txt_venderTypeName').value=table.getXMLText( "/xdoc/xout/detail/head/row/vendertypename" );
					$('txt_venderTypeName').disabled='disabled';
				}
				$('voteoption1').disabled="disabled";
				$('voteoption2').disabled="disabled";
			}else if(type==2){
				var venderType = table.getXMLText( "/xdoc/xout/detail/head/row/vendertype" );
				if(venderType==2){
					$('voteoption2').checked='checked';
					$('txt_venderTypeName').value=table.getXMLText( "/xdoc/xout/detail/head/row/vendertypename" );
					$('txt_venderTypeName').disabled='disabled';
				}
				$('voteoption1').disabled="disabled";
				$('voteoption2').disabled="disabled";
				$('txt_ccid').value=table.getXMLText( "/xdoc/xout/detail/head/row/ccid" );
				$('txt_ccid').disabled='disabled';
			}
			initData(type,table);
			//有非审核通过单,则不能整单通过
			if( headFlag==100){
				document.getElementById('btn_checkAll').disabled='disabled';
			}else if(headFlag==99){
				document.getElementById('btn_checkAll').disabled='disabled';
			}

		}
		setLoading( false );
	};

	jQuery( "#dialog:ui-dialog" ).dialog( "destroy" );

	jQuery('#btn_editVenderExt').click(function() {
		jQuery( "#txt_newContact" ).val(jQuery( "#txt_contact" ).val());
		jQuery( "#txt_newContactTel" ).val(jQuery( "#txt_contacttel" ).val());
		jQuery( "#dialog-form" ).dialog( "open" );
	});

	jQuery( "#dialog-form" ).dialog({
		autoOpen: false,
		height: 350,
		width: 350,
		modal: true,
		buttons: {
			"确定": function() {
				var table = new AW.XML.Table;
				table.setXML("");
				var doc = table.getXML();
				var elm_xdoc = doc.createElement("xdoc");
				var elm_xparms = doc.createElement("xparms");
				var elm_contact=doc.createElement("contact");
				elm_contact.appendChild( doc.createTextNode(jQuery( "#txt_newContact" ).val()));
				elm_xparms.appendChild( elm_contact );
				var elm_contacttel=doc.createElement("contacttel");
				elm_contacttel.appendChild( doc.createTextNode(jQuery( "#txt_newContactTel" ).val()));
				elm_xparms.appendChild( elm_contacttel );
				var elm_contactmotel=doc.createElement("contactmotel");
				elm_contactmotel.appendChild( doc.createTextNode(jQuery( "#txt_newContactTel" ).val()));
				elm_xparms.appendChild( elm_contactmotel );

				elm_xdoc.appendChild( elm_xparms );

				var venderid = jQuery( "#txt_venderid" ).text();
				table.setParameter("action","setVenderExt");
				table.setURL("../DaemonCertificate?action=setVenderExt&venderid="+venderid);
				table.setRequestMethod('POST');
				table.setRequestData(table.getXMLContent());
				table.request();
				table.response = function(text){
					setLoading(false);
					table.setXML(text);
					var errCode= table.getErrCode();
					if(errCode==0){
						jQuery( "#txt_contact" ).val(jQuery( "#txt_newContact" ).val());
						jQuery( "#txt_contacttel" ).val(jQuery( "#txt_newContactTel" ).val());
						jQuery( "#dialog-form" ).dialog( "close" );
					}else{
						alert(table.getErrNote());
					}
				};
			},
			"取消": function() {
				jQuery( this ).dialog( "close" );
			}
		},
		close: function() {

		}
	});
};

function initData(type,table){
	$('txt_contact').value = table.getXMLText( "/xdoc/xout/detail/head/row/contact" );
	var venderid = table.getXMLText( "/xdoc/xout/detail/head/row/venderid" );
	$("itemList").style.display="block";
	var nodes = table.getXMLNodes( "/xdoc/xout/detail/body/row" );
	var html = "";
	g_cnum = nodes.length;
	for ( var i = 0; i < nodes.length; i++) {
		var next_node = nodes[i];
		var sheetid=table.getXMLText("sheetid",next_node);
		var seqno=table.getXMLText("seqno",next_node);
		var flag=table.getXMLText("flag",next_node);
		var certificateid=table.getXMLText("certificateid",next_node);
		var certificatename=table.getXMLText("certificatename",next_node);
		var ctid=table.getXMLText("ctid",next_node);
		var expirydate=table.getXMLText("expirydate",next_node);
		var yeardate = table.getXMLText("yeardate",next_node);
		var goodsname=table.getXMLText("goodsname",next_node);
		var barcodeid=table.getXMLText("barcodeid",next_node);
		var note=table.getXMLText("note",next_node);
		var ctname=table.getXMLText("ctname",next_node);
		var yearflag=table.getXMLText("yearflag",next_node);
		var approvalnum=table.getXMLText("approvalnum",next_node);
		var papprovalnum=table.getXMLText("papprovalnum",next_node);
		var appflag=table.getXMLText("appflag",next_node);
		var checktime=table.getXMLText("checktime",next_node);
		var checker=table.getXMLText("checker",next_node);
		var edittime=table.getXMLText("edittime",next_node);
		var editor=table.getXMLText("editor",next_node);

		var ctype="必备证照";
		var ccid = $("txt_ccid")==null?"":$("txt_ccid").value;
		var src = "./certificateitem_check.jsp?&sheetid="+g_sheetid+"&type="+type+"&id="+seqno+"&ccid="+ccid+"&yearflag="+yearflag+
		"&flag="+flag+"&venderid="+venderid+"&ctid="+ctid+"&cname="+encodeURIComponent(ctname)+"&certificateid="+
		certificateid+"&ctype="+ctype+"&yeardate="+yeardate+"&expirydate="+expirydate+"&goodsname="+encodeURIComponent(goodsname)+
		"&barcodeid="+barcodeid+"&note="+note+"&approvalnum="+approvalnum+"&papprovalnum="+papprovalnum+"&appflag="+appflag
		+"&checktime="+checktime+"&checker="+checker+"&edittime="+edittime+"&editor="+editor;

		html += "

";
	}

	$("itemList").innerHTML = html;
}

function checkAll(){
	if(!confirm("是否确认需要整单审核")){
		return;
	}
	setLoading( true );
	var parms = new Array();
	parms.push("action=checkAllOK");
	parms.push("sheetid="+g_sheetid);
	parms.push("note="+encodeURIComponent("整单审核通过"));
	var url  = "../DaemonCertificate?"+parms.join('&');
	var table = new AW.XML.Table;
	table.setURL((url));
	table.request();
	table.response = function(text){
		table.setXML(text);
		var xcode = table.getErrCode();
		if( xcode != '0' ){//处理xml中的错误消息
			alert( xcode+table.getErrNote());
		}else{
			window.location.reload();
		}
		setLoading( false );
	};
}

function delSheet(){
	if(!confirm("该操作将删除整张单据,确认删除?")){
		return;
	}

	setLoading( true );
	var parms = new Array();
	parms.push("action=delSheet");
	parms.push("sheetid="+g_sheetid);
	var url  = "../DaemonCertificate?"+parms.join('&');
	var table = new AW.XML.Table;
	table.setURL((url));
	table.request();
	table.response = function(text){
		setLoading( false );
		table.setXML(text);
		var xcode = table.getErrCode();
		if( xcode != '0' ){//处理xml中的错误消息
			alert( xcode+table.getErrNote());
		}else{
			alert("单据:"+g_sheetid+"已删除");
			window.close();
		}
	};
}

function checkChecked(){
	var ifrs = document.getElementsByTagName('iframe');
	for ( var i = 0; i < ifrs.length; i++) {
		var btn = ifrs[i].contentWindow.document.getElementById('checkBox_btn');
		if(btn!=null && btn.checked){
			ifrs[i].contentWindow.checkItemOK2();
		}
	}
	alert("操作成功");
}


text:
package timing.cat;

import com.mongodb.DB;
import com.mongodb.MongoClient;
import java.net.UnknownHostException;

public class DBConnectionSingleton {
	public static final String HOST = "localhost";
	public static final int PORT = 27017;
	public static final String DB_NAME = "mydb";

	private static DBConnectionSingleton mInstance = null;
	private MongoClient mMongoClient = null;

	private DBConnectionSingleton() {
		try {
			mMongoClient = new MongoClient( HOST , PORT );
		} catch (UnknownHostException e) {
			System.out.println("impossible de se connecter à mongodb");
			System.exit(0);
		}
	}

	public MongoClient getMongoClient() {
		return mMongoClient;
	}

	public DB getDatabase() {
		return mMongoClient.getDB(DB_NAME);
	}

	public void close() {
		if(mMongoClient == null)
			return;
		mMongoClient.close();
		mMongoClient = null;
	}

	public static DBConnectionSingleton getInstance() {
		if(mInstance == null)
			mInstance = new DBConnectionSingleton();
		return mInstance;
	}
}


text: TOPIC = 'engine_worker'