text:
@interface JSZPlayerTestCase : JSZVCRTestCase
@end

@implementation JSZPlayerTestCase

- (BOOL)isRecording {
    return NO;
}

- (void)setUp {
    [super setUp];
    XCTAssertNotNil(self.recordings);
    XCTAssertNotEqual(self.recordings.count, 0);
}

- (void)tearDown {
    XCTAssertNotEqual(self.recordings.count, 0);
    [super tearDown];
}

- (void)testRecordedNetworkCall {
    // We should ALWAYS have recordings loaded at the beginning of a test
    XCTAssertNotEqual(self.recordings.count, 0);
    [self performSimpleVerifiedNetworkCall:nil];
}

- (void)DISABLED_testRedirectedRecordedNetworkCall {
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://httpbin.org/redirect/6"]];
    [self performNetworkRequest:request withVerification:^(NSData *data, NSURLResponse *response, NSError *error) {
        NSLog(@"");
    }];
}

- (void)testPerformanceRecordedNetworkCall {
    __weak typeof(self) wself = self;
    [self measureBlock:^{
        // Put the code you want to measure the time of here.
        __weak typeof(wself) sself = wself;
        if (!sself) {
            return;
        }
        [sself performSimpleVerifiedNetworkCall:nil];
    }];
}

@end


text:
package org.elasticsearch.xpack.core.ml.job.config;

import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.core.Nullable;
import org.elasticsearch.xcontent.ConstructingObjectParser;
import org.elasticsearch.xcontent.ObjectParser;
import org.elasticsearch.xcontent.ParseField;
import org.elasticsearch.xcontent.ToXContentObject;
import org.elasticsearch.xcontent.XContentBuilder;
import org.elasticsearch.xcontent.XContentParser;
import org.elasticsearch.xpack.core.ml.job.messages.Messages;
import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper;

import java.io.IOException;
import java.util.Objects;

/**
 * Analysis limits for autodetect. In particular,
 * this is a collection of parameters that allow limiting
 * the resources used by the job.
 */
public class AnalysisLimits implements ToXContentObject, Writeable {

    /**
     * Prior to 6.1 the default model memory size limit was 4GB, and defined in the C++ code.  The default
     * is now 1GB and defined here in the Java code.  Prior to 6.3, a value of null means that
     * the old default value should be used. From 6.3 onwards, the value will always be explicit.
     */
    public static final long DEFAULT_MODEL_MEMORY_LIMIT_MB = 1024L;
    public static final long PRE_6_1_DEFAULT_MODEL_MEMORY_LIMIT_MB = 4096L;

    public static final long DEFAULT_CATEGORIZATION_EXAMPLES_LIMIT = 4;

    /**
     * Serialisation field names
     */
    public static final ParseField MODEL_MEMORY_LIMIT = new ParseField("model_memory_limit");
    public static final ParseField CATEGORIZATION_EXAMPLES_LIMIT = new ParseField("categorization_examples_limit");

    // These parsers follow the pattern that metadata is parsed leniently (to allow for enhancements), whilst config is parsed strictly
    public static final ConstructingObjectParser<AnalysisLimits, Void> LENIENT_PARSER = createParser(true);
    public static final ConstructingObjectParser<AnalysisLimits, Void> STRICT_PARSER = createParser(false);

    private static ConstructingObjectParser<AnalysisLimits, Void> createParser(boolean ignoreUnknownFields) {
        ConstructingObjectParser<AnalysisLimits, Void> parser = new ConstructingObjectParser<>(
            "analysis_limits",
            ignoreUnknownFields,
            a -> ignoreUnknownFields
                ? new AnalysisLimits(
                    a[0] == null ? PRE_6_1_DEFAULT_MODEL_MEMORY_LIMIT_MB : (Long) a[0],
                    a[1] == null ? DEFAULT_CATEGORIZATION_EXAMPLES_LIMIT : (Long) a[1]
                )
                : new AnalysisLimits((Long) a[0], (Long) a[1])
        );

        parser.declareField(ConstructingObjectParser.optionalConstructorArg(), p -> {
            if (p.currentToken() == XContentParser.Token.VALUE_STRING) {
                return ByteSizeValue.parseBytesSizeValue(p.text(), MODEL_MEMORY_LIMIT.getPreferredName()).getMb();
            } else if (p.currentToken() == XContentParser.Token.VALUE_NUMBER) {
                return p.longValue();
            }
            throw new IllegalArgumentException("Unsupported token [" + p.currentToken() + "]");
        }, MODEL_MEMORY_LIMIT, ObjectParser.ValueType.VALUE);
        parser.declareLong(ConstructingObjectParser.optionalConstructorArg(), CATEGORIZATION_EXAMPLES_LIMIT);

        return parser;
    }

    /**
     * The model memory limit in MiBs.
     * It is initialised to null.
     * A value of null will result to the default defined in the C++ code being used.
     * However, for jobs created in version 6.1 or higher this will rarely be null because
     * the put_job action set it to a new default defined in the Java code.
     */
    private final Long modelMemoryLimit;

    /**
     * It is initialised to null.
     * A value of null will result to the default being used.
     */
    private final Long categorizationExamplesLimit;

    public AnalysisLimits(Long categorizationExamplesLimit) {
        this(DEFAULT_MODEL_MEMORY_LIMIT_MB, categorizationExamplesLimit);
    }

    public AnalysisLimits(Long modelMemoryLimitMb, Long categorizationExamplesLimit) {
        if (modelMemoryLimitMb != null && modelMemoryLimitMb < 1) {
            String msg = Messages.getMessage(Messages.JOB_CONFIG_MODEL_MEMORY_LIMIT_TOO_LOW, modelMemoryLimitMb, "1 MiB");
            throw ExceptionsHelper.badRequestException(msg);
        }
        if (categorizationExamplesLimit != null && categorizationExamplesLimit < 0) {
            String msg = Messages.getMessage(
                Messages.JOB_CONFIG_FIELD_VALUE_TOO_LOW,
                CATEGORIZATION_EXAMPLES_LIMIT,
                0,
                categorizationExamplesLimit
            );
            throw ExceptionsHelper.badRequestException(msg);
        }
        this.modelMemoryLimit = modelMemoryLimitMb;
        this.categorizationExamplesLimit = categorizationExamplesLimit;
    }

    public AnalysisLimits(StreamInput in) throws IOException {
        this(in.readOptionalLong(), in.readOptionalLong());
    }

    /**
     * Creates a new {@code AnalysisLimits} object after validating it against external limitations
     * and filling missing values with their defaults. Validations:
     *
     *

     *
check model memory limit doesn't exceed the MAX_MODEL_MEM setting

     *

     *
     * @param source an optional {@code AnalysisLimits} whose explicit values will be copied
     * @param maxModelMemoryLimit the max allowed model memory limit
     * @param defaultModelMemoryLimit the default model memory limit to be used if an explicit value is missing
     * @return a new {@code AnalysisLimits} that is validated and has no missing values
     */
    public static AnalysisLimits validateAndSetDefaults(
        @Nullable AnalysisLimits source,
        @Nullable ByteSizeValue maxModelMemoryLimit,
        long defaultModelMemoryLimit
    ) {

        boolean maxModelMemoryIsSet = maxModelMemoryLimit != null && maxModelMemoryLimit.getMb() > 0;

        long modelMemoryLimit = defaultModelMemoryLimit;
        if (maxModelMemoryIsSet) {
            modelMemoryLimit = Math.min(maxModelMemoryLimit.getMb(), modelMemoryLimit);
        }

        long categorizationExamplesLimit = DEFAULT_CATEGORIZATION_EXAMPLES_LIMIT;

        if (source != null) {
            if (source.getModelMemoryLimit() != null) {
                modelMemoryLimit = source.getModelMemoryLimit();
            }
            if (source.getCategorizationExamplesLimit() != null) {
                categorizationExamplesLimit = source.getCategorizationExamplesLimit();
            }
        }

        if (maxModelMemoryIsSet && modelMemoryLimit > maxModelMemoryLimit.getMb()) {
            throw ExceptionsHelper.badRequestException(
                Messages.getMessage(
                    Messages.JOB_CONFIG_MODEL_MEMORY_LIMIT_GREATER_THAN_MAX,
                    ByteSizeValue.ofMb(modelMemoryLimit),
                    maxModelMemoryLimit
                )
            );
        }

        return new AnalysisLimits(modelMemoryLimit, categorizationExamplesLimit);
    }

    /**
     * Maximum size of the model in MB before the anomaly detector
     * will drop new samples to prevent the model using any more
     * memory.
     *
     * @return The set memory limit or null if not set
     */
    @Nullable
    public Long getModelMemoryLimit() {
        return modelMemoryLimit;
    }

    /**
     * Gets the limit to the number of examples that are stored per category
     *
     * @return the limit or null if not set
     */
    @Nullable
    public Long getCategorizationExamplesLimit() {
        return categorizationExamplesLimit;
    }

    @Override
    public void writeTo(StreamOutput out) throws IOException {
        out.writeOptionalLong(modelMemoryLimit);
        out.writeOptionalLong(categorizationExamplesLimit);
    }

    @Override
    public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
        builder.startObject();
        if (modelMemoryLimit != null) {
            builder.field(MODEL_MEMORY_LIMIT.getPreferredName(), modelMemoryLimit + "mb");
        }
        if (categorizationExamplesLimit != null) {
            builder.field(CATEGORIZATION_EXAMPLES_LIMIT.getPreferredName(), categorizationExamplesLimit);
        }
        builder.endObject();
        return builder;
    }

    /**
     * Overridden equality test
     */
    @Override
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }

        if (other instanceof AnalysisLimits == false) {
            return false;
        }

        AnalysisLimits that = (AnalysisLimits) other;
        return Objects.equals(this.modelMemoryLimit, that.modelMemoryLimit)
            && Objects.equals(this.categorizationExamplesLimit, that.categorizationExamplesLimit);
    }

    @Override
    public int hashCode() {
        return Objects.hash(modelMemoryLimit, categorizationExamplesLimit);
    }
}

redpajama_set_name: RedPajamaGithub


text:
"""
Display logged-in username.

Configuration parameters:
    format: display format for whoami (default '{username}')

Format placeholders:
    {username} display current username

Inspired by i3 FAQ:
    https://faq.i3wm.org/question/1618/add-user-name-to-status-bar.1.html

@author ultrabug

SAMPLE OUTPUT
{'full_text': u'ultrabug'}
"""

from getpass import getuser

class Py3status:
    """
    """
    # available configuration parameters
    format = '{username}'

    class Meta:
        deprecated = {
            'remove': [
                {
                    'param': 'cache_timeout',
                    'msg': 'obsolete parameter',
                },
            ],
        }

    def whoami(self):
        """
        We use the getpass module to get the current user.
        """
        username = '{}'.format(getuser())

        return {
            'cached_until': self.py3.CACHE_FOREVER,
            'full_text': self.py3.safe_format(self.format, {'username': username})
        }

if __name__ == "__main__":
    """
    Run module in test mode.
    """
    from py3status.module_test import module_test
    module_test(Py3status)


text:
module.exports = {
    helpMessage: "Here's what I can do:\n\n" +
    "* Create new tasks by saying something like 'add a new task to go to the gym'\n" +
    "* List your existing tasks by saying something like 'what do I have to do?'\n" +
    "* Finish an existing task by saying something like 'remove go to the gym'",
    canceled: 'Sure... No problem.',
    saveTaskCreated: "Created a new task called '%(task)s'",
    saveTaskMissing: 'What would you like to name the task?',
    listTaskList: 'Tasks\n%s',
    listTaskItem: '%(index)d. %(task)s\n',
    listNoTasks: 'You have no tasks.',
    finishTaskMissing: "Which task would you like to delete?",
    finishTaskDone: "Removed '%(task)s' from your task list."
}


text:
#ifndef AGILLA_LOCATION_DIRECTORY_H_INCLUDED
#define AGILLA_LOCATION_DIRECTORY_H_INCLUDED

#include "Agilla.h"
#include "TOSTime.h"

#define NO_CH 0xff

enum {
  MAX_AGENT_NUM   = 2,
  MAX_AGENT_ARRAY_NUM = 10,
} AgillaLocDirConstants;

enum {
  AM_AGILLALOCMSG                       = 0x42,
  AM_AGILLAQUERYNUMAGENTSMSG            = 0x43,
  AM_AGILLAQUERYAGENTLOCMSG             = 0x44,
  AM_AGILLAQUERYNEARESTAGENTMSG         = 0x45,
  AM_AGILLAQUERYALLAGENTSMSG            = 0x46,
  AM_AGILLAQUERYREPLYNUMAGENTSMSG       = 0x47,
  AM_AGILLAQUERYREPLYAGENTLOCMSG        = 0x48,
  AM_AGILLAQUERYREPLYNEARESTAGENTMSG    = 0x49,
  AM_AGILLAQUERYREPLYALLAGENTSMSG       = 0x4a,
};

/**
 * These flags are used in the "flag" field of the query
 * messages.
 */
enum {
  LOCAL = 0x00,
  GLOBAL  = 0x01,
} QueryFlags;

/**
 * These flags are used in the "flag" field of the query
 * reply message.
 */
enum {
  INVALID = 0x01,
  VALID   = 0x02,   // Does the message contain results?
  COARSE  = 0x04,   // Is it from the BS or from the CH?
} QueryReplyFlags;

typedef struct AgillaLocMAgentInfo {
  AgillaAgentID agent_id;   // 2 bytes: id of agent
  AgillaLocation loc;       // 4 bytes: location of agent
} AgillaLocMAgentInfo;      // 6 bytes

/**
 *
 * This message is used by the location directory service to
 * update the Base Station about an agent location.
 *
 */

typedef struct AgillaLocMsg {
  AgillaAgentID agent_id;       //  2 bytes: id of agent detected
  uint16_t agent_type;          //  2 bytes: type of agent
  uint16_t src;                 //  2 bytes: src id of host that detected the agent
  AgillaLocation loc;           //  4 bytes: location of agent
  tos_time_t timestamp;         //  2 bytes: time at which agent was detected
  uint16_t dest;                //  2 bytes: destination id (BS id)
  uint16_t seq;                 //  2 bytes: sequence number of message
} AgillaLocMsg;                 // 18 bytes

/**
 *
 * This message is used to query the total number of agents of type "type" in the system
 *
 */

typedef struct AgillaQueryNumAgentsMsg {
  AgillaAgentID agent_id;       // 2 bytes: id of agent issuing query
  uint16_t src;                 // 2 bytes: src id of host that contains the agent
  uint16_t dest;                // 2 bytes: id of node to which query needs to be routed
  uint16_t qid;                 // 2 bytes: query id
  uint16_t flags;               // 2 bytes: bit 0 represents if the query should be reolved only in the current
                                //          sensor netowrk or throughout the system (across sensor networks)
                                //          if bit 0 is 1 then the query should be sent to all networks
  uint16_t agent_type;          // 2 bytes: type of agent being queried
} AgillaQueryNumAgentsMsg;      // 12 bytes

/**
 *
 * This message is used to query the location of a particular agent in the system
 *
 */
typedef struct AgillaQueryAgentLocMsg {
  AgillaAgentID agent_id;       // 2 bytes: id of agent issuing query
  uint16_t src;                 // 2 bytes: src id of host that contains the agent
  uint16_t dest;                // 2 bytes: id of node to which query needs to be routed
  uint16_t qid;                 // 2 bytes: query id
  uint16_t flags;               // 2 bytes: bit 0 represents if the query should be resolved only in the current
                                //          sensor network or throughout the system (across sensor networks)
                                //          if bit 0 is 1 then the query should be sent to all networks
  AgillaAgentID find_agent_id;  // 2 bytes: id of agent whose location is requested
} AgillaQueryAgentLocMsg;       // 12 bytes

/**
 *
 * This message is used to query the location and id of an agent of type "type" that is physically
 * closest to the querying agent
 *
 */
typedef struct AgillaQueryNearestAgentMsg {
  AgillaAgentID agent_id;       // 2 bytes: id of agent issuing query
  uint16_t src;                 // 2 bytes: src id of host that contains the agent
  uint16_t dest;                // 2 bytes: id of node to which query needs to be routed
  uint16_t qid;                 // 2 bytes: query id
  uint16_t flags;               // 2 bytes: bit 0 represents if the query should be reolved only in the current
                                //          sensor netowrk or throughout the system (across sensor networks)
                                //          if bit 0 is 1 then the query should be sent to all networks
  AgillaLocation loc;           // 4 bytes: location of agent issuing query
  uint16_t agent_type;          // 2 bytes: type of agent being queried
} AgillaQueryNearestAgentMsg;   // 16 bytes

/**
 *
 * This message is used to query the location and ids of all agents of type "type" in the system
 *
 */

typedef struct AgillaQueryAllAgentsMsg {
  AgillaAgentID agent_id;       // 2 bytes: id of agent issuing query
  uint16_t src;                 // 2 bytes: src id of host that contains the agent
  uint16_t dest;                // 2 bytes: id of node to which query needs to be routed
  uint16_t qid;                 // 2 bytes: query id
  uint16_t flags;               // 2 bytes: bit 0 represents if the query should be reolved only in the current
                                //          sensor netowrk or throughout the system (across sensor networks)
                                //          if bit 0 is 1 then the query should be sent to all networks
  uint16_t agent_type;          // 2 bytes: type of agent being queried
} AgillaQueryAllAgentsMsg;      // 12 bytes

/**
 *
 * This message contains the reply to a query asking for the number of agents in the system
 *
 */
typedef struct AgillaQueryReplyNumAgentsMsg {
  AgillaAgentID agent_id;       // 2 bytes: id of agent issuing query
  uint16_t dest;                // 2 bytes: id of node to which query result should to be routed
  uint16_t qid;                 // 2 bytes: query id
  uint16_t flags;               // 2 bytes: bit 0 = coarse
  int16_t num_agents;           // 2 bytes: number of agents
} AgillaQueryReplyNumAgentsMsg; // 8 bytes

/**
 *
 * This message contains the reply to a query asking for the location of a particular agent in the system
 *
 */
typedef struct AgillaQueryReplyAgentLocMsg {
  AgillaAgentID agent_id;       // 2 bytes: id of agent issuing query
  uint16_t dest;                // 2 bytes: id of node to which query result should to be routed
  uint16_t qid;                 // 2 bytes: query id
  uint16_t flags;               // 2 bytes: bit 0 = coarse
  AgillaLocation loc;           // 4 bytes: location of agent that was requested by the query
  AgillaString nw_desc;         // 2 bytes: network description; unique for each sensor network
} AgillaQueryReplyAgentLocMsg;  // 14 bytes

/**
 *
 * This message contains the reply to a query asking for the nearest agent (to the querying agent)
 * of a particular type in the system.
 *
 */
typedef struct AgillaQueryReplyNearestAgentMsg {
  AgillaAgentID agent_id;           // 2 bytes: id of agent issuing query
  uint16_t src;                     // 2 bytes: id of node sending the reply
  uint16_t dest;                    // 2 bytes: id of node to which query result should to be routed
  uint16_t qid;                     // 2 bytes: query id
  uint16_t flags;                   // 2 bytes: bit 0 = coarse
  AgillaAgentID nearest_agent_id;   // 2 bytes: id of nearest agent
  AgillaLocation nearest_agent_loc; // 4 bytes: location of nearest agent
} AgillaQueryReplyNearestAgentMsg;  // 16 bytes

/**
 *
 * This message contains the reply to a query asking for the locations and ids of all agents
 * of a particular type in the system.
 *
 */
typedef struct AgillaQueryReplyAllAgentsMsg {
  AgillaAgentID agent_id;                           // 2 bytes: id of agent issuing query
  uint16_t src;                                     // 2 bytes: id of node sending the reply
  uint16_t dest;                                    // 2 bytes: id of node to which query result should to be routed
  uint16_t qid;                                     // 2 bytes: query id
  uint16_t num_agents;                              // 2 bytes: number of agents
  uint16_t flags;                                   // 2 bytes: bit 0 = coarse
  AgillaLocMAgentInfo agent_info[MAX_AGENT_NUM];    // 12 bytes: agent info (id, loc) 6 bytes each
} AgillaQueryReplyAllAgentsMsg;                     // 24 bytes

#endif


text:
namespace certificate_reporting_test_utils {

// This is a test implementation of the interface that blocking pages use to
// send certificate reports. It checks that the blocking page calls or does not
// call the report method when a report should or should not be sent,
// respectively.
class MockSSLCertReporter : public SSLCertReporter {
 public:
  MockSSLCertReporter(
      const base::Callback<void(const std::string&)>& report_sent_callback,
      ExpectReport expect_report)
      : report_sent_callback_(report_sent_callback),
        expect_report_(expect_report),
        reported_(false) {}

  ~MockSSLCertReporter() override {
    if (expect_report_ == CERT_REPORT_EXPECTED) {
      EXPECT_TRUE(reported_);
    } else {
      EXPECT_FALSE(reported_);
    }
  }

  // SSLCertReporter implementation.
  void ReportInvalidCertificateChain(
      const std::string& serialized_report) override {
    reported_ = true;
    certificate_reporting::ErrorReport report;
    EXPECT_TRUE(report.InitializeFromString(serialized_report));
    report_sent_callback_.Run(report.hostname());
  }

 private:
  const base::Callback<void(const std::string&)> report_sent_callback_;
  const ExpectReport expect_report_;
  bool reported_;

  DISALLOW_COPY_AND_ASSIGN(MockSSLCertReporter);
};

SSLCertReporterCallback::SSLCertReporterCallback(base::RunLoop* run_loop)
    : run_loop_(run_loop) {}

SSLCertReporterCallback::~SSLCertReporterCallback() {}

void SSLCertReporterCallback::ReportSent(const std::string& hostname) {
  latest_hostname_reported_ = hostname;
  run_loop_->Quit();
}

const std::string& SSLCertReporterCallback::GetLatestHostnameReported() const {
  return latest_hostname_reported_;
}

void SetCertReportingOptIn(Browser* browser, OptIn opt_in) {
  safe_browsing::SetExtendedReportingPref(browser->profile()->GetPrefs(),
                                          opt_in == EXTENDED_REPORTING_OPT_IN);
}

std::unique_ptr<SSLCertReporter> CreateMockSSLCertReporter(
    const base::Callback<void(const std::string&)>& report_sent_callback,
    ExpectReport expect_report) {
  return std::unique_ptr<SSLCertReporter>(
      new MockSSLCertReporter(report_sent_callback, expect_report));
}

ExpectReport GetReportExpectedFromFinch() {
  const std::string group_name = base::FieldTrialList::FindFullName(
      CertReportHelper::kFinchExperimentName);

  if (group_name == CertReportHelper::kFinchGroupShowPossiblySend) {
    const std::string param = variations::GetVariationParamValue(
        CertReportHelper::kFinchExperimentName,
        CertReportHelper::kFinchParamName);
    double sendingThreshold;
    if (!base::StringToDouble(param, &sendingThreshold))
      return CERT_REPORT_NOT_EXPECTED;

    if (sendingThreshold == 1.0)
      return certificate_reporting_test_utils::CERT_REPORT_EXPECTED;
  }
  return certificate_reporting_test_utils::CERT_REPORT_NOT_EXPECTED;
}

}  // namespace certificate_reporting_test_utils


text:
"""
A port of Infobot's nickometer command from Perl. This plugin
provides one command (called nickometer) which will tell you how 'lame'
an IRC nick is. It's an elitist hacker thing, but quite fun.
"""

import supybot
import supybot.world as world

# Use this for the version of this plugin.  You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system.
__version__ = ""

# XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.authors.baggins

# This is a dictionary mapping supybot.Author instances to lists of
# contributions.
__contributors__ = {}

import config
import plugin
reload(plugin) # In case we're being reloaded.
# Add more reloads here if you add third-party modules and want them to be
# reloaded when this plugin is reloaded.  Don't forget to import them as well!

if world.testing:
    import test

Class = plugin.Class
configure = config.configure

# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:


text:
package rmi;

import java.util.Date;

// BEGIN main
/** A statement of what the client & server must agree upon. */
public interface RemoteDate extends java.rmi.Remote {

    /** The method used to get the current date on the remote */
    public Date getRemoteDate() throws java.rmi.RemoteException;

    /** The name used in the RMI registry service. */
    public final static String LOOKUPNAME = "RemoteDate";
}
// END main


text:
require "json"
require "uri"
require "cgi"
require "net/https"
require "etc"

module ServiceNow
	class Simple
		attr_accessor :_success
		attr_accessor :_output
		attr_accessor :_errors
		attr_accessor :_debug
		attr_accessor :_urls
		attr_accessor :_filters
		attr_accessor :_orderby
		attr_accessor :_content
		attr_accessor :env
		attr_accessor :username
		attr_accessor :password
		attr_accessor :proxy
		attr_accessor :base_url

		def initialize(opts)
			self._urls = Array.new
			self._errors = Array.new

			envs = {
				"dev1" => { "base" => "https://foodev01.service-now.com/api/now/v1/table" },
				"dev2" => { "base" => "https://foodev02.service-now.com/api/now/v1/table" },
				"prod" => { "base" => "https://foo.service-now.com/api/now/v1/table" }
			}

			if (opts["env"])
				if (envs[ opts["env"] ])
					self.env = opts["env"]
					self.base_url = envs[opts["env"]]["base"]
				else
					self._error_exit(sprintf("%s is not a valid environment. valid environments are: %s", opts["env"], envs.keys.join(", ")))
				end
			else
				self.env = "dev"
			end

			if (opts["username"] && opts["password"])
				self.username = opts["username"]
				self.password = opts["password"]
			else
				self._error_exit("you must specify username and password in the constructor.")
			end

			#if (opts["record_limit"])
			#	if (opts["record_limit"].is_a?(Integer))
			#		$default_qs.push(sprintf("sysparm_record_count=%s", opts["record_limit"]))
			#	else
			#		self._warn_text("the record_limit option must be an integer - ignoring.")
			#	end
			#end

			if (opts["proxy"])
				if (opts["proxy"] =~ /^http:\/\/.+:[0-9]+/)
					self.proxy = opts["proxy"]
				end
			end

			$config = self.configure
		end

		def debug(flag)
			return unless flag
			if (flag == "on")
				flag = "on"
			else
				flag = "off"
			end
			self._debug = flag
		end

		def dump_config
			pp $config || nil
		end

		def success
			return self._success || nil
		end

		def orderby
			# nothing yet
		end

		def count
			return self.output.length || -1
		end

		def last_url
			return self._urls[ self._urls.length - 1] || nil
		end

		def output
			return self._output
		end

		def clear_output
			self._output = nil
		end

		def errors
			return self._errors.join("; ") || nil
		end

		def _debug_text(text)
			return unless self._debug == "on"
			puts("[Debug] #{text}")
		end

		def _error_exit(text)
			puts("[Error] #{text}")
			exit
		end

		def _warn_text(text)
			puts("[Warn] #{text}")
		end

		# Begin get functions
		def incident_get(*args)
			self._generic_get("incident", "number", args[0], nil) if self._validate_get_args(args)["status"] == "success"
		end

		def incident_task_get(*args)
			self._generic_get("u_incident_task", "number", args[0], nil) if self._validate_get_args(args)["status"] == "success"
		end

		def major_incident_get(*args)
			filter = ServiceNow::Filter.new
			filter.add("u_major_incident", "=", "true")
			filter.add("number", "=", args[0])
			#self._generic_find("incident", "number", args[0], content) if self._validate_get_args(args)["status"] == "success"
			self._generic_find("incident", filter)
		end

		def sc_request_get(*args)
			self._generic_get("sc_request", "number", args[0], nil) if self._validate_get_args(args)["status"] == "success"
		end

		def sc_req_item_get(*args)
			self._generic_get("sc_req_item", "number", args[0], nil) if self._validate_get_args(args)["status"] == "success"
		end

		def sc_task_get(*args)
			self._generic_get("sc_task", "number", args[0], nil) if self._validate_get_args(args)["status"] == "success"
		end

		def netgear_get(*args)
			content = {
				"sysparm_action" => "getRecords",
				"sysparm_query" => sprintf(
					"sys_class_name=cmdb_ci_netgear^name=%s",
					name
				)
			}
			self._generic_get("cmdb_ci", "name", args[0], content) if self._validate_get_args(args)["status"] == "success"
		end

		def problem_get(*args)
			self._generic_get("problem", "number", args[0], nil) if self._validate_get_args(args)["status"] == "success"
		end

		def change_request_get(*args)
			self._generic_get("change_request", "number", args[0], nil) if self._validate_get_args(args)["status"] == "success"
		end

		def change_task_get(*args)
			self._generic_get("change_task", "number", args[0], nil) if self._validate_get_args(args)["status"] == "success"
		end

		def group_get(*args)
			self._generic_get("sys_user_group", "name", args[0], nil) if self._validate_get_args(args)["status"] == "success"
		end

		def user_get(*args)
			name = args[0]
			parts = name.split(/\s+/)
			field = parts.length > 1 ? "name" : "user_name"
			self._generic_get("sys_user", field, name, nil) if self._validate_get_args(args)["status"] == "success"
		end
		# End get functions

		# Begin find functions
		def incident_find
			self._generic_find("incident")
		end

		def incident_task_find
			self._generic_find("u_incident_task")
		end

		def major_incident_find
			self._filters.add("u_major_incident", "=", "true")
			self._generic_find("incident")
		end

		def netgear_find
			self._filters.add("sys_class_name", "=", "cmdb_ci_netgear")
			self._generic_find("cmdb_ci")
		end

		def problem_find
			self._generic_find("problem")
		end

		def sc_request_find
			self._generic_find("sc_request")
		end

		def sc_req_item_find
			self._generic_find("sc_req_item")
		end

		def sc_task_find
			self._generic_find("sc_task")
		end

		def change_request_find
			self._generic_find("change_request")
		end

		def change_task_find
			self._generic_find("change_task")
		end

		def group_find
			self._generic_find("sys_user_group")
		end

		#def user_find( filter=nil )
		#	#self._generic_find("sys_user_list", filter)
		#	self._generic_find("sys_user")
		#end

		def user_find
			self._generic_find("sys_user")
		end

		def label_entry_find
			self._generic_find("label_entry")
		end

		def application_find
			self._generic_find("cmdb_ci_appl")
		end
		# End find functions

		# Begin create functions
		def incident_create(*args)
			if (self._validate_create_args(args)["status"] == "success")
				content = args[0].clone
				content["assigned_to"] = Etc.getlogin unless (content["assigned_to"])
				content["u_client"] = Etc.getlogin unless (content["u_client"])
				self._generic_create("incident", content)
			end
		end

		def major_incident_create(*args)
			if (self._validate_create_args(args)["status"] == "success")
				content = args[0].clone
				content["u_major_incident"] = "true"
				self._generic_create("incident", content)
			end
		end

		def sc_request_create(*args)
			self._generic_create("sc_request", args[0]) if self._validate_create_args(args)["status"] == "success"
		end

		def sc_req_item_create(*args)
			self._generic_create("sc_req_item", args[0]) if self._validate_create_args(args)["status"] == "success"
		end

		def sc_task_create(*args)
			self._generic_create("sc_task", args[0]) if self._validate_create_args(args)["status"] == "success"
		end

		def problem_create(*args)
			self._generic_create("problem", args[0]) if self._validate_create_args(args)["status"] == "success"
		end

		def change_request_create(*args)
			self._generic_create("change_request", args[0]) if self._validate_create_args(args)["status"] == "success"
		end

		def change_task_create(*args)
			self._generic_create("change_task", args[0]) if self._validate_create_args(args)["status"] == "success"
		end
		# End create functions

		# Begin update functions
		def incident_update(*args)
			self._generic_update("incident", args[0], args[1]) if self._validate_update_args(args)["status"] == "success"
		end

		def major_incident_update(*args)
			self.generic_update("incident", args[0], args[1]) if self._validate_update_args(args)["status"] == "success"
		end

		def problem_update(*args)
			self._generic_update("problem", args[0], args[1]) if self._validate_update_args(args)["status"] == "success"
		end

		def sc_request_update(*args)
			self._generic_update("sc_request", args[0], args[1]) if self._validate_update_args(args)["status"] == "success"
		end

		def sc_req_item_update(*args)
			self._generic_update("sc_req_item", args[0], args[1]) if self._validate_update_args(args)["status"] == "success"
		end

		def sc_task_update(*args)
			self._generic_update("sc_task", args[0], args[1]) if self._validate_update_args(args)["status"] == "success"
		end

		def change_request_update(*args)
			self._generic_update("change_request", args[0], args[1]) if self._validate_update_args(args)["status"] == "success"
		end

		def change_task_update(*args)
			self._generic_update("change_task", args[0], args[1]) if self._validate_update_args(args)["status"] == "success"
		end
		# End update functions

		# Begin delete functions
		def incident_delete(*args)
			self._generic_delete("incident", args[0])
		end

		def major_incident_delete(*args)
			self._generic_delete("incident", args[0])
		end

		def problem_delete(*args)
			self._generic_delete("problem", args[0])
		end

        def sc_request_delete(*args)
            self._generic_delete("sc_request", args[0])
        end

        def sc_req_item_delete(*args)
            self._generic_delete("sc_req_item", args[0])
        end

        def sc_task_delete(*args)
            self._generic_delete("sc_task", args[0])
        end

        def change_request_delete(*args)
            self._generic_delete("change_request", args[0])
        end

        def change_task_delete(*args)
            self._generic_delete("change_task", args[0])
        end
		# End delete functions

		# Begin convenience functions
		#def user_incidents(name)
		#	method = caller[0][/`.*'/][1..-2]
		#	uri = "incident_list.do"
		#	content = {
		#		"sysparm_action" => "getRecords",
		#		"sysparm_query" => sprintf(
		#			"assigned_to.nameLIKE%s^sys_class_name=incident",
		#			name
		#		)
		#	}
		#	self._servicenow_request(method, uri, content, $default_qs)
		#end

		#def user_tasks(name)
		#	method = caller[0][/`.*'/][1..-2]
		#	uri = "sc_task_list.do"
		#	content = {
		#		"sysparm_action" => "getRecords",
		#		"sysparm_query" => sprintf(
		#			"assigned_to.name=%s",
		#			name
		#		)
		#	}
		#	self._servicenow_request(method, uri, content, $default_qs)
		#end

		#def user_direct_reports(name)
		#	method = caller[0][/`.*'/][1..-2]
		#	uri = "sys_user_list.do"
		#	content = {
		#		"sysparm_action" => "getRecords",
		#		"sysparm_query" => sprintf(
		#			"manager.nameIN%s^active=true",
		#			name
		#		)
		#	}
		#	self._servicenow_request(method, uri, content, $default_qs)
		#end

		#def user_assets(name)
		#	method = caller[0][/`.*'/][1..-2]
		#	uri = "alm_hardware_list.do";
		#	content = {
		#		"sysparm_action" => "getRecords",
		#		"sysparm_query" => sprintf(
		#			"assigned_to.nameLIKE%s",
		#			name
		#		)
		#	}
		#	self._servicenow_request(method, uri, content, $default_qs)
		#end
		# End convenience functions

		# Begin CI functions
		def ci_get
			method = __method__.to_s
			self._generic_get("cmdb_ci", "name", args[0], nil) if self._validate_get_args(args)["status"] == "success"
		end

		def ci_find
			method = __method__.to_s
			self._generic_find("cmdb_ci")
		end

		def colo_get(*args)
			method = __method__.to_s
			self._generic_get("cmdb_ci", "name", args[0], nil) if self._validate_get_args(args)["status"] == "success"
		end

		def colo_find
			method = __method__.to_s
			self._filters.add("sys_class_name", "=", "cmdb_ci_datacenter")
			self._generic_find("cmdb_ci")
		end

		def host_get(*args)
			method = __method__.to_s
			self._generic_get("cmdb_ci", "name", args[0], nil) if self._validate_get_args(args)["status"] == "success"
		end

		def host_find
			method = __method__.to_s
			self._filters.add("sys_class_name", "IN", "cmdb_ci_server,cmdb_ci_vm")
			self._generic_find("cmdb_ci")
		end
		# End CI functions

		def _validate_get_args(args)
			out = Hash.new
			method = caller[0][/`.*'/][1..-2]
			required_count = 1
			if (args.length != required_count)
				self._success = nil
				self._errors.push(sprintf("incorrect number of arguments. %s requires %s arguments.", method, required_count))
				out = { "status" => "failed" }
			else
				if (args[0].is_a?(String))
					out = { "status" => "success" }
				else
					self._success = nil
					self._errors.push(sprintf("argument 1 to %s must be a string", method))
					out = { "status" => "failed" }
				end
			end
			return out
		end

		def _validate_create_args(args)
			out = Hash.new
			method = caller[0][/`.*'/][1..-2]
			required_count = 1
			if (args.length != required_count)
				self._success = nil
				self._errors.push(sprintf("incorrect number of arguments. %s requires %s arguments.", method, required_count))
				out = { "status" => "failed" }
			else
				if (args[0].is_a?(Hash))
					out = { "status" => "success" }
				else
					self._success = nil
					self._errors.push(sprintf("argument 1 to %s must be a hash", method))
					out = { "status" => "failed" }
				end
			end
			return out
		end

		def _validate_update_args(args)
			out = Hash.new
			method = caller[0][/`.*'/][1..-2]
			required_count = 2
			if (args.length != required_count)
				self._success = nil
				self._errors.push(sprintf("incorrect number of arguments. %s requires %s argument.", method, required_count))
			else
				if (args[0].is_a?(String))
					self._success = 1
				else
					self._success = nil
					self._errors.push(sprintf("argument 1 to %s must be a string", method))
				end

				if (args[1].is_a?(Hash))
					self._success = 1 if self._success == 1
				else
					self._success = nil
					self._errors.push(sprintf("argument 2 to %s must be a hash", method))
				end
			end
			status = self._success == 1 ? "success" : "failed"
			return { "status" => status }
		end

		def _validate_json(string)
			hashref = JSON.parse(string)
			return hashref
		rescue JSON::ParserError
			return nil
		end

		def filters(obj)
			if (obj.is_a?(ServiceNow::Filter))
				self._filters = obj
			else
				self._error_exit("when using the filters method, filter object must be of type ServiceNow::Filter. cannot continue.")
			end
		end

		def _process_filters(method, filters=nil)
			base_table = method.clone
			base_table.sub! "_find", ""
			out = nil

			filters = filters ||= @_filters

			if(!filters.is_a?(ServiceNow::Filter))
				raise Exception.new( "Invalid filter" )
			end

			value, new_filters, filters_str = Array.new, Array.new, nil
			filters._data.each do |filter|
				filter["op"] = filter["op"].upcase
				new_filters.push( "%s%s%s" % [
					defined?($config[base_table]["fields"][var]["target"]) ? $config[base_table]["fields"][var]["target"] : filter["var"],
					filter["op"],
					defined?($config[base_table]["fields"][var]["valid"][value]) ? $config[base_table]["fields"][var]["valid"][value] : filter["value"]
				])
			end

			if (new_filters.length > 0)
				filters_str = new_filters.join("^")
			end
			out = filters_str if filters_str
			return out.gsub("&", "%26")
		end

		def _generic_sys_id(table, value)
			output = nil
			method = "get_sys_id"
			filter = ServiceNow::Filter.new
			filter.add("number", "=", value)
			filters = self._process_filters(method, filter)
			qs = {
				"sysparm_fields" => "sys_id",
				"sysparm_query" => filters
			}
			self._output =  nil
			self._servicenow_request("get", method, table, nil, qs)
			if (self.success)
				output = self.output[0]["sys_id"] || nil
				self._output = nil
			end
			return output
		end

		def _generic_get(table, field, value, passed_content)
			method = caller[0][/`.*'/][1..-2]
			filter = ServiceNow::Filter.new
			filter.add(field, "=", value)
			filters = self._process_filters(method, filter)
			qs = {
				"sysparm_display_value" => "true",
				"sysparm_query" => filters
			}
			self._output =  nil
			self._servicenow_request("get", method, table, nil, qs)
		end

		def _generic_find(table, filters=nil)
			method = caller[0][/`.*'/][1..-2]
			filter_obj = nil

			if (filters)
				filter_obj = filters
			elsif (self._filters)
				filter_obj = self._filters
			end

			if (filter_obj)
				filters = self._process_filters(method, filters)
				qs = {
					"sysparm_display_value" => "true",
					"sysparm_query" => filters
				}
				self._output =  nil
				self._servicenow_request("get", method, table, nil, qs)
			else
				self._success = nil
				self._errors.push(sprintf("the %s method requires a filter object.", method))
			end
		end

		def _generic_create(table, content)
			method = caller[0][/`.*'/][1..-2]
			if (content)
				self._validate_content(table, content)
				if (self._content["status"] == "ok")
					qs = {
						"sysparm_display_value" => "true"
					}
					self._output =  nil
					self._servicenow_request("post", method, table, content, qs)
				else
					self._success = nil
					self._errors.push(sprintf("method %s failed: %s", method, self._content["messages"]))
				end
			else
				self._success = nil
				self._errors.push(sprintf("when using the method %s, you must supply the create content in a hash.", method))
			end
		end

		def _generic_update(table, value, content)
			method = caller[0][/`.*'/][1..-2]
			sys_id = self._generic_sys_id(table, value)
			if (sys_id && content)
				self._validate_content(table, content)
				if (self._content["status"] == "ok")
					qs = {
						"sysparm_display_value" => "true"
					}
					self._output =  nil
					self._servicenow_request("put", method, table, content, qs, sys_id)
				else
					self._success = nil
					self._errors.push(sprintf("method %s failed: %s", method, self._content["messages"]))
				end
			else
				self._success = nil
				self._errors.push(sprintf("when using the method %s, you must supply the update content in a hash.", method))
			end
		end

		def _generic_delete(table, value)
			method = caller[0][/`.*'/][1..-2]
			sys_id = self._generic_sys_id(table, value)
			if (sys_id)
				self._output =  nil
				self._servicenow_request("delete", method, table, nil, nil, sys_id)
			else
				self._success = nil
				self._errors.push(sprintf("could not find %s", value))
			end
		end

		def _validate_content(type, content)
			errors = Array.new
			self._content = Hash.new

			if (content.is_a?(Hash))
				# Validate supplied fields
				content.each do |key, value|
					if ($config[type]["fields"][key] && $config[type]["fields"][key]["valid"])
						values = $config[type]["fields"][key]["valid"].keys
						if values.include?(value)
							content[key] = $config[type]["fields"][key]["valid"][value]
						else
							errors.push(sprintf(
								"invalid option for %s. valid options for %s are: %s",
								key,
								key,
								$config[type]["fields"][key]["valid"].keys.join(", ")
							))
						end
					end
				end

				# Validate required fields
				if ($config[type]["required"])
					$config[type]["required"].each_key do |required|
						errors.push(sprintf("%s is a required field", required)) unless content[required]
					end
				end

				if (errors.length == 0)
					self._content = { "status" => "ok", "content" => content }
				else
					self._content = { "status" => "error", "messages" => errors.join("; ") }
				end
			else
				self._content = { "status" => "error", "messages" => "the content must be a hash." }
			end
		end

		def _servicenow_request(*args)
			http_method = args[0]
			method = args[1]
			uri = args[2]
			content = args[3] || nil
			query_string = args[4] || nil
			sys_id = args[5] || nil

			record_count = 0
			self._debug_text(sprintf("executing method: %s", method))
			errors, message = Array.new, Array.new
			payload = content ? content.to_json : nil

			url = sprintf("%s/%s", self.base_url, uri)
			url += sprintf("/%s", sys_id) if sys_id
			url += sprintf("?%s", query_string.keys.map {|x| "#{x}=#{query_string[x]}"}.join("&")) if query_string

			self._urls.push(url)
			self._debug_text("fetching #{url}")
			self._debug_text("JSON payload: #{payload}") if payload

			if (http_method == "get")
				uri = URI(URI.escape(url))
				http = Net::HTTP.new(uri.host, uri.port)
				http.use_ssl = true
				http.verify_mode = ::OpenSSL::SSL::VERIFY_NONE
				http.read_timeout = 10
				req = Net::HTTP::Get.new(uri.request_uri)
				req.basic_auth self.username, self.password
				req["Accept"] = "application/json"

			elsif (http_method == "post")
				payload = content.to_json
				uri = URI(URI.escape(url))
				http = Net::HTTP.new(uri.host, uri.port)
				http.use_ssl = true
				http.verify_mode = ::OpenSSL::SSL::VERIFY_NONE
				http.read_timeout = 10
				req = Net::HTTP::Post.new(uri.request_uri)
				req.basic_auth self.username, self.password
				req["Accept"] = "application/json"
				req["Content-Type"] = "application/json"
				req.body = payload

			elsif (http_method == "put")
				payload = content.to_json
				uri = URI(URI.escape(url))
				http = Net::HTTP.new(uri.host, uri.port)
				http.use_ssl = true
				http.verify_mode = ::OpenSSL::SSL::VERIFY_NONE
				http.read_timeout = 10
				req = Net::HTTP::Put.new(uri.request_uri)
				req.basic_auth self.username, self.password
				req["Accept"] = "application/json"
				req["Content-Type"] = "application/json"
				req.body = payload

			elsif (http_method == "delete")
				payload = content.to_json
				uri = URI(URI.escape(url))
				http = Net::HTTP.new(uri.host, uri.port)
				http.use_ssl = true
				http.verify_mode = ::OpenSSL::SSL::VERIFY_NONE
				http.read_timeout = 10
				req = Net::HTTP::Delete.new(uri.request_uri)
				req.basic_auth self.username, self.password
				req["Accept"] = "application/json"
				req["Content-Type"] = "application/json"
			end

			res = http.request(req)

			if (res.code =~ /^2\d\d$/)
				items = Array.new
				hashref = self._validate_json(res.body)
				if (hashref)
					if (hashref["error"])
						self._success = nil
						self._errors.push(sprintf("servicenow returned an error: %s", hashref["error"]))
					else
						if (hashref["result"].is_a?(Hash))
							items.push(hashref["result"])
						elsif (hashref["result"].is_a?(Array))
							hashref["result"].each do |item|
								items.push(item)
							end
						end

						if (items)
							self._success = 1
							if (items.length > 0)
								records = Array.new
								items.each do |record|
									if (record["__error"])
										errors.push(record["__error"]["message"].downcase)
									else
										sorted = Hash.new
										# temporary hack
										record["cmdb_ci"] = record["cmdb_ci"]["display_value"] if record["cmdb_ci"]

										Hash[record].sort.each do |k,v|
											sorted[k] = v
										end
										records.push(sorted)
									end
								end

								if (errors.length > 0)
									self._success = nil
									self._output = records
									self._errors.push(sprintf("method %s failed: %s", method, errors.join("; ")))
								else
									self._success = 1
									self._output = records
								end
							else
								self._output = Array.new
							end
						else
							self._success = 1
							self._errors.push(sprintf("method %s failed: no records found.", method))
						end
					end
				else
					self._success = 1
					self._errors.push(sprintf("method %s failed: invalid json received.", method))
				end
			else
				self._success = nil
				self._errors.push(sprintf("non-200 (%s) code received from servicenow: %s", res.code, res.message.downcase))
			end
		end

		def configure
			config = {
				"incident" => {
					"fields" => {
						"impact" => {
							"valid" => {
								"high" => "1",
								"medium" => "2",
								"low" => "3"
							}
						},
						"urgency" => {
							"valid" => {
								"high" => "1",
								"medium" => "2",
								"low" => "3"
							}
						},
						"priority" => {
							"valid" => {
								"critical" => "1",
								"high" => "2",
								"moderate" => "3",
								"low" => "4",
								"planning" => "5"
							}
						},
						"state" => {
							"valid" => {
								"open" => "1",
								"assigned" => "-1",
								"in progress" => "2",
								"pending" => "-5",
								"resolved" => "6",
								"closed" => "7",
								"cancelled" => "8"
							}
						},
						"contact_type" => {
							"valid" => {
								"email" => "email",
								"phone" => "phone",
								"self-service" => "self-service",
								"walk-in" => "walk-in",
								"monitoring" => "Monitoring"
							}
						}
					}
				},
				"major_incident" => {
					"fields" => {
						"impact" => {
							"valid" => {
								"high" => "1",
								"medium" => "2",
								"low" => "3"
							}
						},
						"urgency" => {
							"valid" => {
								"high" => "1",
								"medium" => "2",
								"low" => "3"
							}
						},
						"priority" => {
							"valid" => {
								"critical" => "1",
								"high" => "2",
								"moderate" => "3",
								"low" => "4",
								"planning" => "5"
							}
						},
						"state" => {
							"valid" => {
								"open" => "1",
								"assigned" => "-1",
								"in progress" => "2",
								"pending" => "-5",
								"resolved" => "6",
								"closed" => "7",
								"cancelled" => "8"
							}
						},
						"contact_type" => {
							"valid" => {
								"email" => "email",
								"phone" => "phone",
								"self-service" => "self-service",
								"walk-in" => "walk-in",
								"monitoring" => "Monitoring"
							}
						}
					}
				},
				"incident_task" => {
					"fields" => {
						"priority" => {
							"valid" => {
								"critical" => "1",
								"high" => "2",
								"moderate" => "3",
								"low" => "4",
								"planning" => "5"
							}
						},
						"state" => {
							"valid" => {
								"pending" => "-5",
								"open" => "1",
								"work in progress" => "2",
								"closed" => "3",
								"closed complete" => "3",
								"cancelled" => "8"
							}
						},
						"parent" => {
							"target" => "u_ud_parent.number",
							"valid" => {
							}
						}
					}
				},
				"problem" => {
					"fields" => {
						"priority" => {
							"valid" => {
								"critical" => "1",
								"high" => "2",
								"moderate" => "3",
								"low" => "4",
								"planning" => "5"
							}
						},
						"state" => {
							"valid" => {
								"open" => "1",
								"post mortem complete" => "10",
								"in progress" => "11",
								"on hold" => "12",
								"closed" => "4"
							}
						},
						"type" => {
							"target" => "u_sub_type",
							"valid" => {
								"proactive" => "Proactive",
								"reactive" => "Reactive"
							}
						}
					}
				},
				"change_request" => {
					"fields" => {
						"category" => {
							"valid" => {
								"application" => "Application",
								"database" => "Database",
								"facilities" => "Facilities",
								"hardware" => "Hardware",
								"network" => "Network",
								"server" => "Server",
								"storage" => "Storage",
								"telecom" => "Telecom"
							}
						},
						"risk" => {
							"valid" => {
								"high" => "1",
								"medium" => "2",
								"low" => "3",
							}
						},
						"approval" => {
							"valid" => {
								"not yet requested" => "not requested",
								"requested" => "requested",
								"approved" => "approved",
								"rejected" => "rejected"
							}
						},
						"priority" => {
							"valid" => {
								"critical" => "1",
								"high" => "2",
								"moderate" => "3",
								"low" => "4",
								"planning" => "5"
							}
						},
						"type" => {
							"valid" => {
								"standard" => "Standard",
								"normal" => "Normal",
								"emergency" => "Emergency"
							}
						},
						"state" => {
							"valid" => {
								"draft" => "-40",
								"new" => "-30",
								"pending approval" => "-20",
								"scheduled" => "-10",
								"in progress" => "1",
								"implemented" => "2",
								"closed" => "3",
								"cancelled" => "4",
								"rejected" => "4",
								"cancelled/rejected" => "4"
							}
						},
						"u_environment" => {
							"valid" => {
								"build" => "Build (bld)",
								"data_migration" => "Data Migration (mig)",
								"development" => "Development (dev)",
								"dev" => "Development (dev)",
								"e2e" => "End-to-end (e2e)",
								"performance" => "Performance (prf)",
								"perf" => "Performance (prf)",
								"prf" => "Performance (prf)",
								"production" => "Production (prd)",
								"prod" => "Production (prd)",
								"prd" => "Production (prd)",
								"pex" => "Production Experiment (pex)",
								"pds" => "Production Support (pds)",
								"qal" => "QA/Test (qal)",
								"qa" => "QA/Test (qal)",
								"rtb" => "Run the Business (rtb)",
								"sbx" => "Sandbox (sbx)",
								"staging" => "Staging (stg)",
								"stg" => "Staging (stg)",
								"training" => "Training (trn)",
								"trn" => "Training (trn)",
								"uat" => "User Acceptance Testing (uat)"
							}
						}
					}
				},
				"change_task" => {
					"fields" => {
						"state" => {
							"valid" => {
								"pending" => "-5",
								"open" => "1",
								"work in progress" => "2",
								"closed complete" => "3",
								"cancelled" => "4"
							}
						},
						"type" => {
							"target" => "u_sub_type",
							"valid" => {
								"communication" => "Communication",
								"documentation" => "Documentation",
								"emergency" => "Emergency",
								"implementation" => "Implementation",
								"qa" => "QA",
								"location based" => "location_based"
							}
						},
						"priority" => {
							"valid" => {
								"critical" => "1",
								"high" => "2",
								"moderate" => "3",
								"low" => "4",
								"planning" => "5"
							}
						},
					}
				},
				"sc_task" => {
					"fields" => {
						"state" => {
							"valid" => {
								"open" => "1",
								"pending" => "-5",
								"work in progress" => "2",
								"closed" => "3",
								"closed complete" => "3",
								"cancelled" => "4",
							}
						},
						"parent" => {
							"target" => "parent.number"
						}
					}
				},
				"sc_request" => {
					"fields" => {
						"approval" => {
							"valid" => {
								"not yet requsted" => "not requested",
								"requested" => "requested",
								"approved" => "approved",
								"rejected" => "rejected"
							}
						},
						"request_state" => {
							"valid" => {
								"pending approval" => "requested",
								"approved" => "in_process",
								"closed complete" => "closed_complete",
								"closed incomplete" => "closed_incomplete",
								"closed cancelled" => "closed_cancelled",
								"closed rejected" => "closed_rejected"
							}
						}
					}
				},
				"sc_req_item" => {
					"fields" => {
						"state" => {
							"valid" => {
								"waiting for approval" => "waiting_for_approval",
								"closed incomplete" => "closed_incomplete",
								"Request Cancelled" => "Request Cancelled",
								"Completed" => "complete"
							}
						},
						"state" => {
							"valid" => {
								"open" => "1",
								"pending" => "-5",
								"work in progress" => "2",
								"closed complete" => "3",
								"cancelled" => "4"
							}
						}
					}
				}
			}
			return config
		end
	end
end


text:
.class public Landroid/support/v7/widget/FitWindowsLinearLayout;
.super Landroid/widget/LinearLayout;

# interfaces
.implements Landroid/support/v7/widget/ca;

# instance fields
.field private a:Landroid/support/v7/widget/cb;

# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

# virtual methods
.method protected fitSystemWindows(Landroid/graphics/Rect;)Z
    .locals 1

    iget-object v0, p0, Landroid/support/v7/widget/FitWindowsLinearLayout;->a:Landroid/support/v7/widget/cb;

    if-eqz v0, :cond_0

    iget-object v0, p0, Landroid/support/v7/widget/FitWindowsLinearLayout;->a:Landroid/support/v7/widget/cb;

    invoke-interface {v0, p1}, Landroid/support/v7/widget/cb;->a(Landroid/graphics/Rect;)V

    :cond_0
    invoke-super {p0, p1}, Landroid/widget/LinearLayout;->fitSystemWindows(Landroid/graphics/Rect;)Z

    move-result v0

    return v0
.end method

.method public setOnFitSystemWindowsListener(Landroid/support/v7/widget/cb;)V
    .locals 0

    iput-object p1, p0, Landroid/support/v7/widget/FitWindowsLinearLayout;->a:Landroid/support/v7/widget/cb;

    return-void
.end method


text:
BasicGame.Preloader = function (game) {

    this.background = null;
    this.preloadBar = null;

    this.ready = false;

};

BasicGame.Preloader.prototype = {

    preload: function () {

        //	These are the assets we loaded in Boot.js
        //	A nice sparkly background and a loading progress bar

        this.background = this.add.sprite(0, 0, 'preloaderBackground');
        this.preloadBar = this.add.sprite(300, 400, 'preloaderBar');

        //	This sets the preloadBar sprite as a loader sprite.
        //	What that does is automatically crop the sprite from 0 to full-width
        //	as the files below are loaded in.

        this.load.setPreloadSprite(this.preloadBar);

        //	Here we load the rest of the assets our game needs.
        //	You can find all of these assets in the Phaser Examples repository

        this.load.image('background', 'assets/background/background.png');
        this.button = this.load.image('button', 'assets/button/button.png');

        this.load.atlas('uiitem', 'assets/images/uiitem.png', 'assets/images/uiitem.json');

    },

    create: function () {

        this.state.start('MainMenu');

    }

};


text:
package com.qualogy.qafe.gwt.client.ui.renderer.cell;

import java.util.List;

import com.google.gwt.cell.client.TextCell;
import com.google.gwt.user.cellview.client.Column;
import com.qualogy.qafe.gwt.client.vo.ui.DataGridColumnGVO;
import com.qualogy.qafe.gwt.client.vo.ui.event.EventListenerGVO;
import com.qualogy.qafe.gwt.client.vo.ui.event.InputVariableGVO;

/**
 * A column that displays its contents with a {@link TextCell} and does not make
 * use of view data.
 *
 * @param <T> the row type
 */
public abstract class LinkColumn<T> extends Column<T, String> {

  public LinkColumn(String uuid,String context, String window, String component, String id,String parent,String tooltip,final DataGridColumnGVO column) {
	    super(new LinkCell(uuid,context,window,component,id,parent,tooltip,column));

	  }

}


text:
using System;
using WebApiHypermediaExtensionsCore.Hypermedia;
using WebApiHypermediaExtensionsCore.Hypermedia.Actions;
using WebApiHypermediaExtensionsCore.Hypermedia.Links;

namespace WebApiHypermediaExtensionsCore.WebApi.RouteResolver
{
    /// <summary>
    /// Maps hypermedia objects to a route.
    /// </summary>
    public interface IHypermediaRouteResolver
    {
        string ObjectToRoute(HypermediaObject hypermediaObject);

        string ReferenceToRoute(HypermediaObjectReferenceBase reference);

        string ActionToRoute(HypermediaObject hypermediaObject, HypermediaActionBase reference);

        string TypeToRoute(Type actionParameterType);
    }
}


text:
<!doctype html>

    <title>polymer-selector-multi</title>

    <link rel="import" href="../../polymer-selector/polymer-selector.html">

    <polymer-selector id="selector" multi>

Item 1

Item 2

Item 3

Item 4

Item 5

    </polymer-selector>


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

<TITLE>
NVTextureShader (LWJGL API)
</TITLE>

<META NAME="date" CONTENT="2012-11-04">

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

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.lwjgl.opengl

Class NVTextureShader

java.lang.Object
  org.lwjgl.opengl.NVTextureShader

public final class NVTextureShader
extends java.lang.Object

Field Summary

static int
GL_CONST_EYE_NV

          When the <target> parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and
  GetTexEnviv is TEXTURE_SHADER_NV, then the value of <pname> may be:

static int
GL_CULL_FRAGMENT_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_CULL_MODES_NV

          When the <target> parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and
  GetTexEnviv is TEXTURE_SHADER_NV, then the value of <pname> may be:

static int
GL_DEPENDENT_AR_TEXTURE_2D_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_DEPENDENT_GB_TEXTURE_2D_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_DOT_PRODUCT_DEPTH_REPLACE_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_DOT_PRODUCT_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_DOT_PRODUCT_TEXTURE_2D_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_DS_BIAS_NV

          Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

static int
GL_DS_SCALE_NV

          Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

static int
GL_DSDT_MAG_INTENSITY_NV

          Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

static int
GL_DSDT_MAG_NV

          Accepted by the <format> parameter of GetTexImage, TexImage1D,
  TexImage2D, TexSubImage1D, and TexSubImage2D.

static int
GL_DSDT_MAG_VIB_NV

          Accepted by the <format> parameter of GetTexImage, TexImage1D,
  TexImage2D, TexSubImage1D, and TexSubImage2D.

static int
GL_DSDT_NV

          Accepted by the <format> parameter of GetTexImage, TexImage1D,
  TexImage2D, TexSubImage1D, and TexSubImage2D.

static int
GL_DSDT8_MAG8_INTENSITY8_NV

          Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

static int
GL_DSDT8_MAG8_NV

          Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

static int
GL_DSDT8_NV

          Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

static int
GL_DT_BIAS_NV

          Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

static int
GL_DT_SCALE_NV

          Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

static int
GL_HI_BIAS_NV

          Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

static int
GL_HI_SCALE_NV

          Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

static int
GL_HILO_NV

          Accepted by the <format> parameter of GetTexImage, TexImage1D,
  TexImage2D, TexSubImage1D, and TexSubImage2D.

static int
GL_HILO16_NV

          Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

static int
GL_LO_BIAS_NV

          Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

static int
GL_LO_SCALE_NV

          Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

static int
GL_MAGNITUDE_BIAS_NV

          Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

static int
GL_MAGNITUDE_SCALE_NV

          Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

static int
GL_OFFSET_TEXTURE_2D_BIAS_NV

          When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

static int
GL_OFFSET_TEXTURE_2D_MATRIX_NV

          When the <target> parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and
  GetTexEnviv is TEXTURE_SHADER_NV, then the value of <pname> may be:

static int
GL_OFFSET_TEXTURE_2D_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_OFFSET_TEXTURE_2D_SCALE_NV

          When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

static int
GL_OFFSET_TEXTURE_BIAS_NV

          When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

static int
GL_OFFSET_TEXTURE_MATRIX_NV

          When the <target> parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and
  GetTexEnviv is TEXTURE_SHADER_NV, then the value of <pname> may be:

static int
GL_OFFSET_TEXTURE_RECTANGLE_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_OFFSET_TEXTURE_SCALE_NV

          When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

static int
GL_PASS_THROUGH_NV

          When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

static int
GL_PREVIOUS_TEXTURE_INPUT_NV

          When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

static int
GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV

          When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

static int
GL_SHADER_CONSISTENT_NV

          When the <target> parameter GetTexEnvfv and GetTexEnviv is
  TEXTURE_SHADER_NV, then the value of <pname> may be:

static int
GL_SHADER_OPERATION_NV

          When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

static int
GL_SIGNED_ALPHA_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_ALPHA8_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_HILO_NV

          Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

static int
GL_SIGNED_HILO16_NV

          Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

static int
GL_SIGNED_INTENSITY_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_INTENSITY8_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_LUMINANCE_ALPHA_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_LUMINANCE_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_LUMINANCE8_ALPHA8_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_LUMINANCE8_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_RGB_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_RGB_UNSIGNED_ALPHA_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_RGB8_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_RGBA_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_SIGNED_RGBA8_NV

          Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

static int
GL_TEXTURE_BORDER_VALUES_NV

          Accepted by the <pname> parameter of TexParameteriv, TexParameterfv,
  GetTexParameterfv and GetTexParameteriv.

static int
GL_TEXTURE_DS_SIZE_NV

          Accepted by the <pname> parameter of GetTexLevelParameterfv and
  GetTexLevelParameteriv.

static int
GL_TEXTURE_DT_SIZE_NV

          Accepted by the <pname> parameter of GetTexLevelParameterfv and
  GetTexLevelParameteriv.

static int
GL_TEXTURE_HI_SIZE_NV

          Accepted by the <pname> parameter of GetTexLevelParameterfv and
  GetTexLevelParameteriv.

static int
GL_TEXTURE_LO_SIZE_NV

          Accepted by the <pname> parameter of GetTexLevelParameterfv and
  GetTexLevelParameteriv.

static int
GL_TEXTURE_MAG_SIZE_NV

          Accepted by the <pname> parameter of GetTexLevelParameterfv and
  GetTexLevelParameteriv.

static int
GL_TEXTURE_SHADER_NV

          Accepted by the <cap> parameter of Enable, Disable, and IsEnabled,
  and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
  and GetDoublev, and by the <target> parameter of TexEnvf, TexEnvfv,
  TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv.

static int
GL_UNSIGNED_INT_8_8_S8_S8_REV_NV

          Accepted by the <type> parameter of GetTexImage, TexImage1D,
  TexImage2D, TexSubImage1D, and TexSubImage2D.

static int
GL_UNSIGNED_INT_S8_S8_8_8_NV

          Accepted by the <type> parameter of GetTexImage, TexImage1D,
  TexImage2D, TexSubImage1D, and TexSubImage2D.

static int
GL_VIBRANCE_BIAS_NV

          Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

static int
GL_VIBRANCE_SCALE_NV

          Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

Method Summary

Methods inherited from class java.lang.Object

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

Field Detail

GL_TEXTURE_SHADER_NV

public static final int GL_TEXTURE_SHADER_NV

Accepted by the <cap> parameter of Enable, Disable, and IsEnabled,
  and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
  and GetDoublev, and by the <target> parameter of TexEnvf, TexEnvfv,
  TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv.

See Also:
Constant Field Values

GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV

public static final int GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV

When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

See Also:
Constant Field Values

GL_SHADER_OPERATION_NV

public static final int GL_SHADER_OPERATION_NV

When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

See Also:
Constant Field Values

GL_OFFSET_TEXTURE_SCALE_NV

public static final int GL_OFFSET_TEXTURE_SCALE_NV

When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

See Also:
Constant Field Values

GL_OFFSET_TEXTURE_BIAS_NV

public static final int GL_OFFSET_TEXTURE_BIAS_NV

When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

See Also:
Constant Field Values

GL_OFFSET_TEXTURE_2D_SCALE_NV

public static final int GL_OFFSET_TEXTURE_2D_SCALE_NV

When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

See Also:
Constant Field Values

GL_OFFSET_TEXTURE_2D_BIAS_NV

public static final int GL_OFFSET_TEXTURE_2D_BIAS_NV

When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

See Also:
Constant Field Values

GL_PREVIOUS_TEXTURE_INPUT_NV

public static final int GL_PREVIOUS_TEXTURE_INPUT_NV

When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
  GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value
  of <pname> may be:

See Also:
Constant Field Values

GL_CULL_MODES_NV

public static final int GL_CULL_MODES_NV

When the <target> parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and
  GetTexEnviv is TEXTURE_SHADER_NV, then the value of <pname> may be:

See Also:
Constant Field Values

GL_OFFSET_TEXTURE_MATRIX_NV

public static final int GL_OFFSET_TEXTURE_MATRIX_NV

When the <target> parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and
  GetTexEnviv is TEXTURE_SHADER_NV, then the value of <pname> may be:

See Also:
Constant Field Values

GL_OFFSET_TEXTURE_2D_MATRIX_NV

public static final int GL_OFFSET_TEXTURE_2D_MATRIX_NV

When the <target> parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and
  GetTexEnviv is TEXTURE_SHADER_NV, then the value of <pname> may be:

See Also:
Constant Field Values

GL_CONST_EYE_NV

public static final int GL_CONST_EYE_NV

When the <target> parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and
  GetTexEnviv is TEXTURE_SHADER_NV, then the value of <pname> may be:

See Also:
Constant Field Values

GL_SHADER_CONSISTENT_NV

public static final int GL_SHADER_CONSISTENT_NV

When the <target> parameter GetTexEnvfv and GetTexEnviv is
  TEXTURE_SHADER_NV, then the value of <pname> may be:

See Also:
Constant Field Values

GL_PASS_THROUGH_NV

public static final int GL_PASS_THROUGH_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_CULL_FRAGMENT_NV

public static final int GL_CULL_FRAGMENT_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_OFFSET_TEXTURE_2D_NV

public static final int GL_OFFSET_TEXTURE_2D_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_OFFSET_TEXTURE_RECTANGLE_NV

public static final int GL_OFFSET_TEXTURE_RECTANGLE_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV

public static final int GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_DEPENDENT_AR_TEXTURE_2D_NV

public static final int GL_DEPENDENT_AR_TEXTURE_2D_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_DEPENDENT_GB_TEXTURE_2D_NV

public static final int GL_DEPENDENT_GB_TEXTURE_2D_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_DOT_PRODUCT_NV

public static final int GL_DOT_PRODUCT_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_DOT_PRODUCT_DEPTH_REPLACE_NV

public static final int GL_DOT_PRODUCT_DEPTH_REPLACE_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_DOT_PRODUCT_TEXTURE_2D_NV

public static final int GL_DOT_PRODUCT_TEXTURE_2D_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV

public static final int GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV

public static final int GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV

public static final int GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV

public static final int GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV

public static final int GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV

When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
  TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
  respectively, then the value of <param> or the value pointed to by
  <params> may be:

See Also:
Constant Field Values

GL_HILO_NV

public static final int GL_HILO_NV

Accepted by the <format> parameter of GetTexImage, TexImage1D,
  TexImage2D, TexSubImage1D, and TexSubImage2D.

See Also:
Constant Field Values

GL_DSDT_NV

public static final int GL_DSDT_NV

Accepted by the <format> parameter of GetTexImage, TexImage1D,
  TexImage2D, TexSubImage1D, and TexSubImage2D.

See Also:
Constant Field Values

GL_DSDT_MAG_NV

public static final int GL_DSDT_MAG_NV

Accepted by the <format> parameter of GetTexImage, TexImage1D,
  TexImage2D, TexSubImage1D, and TexSubImage2D.

See Also:
Constant Field Values

GL_DSDT_MAG_VIB_NV

public static final int GL_DSDT_MAG_VIB_NV

Accepted by the <format> parameter of GetTexImage, TexImage1D,
  TexImage2D, TexSubImage1D, and TexSubImage2D.

See Also:
Constant Field Values

GL_UNSIGNED_INT_S8_S8_8_8_NV

public static final int GL_UNSIGNED_INT_S8_S8_8_8_NV

Accepted by the <type> parameter of GetTexImage, TexImage1D,
  TexImage2D, TexSubImage1D, and TexSubImage2D.

See Also:
Constant Field Values

GL_UNSIGNED_INT_8_8_S8_S8_REV_NV

public static final int GL_UNSIGNED_INT_8_8_S8_S8_REV_NV

Accepted by the <type> parameter of GetTexImage, TexImage1D,
  TexImage2D, TexSubImage1D, and TexSubImage2D.

See Also:
Constant Field Values

GL_SIGNED_RGBA_NV

public static final int GL_SIGNED_RGBA_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_RGBA8_NV

public static final int GL_SIGNED_RGBA8_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_RGB_NV

public static final int GL_SIGNED_RGB_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_RGB8_NV

public static final int GL_SIGNED_RGB8_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_LUMINANCE_NV

public static final int GL_SIGNED_LUMINANCE_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_LUMINANCE8_NV

public static final int GL_SIGNED_LUMINANCE8_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_LUMINANCE_ALPHA_NV

public static final int GL_SIGNED_LUMINANCE_ALPHA_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_LUMINANCE8_ALPHA8_NV

public static final int GL_SIGNED_LUMINANCE8_ALPHA8_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_ALPHA_NV

public static final int GL_SIGNED_ALPHA_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_ALPHA8_NV

public static final int GL_SIGNED_ALPHA8_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_INTENSITY_NV

public static final int GL_SIGNED_INTENSITY_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_INTENSITY8_NV

public static final int GL_SIGNED_INTENSITY8_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_RGB_UNSIGNED_ALPHA_NV

public static final int GL_SIGNED_RGB_UNSIGNED_ALPHA_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV

public static final int GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV

Accepted by the <internalformat> parameter of CopyTexImage1D,
  CopyTexImage2D, TexImage1D, and TexImage2D.

See Also:
Constant Field Values

GL_HILO16_NV

public static final int GL_HILO16_NV

Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_HILO_NV

public static final int GL_SIGNED_HILO_NV

Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

See Also:
Constant Field Values

GL_SIGNED_HILO16_NV

public static final int GL_SIGNED_HILO16_NV

Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

See Also:
Constant Field Values

GL_DSDT8_NV

public static final int GL_DSDT8_NV

Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

See Also:
Constant Field Values

GL_DSDT8_MAG8_NV

public static final int GL_DSDT8_MAG8_NV

Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

See Also:
Constant Field Values

GL_DSDT_MAG_INTENSITY_NV

public static final int GL_DSDT_MAG_INTENSITY_NV

Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

See Also:
Constant Field Values

GL_DSDT8_MAG8_INTENSITY8_NV

public static final int GL_DSDT8_MAG8_INTENSITY8_NV

Accepted by the <internalformat> parameter of TexImage1D and
  TexImage2D.

See Also:
Constant Field Values

GL_HI_SCALE_NV

public static final int GL_HI_SCALE_NV

Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

See Also:
Constant Field Values

GL_LO_SCALE_NV

public static final int GL_LO_SCALE_NV

Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

See Also:
Constant Field Values

GL_DS_SCALE_NV

public static final int GL_DS_SCALE_NV

Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

See Also:
Constant Field Values

GL_DT_SCALE_NV

public static final int GL_DT_SCALE_NV

Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

See Also:
Constant Field Values

GL_MAGNITUDE_SCALE_NV

public static final int GL_MAGNITUDE_SCALE_NV

Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

See Also:
Constant Field Values

GL_VIBRANCE_SCALE_NV

public static final int GL_VIBRANCE_SCALE_NV

Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

See Also:
Constant Field Values

GL_HI_BIAS_NV

public static final int GL_HI_BIAS_NV

Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

See Also:
Constant Field Values

GL_LO_BIAS_NV

public static final int GL_LO_BIAS_NV

Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

See Also:
Constant Field Values

GL_DS_BIAS_NV

public static final int GL_DS_BIAS_NV

Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

See Also:
Constant Field Values

GL_DT_BIAS_NV

public static final int GL_DT_BIAS_NV

Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

See Also:
Constant Field Values

GL_MAGNITUDE_BIAS_NV

public static final int GL_MAGNITUDE_BIAS_NV

Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

See Also:
Constant Field Values

GL_VIBRANCE_BIAS_NV

public static final int GL_VIBRANCE_BIAS_NV

Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
  GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi.

See Also:
Constant Field Values

GL_TEXTURE_BORDER_VALUES_NV

public static final int GL_TEXTURE_BORDER_VALUES_NV

Accepted by the <pname> parameter of TexParameteriv, TexParameterfv,
  GetTexParameterfv and GetTexParameteriv.

See Also:
Constant Field Values

GL_TEXTURE_HI_SIZE_NV

public static final int GL_TEXTURE_HI_SIZE_NV

Accepted by the <pname> parameter of GetTexLevelParameterfv and
  GetTexLevelParameteriv.

See Also:
Constant Field Values

GL_TEXTURE_LO_SIZE_NV

public static final int GL_TEXTURE_LO_SIZE_NV

Accepted by the <pname> parameter of GetTexLevelParameterfv and
  GetTexLevelParameteriv.

See Also:
Constant Field Values

GL_TEXTURE_DS_SIZE_NV

public static final int GL_TEXTURE_DS_SIZE_NV

Accepted by the <pname> parameter of GetTexLevelParameterfv and
  GetTexLevelParameteriv.

See Also:
Constant Field Values

GL_TEXTURE_DT_SIZE_NV

public static final int GL_TEXTURE_DT_SIZE_NV

Accepted by the <pname> parameter of GetTexLevelParameterfv and
  GetTexLevelParameteriv.

See Also:
Constant Field Values

GL_TEXTURE_MAG_SIZE_NV

public static final int GL_TEXTURE_MAG_SIZE_NV

Accepted by the <pname> parameter of GetTexLevelParameterfv and
  GetTexLevelParameteriv.

See Also:
Constant Field Values

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2009 lwjgl.org. All Rights Reserved.


text:
package ee.jiss.commons.function;

import java.util.Objects;
import java.util.function.Function;

/**
 * Reimplementation of function which can throws any exception.
 *
 * For more details see java.util.function.Function
 *
 * @param <T> the type of the input to the function
 * @param <R> the type of the result of the function
 */
public interface ThrowsFunction<T, R> {
    R apply(T t) throws Exception;

    default <V> ThrowsFunction<V, R> compose(ThrowsFunction<? super V, ? extends T> before) {
        Objects.requireNonNull(before);
        return (V v) -> apply(before.apply(v));
    }

    default <V> ThrowsFunction<V, R> compose(Function<? super V, ? extends T> before) {
        Objects.requireNonNull(before);
        return (V v) -> apply(before.apply(v));
    }

    default <V> ThrowsFunction<T, V> andThen(ThrowsFunction<? super R, ? extends V> after) {
        Objects.requireNonNull(after);
        return (T t) -> after.apply(apply(t));
    }

    default <V> ThrowsFunction<T, V> andThen(Function<? super R, ? extends V> after) {
        Objects.requireNonNull(after);
        return (T t) -> after.apply(apply(t));
    }

    static <T> ThrowsFunction<T, T> identity() {
        return t -> t;
    }
}