text
stringlengths 0
13M
|
---|
dojo/_base/kernel.touch Summary This module provides unified touch event handlers by exporting press, move, release and cancel which can also run well on desktop. Based on http://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html Also, if the dojoClick property is set to truthy on a DOM node, dojo/touch generates click events immediately for this node and its descendants (except for descendants that have a dojoClick property set to falsy), to avoid the delay before native browser click events, and regardless of whether evt.preventDefault() was called in a touch.press event listener. Examples Example 1Used with dojo/on define(["dojo/on", "dojo/touch"], function(on, touch){
on(node, touch.press, function(e){});
on(node, touch.move, function(e){});
on(node, touch.release, function(e){});
on(node, touch.cancel, function(e){}); Example 2Used with touch.* directly touch.press(node, function(e){});
touch.move(node, function(e){});
touch.release(node, function(e){});
touch.cancel(node, function(e){}); Example 3Have dojo/touch generate clicks without delay, with a default move threshold of 4 pixels node.dojoClick = true; Example 4Have dojo/touch generate clicks without delay, with a move threshold of 10 pixels horizontally and vertically node.dojoClick = 10; Example 5Have dojo/touch generate clicks without delay, with a move threshold of 50 pixels horizontally and 10 pixels vertically node.dojoClick = {x:50, y:5}; Example 6Disable clicks without delay generated by dojo/touch on a node that has an ancestor with property dojoClick set to truthy node.dojoClick = false; Methods
cancel(node,listener) Defined by dojo/touch Register a listener to 'touchcancel'|'mouseleave' for the given node Parameter Type Description node Dom
Target node to listen to listener Function
Callback function Returns: any A handle which will be used to remove the listener by handle.remove()
enter(node,listener) Defined by dojo/touch Register a listener to mouse.enter or touch equivalent for the given node Parameter Type Description node Dom
Target node to listen to listener Function
Callback function Returns: any A handle which will be used to remove the listener by handle.remove()
leave(node,listener) Defined by dojo/touch Register a listener to mouse.leave or touch equivalent for the given node Parameter Type Description node Dom
Target node to listen to listener Function
Callback function Returns: any A handle which will be used to remove the listener by handle.remove()
move(node,listener) Defined by dojo/touch Register a listener that fires when the mouse cursor or a finger is dragged over the given node. Parameter Type Description node Dom
Target node to listen to listener Function
Callback function Returns: any A handle which will be used to remove the listener by handle.remove()
out(node,listener) Defined by dojo/touch Register a listener to 'mouseout' or touch equivalent for the given node Parameter Type Description node Dom
Target node to listen to listener Function
Callback function Returns: any A handle which will be used to remove the listener by handle.remove()
over(node,listener) Defined by dojo/touch Register a listener to 'mouseover' or touch equivalent for the given node Parameter Type Description node Dom
Target node to listen to listener Function
Callback function Returns: any A handle which will be used to remove the listener by handle.remove()
press(node,listener) Defined by dojo/touch Register a listener to 'touchstart'|'mousedown' for the given node Parameter Type Description node Dom
Target node to listen to listener Function
Callback function Returns: any A handle which will be used to remove the listener by handle.remove()
release(node,listener) Defined by dojo/touch Register a listener to releasing the mouse button while the cursor is over the given node (i.e. "mouseup") or for removing the finger from the screen while touching the given node. Parameter Type Description node Dom
Target node to listen to listener Function
Callback function Returns: any A handle which will be used to remove the listener by handle.remove()
|
dart:html
FileReader class Inheritance Object JSObject DartHtmlDomObject EventTarget FileReader Annotations @DocsEditable() @DomName('FileReader') Constants abortEvent → EventStreamProvider<ProgressEvent> @DocsEditable(), @DomName('FileReader.abortEvent')
Static factory designed to expose abort events to event handlers that are not necessarily instances of FileReader. const EventStreamProvider<ProgressEvent>('abort') DONE → int @DocsEditable(), @DomName('FileReader.DONE')
2 EMPTY → int @DocsEditable(), @DomName('FileReader.EMPTY')
0 errorEvent → EventStreamProvider<Event> @DocsEditable(), @DomName('FileReader.errorEvent')
Static factory designed to expose error events to event handlers that are not necessarily instances of FileReader. const EventStreamProvider<Event>('error') loadEndEvent → EventStreamProvider<ProgressEvent> @DocsEditable(), @DomName('FileReader.loadendEvent')
Static factory designed to expose loadend events to event handlers that are not necessarily instances of FileReader. const EventStreamProvider<ProgressEvent>('loadend') loadEvent → EventStreamProvider<ProgressEvent> @DocsEditable(), @DomName('FileReader.loadEvent')
Static factory designed to expose load events to event handlers that are not necessarily instances of FileReader. const EventStreamProvider<ProgressEvent>('load') LOADING → int @DocsEditable(), @DomName('FileReader.LOADING')
1 loadStartEvent → EventStreamProvider<ProgressEvent> @DocsEditable(), @DomName('FileReader.loadstartEvent')
Static factory designed to expose loadstart events to event handlers that are not necessarily instances of FileReader. const EventStreamProvider<ProgressEvent>('loadstart') progressEvent → EventStreamProvider<ProgressEvent> @DocsEditable(), @DomName('FileReader.progressEvent')
Static factory designed to expose progress events to event handlers that are not necessarily instances of FileReader. const EventStreamProvider<ProgressEvent>('progress') Static Properties instanceRuntimeType → Type @Deprecated("Internal Use Only"), read-only
Constructors FileReader() factory
FileReader.internal_() Properties error → FileError @DocsEditable(), @DomName('FileReader.error'), read-only
onAbort → Stream<ProgressEvent> @DocsEditable(), @DomName('FileReader.onabort'), read-only
Stream of abort events handled by this FileReader. onError → Stream<Event> @DocsEditable(), @DomName('FileReader.onerror'), read-only
Stream of error events handled by this FileReader. onLoad → Stream<ProgressEvent> @DocsEditable(), @DomName('FileReader.onload'), read-only
Stream of load events handled by this FileReader. onLoadEnd → Stream<ProgressEvent> @DocsEditable(), @DomName('FileReader.onloadend'), read-only
Stream of loadend events handled by this FileReader. onLoadStart → Stream<ProgressEvent> @DocsEditable(), @DomName('FileReader.onloadstart'), read-only
Stream of loadstart events handled by this FileReader. onProgress → Stream<ProgressEvent> @DocsEditable(), @DomName('FileReader.onprogress'), read-only
Stream of progress events handled by this FileReader. readyState → int @DocsEditable(), @DomName('FileReader.readyState'), read-only
result → Object @DocsEditable(), @DomName('FileReader.result'), read-only
hashCode → int read-only, inherited
on → Events read-only, inherited
This is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available. runtimeType → Type read-only, inherited
A representation of the runtime type of the object. Operators operator ==(other) → bool inherited
The equality operator. Methods abort() → void @DocsEditable(), @DomName('FileReader.abort')
readAsArrayBuffer(Blob blob) → void @DocsEditable(), @DomName('FileReader.readAsArrayBuffer')
readAsDataUrl(Blob blob) → void @DocsEditable(), @DomName('FileReader.readAsDataURL')
readAsText(Blob blob, [ String label ]) → void addEventListener(String type, EventListener listener, [ bool useCapture ]) → void inherited
dispatchEvent(Event event) → bool @DocsEditable(), @DomName('EventTarget.dispatchEvent'), inherited
noSuchMethod(Invocation invocation) → dynamic inherited
Invoked when a non-existent method or property is accessed. removeEventListener(String type, EventListener listener, [ bool useCapture ]) → void inherited
toString() → String inherited
Returns the result of the JavaScript objects toString method.
|
aws_nat_gateway Provides a resource to create a VPC NAT Gateway. Example Usage resource "aws_nat_gateway" "gw" {
allocation_id = "${aws_eip.nat.id}"
subnet_id = "${aws_subnet.public.id}"
}
Usage with tags: resource "aws_nat_gateway" "gw" {
allocation_id = "${aws_eip.nat.id}"
subnet_id = "${aws_subnet.public.id}"
tags {
Name = "gw NAT"
}
}
Argument Reference The following arguments are supported:
allocation_id - (Required) The Allocation ID of the Elastic IP address for the gateway.
subnet_id - (Required) The Subnet ID of the subnet in which to place the gateway.
tags - (Optional) A mapping of tags to assign to the resource. Note: It's recommended to denote that the NAT Gateway depends on the Internet Gateway for the VPC in which the NAT Gateway's subnet is located. For example: resource "aws_internet_gateway" "gw" {
vpc_id = "${aws_vpc.main.id}"
}
resource "aws_nat_gateway" "gw" {
//other arguments
depends_on = ["aws_internet_gateway.gw"]
}
Attributes Reference In addition to all arguments above, the following attributes are exported:
id - The ID of the NAT Gateway.
allocation_id - The Allocation ID of the Elastic IP address for the gateway.
subnet_id - The Subnet ID of the subnet in which the NAT gateway is placed.
network_interface_id - The ENI ID of the network interface created by the NAT gateway.
private_ip - The private IP address of the NAT Gateway.
public_ip - The public IP address of the NAT Gateway. Import NAT Gateways can be imported using the id, e.g. $ terraform import aws_nat_gateway.private_gw nat-05dba92075d71c408
|
[Groovy] Class Main
org.apache.groovy.groovysh.Main
class Main
extends Object A Main instance has a Groovysh member representing the shell, and a startGroovysh() method to run an interactive shell. Subclasses should preferably extend createIO() or configure the shell via getShell prior to invoking startGroovysh. Clients may use configureAndStartGroovysh to provide the same CLI params but a different Groovysh implementation (implementing getIO() and run()). The class also has static utility methods to manipulate the static ansi state using the jAnsi library. Main CLI entry-point for groovysh. Properties Summary
Properties
Type Name and description
Groovysh
groovysh
Constructor Summary
Constructors
Constructor and description Main(IO io)
Parameters:
io: - may just be new IO(), which is the default
Main(IO io, CompilerConfiguration configuration)
Parameters:
io: - may just be new IO(), which is the default
Methods Summary
Methods
Type Params Return Type Name and description static void
installAnsi()
static void
main(String[] args)create a Main instance, configures it according to CLI arguments, and starts the shell. static void
setSystemProperty(String nameValue)
static void
setTerminalType(String type, boolean suppressColor)
Parameters:
type: - one of 'auto', 'unix', ('win', 'windows'), ('false', 'off', 'none')
protected void
startGroovysh(String evalString, List<String> filenames)
Parameters:
evalString - commands that will be executed at startup after loading files given with filenames param
Inherited Methods Summary
Inherited Methods
Methods inherited from class Name class Object wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll Property Detail final Groovysh groovysh
Constructor Detail
Main(IO io)
Parameters:
io: - may just be new IO(), which is the default
Main(IO io, CompilerConfiguration configuration)
Parameters:
io: - may just be new IO(), which is the default
Method Detail static void installAnsi() static void main(String[] args) create a Main instance, configures it according to CLI arguments, and starts the shell.
Parameters:
main - must have a Groovysh member that has an IO member.
@Deprecated static void setSystemProperty(String nameValue) static void setTerminalType(String type, boolean suppressColor)
Parameters:
type: - one of 'auto', 'unix', ('win', 'windows'), ('false', 'off', 'none')
suppressColor - only has effect when ansi is enabled
protected void startGroovysh(String evalString, List<String> filenames)
Parameters:
evalString - commands that will be executed at startup after loading files given with filenames param
filenames - files that will be loaded at startup
|
set_query_var( string $var, mixed $value ) Sets the value of a query variable in the WP_Query class. Parameters $var string Required Query variable key. $value mixed Required Query variable value. Source File: wp-includes/query.php. View all references function set_query_var( $var, $value ) {
global $wp_query;
$wp_query->set( $var, $value );
}
Related Uses Uses Description WP_Query8b7c:f320:99b9:690f:4595:cd17:293a:c069set() wp-includes/class-wp-query.php Sets the value of a query variable.
Used By Used By Description build_comment_query_vars_from_block() wp-includes/blocks.php Helper function that constructs a comment query vars array from the passed block properties. wp_list_comments() wp-includes/comment-template.php Displays a list of comments. comments_template() wp-includes/comment-template.php Loads the comment template specified in $file.
Changelog Version Description 2.2.0 Introduced.
|
tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069ops8b7c:f320:99b9:690f:4595:cd17:293a:c069QueueDequeue #include <data_flow_ops.h> Dequeues a tuple of one or more tensors from the given queue. Summary This operation has k outputs, where k is the number of components in the tuples stored in the given queue, and output i is the ith component of the dequeued tuple. N.B. If the queue is empty, this operation will block until an element has been dequeued (or 'timeout_ms' elapses, if specified). Arguments:
scope: A Scope object handle: The handle to a queue. component_types: The type of each component in a tuple. Optional attributes (see Attrs):
timeout_ms: If the queue is empty, this operation will block for up to timeout_ms milliseconds. Note: This option is not supported yet. Returns:
OutputList: One or more tensors that were dequeued as a tuple. Constructors and Destructors QueueDequeue(const 8b7c:f320:99b9:690f:4595:cd17:293a:c069tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069Scope & scope, 8b7c:f320:99b9:690f:4595:cd17:293a:c069tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069Input handle, const DataTypeSlice & component_types) QueueDequeue(const 8b7c:f320:99b9:690f:4595:cd17:293a:c069tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069Scope & scope, 8b7c:f320:99b9:690f:4595:cd17:293a:c069tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069Input handle, const DataTypeSlice & component_types, const QueueDequeu8b7c:f320:99b9:690f:4595:cd17:293a:c069Attrs & attrs) Public attributes components 8b7c:f320:99b9:690f:4595:cd17:293a:c069tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069OutputList operation Operation Public functions operator[](size_t index) const 8b7c:f320:99b9:690f:4595:cd17:293a:c069tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069Output Public static functions TimeoutMs(int64 x) Attrs Structs tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069ops8b7c:f320:99b9:690f:4595:cd17:293a:c069QueueDequeu8b7c:f320:99b9:690f:4595:cd17:293a:c069Attrs Optional attribute setters for QueueDequeue. Public attributes components 8b7c:f320:99b9:690f:4595:cd17:293a:c069tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069OutputList components operation Operation operation Public functions QueueDequeue QueueDequeue(
const 8b7c:f320:99b9:690f:4595:cd17:293a:c069tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069Scope & scope,
8b7c:f320:99b9:690f:4595:cd17:293a:c069tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069Input handle,
const DataTypeSlice & component_types
) QueueDequeue QueueDequeue(
const 8b7c:f320:99b9:690f:4595:cd17:293a:c069tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069Scope & scope,
8b7c:f320:99b9:690f:4595:cd17:293a:c069tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069Input handle,
const DataTypeSlice & component_types,
const QueueDequeu8b7c:f320:99b9:690f:4595:cd17:293a:c069Attrs & attrs
) operator[] 8b7c:f320:99b9:690f:4595:cd17:293a:c069tensorflow8b7c:f320:99b9:690f:4595:cd17:293a:c069Output operator[](
size_t index
) const Public static functions TimeoutMs Attrs TimeoutMs(
int64 x
)
|
<QtGlobal> - Global Qt Declarations The <QtGlobal> header file includes the fundamental global declarations. It is included by most other Qt header files. More... Obsolete members Types typedef QFunctionPointer typedef QtMessageHandler enum QtMsgType { QtDebugMsg, QtInfoMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg } typedef qint8 typedef qint16 typedef qint32 typedef qint64 typedef qintptr typedef qlonglong typedef qptrdiff typedef qreal typedef quint8 typedef quint16 typedef quint32 typedef quint64 typedef quintptr typedef qulonglong typedef uchar typedef uint typedef ulong typedef ushort Functions T qAbs(const T &value) QtPrivat8b7c:f320:99b9:690f:4595:cd17:293a:c069QAddConst<T>8b7c:f320:99b9:690f:4595:cd17:293a:c069Type & qAsConst(T &t) const T & qBound(const T &min, const T &value, const T &max) auto qConstOverload(T memberFunctionPointer) int qEnvironmentVariableIntValue(const char *varName, bool *ok = Q_NULLPTR) bool qEnvironmentVariableIsEmpty(const char *varName) bool qEnvironmentVariableIsSet(const char *varName) quint32 qFloatDistance(float a, float b) quint64 qFloatDistance(double a, double b) QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, const QString &str) bool qFuzzyCompare(double p1, double p2) bool qFuzzyCompare(float p1, float p2) bool qFuzzyIsNull(double d) bool qFuzzyIsNull(float f) double qInf() QtMessageHandler qInstallMessageHandler(QtMessageHandler handler) bool qIsFinite(double d) bool qIsFinite(float f) bool qIsInf(double d) bool qIsInf(float f) bool qIsNaN(double d) bool qIsNaN(float f) const T & qMax(const T &value1, const T &value2) const T & qMin(const T &value1, const T &value2) auto qNonConstOverload(T memberFunctionPointer) auto qOverload(T functionPointer) double qQNaN() qint64 qRound64(double value) qint64 qRound64(float value) int qRound(double value) int qRound(float value) double qSNaN() void qSetMessagePattern(const QString &pattern) T * q_check_ptr(T *pointer) QByteArray qgetenv(const char *varName) bool qputenv(const char *varName, const QByteArray &value) int qrand() void qsrand(uint seed) QString qtTrId(const char *id, int n = -1) bool qunsetenv(const char *varName) Macros QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE QT_POINTER_SIZE QT_REQUIRE_VERSION(int argc, char **argv, const char *version) QT_TRANSLATE_NOOP3(context, sourceText, comment) QT_TRANSLATE_NOOP(context, sourceText) QT_TRID_NOOP(id) QT_TR_NOOP(sourceText) QT_VERSION QT_VERSION_CHECK QT_VERSION_STR void Q_ASSERT(bool test) void Q_ASSERT_X(bool test, const char *where, const char *what) void Q_ASSUME(bool expr) Q_BIG_ENDIAN Q_BYTE_ORDER Q_CC_BOR Q_CC_CDS Q_CC_CLANG Q_CC_COMEAU Q_CC_DEC Q_CC_EDG Q_CC_GHS Q_CC_GNU Q_CC_HIGHC Q_CC_HPACC Q_CC_INTEL Q_CC_KAI Q_CC_MIPS Q_CC_MSVC Q_CC_OC Q_CC_PGI Q_CC_SUN Q_CC_SYM Q_CC_USLC Q_CC_WAT void Q_CHECK_PTR(void *pointer) Q_DECLARE_TYPEINFO(Type, Flags) Q_DECL_CONSTEXPR Q_DECL_EXPORT Q_DECL_FINAL Q_DECL_IMPORT Q_DECL_NOEXCEPT Q_DECL_NOEXCEPT_EXPR(x) Q_DECL_NOTHROW Q_DECL_OVERRIDE Q_DECL_RELAXED_CONSTEXPR void Q_FALLTHROUGH() Q_FOREACH(variable, container) Q_FOREVER Q_FORWARD_DECLARE_CF_TYPE(type) Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type) Q_FORWARD_DECLARE_OBJC_CLASS(classname) const char * Q_FUNC_INFO() qint64 Q_INT64_C(literal) Q_LIKELY(expr) Q_LITTLE_ENDIAN Q_OS_AIX Q_OS_ANDROID Q_OS_BSD4 Q_OS_BSDI Q_OS_CYGWIN Q_OS_DARWIN Q_OS_DGUX Q_OS_DYNIX Q_OS_FREEBSD Q_OS_HPUX Q_OS_HURD Q_OS_IOS Q_OS_IRIX Q_OS_LINUX Q_OS_LYNX Q_OS_MAC Q_OS_MACOS Q_OS_NETBSD Q_OS_OPENBSD Q_OS_OSF Q_OS_OSX Q_OS_QNX Q_OS_RELIANT Q_OS_SCO Q_OS_SOLARIS Q_OS_TVOS Q_OS_ULTRIX Q_OS_UNIX Q_OS_UNIXWARE Q_OS_WATCHOS Q_OS_WIN32 Q_OS_WIN64 Q_OS_WIN Q_OS_WINRT Q_PROCESSOR_X86 Q_PROCESSOR_S390 Q_PROCESSOR_ALPHA Q_PROCESSOR_ARM Q_PROCESSOR_ARM_V5 Q_PROCESSOR_ARM_V6 Q_PROCESSOR_ARM_V7 Q_PROCESSOR_AVR32 Q_PROCESSOR_BLACKFIN Q_PROCESSOR_IA64 Q_PROCESSOR_MIPS Q_PROCESSOR_MIPS_32 Q_PROCESSOR_MIPS_64 Q_PROCESSOR_MIPS_I Q_PROCESSOR_MIPS_II Q_PROCESSOR_MIPS_III Q_PROCESSOR_MIPS_IV Q_PROCESSOR_MIPS_V Q_PROCESSOR_POWER Q_PROCESSOR_POWER_32 Q_PROCESSOR_POWER_64 Q_PROCESSOR_S390_X Q_PROCESSOR_SH Q_PROCESSOR_SH_4A Q_PROCESSOR_SPARC Q_PROCESSOR_SPARC_V9 Q_PROCESSOR_X86_32 Q_PROCESSOR_X86_64 quint64 Q_UINT64_C(literal) Q_UNLIKELY(expr) void Q_UNREACHABLE() Q_UNUSED(name) foreach(variable, container) forever qCritical(const char *message, ...) qDebug(const char *message, ...) qFatal(const char *message, ...) qInfo(const char *message, ...) qMove(x) const char * qPrintable(const QString &str) const wchar_t * qUtf16Printable(const QString &str) const char * qUtf8Printable(const QString &str) qWarning(const char *message, ...) The global declarations include types, functions and macros. The type definitions are partly convenience definitions for basic types (some of which guarantee certain bit-sizes on all platforms supported by Qt), partly types related to Qt message handling. The functions are related to generating messages, Qt version handling and comparing and adjusting object values. And finally, some of the declared macros enable programmers to add compiler or platform specific code to their applications, while others are convenience macros for larger operations. Types The header file declares several type definitions that guarantee a specified bit-size on all platforms supported by Qt for various basic types, for example qint8 which is a signed char guaranteed to be 8-bit on all platforms supported by Qt. The header file also declares the qlonglong type definition for long long int (__int64 on Windows). Several convenience type definitions are declared: qreal for double, uchar for unsigned char, uint for unsigned int, ulong for unsigned long and ushort for unsigned short. Finally, the QtMsgType definition identifies the various messages that can be generated and sent to a Qt message handler; QtMessageHandler is a type definition for a pointer to a function with the signature void myMessageHandler(QtMsgType, const QMessageLogContext &, const char *). QMessageLogContext class contains the line, file, and function the message was logged at. This information is created by the QMessageLogger class. Functions The <QtGlobal> header file contains several functions comparing and adjusting an object's value. These functions take a template type as argument: You can retrieve the absolute value of an object using the qAbs() function, and you can bound a given object's value by given minimum and maximum values using the qBound() function. You can retrieve the minimum and maximum of two given objects using qMin() and qMax() respectively. All these functions return a corresponding template type; the template types can be replaced by any other type. Example: int myValue = 10; int minValue = 2; int maxValue = 6; int boundedValue = qBound(minValue, myValue, maxValue); // boundedValue == 6 <QtGlobal> also contains functions that generate messages from the given string argument: qDebug(), qInfo(), qWarning(), qCritical(), and qFatal(). These functions call the message handler with the given message. Example: if (!driver()->isOpen() || driver()->isOpenError()) { qWarning("QSqlQuery8b7c:f320:99b9:690f:4595:cd17:293a:c069xec: database not open"); return false; } The remaining functions are qRound() and qRound64(), which both accept a double or float value as their argument returning the value rounded up to the nearest integer and 64-bit integer respectively, the qInstallMessageHandler() function which installs the given QtMessageHandler, and the qVersion() function which returns the version number of Qt at run-time as a string. Macros The <QtGlobal> header file provides a range of macros (Q_CC_*) that are defined if the application is compiled using the specified platforms. For example, the Q_CC_SUN macro is defined if the application is compiled using Forte Developer, or Sun Studio C++. The header file also declares a range of macros (Q_OS_*) that are defined for the specified platforms. For example, Q_OS_UNIX which is defined for the Unix-based systems. The purpose of these macros is to enable programmers to add compiler or platform specific code to their application. The remaining macros are convenience macros for larger operations: The QT_TRANSLATE_NOOP() and QT_TR_NOOP() macros provide the possibility of marking text for dynamic translation, i.e. translation without changing the stored source text. The Q_ASSERT() and Q_ASSERT_X() enables warning messages of various level of refinement. The Q_FOREACH() and foreach() macros implement Qt's foreach loop. The Q_INT64_C() and Q_UINT64_C() macros wrap signed and unsigned 64-bit integer literals in a platform-independent way. The Q_CHECK_PTR() macro prints a warning containing the source code's file name and line number, saying that the program ran out of memory, if the pointer is 0. The qPrintable() and qUtf8Printable() macros represent an easy way of printing text. Finally, the QT_POINTER_SIZE macro expands to the size of a pointer in bytes, and the QT_VERSION and QT_VERSION_STR macros expand to a numeric value or a string, respectively, specifying Qt's version number, i.e the version the application is compiled against. See also <QtAlgorithms> and QSysInfo. Type Documentation typedef QFunctionPointer This is a typedef for void (*)(), a pointer to a function that takes no arguments and returns void. typedef QtMessageHandler This is a typedef for a pointer to a function with the following signature: void myMessageHandler(QtMsgType, const QMessageLogContext &, const QString &); This typedef was introduced in Qt 5.0. See also QtMsgType and qInstallMessageHandler(). enum QtMsgType This enum describes the messages that can be sent to a message handler (QtMessageHandler). You can use the enum to identify and associate the various message types with the appropriate actions. Constant Value Description QtDebugMsg 0 A message generated by the qDebug() function. QtInfoMsg 4 A message generated by the qInfo() function. QtWarningMsg 1 A message generated by the qWarning() function. QtCriticalMsg 2 A message generated by the qCritical() function. QtFatalMsg 3 A message generated by the qFatal() function. QtSystemMsg QtCriticalMsg QtInfoMsg was added in Qt 5.5. See also QtMessageHandler and qInstallMessageHandler(). typedef qint8 Typedef for signed char. This type is guaranteed to be 8-bit on all platforms supported by Qt. typedef qint16 Typedef for signed short. This type is guaranteed to be 16-bit on all platforms supported by Qt. typedef qint32 Typedef for signed int. This type is guaranteed to be 32-bit on all platforms supported by Qt. typedef qint64 Typedef for long long int (__int64 on Windows). This type is guaranteed to be 64-bit on all platforms supported by Qt. Literals of this type can be created using the Q_INT64_C() macro: qint64 value = Q_INT64_C(932838457459459); See also Q_INT64_C(), quint64, and qlonglong. typedef qintptr Integral type for representing pointers in a signed integer (useful for hashing, etc.). Typedef for either qint32 or qint64. This type is guaranteed to be the same size as a pointer on all platforms supported by Qt. On a system with 32-bit pointers, qintptr is a typedef for qint32; on a system with 64-bit pointers, qintptr is a typedef for qint64. Note that qintptr is signed. Use quintptr for unsigned values. See also qptrdiff, qint32, and qint64. typedef qlonglong Typedef for long long int (__int64 on Windows). This is the same as qint64. See also qulonglong and qint64. typedef qptrdiff Integral type for representing pointer differences. Typedef for either qint32 or qint64. This type is guaranteed to be the same size as a pointer on all platforms supported by Qt. On a system with 32-bit pointers, quintptr is a typedef for quint32; on a system with 64-bit pointers, quintptr is a typedef for quint64. Note that qptrdiff is signed. Use quintptr for unsigned values. See also quintptr, qint32, and qint64. typedef qreal Typedef for double unless Qt is configured with the -qreal float option. typedef quint8 Typedef for unsigned char. This type is guaranteed to be 8-bit on all platforms supported by Qt. typedef quint16 Typedef for unsigned short. This type is guaranteed to be 16-bit on all platforms supported by Qt. typedef quint32 Typedef for unsigned int. This type is guaranteed to be 32-bit on all platforms supported by Qt. typedef quint64 Typedef for unsigned long long int (unsigned __int64 on Windows). This type is guaranteed to be 64-bit on all platforms supported by Qt. Literals of this type can be created using the Q_UINT64_C() macro: quint64 value = Q_UINT64_C(932838457459459); See also Q_UINT64_C(), qint64, and qulonglong. typedef quintptr Integral type for representing pointers in an unsigned integer (useful for hashing, etc.). Typedef for either quint32 or quint64. This type is guaranteed to be the same size as a pointer on all platforms supported by Qt. On a system with 32-bit pointers, quintptr is a typedef for quint32; on a system with 64-bit pointers, quintptr is a typedef for quint64. Note that quintptr is unsigned. Use qptrdiff for signed values. See also qptrdiff, quint32, and quint64. typedef qulonglong Typedef for unsigned long long int (unsigned __int64 on Windows). This is the same as quint64. See also quint64 and qlonglong. typedef uchar Convenience typedef for unsigned char. typedef uint Convenience typedef for unsigned int. typedef ulong Convenience typedef for unsigned long. typedef ushort Convenience typedef for unsigned short. Function Documentation T qAbs(const T &value) Compares value to the 0 of type T and returns the absolute value. Thus if T is double, then value is compared to (double) 0. Example: int absoluteValue; int myValue = -4; absoluteValue = qAbs(myValue); // absoluteValue == 4 QtPrivat8b7c:f320:99b9:690f:4595:cd17:293a:c069QAddConst<T>8b7c:f320:99b9:690f:4595:cd17:293a:c069Type &qAsConst(T &t) Returns t cast to const T. This function is a Qt implementation of C++17's st8b7c:f320:99b9:690f:4595:cd17:293a:c069as_const(), a cast function like st8b7c:f320:99b9:690f:4595:cd17:293a:c069move(). But while st8b7c:f320:99b9:690f:4595:cd17:293a:c069move() turns lvalues into rvalues, this function turns non-const lvalues into const lvalues. Like st8b7c:f320:99b9:690f:4595:cd17:293a:c069as_const(), it doesn't work on rvalues, because it cannot be efficiently implemented for rvalues without leaving dangling references. Its main use in Qt is to prevent implicitly-shared Qt containers from detaching: QString s = ...; for (QChar ch : s) // detaches 's' (performs a deep-copy if 's' was shared) process(ch); for (QChar ch : qAsConst(s)) // ok, no detach attempt process(ch); Of course, in this case, you could (and probably should) have declared s as const in the first place: const QString s = ...; for (QChar ch : s) // ok, no detach attempt on const objects process(ch); but often that is not easily possible. It is important to note that qAsConst() does not copy its argument, it just performs a const_cast<const T&>(t). This is also the reason why it is designed to fail for rvalues: The returned reference would go stale too soon. So while this works (but detaches the returned object): for (QChar ch : funcReturningQString()) process(ch); // OK, the returned object is kept alive for the loop's duration this would not: for (QChar ch : qAsConst(funcReturningQString())) process(ch); // ERROR: ch is copied from deleted memory To prevent this construct from compiling (and failing at runtime), qAsConst() has a second, deleted, overload which binds to rvalues. This function was introduced in Qt 5.7. const T &qBound(const T &min, const T &value, const T &max) Returns value bounded by min and max. This is equivalent to qMax(min, qMin(value, max)). Example: int myValue = 10; int minValue = 2; int maxValue = 6; int boundedValue = qBound(minValue, myValue, maxValue); // boundedValue == 6 See also qMin() and qMax(). auto qConstOverload(T memberFunctionPointer) Returns the memberFunctionPointer pointer to a constant member function: struct Foo { void overloadedFunction(int, QString); void overloadedFunction(int, QString) const; }; ... qConstOverload<int, QString>(&Foo8b7c:f320:99b9:690f:4595:cd17:293a:c069overloadedFunction) ... qNonConstOverload<int, QString>(&Foo8b7c:f320:99b9:690f:4595:cd17:293a:c069overloadedFunction) This function was introduced in Qt 5.7. See also qOverload, qNonConstOverload, and Differences between String-Based and Functor-Based Connections. int qEnvironmentVariableIntValue(const char *varName, bool *ok = Q_NULLPTR) Returns the numerical value of the environment variable varName. If ok is not null, sets *ok to true or false depending on the success of the conversion. Equivalent to qgetenv(varName).toInt(ok, 0) except that it's much faster, and can't throw exceptions. Note: there's a limit on the length of the value, which is sufficient for all valid values of int, not counting leading zeroes or spaces. Values that are too long will either be truncated or this function will set ok to false. This function was introduced in Qt 5.5. See also qgetenv() and qEnvironmentVariableIsSet(). bool qEnvironmentVariableIsEmpty(const char *varName) Returns whether the environment variable varName is empty. Equivalent to qgetenv(varName).isEmpty() except that it's potentially much faster, and can't throw exceptions. This function was introduced in Qt 5.1. See also qgetenv() and qEnvironmentVariableIsSet(). bool qEnvironmentVariableIsSet(const char *varName) Returns whether the environment variable varName is set. Equivalent to !qgetenv(varName).isNull() except that it's potentially much faster, and can't throw exceptions. This function was introduced in Qt 5.1. See also qgetenv() and qEnvironmentVariableIsEmpty(). quint32 qFloatDistance(float a, float b) Returns the number of representable floating-point numbers between a and b. This function provides an alternative way of doing approximated comparisons of floating-point numbers similar to qFuzzyCompare(). However, it returns the distance between two numbers, which gives the caller a possibility to choose the accepted error. Errors are relative, so for instance the distance between 1.0E-5 and 1.00001E-5 will give 110, while the distance between 1.0E36 and 1.00001E36 will give 127. This function is useful if a floating point comparison requires a certain precision. Therefore, if a and b are equal it will return 0. The maximum value it will return for 32-bit floating point numbers is 4,278,190,078. This is the distance between -FLT_MAX and +FLT_MAX. The function does not give meaningful results if any of the arguments are Infinite or NaN. You can check for this by calling qIsFinite(). The return value can be considered as the "error", so if you for instance want to compare two 32-bit floating point numbers and all you need is an approximated 24-bit precision, you can use this function like this: if (qFloatDistance(a, b) < (1 << 7)) { // The last 7 bits are not // significant // precise enough } This function was introduced in Qt 5.2. See also qFuzzyCompare(). quint64 qFloatDistance(double a, double b) Returns the number of representable floating-point numbers between a and b. This function serves the same purpose as qFloatDistance(float, float), but returns the distance between two double numbers. Since the range is larger than for two float numbers ([-DBL_MAX,DBL_MAX]), the return type is quint64. This function was introduced in Qt 5.2. See also qFuzzyCompare(). QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, const QString &str) Generates a formatted string out of the type, context, str arguments. qFormatLogMessage returns a QString that is formatted according to the current message pattern. It can be used by custom message handlers to format output similar to Qt's default message handler. The function is thread-safe. This function was introduced in Qt 5.4. See also qInstallMessageHandler() and qSetMessagePattern(). [static] bool qFuzzyCompare(double p1, double p2) Compares the floating point value p1 and p2 and returns true if they are considered equal, otherwise false. Note that comparing values where either p1 or p2 is 0.0 will not work, nor does comparing values where one of the values is NaN or infinity. If one of the values is always 0.0, use qFuzzyIsNull instead. If one of the values is likely to be 0.0, one solution is to add 1.0 to both values. // Instead of comparing with 0.0 qFuzzyCompare(0.0,1.0e-200); // This will return false // Compare adding 1 to both values will fix the problem qFuzzyCompare(1 + 0.0, 1 + 1.0e-200); // This will return true The two numbers are compared in a relative way, where the exactness is stronger the smaller the numbers are. Note: This function is thread-safe. This function was introduced in Qt 4.4. [static] bool qFuzzyCompare(float p1, float p2) Compares the floating point value p1 and p2 and returns true if they are considered equal, otherwise false. The two numbers are compared in a relative way, where the exactness is stronger the smaller the numbers are. Note: This function is thread-safe. This function was introduced in Qt 4.4. [static] bool qFuzzyIsNull(double d) Returns true if the absolute value of d is within 0.000000000001 of 0.0. Note: This function is thread-safe. This function was introduced in Qt 4.4. [static] bool qFuzzyIsNull(float f) Returns true if the absolute value of f is within 0.00001f of 0.0. Note: This function is thread-safe. This function was introduced in Qt 4.4. double qInf() Returns the bit pattern for an infinite number as a double. QtMessageHandler qInstallMessageHandler(QtMessageHandler handler) Installs a Qt message handler which has been defined previously. Returns a pointer to the previous message handler. The message handler is a function that prints out debug messages, warnings, critical and fatal error messages. The Qt library (debug mode) contains hundreds of warning messages that are printed when internal errors (usually invalid function arguments) occur. Qt built in release mode also contains such warnings unless QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during compilation. If you implement your own message handler, you get total control of these messages. The default message handler prints the message to the standard output under X11 or to the debugger under Windows. If it is a fatal message, the application aborts immediately. Only one message handler can be defined, since this is usually done on an application-wide basis to control debug output. To restore the message handler, call qInstallMessageHandler(0). Example: #include <qapplication.h> #include <stdio.h> #include <stdlib.h> void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) { QByteArray localMsg = msg.toLocal8Bit(); switch (type) { case QtDebugMsg: fprintf(stderr, "Debug: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function); break; case QtInfoMsg: fprintf(stderr, "Info: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function); break; case QtWarningMsg: fprintf(stderr, "Warning: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function); break; case QtCriticalMsg: fprintf(stderr, "Critical: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function); break; case QtFatalMsg: fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function); abort(); } } int main(int argc, char **argv) { qInstallMessageHandler(myMessageOutput); QApplication app(argc, argv); ... return app.exec(); } This function was introduced in Qt 5.0. See also QtMessageHandler, QtMsgType, qDebug(), qInfo(), qWarning(), qCritical(), qFatal(), and Debugging Techniques. bool qIsFinite(double d) Returns true if the double d is a finite number. bool qIsFinite(float f) Returns true if the float f is a finite number. bool qIsInf(double d) Returns true if the double d is equivalent to infinity. bool qIsInf(float f) Returns true if the float f is equivalent to infinity. bool qIsNaN(double d) Returns true if the double d is not a number (NaN). bool qIsNaN(float f) Returns true if the float f is not a number (NaN). const T &qMax(const T &value1, const T &value2) Returns the maximum of value1 and value2. Example: int myValue = 6; int yourValue = 4; int maxValue = qMax(myValue, yourValue); // maxValue == myValue See also qMin() and qBound(). const T &qMin(const T &value1, const T &value2) Returns the minimum of value1 and value2. Example: int myValue = 6; int yourValue = 4; int minValue = qMin(myValue, yourValue); // minValue == yourValue See also qMax() and qBound(). auto qNonConstOverload(T memberFunctionPointer) Returns the memberFunctionPointer pointer to a non-constant member function: struct Foo { void overloadedFunction(int, QString); void overloadedFunction(int, QString) const; }; ... qConstOverload<int, QString>(&Foo8b7c:f320:99b9:690f:4595:cd17:293a:c069overloadedFunction) ... qNonConstOverload<int, QString>(&Foo8b7c:f320:99b9:690f:4595:cd17:293a:c069overloadedFunction) This function was introduced in Qt 5.7. See also qOverload, qNonConstOverload, and Differences between String-Based and Functor-Based Connections. auto qOverload(T functionPointer) Returns a pointer to an overloaded function. The template parameter is the list of the argument types of the function. functionPointer is the pointer to the (member) function: struct Foo { void overloadedFunction(); void overloadedFunction(int, QString); }; ... qOverload<>(&Foo8b7c:f320:99b9:690f:4595:cd17:293a:c069overloadedFunction) ... qOverload<int, QString>(&Foo8b7c:f320:99b9:690f:4595:cd17:293a:c069overloadedFunction) If a member function is also const-overloaded qConstOverload and qNonConstOverload need to be used. qOverload() requires C++14 enabled. In C++11-only code, the helper classes QOverload, QConstOverload, and QNonConstOverload can be used directly: ... QOverload<>8b7c:f320:99b9:690f:4595:cd17:293a:c069of(&Foo8b7c:f320:99b9:690f:4595:cd17:293a:c069overloadedFunction) ... QOverload<int, QString>8b7c:f320:99b9:690f:4595:cd17:293a:c069of(&Foo8b7c:f320:99b9:690f:4595:cd17:293a:c069overloadedFunction) This function was introduced in Qt 5.7. See also qConstOverload(), qNonConstOverload(), and Differences between String-Based and Functor-Based Connections. double qQNaN() Returns the bit pattern of a quiet NaN as a double. qint64 qRound64(double value) Rounds value to the nearest 64-bit integer. Example: double valueA = 42949672960.3; double valueB = 42949672960.7; qint64 roundedValueA = qRound64(valueA); // roundedValueA = 42949672960 qint64 roundedValueB = qRound64(valueB); // roundedValueB = 42949672961 qint64 qRound64(float value) Rounds value to the nearest 64-bit integer. Example: float valueA = 42949672960.3; float valueB = 42949672960.7; qint64 roundedValueA = qRound64(valueA); // roundedValueA = 42949672960 qint64 roundedValueB = qRound64(valueB); // roundedValueB = 42949672961 int qRound(double value) Rounds value to the nearest integer. Example: double valueA = 2.3; double valueB = 2.7; int roundedValueA = qRound(valueA); // roundedValueA = 2 int roundedValueB = qRound(valueB); // roundedValueB = 3 int qRound(float value) Rounds value to the nearest integer. Example: float valueA = 2.3; float valueB = 2.7; int roundedValueA = qRound(valueA); // roundedValueA = 2 int roundedValueB = qRound(valueB); // roundedValueB = 3 double qSNaN() Returns the bit pattern of a signalling NaN as a double. void qSetMessagePattern(const QString &pattern) Changes the output of the default message handler. Allows to tweak the output of qDebug(), qInfo(), qWarning(), qCritical(), and qFatal(). The category logging output of qCDebug(), qCInfo(), qCWarning(), and qCCritical() is formatted, too. Following placeholders are supported: Placeholder Description %{appname} QCoreApplication8b7c:f320:99b9:690f:4595:cd17:293a:c069pplicationName() %{category} Logging category %{file} Path to source file %{function} Function %{line} Line in source file %{message} The actual message %{pid} QCoreApplication8b7c:f320:99b9:690f:4595:cd17:293a:c069pplicationPid() %{threadid} The system-wide ID of current thread (if it can be obtained) %{qthreadptr} A pointer to the current QThread (result of QThr8b7c:f320:99b9:690f:4595:cd17:293a:c069currentThread()) %{type} "debug", "warning", "critical" or "fatal" %{time process} time of the message, in seconds since the process started (the token "process" is literal) %{time boot} the time of the message, in seconds since the system boot if that can be determined (the token "boot" is literal). If the time since boot could not be obtained, the output is indeterminate (see QElapsedTimer8b7c:f320:99b9:690f:4595:cd17:293a:c069msecsSinceReference()). %{time [format]} system time when the message occurred, formatted by passing the format to QDateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069toString(). If the format is not specified, the format of Qt8b7c:f320:99b9:690f:4595:cd17:293a:c069ISODate is used. %{backtrace [depth=N] [separator="..."]} A backtrace with the number of frames specified by the optional depth parameter (defaults to 5), and separated by the optional separator parameter (defaults to "|"). This expansion is available only on some platforms (currently only platfoms using glibc). Names are only known for exported functions. If you want to see the name of every function in your application, use QMAKE_LFLAGS += -rdynamic. When reading backtraces, take into account that frames might be missing due to inlining or tail call optimization. You can also use conditionals on the type of the message using %{if-debug}, %{if-info} %{if-warning}, %{if-critical} or %{if-fatal} followed by an %{endif}. What is inside the %{if-*} and %{endif} will only be printed if the type matches. Finally, text inside %{if-category} ... %{endif} is only printed if the category is not the default one. Example: QT_MESSAGE_PATTERN="[%{time yyyyMMdd h:mm:ss.zzz t} %{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}] %{file}:%{line} - %{message}" The default pattern is "%{if-category}%{category}: %{endif}%{message}". The pattern can also be changed at runtime by setting the QT_MESSAGE_PATTERN environment variable; if both qSetMessagePattern() is called and QT_MESSAGE_PATTERN is set, the environment variable takes precedence. Custom message handlers can use qFormatLogMessage() to take pattern into account. This function was introduced in Qt 5.0. See also qInstallMessageHandler(), Debugging Techniques, and QLoggingCategory. T *q_check_ptr(T *pointer) Uses Q_CHECK_PTR on pointer, then returns pointer. This can be used as an inline version of Q_CHECK_PTR. QByteArray qgetenv(const char *varName) Returns the value of the environment variable with name varName. To get the variable string, use QByteArray8b7c:f320:99b9:690f:4595:cd17:293a:c069onstData(). To convert the data to a QString use QString8b7c:f320:99b9:690f:4595:cd17:293a:c069romLocal8Bit(). Note: qgetenv() was introduced because getenv() from the standard C library was deprecated in VC2005 (and later versions). qgetenv() uses the new replacement function in VC, and calls the standard C library's implementation on all other platforms. Warning: Don't use qgetenv on Windows if the content may contain non-US-ASCII characters, like file paths. See also qputenv(), qEnvironmentVariableIsSet(), and qEnvironmentVariableIsEmpty(). bool qputenv(const char *varName, const QByteArray &value) This function sets the value of the environment variable named varName. It will create the variable if it does not exist. It returns 0 if the variable could not be set. Calling qputenv with an empty value removes the environment variable on Windows, and makes it set (but empty) on Unix. Prefer using qunsetenv() for fully portable behavior. Note: qputenv() was introduced because putenv() from the standard C library was deprecated in VC2005 (and later versions). qputenv() uses the replacement function in VC, and calls the standard C library's implementation on all other platforms. See also qgetenv(). int qrand() Thread-safe version of the standard C++ rand() function. Returns a value between 0 and RAND_MAX (defined in <cstdlib> and <stdlib.h>), the next number in the current sequence of pseudo-random integers. Use qsrand() to initialize the pseudo-random number generator with a seed value. This function was introduced in Qt 4.2. See also qsrand(). void qsrand(uint seed) Thread-safe version of the standard C++ srand() function. Sets the argument seed to be used to generate a new random number sequence of pseudo random integers to be returned by qrand(). The sequence of random numbers generated is deterministic per thread. For example, if two threads call qsrand(1) and subsequently call qrand(), the threads will get the same random number sequence. This function was introduced in Qt 4.2. See also qrand(). QString qtTrId(const char *id, int n = -1) The qtTrId function finds and returns a translated string. Returns a translated string identified by id. If no matching string is found, the id itself is returned. This should not happen under normal conditions. If n >= 0, all occurrences of %n in the resulting string are replaced with a decimal representation of n. In addition, depending on n's value, the translation text may vary. Meta data and comments can be passed as documented for QObject8b7c:f320:99b9:690f:4595:cd17:293a:c069tr(). In addition, it is possible to supply a source string template like that: //% <C string> or \begincomment% <C string> \endcomment Example: //% "%n fooish bar(s) found.\n" //% "Do you want to continue?" QString text = qtTrId("qtn_foo_bar", n); Creating QM files suitable for use with this function requires passing the -idbased option to the lrelease tool. Warning: This method is reentrant only if all translators are installed before calling this method. Installing or removing translators while performing translations is not supported. Doing so will probably result in crashes or other undesirable behavior. Note: This function is reentrant. This function was introduced in Qt 4.6. See also QObject8b7c:f320:99b9:690f:4595:cd17:293a:c069tr(), QCoreApplication8b7c:f320:99b9:690f:4595:cd17:293a:c069translate(), and Internationalization with Qt. bool qunsetenv(const char *varName) This function deletes the variable varName from the environment. Returns true on success. This function was introduced in Qt 5.1. See also qputenv() and qgetenv(). Macro Documentation QT_DEPRECATED_WARNINGS If this macro is defined, the compiler will generate warnings if API declared as deprecated by Qt is used. See also QT_DISABLE_DEPRECATED_BEFORE. QT_DISABLE_DEPRECATED_BEFORE This macro can be defined in the project file to disable functions deprecated in a specified version of Qt or any earlier version. The default version number is 5.0, meaning that functions deprecated in or before Qt 5.0 will not be included. Examples: When using a future release of Qt 5, set QT_DISABLE_DEPRECATED_BEFORE=0x050100 to disable functions deprecated in Qt 5.1 and earlier. In any release, set QT_DISABLE_DEPRECATED_BEFORE=0x000000 to enable any functions, including the ones deprecated in Qt 5.0 See also QT_DEPRECATED_WARNINGS. QT_POINTER_SIZE Expands to the size of a pointer in bytes (4 or 8). This is equivalent to sizeof(void *) but can be used in a preprocessor directive. QT_REQUIRE_VERSION(int argc, char **argv, const char *version) This macro can be used to ensure that the application is run against a recent enough version of Qt. This is especially useful if your application depends on a specific bug fix introduced in a bug-fix release (e.g., 4.0.2). The argc and argv parameters are the main() function's argc and argv parameters. The version parameter is a string literal that specifies which version of Qt the application requires (e.g., "4.0.2"). Example: #include <QApplication> #include <QMessageBox> int main(int argc, char *argv[]) { QT_REQUIRE_VERSION(argc, argv, "4.0.2") QApplication app(argc, argv); ... return app.exec(); } QT_TRANSLATE_NOOP3(context, sourceText, comment) Marks the string literal sourceText for dynamic translation in the given context and with comment, i.e the stored sourceText will not be altered. The context is typically a class and also needs to be specified as string literal. The string literal comment will be available for translators using e.g. Qt Linguist. The macro expands to anonymous struct of the two string literals passed as sourceText and comment. Example: static { const char *source; const char *comment; } greeting_strings[] = { QT_TRANSLATE_NOOP3("FriendlyConversation", "Hello", "A really friendly hello"), QT_TRANSLATE_NOOP3("FriendlyConversation", "Goodbye", "A really friendly goodbye") }; QString FriendlyConversation8b7c:f320:99b9:690f:4595:cd17:293a:c069greeting(int type) { return tr(greeting_strings[type].source, greeting_strings[type].comment); } QString global_greeting(int type) { return qApp->translate("FriendlyConversation", greeting_strings[type].source, greeting_strings[type].comment); } This function was introduced in Qt 4.4. See also QT_TR_NOOP(), QT_TRANSLATE_NOOP(), and Internationalization with Qt. QT_TRANSLATE_NOOP(context, sourceText) Marks the string literal sourceText for dynamic translation in the given context; i.e, the stored sourceText will not be altered. The context is typically a class and also needs to be specified as string literal. The macro expands to sourceText. Example: static const char *greeting_strings[] = { QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"), QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye") }; QString FriendlyConversation8b7c:f320:99b9:690f:4595:cd17:293a:c069greeting(int type) { return tr(greeting_strings[type]); } QString global_greeting(int type) { return qApp->translate("FriendlyConversation", greeting_strings[type]); } See also QT_TR_NOOP(), QT_TRANSLATE_NOOP3(), and Internationalization with Qt. QT_TRID_NOOP(id) The QT_TRID_NOOP macro marks an id for dynamic translation. The only purpose of this macro is to provide an anchor for attaching meta data like to qtTrId(). The macro expands to id. Example: static const char * const ids[] = { //% "This is the first text." QT_TRID_NOOP("qtn_1st_text"), //% "This is the second text." QT_TRID_NOOP("qtn_2nd_text"), 0 }; void TheClass8b7c:f320:99b9:690f:4595:cd17:293a:c069Labels() { for (int i = 0; ids[i]; ++i) new QLabel(qtTrId(ids[i]), this); } This function was introduced in Qt 4.6. See also qtTrId() and Internationalization with Qt. QT_TR_NOOP(sourceText) Marks the string literal sourceText for dynamic translation in the current context (class), i.e the stored sourceText will not be altered. The macro expands to sourceText. Example: QString FriendlyConversation8b7c:f320:99b9:690f:4595:cd17:293a:c069greeting(int type) { static const char *greeting_strings[] = { QT_TR_NOOP("Hello"), QT_TR_NOOP("Goodbye") }; return tr(greeting_strings[type]); } The macro QT_TR_NOOP_UTF8() is identical except that it tells lupdate that the source string is encoded in UTF-8. Corresponding variants exist in the QT_TRANSLATE_NOOP() family of macros, too. See also QT_TRANSLATE_NOOP() and Internationalization with Qt. QT_VERSION This macro expands a numeric value of the form 0xMMNNPP (MM = major, NN = minor, PP = patch) that specifies Qt's version number. For example, if you compile your application against Qt 4.1.2, the QT_VERSION macro will expand to 0x040102. You can use QT_VERSION to use the latest Qt features where available. Example: #if QT_VERSION >= 0x040100 QIcon icon = style()->standardIcon(QStyl8b7c:f320:99b9:690f:4595:cd17:293a:c069SP_TrashIcon); #else QPixmap pixmap = style()->standardPixmap(QStyl8b7c:f320:99b9:690f:4595:cd17:293a:c069SP_TrashIcon); QIcon icon(pixmap); #endif See also QT_VERSION_STR and qVersion(). QT_VERSION_CHECK Turns the major, minor and patch numbers of a version into an integer, 0xMMNNPP (MM = major, NN = minor, PP = patch). This can be compared with another similarly processed version id. Example: #include <QtGlobal> #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) #include <QtWidgets> #else #include <QtGui> #endif See also QT_VERSION. QT_VERSION_STR This macro expands to a string that specifies Qt's version number (for example, "4.1.2"). This is the version against which the application is compiled. See also qVersion() and QT_VERSION. void Q_ASSERT(bool test) Prints a warning message containing the source code file name and line number if test is false. Q_ASSERT() is useful for testing pre- and post-conditions during development. It does nothing if QT_NO_DEBUG was defined during compilation. Example: // File: div.cpp #include <QtGlobal> int divide(int a, int b) { Q_ASSERT(b != 0); return a / b; } If b is zero, the Q_ASSERT statement will output the following message using the qFatal() function: ASSERT: "b != 0" in file div.cpp, line 7 See also Q_ASSERT_X(), qFatal(), and Debugging Techniques. void Q_ASSERT_X(bool test, const char *where, const char *what) Prints the message what together with the location where, the source file name and line number if test is false. Q_ASSERT_X is useful for testing pre- and post-conditions during development. It does nothing if QT_NO_DEBUG was defined during compilation. Example: // File: div.cpp #include <QtGlobal> int divide(int a, int b) { Q_ASSERT_X(b != 0, "divide", "division by zero"); return a / b; } If b is zero, the Q_ASSERT_X statement will output the following message using the qFatal() function: ASSERT failure in divide: "division by zero", file div.cpp, line 7 See also Q_ASSERT(), qFatal(), and Debugging Techniques. void Q_ASSUME(bool expr) Causes the compiler to assume that expr is true. This macro is useful for improving code generation, by providing the compiler with hints about conditions that it would not otherwise know about. However, there is no guarantee that the compiler will actually use those hints. This macro could be considered a "lighter" version of Q_ASSERT(). While Q_ASSERT will abort the program's execution if the condition is false, Q_ASSUME will tell the compiler not to generate code for those conditions. Therefore, it is important that the assumptions always hold, otherwise undefined behaviour may occur. If expr is a constantly false condition, Q_ASSUME will tell the compiler that the current code execution cannot be reached. That is, Q_ASSUME(false) is equivalent to Q_UNREACHABLE(). In debug builds the condition is enforced by an assert to facilitate debugging. Note: Q_LIKELY() tells the compiler that the expression is likely, but not the only possibility. Q_ASSUME tells the compiler that it is the only possibility. This function was introduced in Qt 5.0. See also Q_ASSERT(), Q_UNREACHABLE(), and Q_LIKELY(). Q_BIG_ENDIAN This macro represents a value you can compare to the macro Q_BYTE_ORDER to determine the endian-ness of your system. In a big-endian system, the most significant byte is stored at the lowest address. The other bytes follow in decreasing order of significance. #if Q_BYTE_ORDER == Q_BIG_ENDIAN ... #endif See also Q_BYTE_ORDER and Q_LITTLE_ENDIAN. Q_BYTE_ORDER This macro can be used to determine the byte order your system uses for storing data in memory. i.e., whether your system is little-endian or big-endian. It is set by Qt to one of the macros Q_LITTLE_ENDIAN or Q_BIG_ENDIAN. You normally won't need to worry about endian-ness, but you might, for example if you need to know which byte of an integer or UTF-16 character is stored in the lowest address. Endian-ness is important in networking, where computers with different values for Q_BYTE_ORDER must pass data back and forth. Use this macro as in the following examples. #if Q_BYTE_ORDER == Q_BIG_ENDIAN ... #endif or #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN ... #endif See also Q_BIG_ENDIAN and Q_LITTLE_ENDIAN. Q_CC_BOR Defined if the application is compiled using Borland/Turbo C++. Q_CC_CDS Defined if the application is compiled using Reliant C++. Q_CC_CLANG Defined if the application is compiled using Clang. Q_CC_COMEAU Defined if the application is compiled using Comeau C++. Q_CC_DEC Defined if the application is compiled using DEC C++. Q_CC_EDG Defined if the application is compiled using Edison Design Group C++. Q_CC_GHS Defined if the application is compiled using Green Hills Optimizing C++ Compilers. Q_CC_GNU Defined if the application is compiled using GNU C++. Q_CC_HIGHC Defined if the application is compiled using MetaWare High C/C++. Q_CC_HPACC Defined if the application is compiled using HP aC++. Q_CC_INTEL Defined if the application is compiled using Intel C++ for Linux, Intel C++ for Windows. Q_CC_KAI Defined if the application is compiled using KAI C++. Q_CC_MIPS Defined if the application is compiled using MIPSpro C++. Q_CC_MSVC Defined if the application is compiled using Microsoft Visual C/C++, Intel C++ for Windows. Q_CC_OC Defined if the application is compiled using CenterLine C++. Q_CC_PGI Defined if the application is compiled using Portland Group C++. Q_CC_SUN Defined if the application is compiled using Forte Developer, or Sun Studio C++. Q_CC_SYM Defined if the application is compiled using Digital Mars C/C++ (used to be Symantec C++). Q_CC_USLC Defined if the application is compiled using SCO OUDK and UDK. Q_CC_WAT Defined if the application is compiled using Watcom C++. void Q_CHECK_PTR(void *pointer) If pointer is 0, prints a message containing the source code's file name and line number, saying that the program ran out of memory and aborts program execution. It throws st8b7c:f320:99b9:690f:4595:cd17:293a:c069bad_alloc instead if exceptions are enabled. Q_CHECK_PTR does nothing if QT_NO_DEBUG and QT_NO_EXCEPTIONS were defined during compilation. Therefore you must not use Q_CHECK_PTR to check for successful memory allocations because the check will be disabled in some cases. Example: int *a; Q_CHECK_PTR(a = new int[80]); // WRONG! a = new (nothrow) int[80]; // Right Q_CHECK_PTR(a); See also qWarning() and Debugging Techniques. Q_DECLARE_TYPEINFO(Type, Flags) You can use this macro to specify information about a custom type Type. With accurate type information, Qt's generic containers can choose appropriate storage methods and algorithms. Flags can be one of the following: Q_PRIMITIVE_TYPE specifies that Type is a POD (plain old data) type with no constructor or destructor, or else a type where every bit pattern is a valid object and memcpy() creates a valid independent copy of the object. Q_MOVABLE_TYPE specifies that Type has a constructor and/or a destructor but can be moved in memory using memcpy(). Note: despite the name, this has nothing to do with move constructors or C++ move semantics. Q_COMPLEX_TYPE (the default) specifies that Type has constructors and/or a destructor and that it may not be moved in memory. Example of a "primitive" type: struct Point2D { int x; int y; }; Q_DECLARE_TYPEINFO(Point2D, Q_PRIMITIVE_TYPE); An example of a non-POD "primitive" type is QUuid: Even though QUuid has constructors (and therefore isn't POD), every bit pattern still represents a valid object, and memcpy() can be used to create a valid independent copy of a QUuid object. Example of a movable type: class Point2D { public: Point2D() { data = new int[2]; } Point2D(const Point2D &other) { ... } ~Point2D() { delete[] data; } Point2D &operator=(const Point2D &other) { ... } int x() const { return data[0]; } int y() const { return data[1]; } private: int *data; }; Q_DECLARE_TYPEINFO(Point2D, Q_MOVABLE_TYPE); Q_DECL_CONSTEXPR This macro can be used to declare variable that should be constructed at compile-time, or an inline function that can be [email protected]. It expands to "constexpr" if your compiler supports that C++11 keyword, or to nothing otherwise. See also Q_DECL_RELAXED_CONSTEXPR. Q_DECL_EXPORT This macro marks a symbol for shared library export (see Creating Shared Libraries). See also Q_DECL_IMPORT. Q_DECL_FINAL This macro can be used to declare an overriding virtual or a class as "final", with Java semantics. Further-derived classes can then no longer override this virtual function, or inherit from this class, respectively. It expands to "final" if your compiler supports that C++11 contextual keyword, or something non-standard if your compiler supports something close enough to the C++11 semantics, or to nothing otherwise. The macro goes at the end of the function, usually after the const, if any: // more-derived classes no longer permitted to override this: virtual void MyWidget8b7c:f320:99b9:690f:4595:cd17:293a:c069paintEvent(QPaintEvent*) Q_DECL_FINAL; For classes, it goes in front of the : in the class definition, if any: class QRect Q_DECL_FINAL { // cannot be derived from // ... }; This function was introduced in Qt 5.0. See also Q_DECL_OVERRIDE. Q_DECL_IMPORT This macro declares a symbol to be an import from a shared library (see Creating Shared Libraries). See also Q_DECL_EXPORT. Q_DECL_NOEXCEPT This macro marks a function as never throwing. If the function does nevertheless throw, the behaviour is defined: st8b7c:f320:99b9:690f:4595:cd17:293a:c069terminate() is called. The macro expands to C++11 noexcept, if available, or to nothing otherwise. If you need the operator version of C++11 noexcept, use Q_DECL_NOEXCEPT_EXPR(x). If you don't need C++11 noexcept semantics, e.g. because your function can't possibly throw, don't use this macro, use Q_DECL_NOTHROW instead. This function was introduced in Qt 5.0. See also Q_DECL_NOTHROW and Q_DECL_NOEXCEPT_EXPR(). Q_DECL_NOEXCEPT_EXPR(x) This macro marks a function as non-throwing if x is true. If the function does nevertheless throw, the behaviour is defined: st8b7c:f320:99b9:690f:4595:cd17:293a:c069terminate() is called. The macro expands to C++11 noexcept(x), if available, or to nothing otherwise. If you need the always-true version of C++11 noexcept, use Q_DECL_NOEXCEPT. If you don't need C++11 noexcept semantics, e.g. because your function can't possibly throw, don't use this macro, use Q_DECL_NOTHROW instead. This function was introduced in Qt 5.0. See also Q_DECL_NOTHROW and Q_DECL_NOEXCEPT. Q_DECL_NOTHROW This macro marks a function as never throwing, under no circumstances. If the function does nevertheless throw, the behaviour is undefined. The macro expands to either "throw()", if that has some benefit on the compiler, or to C++11 noexcept, if available, or to nothing otherwise. If you need C++11 noexcept semantics, don't use this macro, use Q_DECL_NOEXCEPT/Q_DECL_NOEXCEPT_EXPR instead. This function was introduced in Qt 5.0. See also Q_DECL_NOEXCEPT and Q_DECL_NOEXCEPT_EXPR(). Q_DECL_OVERRIDE This macro can be used to declare an overriding virtual function. Use of this markup will allow the compiler to generate an error if the overriding virtual function does not in fact override anything. It expands to "override" if your compiler supports that C++11 contextual keyword, or to nothing otherwise. The macro goes at the end of the function, usually after the const, if any: // generate error if this doesn't actually override anything: virtual void MyWidget8b7c:f320:99b9:690f:4595:cd17:293a:c069paintEvent(QPaintEvent*) Q_DECL_OVERRIDE; This function was introduced in Qt 5.0. See also Q_DECL_FINAL. Q_DECL_RELAXED_CONSTEXPR This macro can be used to declare an inline function that can be computed at compile-time according to the relaxed rules from C++14. It expands to "constexpr" if your compiler supports C++14 relaxed constant expressions, or to nothing otherwise. See also Q_DECL_CONSTEXPR. void Q_FALLTHROUGH() Can be used in switch statements at the end of case block to tell the compiler and other developers that that the lack of a break statement is intentional. This is useful since a missing break statement is often a bug, and some compilers can be configured to emit warnings when one is not found. This function was introduced in Qt 5.8. See also Q_UNREACHABLE(). Q_FOREACH(variable, container) Same as foreach(variable, container). This macro is available even when no_keywords is specified using the .pro file's CONFIG variable. Note: Since Qt 5.7, the use of this macro is discouraged. It will be removed in a future version of Qt. Please use C++11 range-for, possibly with qAsConst(), as needed. See also qAsConst(). Q_FOREVER Same as forever. This macro is available even when no_keywords is specified using the .pro file's CONFIG variable. See also foreach(). Q_FORWARD_DECLARE_CF_TYPE(type) Forward-declares a Core Foundation type. This includes the actual type and the ref type. For example, Q_FORWARD_DECLARE_CF_TYPE(CFString) declares __CFString and CFStringRef. This function was introduced in Qt 5.2. Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type) Forward-declares a mutable Core Foundation type. This includes the actual type and the ref type. For example, Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(CFMutableString) declares __CFMutableString and CFMutableStringRef. This function was introduced in Qt 5.2. Q_FORWARD_DECLARE_OBJC_CLASS(classname) Forward-declares an Objective-C classname in a manner such that it can be compiled as either Objective-C or C++. This is primarily intended for use in header files that may be included by both Objective-C and C++ source files. This function was introduced in Qt 5.2. const char *Q_FUNC_INFO() Expands to a string that describe the function the macro resides in. How this string looks more specifically is compiler dependent. With GNU GCC it is typically the function signature, while with other compilers it might be the line and column number. Q_FUNC_INFO can be conveniently used with qDebug(). For example, this function: template<typename TInputType> const TInputType &myMin(const TInputType &value1, const TInputType &value2) { qDebug() << Q_FUNC_INFO << "was called with value1:" << value1 << "value2:" << value2; if(value1 < value2) return value1; else return value2; } when instantiated with the integer type, will with the GCC compiler produce: const TInputType& myMin(const TInputType&, const TInputType&) [with TInputType = int] was called with value1: 3 value2: 4 If this macro is used outside a function, the behavior is undefined. qint64 Q_INT64_C(literal) Wraps the signed 64-bit integer literal in a platform-independent way. Example: qint64 value = Q_INT64_C(932838457459459); See also qint64 and Q_UINT64_C(). Q_LIKELY(expr) Hints to the compiler that the enclosed condition, expr, is likely to evaluate to true. Use of this macro can help the compiler to optimize the code. Example: // the condition inside the "if" will be successful most of the times for (int i = 1; i <= 365; i++) { if (Q_LIKELY(isWorkingDay(i))) { ... } ... } This function was introduced in Qt 4.8. See also Q_UNLIKELY(). Q_LITTLE_ENDIAN This macro represents a value you can compare to the macro Q_BYTE_ORDER to determine the endian-ness of your system. In a little-endian system, the least significant byte is stored at the lowest address. The other bytes follow in increasing order of significance. #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN ... #endif See also Q_BYTE_ORDER and Q_BIG_ENDIAN. Q_OS_AIX Defined on AIX. Q_OS_ANDROID Defined on Android. Q_OS_BSD4 Defined on Any BSD 4.4 system. Q_OS_BSDI Defined on BSD/OS. Q_OS_CYGWIN Defined on Cygwin. Q_OS_DARWIN Defined on Darwin-based operating systems such as macOS, iOS, watchOS, and tvOS. Q_OS_DGUX Defined on DG/UX. Q_OS_DYNIX Defined on DYNIX/ptx. Q_OS_FREEBSD Defined on FreeBSD. Q_OS_HPUX Defined on HP-UX. Q_OS_HURD Defined on GNU Hurd. Q_OS_IOS Defined on iOS. Q_OS_IRIX Defined on SGI Irix. Q_OS_LINUX Defined on Linux. Q_OS_LYNX Defined on LynxOS. Q_OS_MAC Deprecated synonym for Q_OS_DARWIN. Do not use. Q_OS_MACOS Defined on macOS. Q_OS_NETBSD Defined on NetBSD. Q_OS_OPENBSD Defined on OpenBSD. Q_OS_OSF Defined on HP Tru64 UNIX. Q_OS_OSX Deprecated synonym for Q_OS_MACOS. Do not use. Q_OS_QNX Defined on QNX Neutrino. Q_OS_RELIANT Defined on Reliant UNIX. Q_OS_SCO Defined on SCO OpenServer 5. Q_OS_SOLARIS Defined on Sun Solaris. Q_OS_TVOS Defined on tvOS. Q_OS_ULTRIX Defined on DEC Ultrix. Q_OS_UNIX Defined on Any UNIX BSD/SYSV system. Q_OS_UNIXWARE Defined on UnixWare 7, Open UNIX 8. Q_OS_WATCHOS Defined on watchOS. Q_OS_WIN32 Defined on 32-bit and 64-bit versions of Windows. Q_OS_WIN64 Defined on 64-bit versions of Windows. Q_OS_WIN Defined on all supported versions of Windows. That is, if Q_OS_WIN32, Q_OS_WIN64, or Q_OS_WINRT is defined. Q_OS_WINRT Defined for Windows Runtime (Windows Store apps) on Windows 8, Windows RT, and Windows Phone 8. Q_PROCESSOR_X86 Defined if the application is compiled for x86 processors. Qt currently supports two x86 variants: Q_PROCESSOR_X86_32 and Q_PROCESSOR_X86_64. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_S390 Defined if the application is compiled for S/390 processors. Qt supports one optional variant of S/390: Q_PROCESSOR_S390_X. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_ALPHA Defined if the application is compiled for Alpha processors. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_ARM Defined if the application is compiled for ARM processors. Qt currently supports three optional ARM revisions: Q_PROCESSOR_ARM_V5, Q_PROCESSOR_ARM_V6, and Q_PROCESSOR_ARM_V7. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_ARM_V5 Defined if the application is compiled for ARMv5 processors. The Q_PROCESSOR_ARM macro is also defined when Q_PROCESSOR_ARM_V5 is defined. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_ARM_V6 Defined if the application is compiled for ARMv6 processors. The Q_PROCESSOR_ARM and Q_PROCESSOR_ARM_V5 macros are also defined when Q_PROCESSOR_ARM_V6 is defined. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_ARM_V7 Defined if the application is compiled for ARMv7 processors. The Q_PROCESSOR_ARM, Q_PROCESSOR_ARM_V5, and Q_PROCESSOR_ARM_V6 macros are also defined when Q_PROCESSOR_ARM_V7 is defined. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_AVR32 Defined if the application is compiled for AVR32 processors. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_BLACKFIN Defined if the application is compiled for Blackfin processors. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_IA64 Defined if the application is compiled for IA-64 processors. This includes all Itanium and Itanium 2 processors. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_MIPS Defined if the application is compiled for MIPS processors. Qt currently supports seven MIPS revisions: Q_PROCESSOR_MIPS_I, Q_PROCESSOR_MIPS_II, Q_PROCESSOR_MIPS_III, Q_PROCESSOR_MIPS_IV, Q_PROCESSOR_MIPS_V, Q_PROCESSOR_MIPS_32, and Q_PROCESSOR_MIPS_64. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_MIPS_32 Defined if the application is compiled for MIPS32 processors. The Q_PROCESSOR_MIPS, Q_PROCESSOR_MIPS_I, and Q_PROCESSOR_MIPS_II macros are also defined when Q_PROCESSOR_MIPS_32 is defined. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_MIPS_64 Defined if the application is compiled for MIPS64 processors. The Q_PROCESSOR_MIPS, Q_PROCESSOR_MIPS_I, Q_PROCESSOR_MIPS_II, Q_PROCESSOR_MIPS_III, Q_PROCESSOR_MIPS_IV, and Q_PROCESSOR_MIPS_V macros are also defined when Q_PROCESSOR_MIPS_64 is defined. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_MIPS_I Defined if the application is compiled for MIPS-I processors. The Q_PROCESSOR_MIPS macro is also defined when Q_PROCESSOR_MIPS_I is defined. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_MIPS_II Defined if the application is compiled for MIPS-II processors. The Q_PROCESSOR_MIPS and Q_PROCESSOR_MIPS_I macros are also defined when Q_PROCESSOR_MIPS_II is defined. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_MIPS_III Defined if the application is compiled for MIPS-III processors. The Q_PROCESSOR_MIPS, Q_PROCESSOR_MIPS_I, and Q_PROCESSOR_MIPS_II macros are also defined when Q_PROCESSOR_MIPS_III is defined. See also QSysInfo8b7c:f320:99b9:690f:4595:cd17:293a:c069uildCpuArchitecture(). Q_PROCESSOR_MIPS_IV Defined if the application is |
class Crystal8b7c:f320:99b9:690f:4595:cd17:293a:c069Macros8b7c:f320:99b9:690f:4595:cd17:293a:c069lock
Crystal8b7c:f320:99b9:690f:4595:cd17:293a:c069Macros8b7c:f320:99b9:690f:4595:cd17:293a:c069lock
Crystal8b7c:f320:99b9:690f:4595:cd17:293a:c069Macros8b7c:f320:99b9:690f:4595:cd17:293a:c069STNode
Overview A code block. Defined in: compiler/crystal/macros.cr Instance Method Summary #args : ArrayLiteral(MacroId) Returns the blocks arguments. #body : ASTNode Returns the block's body, if any. #splat_index : NumberLiteral | NilLiteral Returns the index of the argument with a *splat, if any. Instance methods inherited from class Crystal8b7c:f320:99b9:690f:4595:cd17:293a:c069Macros8b7c:f320:99b9:690f:4595:cd17:293a:c069STNode
!=(other : ASTNode) : BoolLiteral !=, ==(other : ASTNode) : BoolLiteral ==, class_name : StringLiteral class_name, column_number : StringLiteral | NilLiteral column_number, end_column_number : StringLiteral | NilLiteral end_column_number, end_line_number : StringLiteral | NilLiteral end_line_number, filename : StringLiteral | NilLiteral filename, id : MacroId id, is_a?(type : TypeNode) : BoolLiteral is_a?, line_number : StringLiteral | NilLiteral line_number, nil? : BoolLiteral nil?, raise(message) : NoReturn raise, stringify : StringLiteral stringify, symbolize : SymbolLiteral symbolize Instance Method Detail def args : ArrayLiteral(MacroId)Source
Returns the blocks arguments. def body : ASTNodeSource
Returns the block's body, if any. def splat_index : NumberLiteral | NilLiteralSource
Returns the index of the argument with a *splat, if any.
|
dart:collection
add method void add(E value) Adds value at the end of the queue. Source void add(E value) {
_sentinel._prepend(value);
_elementCount++;
}
|
tf.contrib.seq2seq.BeamSearchDecoderOutput BeamSearchDecoderOutput(scores, predicted_ids, parent_ids)
tf.contrib.seq2seq.BeamSearchDecoderOutput(
scores, predicted_ids, parent_ids
)
Attributes
scores
predicted_ids
parent_ids
|
SIGTERM, SIGSEGV, SIGINT, SIGILL, SIGABRT, SIGFPE Defined in header <csignal> #define SIGTERM /*implementation defined*/
#define SIGSEGV /*implementation defined*/
#define SIGINT /*implementation defined*/
#define SIGILL /*implementation defined*/
#define SIGABRT /*implementation defined*/
#define SIGFPE /*implementation defined*/
Each of the above macro constants expands to an integer constant expression with distinct values, which represent different signals sent to the program.
Constant Explanation
SIGTERM termination request, sent to the program
SIGSEGV invalid memory access (segmentation fault)
SIGINT external interrupt, usually initiated by the user
SIGILL invalid program image, such as invalid instruction
SIGABRT abnormal termination condition, as is e.g. initiated by st8b7c:f320:99b9:690f:4595:cd17:293a:c069abort()
SIGFPE erroneous arithmetic operation such as divide by zero
Notes Additional signal names are specified by POSIX.
See also signal sets a signal handler for particular signal (function)
raise runs the signal handler for particular signal (function)
C documentation for signal types
|
function PoItem8b7c:f320:99b9:690f:4595:cd17:293a:c069getComment PoItem8b7c:f320:99b9:690f:4595:cd17:293a:c069getComment() Gets the comment of this translation. Return value String $comment File
core/lib/Drupal/Component/Gettext/PoItem.php, line 156 Class
PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code function getComment() {
return $this->_comment;
}
|
Class PluginAssetsCopyCommand Command for copying plugin assets to app's webroot. Namespace: Cake\Command Constants int CODE_ERROR 1 Default error code int CODE_SUCCESS 0 Default success code Property Summary $_modelFactories protected array<callableCake\Datasource\Locator\LocatorInterface> A list of overridden model factory functions. $_modelType protected string The model type to use. $_tableLocator protected Cake\ORM\Locator\LocatorInterface|null Table locator instance $args protected Cake\Console\Arguments Arguments $defaultTable protected string|null This object's default table alias. $io protected Cake\Console\ConsoleIo Console IO $modelClass protected deprecated string|null This object's primary model class name. Should be a plural form. CakePHP will not inflect the name. $name protected string The name of this command. Method Summary __construct() public Constructor _copyDirectory() protected Copy directory _createDirectory() protected Create directory _createSymlink() protected Create symlink _list() protected Get list of plugins to process. Plugins without a webroot directory are skipped. _process() protected Process plugins _remove() protected Remove folder/symlink. _setModelClass() protected Set the modelClass property based on conventions. abort() public Halt the the current process with a StopException. buildOptionParser() public Get the option parser. defaultName() public static Get the command name. displayHelp() protected Output help content execute() public Execute the command executeCommand() public Execute another command with the provided set of arguments. fetchTable() public Convenience method to get a table instance. getDescription() public static Get the command description. getModelType() public Get the model type to be used by this class getName() public Get the command name. getOptionParser() public Get the option parser. getRootName() public Get the root command name. getTableLocator() public Gets the table locator. initialize() public Hook method invoked by CakePHP when a command is about to be executed. loadModel() public deprecated Loads and constructs repository objects required by this object log() public Convenience method to write a message to Log. See Log8b7c:f320:99b9:690f:4595:cd17:293a:c069write() for more information on writing to logs. modelFactory() public Override a existing callable to generate repositories of a given type. run() public Run the command. setModelType() public Set the model type to be used by this class setName() public Set the name this command uses in the collection. setOutputLevel() protected Set the output level based on the Arguments. setTableLocator() public Sets the table locator. Method Detail __construct() public __construct() Constructor By default CakePHP will construct command objects when building the CommandCollection for your application. _copyDirectory() protected _copyDirectory(string $source, string $destination): bool Copy directory Parameters string $source Source directory string $destination Destination directory Returns bool _createDirectory() protected _createDirectory(string $dir): bool Create directory Parameters string $dir Directory name Returns bool _createSymlink() protected _createSymlink(string $target, string $link): bool Create symlink Parameters string $target Target directory string $link Link name Returns bool _list() protected _list(string|null $name = null): array<string, mixed> Get list of plugins to process. Plugins without a webroot directory are skipped. Parameters string|null $name optional Name of plugin for which to symlink assets. If null all plugins will be processed. Returns array<string, mixed> _process() protected _process(array<string, mixed> $plugins, bool $copy = false, bool $overwrite = false): void Process plugins Parameters array<string, mixed> $plugins List of plugins to process bool $copy optional Force copy mode. Default false. bool $overwrite optional Overwrite existing files. Returns void _remove() protected _remove(array<string, mixed> $config): bool Remove folder/symlink. Parameters array<string, mixed> $config Plugin config. Returns bool _setModelClass() protected _setModelClass(string $name): void Set the modelClass property based on conventions. If the property is already set it will not be overwritten Parameters string $name Class name. Returns void abort() public abort(int $code = sel8b7c:f320:99b9:690f:4595:cd17:293a:c069CODE_ERROR): void Halt the the current process with a StopException. Parameters int $code optional The exit code to use. Returns void Throws Cake\Console\Exception\StopException buildOptionParser() public buildOptionParser(Cake\Console\ConsoleOptionParser $parser): Cake\Console\ConsoleOptionParser Get the option parser. Parameters Cake\Console\ConsoleOptionParser $parser The option parser to update Returns Cake\Console\ConsoleOptionParser defaultName() public static defaultName(): string Get the command name. Returns the command name based on class name. For e.g. for a command with class name UpdateTableCommand the default name returned would be 'update_table'. Returns string displayHelp() protected displayHelp(Cake\Console\ConsoleOptionParser $parser, Cake\Console\Arguments $args, Cake\Console\ConsoleIo $io): void Output help content Parameters Cake\Console\ConsoleOptionParser $parser The option parser. Cake\Console\Arguments $args The command arguments. Cake\Console\ConsoleIo $io The console io Returns void execute() public execute(Cake\Console\Arguments $args, Cake\Console\ConsoleIo $io): int|null Execute the command Copying plugin assets to app's webroot. For vendor namespaced plugin, parent folder for vendor name are created if required. Parameters Cake\Console\Arguments $args The command arguments. Cake\Console\ConsoleIo $io The console io Returns int|null executeCommand() public executeCommand(Cake\Console\CommandInterface|string $command, array $args = [], Cake\Console\ConsoleIo|null $io = null): int|null Execute another command with the provided set of arguments. If you are using a string command name, that command's dependencies will not be resolved with the application container. Instead you will need to pass the command as an object with all of its dependencies. Parameters Cake\Console\CommandInterface|string $command The command class name or command instance. array $args optional The arguments to invoke the command with. Cake\Console\ConsoleIo|null $io optional The ConsoleIo instance to use for the executed command. Returns int|null fetchTable() public fetchTable(string|null $alias = null, array<string, mixed> $options = []): Cake\ORM\Table Convenience method to get a table instance. Parameters string|null $alias optional The alias name you want to get. Should be in CamelCase format. If null then the value of $defaultTable property is used. array<string, mixed> $options optional The options you want to build the table with. If a table has already been loaded the registry options will be ignored. Returns Cake\ORM\Table Throws Cake\Core\Exception\CakeException If `$alias` argument and `$defaultTable` property both are `null`. See Also \Cake\ORM\TableLocator8b7c:f320:99b9:690f:4595:cd17:293a:c069get() getDescription() public static getDescription(): string Get the command description. Returns string getModelType() public getModelType(): string Get the model type to be used by this class Returns string getName() public getName(): string Get the command name. Returns string getOptionParser() public getOptionParser(): Cake\Console\ConsoleOptionParser Get the option parser. You can override buildOptionParser() to define your options & arguments. Returns Cake\Console\ConsoleOptionParser Throws RuntimeException When the parser is invalid getRootName() public getRootName(): string Get the root command name. Returns string getTableLocator() public getTableLocator(): Cake\ORM\Locator\LocatorInterface Gets the table locator. Returns Cake\ORM\Locator\LocatorInterface initialize() public initialize(): void Hook method invoked by CakePHP when a command is about to be executed. Override this method and implement expensive/important setup steps that should not run on every command run. This method will be called before the options and arguments are validated and processed. Returns void loadModel() public loadModel(string|null $modelClass = null, string|null $modelType = null): Cake\Datasource\RepositoryInterface Loads and constructs repository objects required by this object Typically used to load ORM Table objects as required. Can also be used to load other types of repository objects your application uses. If a repository provider does not return an object a MissingModelException will be thrown. Parameters string|null $modelClass optional Name of model class to load. Defaults to $this->modelClass. The name can be an alias like 'Post' or FQCN like App\Model\Table\PostsTabl8b7c:f320:99b9:690f:4595:cd17:293a:c069class. string|null $modelType optional The type of repository to load. Defaults to the getModelType() value. Returns Cake\Datasource\RepositoryInterface Throws Cake\Datasource\Exception\MissingModelException If the model class cannot be found. UnexpectedValueException If $modelClass argument is not provided and ModelAwareTrait8b7c:f320:99b9:690f:4595:cd17:293a:c069$modelClass property value is empty. log() public log(string $message, string|int $level = LogLevel8b7c:f320:99b9:690f:4595:cd17:293a:c069RROR, array|string $context = []): bool Convenience method to write a message to Log. See Log8b7c:f320:99b9:690f:4595:cd17:293a:c069write() for more information on writing to logs. Parameters string $message Log message. string|int $level optional Error level. array|string $context optional Additional log data relevant to this message. Returns bool modelFactory() public modelFactory(string $type, Cake\Datasource\Locator\LocatorInterface|callable $factory): void Override a existing callable to generate repositories of a given type. Parameters string $type The name of the repository type the factory function is for. Cake\Datasource\Locator\LocatorInterface|callable $factory The factory function used to create instances. Returns void run() public run(array $argv, Cake\Console\ConsoleIo $io): int|null Run the command. Parameters array $argv Cake\Console\ConsoleIo $io Returns int|null setModelType() public setModelType(string $modelType): $this Set the model type to be used by this class Parameters string $modelType The model type Returns $this setName() public setName(string $name): $this Set the name this command uses in the collection. Generally invoked by the CommandCollection when the command is added. Required to have at least one space in the name so that the root command can be calculated. Parameters string $name Returns $this setOutputLevel() protected setOutputLevel(Cake\Console\Arguments $args, Cake\Console\ConsoleIo $io): void Set the output level based on the Arguments. Parameters Cake\Console\Arguments $args The command arguments. Cake\Console\ConsoleIo $io The console io Returns void setTableLocator() public setTableLocator(Cake\ORM\Locator\LocatorInterface $tableLocator): $this Sets the table locator. Parameters Cake\ORM\Locator\LocatorInterface $tableLocator LocatorInterface instance. Returns $this Property Detail $_modelFactories protected A list of overridden model factory functions. Type array<callableCake\Datasource\Locator\LocatorInterface> $_modelType protected The model type to use. Type string $_tableLocator protected Table locator instance Type Cake\ORM\Locator\LocatorInterface|null $args protected Arguments Type Cake\Console\Arguments $defaultTable protected This object's default table alias. Type string|null $io protected Console IO Type Cake\Console\ConsoleIo $modelClass protected deprecated This object's primary model class name. Should be a plural form. CakePHP will not inflect the name. Example: For an object named 'Comments', the modelClass would be 'Comments'. Plugin classes should use Plugin.Comments style names to correctly load models from the correct plugin. Use empty string to not use auto-loading on this object. Null auto-detects based on controller name. Type string|null $name protected The name of this command. Type string
|
apply_filters( 'pre_get_main_site_id', int|null $main_site_id, WP_Network $network ) Filters the main site ID. Description Returning a positive integer will effectively short-circuit the function. Parameters $main_site_id int|null If a positive integer is returned, it is interpreted as the main site ID. $network WP_Network The network object for which the main site was detected. Source File: wp-includes/class-wp-network.php. View all references $main_site_id = (int) apply_filters( 'pre_get_main_site_id', null, $this );
Related Used By Used By Description WP_Network8b7c:f320:99b9:690f:4595:cd17:293a:c069get_main_site_id() wp-includes/class-wp-network.php Returns the main site ID for the network.
Changelog Version Description 4.9.0 Introduced.
|
matplotlib.lines.segment_hits
matplotlib.lines.segment_hits(cx, cy, x, y, radius) [source]
Determine if any line segments are within radius of a point. Returns the list of line segments that are within that radius.
|
ResponseOptionsArgs
Experimental Interface
Interface Overview
interface ResponseOptionsArgs {
body : string|Object|FormData|ArrayBuffer|Blob
status : number
statusText : string
headers : Headers
type : ResponseType
url : string
}
Interface Description
Interface for options to construct a Response, based on ResponseInit from the Fetch spec. Interface Details
body : string|Object|FormData|ArrayBuffer|Blob
status : number
statusText : string
headers : Headers
type : ResponseType
url : string exported from @angular/http/index, defined in @angular/http/src/interfaces.ts
|
Apache Module mod_mime
Description:
Associates the requested filename's extensions with the file's behavior (handlers and filters) and content (mime-type, language, character set and encoding)
Status:
Base
Module Identifier:
mime_module
Source File:
mod_mime.c
Summary This module is used to assign content metadata to the content selected for an HTTP response by mapping patterns in the URI or filenames to the metadata values. For example, the filename extensions of content files often define the content's Internet media type, language, character set, and content-encoding. This information is sent in HTTP messages containing that content and used in content negotiation when selecting alternatives, such that the user's preferences are respected when choosing one of several possible contents to serve. See mod_negotiation for more information about content negotiation. The directives AddCharset, AddEncoding, AddLanguage and AddType are all used to map file extensions onto the metadata for that file. Respectively they set the character set, content-encoding, content-language, and media-type (content-type) of documents. The directive TypesConfig is used to specify a file which also maps extensions onto media types. In addition, mod_mime may define the handler and filters that originate and process content. The directives AddHandler, AddOutputFilter, and AddInputFilter control the modules or scripts that serve the document. The MultiviewsMatch directive allows mod_negotiation to consider these file extensions to be included when testing Multiviews matches. While mod_mime associates metadata with filename extensions, the core server provides directives that are used to associate all the files in a given container (e.g., <Location>, <Directory>, or <Files>) with particular metadata. These directives include ForceType, SetHandler, SetInputFilter, and SetOutputFilter. The core directives override any filename extension mappings defined in mod_mime. Note that changing the metadata for a file does not change the value of the Last-Modified header. Thus, previously cached copies may still be used by a client or proxy, with the previous headers. If you change the metadata (language, content type, character set or encoding) you may need to 'touch' affected files (updating their last modified date) to ensure that all visitors are receive the corrected content headers. Files with Multiple Extensions Files can have more than one extension; the order of the extensions is normally irrelevant. For example, if the file welcome.html.fr maps onto content type text/html and language French then the file welcome.fr.html will map onto exactly the same information. If more than one extension is given that maps onto the same type of metadata, then the one to the right will be used, except for languages and content encodings. For example, if .gif maps to the media-type image/gif and .html maps to the media-type text/html, then the file welcome.gif.html will be associated with the media-type text/html. Languages and content encodings are treated accumulative, because one can assign more than one language or encoding to a particular resource. For example, the file welcome.html.en.de will be delivered with Content-Language: en, de and Content-Type: text/html. Care should be taken when a file with multiple extensions gets associated with both a media-type and a handler. This will usually result in the request being handled by the module associated with the handler. For example, if the .imap extension is mapped to the handler imap-file (from mod_imagemap) and the .html extension is mapped to the media-type text/html, then the file world.imap.html will be associated with both the imap-file handler and text/html media-type. When it is processed, the imap-file handler will be used, and so it will be treated as a mod_imagemap imagemap file. If you would prefer only the last dot-separated part of the filename to be mapped to a particular piece of meta-data, then do not use the Add* directives. For example, if you wish to have the file foo.html.cgi processed as a CGI script, but not the file bar.cgi.html, then instead of using AddHandler cgi-script .cgi, use
Configure handler based on final extension only
<FilesMatch "[^.]+\.cgi$">
SetHandler cgi-script
</FilesMatch> Content encoding A file of a particular media-type can additionally be encoded a particular way to simplify transmission over the Internet. While this usually will refer to compression, such as gzip, it can also refer to encryption, such a pgp or to an encoding such as UUencoding, which is designed for transmitting a binary file in an ASCII (text) format. The HTTP/1.1 RFC, section 14.11 puts it this way: The Content-Encoding entity-header field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type header field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type. By using more than one file extension (see section above about multiple file extensions), you can indicate that a file is of a particular type, and also has a particular encoding. For example, you may have a file which is a Microsoft Word document, which is pkzipped to reduce its size. If the .doc extension is associated with the Microsoft Word file type, and the .zip extension is associated with the pkzip file encoding, then the file Resume.doc.zip would be known to be a pkzip'ed Word document. Apache sends a Content-encoding header with the resource, in order to tell the client browser about the encoding method. Content-encoding: pkzip Character sets and languages In addition to file type and the file encoding, another important piece of information is what language a particular document is in, and in what character set the file should be displayed. For example, the document might be written in the Vietnamese alphabet, or in Cyrillic, and should be displayed as such. This information, also, is transmitted in HTTP headers. The character set, language, encoding and mime type are all used in the process of content negotiation (See mod_negotiation) to determine which document to give to the client, when there are alternative documents in more than one character set, language, encoding or mime type. All filename extensions associations created with AddCharset, AddEncoding, AddLanguage and AddType directives (and extensions listed in the MimeMagicFile) participate in this select process. Filename extensions that are only associated using the AddHandler, AddInputFilter or AddOutputFilter directives may be included or excluded from matching by using the MultiviewsMatch directive. Charset To convey this further information, Apache optionally sends a Content-Language header, to specify the language that the document is in, and can append additional information onto the Content-Type header to indicate the particular character set that should be used to correctly render the information. Content-Language: en, fr Content-Type: text/plain; charset=ISO-8859-1 The language specification is the two-letter abbreviation for the language. The charset is the name of the particular character set which should be used.
AddCharset Directive
Description:
Maps the given filename extensions to the specified content charset
Syntax:
AddCharset charset extension [extension] ...
Context:
server config, virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The AddCharset directive maps the given filename extensions to the specified content charset (the Internet registered name for a given character encoding). charset is the media type's charset parameter for resources with filenames containing extension. This mapping is added to any already in force, overriding any mappings that already exist for the same extension.
Example
AddLanguage ja .ja
AddCharset EUC-JP .euc
AddCharset ISO-2022-JP .jis
AddCharset SHIFT_JIS .sjis Then the document xxxx.ja.jis will be treated as being a Japanese document whose charset is ISO-2022-JP (as will the document xxxx.jis.ja). The AddCharset directive is useful for both to inform the client about the character encoding of the document so that the document can be interpreted and displayed appropriately, and for content negotiation, where the server returns one from several documents based on the client's charset preference. The extension argument is case-insensitive and can be specified with or without a leading dot. Filenames may have multiple extensions and the extension argument will be compared against each of them. See also mod_negotiation AddDefaultCharset
AddEncoding Directive
Description:
Maps the given filename extensions to the specified encoding type
Syntax:
AddEncoding encoding extension [extension] ...
Context:
server config, virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The AddEncoding directive maps the given filename extensions to the specified HTTP content-encoding. encoding is the HTTP content coding to append to the value of the Content-Encoding header field for documents named with the extension. This mapping is added to any already in force, overriding any mappings that already exist for the same extension.
Example
AddEncoding x-gzip .gz
AddEncoding x-compress .Z This will cause filenames containing the .gz extension to be marked as encoded using the x-gzip encoding, and filenames containing the .Z extension to be marked as encoded with x-compress. Old clients expect x-gzip and x-compress, however the standard dictates that they're equivalent to gzip and compress respectively. Apache does content encoding comparisons by ignoring any leading x-. When responding with an encoding Apache will use whatever form (i.e., x-foo or foo) the client requested. If the client didn't specifically request a particular form Apache will use the form given by the AddEncoding directive. To make this long story short, you should always use x-gzip and x-compress for these two specific encodings. More recent encodings, such as deflate, should be specified without the x-. The extension argument is case-insensitive and can be specified with or without a leading dot. Filenames may have multiple extensions and the extension argument will be compared against each of them.
AddHandler Directive
Description:
Maps the filename extensions to the specified handler
Syntax:
AddHandler handler-name extension [extension] ...
Context:
server config, virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
Files having the name extension will be served by the specified handler-name. This mapping is added to any already in force, overriding any mappings that already exist for the same extension. For example, to activate CGI scripts with the file extension .cgi, you might use: AddHandler cgi-script .cgi Once that has been put into your httpd.conf file, any file containing the .cgi extension will be treated as a CGI program. The extension argument is case-insensitive and can be specified with or without a leading dot. Filenames may have multiple extensions and the extension argument will be compared against each of them. See also SetHandler
AddInputFilter Directive
Description:
Maps filename extensions to the filters that will process client requests
Syntax:
AddInputFilter filter[;filter...] extension [extension] ...
Context:
server config, virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
AddInputFilter maps the filename extension extension to the filters which will process client requests and POST input when they are received by the server. This is in addition to any filters defined elsewhere, including the SetInputFilter directive. This mapping is merged over any already in force, overriding any mappings that already exist for the same extension. If more than one filter is specified, they must be separated by semicolons in the order in which they should process the content. The filter is case-insensitive. The extension argument is case-insensitive and can be specified with or without a leading dot. Filenames may have multiple extensions and the extension argument will be compared against each of them. See also RemoveInputFilter SetInputFilter
AddLanguage Directive
Description:
Maps the given filename extension to the specified content language
Syntax:
AddLanguage language-tag extension [extension] ...
Context:
server config, virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The AddLanguage directive maps the given filename extension to the specified content language. Files with the filename extension are assigned an HTTP Content-Language value of language-tag corresponding to the language identifiers defined by RFC 3066. This directive overrides any mappings that already exist for the same extension.
Example
AddEncoding x-compress .Z
AddLanguage en .en
AddLanguage fr .fr Then the document xxxx.en.Z will be treated as being a compressed English document (as will the document xxxx.Z.en). Although the content language is reported to the client, the browser is unlikely to use this information. The AddLanguage directive is more useful for content negotiation, where the server returns one from several documents based on the client's language preference. If multiple language assignments are made for the same extension, the last one encountered is the one that is used. That is, for the case of: AddLanguage en .en
AddLanguage en-gb .en
AddLanguage en-us .en documents with the extension .en would be treated as being en-us. The extension argument is case-insensitive and can be specified with or without a leading dot. Filenames may have multiple extensions and the extension argument will be compared against each of them. See also mod_negotiation
AddOutputFilter Directive
Description:
Maps filename extensions to the filters that will process responses from the server
Syntax:
AddOutputFilter filter[;filter...] extension [extension] ...
Context:
server config, virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The AddOutputFilter directive maps the filename extension extension to the filters which will process responses from the server before they are sent to the client. This is in addition to any filters defined elsewhere, including SetOutputFilter and AddOutputFilterByType directive. This mapping is merged over any already in force, overriding any mappings that already exist for the same extension. For example, the following configuration will process all .shtml files for server-side includes and will then compress the output using mod_deflate. AddOutputFilter INCLUDES;DEFLATE shtml If more than one filter is specified, they must be separated by semicolons in the order in which they should process the content. The filter argument is case-insensitive. The extension argument is case-insensitive and can be specified with or without a leading dot. Filenames may have multiple extensions and the extension argument will be compared against each of them. Note that when defining a set of filters using the AddOutputFilter directive, any definition made will replace any previous definition made by the AddOutputFilter directive. # Effective filter "DEFLATE"
AddOutputFilter DEFLATE shtml
<Location "/foo">
# Effective filter "INCLUDES", replacing "DEFLATE"
AddOutputFilter INCLUDES shtml
</Location>
<Location "/bar">
# Effective filter "INCLUDES;DEFLATE", replacing "DEFLATE"
AddOutputFilter INCLUDES;DEFLATE shtml
</Location>
<Location "/bar/baz">
# Effective filter "BUFFER", replacing "INCLUDES;DEFLATE"
AddOutputFilter BUFFER shtml
</Location>
<Location "/bar/baz/buz">
# No effective filter, replacing "BUFFER"
RemoveOutputFilter shtml
</Location> See also RemoveOutputFilter SetOutputFilter
AddType Directive
Description:
Maps the given filename extensions onto the specified content type
Syntax:
AddType media-type extension [extension] ...
Context:
server config, virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The AddType directive maps the given filename extensions onto the specified content type. media-type is the media type to use for filenames containing extension. This mapping is added to any already in force, overriding any mappings that already exist for the same extension. It is recommended that new media types be added using the AddType directive rather than changing the TypesConfig file.
Example
AddType image/gif .gif Or, to specify multiple file extensions in one directive:
Example
AddType image/jpeg jpeg jpg jpe The extension argument is case-insensitive and can be specified with or without a leading dot. Filenames may have multiple extensions and the extension argument will be compared against each of them. A similar effect to mod_negotiation's LanguagePriority can be achieved by qualifying a media-type with qs:
Example
AddType application/rss+xml;qs=0.8 .xml This is useful in situations, e.g. when a client requesting Accept: */* can not actually processes the content returned by the server. This directive primarily configures the content types generated for static files served out of the filesystem. For resources other than static files, where the generator of the response typically specifies a Content-Type, this directive has no effect.
Note If no handler is explicitly set for a request, the specified content type will also be used as the handler name. When explicit directives such as SetHandler or AddHandler do not apply to the current request, the internal handler name normally set by those directives is instead set to the content type specified by this directive. This is a historical behavior that may be used by some third-party modules (such as mod_php) for taking responsibility for the matching request. Configurations that rely on such "synthetic" types should be avoided. Additionally, configurations that restrict access to SetHandler or AddHandler should restrict access to this directive as well. See also ForceType mod_negotiation
DefaultLanguage Directive
Description:
Defines a default language-tag to be sent in the Content-Language header field for all resources in the current context that have not been assigned a language-tag by some other means.
Syntax:
DefaultLanguage language-tag
Context:
server config, virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The DefaultLanguage directive tells Apache that all resources in the directive's scope (e.g., all resources covered by the current <Directory> container) that don't have an explicit language extension (such as .fr or .de as configured by AddLanguage) should be assigned a Content-Language of language-tag. This allows entire directory trees to be marked as containing Dutch content, for instance, without having to rename each file. Note that unlike using extensions to specify languages, DefaultLanguage can only specify a single language. If no DefaultLanguage directive is in force and a file does not have any language extensions as configured by AddLanguage, then no Content-Language header field will be generated.
Example
DefaultLanguage en See also mod_negotiation
ModMimeUsePathInfo Directive
Description:
Tells mod_mime to treat path_info components as part of the filename
Syntax:
ModMimeUsePathInfo On|Off
Default:
ModMimeUsePathInfo Off
Context:
directory
Status:
Base
Module:
mod_mime
The ModMimeUsePathInfo directive is used to combine the filename with the path_info URL component to apply mod_mime's directives to the request. The default value is Off - therefore, the path_info component is ignored. This directive is recommended when you have a virtual filesystem.
Example
ModMimeUsePathInfo On If you have a request for /index.php/foo.shtml mod_mime will now treat the incoming request as /index.php/foo.shtml and directives like AddOutputFilter INCLUDES .shtml will add the INCLUDES filter to the request. If ModMimeUsePathInfo is not set, the INCLUDES filter will not be added. This will work analogously for virtual paths, such as those defined by <Location> See also AcceptPathInfo
MultiviewsMatch Directive
Description:
The types of files that will be included when searching for a matching file with MultiViews
Syntax:
MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers [Handlers|Filters]
Default:
MultiviewsMatch NegotiatedOnly
Context:
server config, virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
MultiviewsMatch permits three different behaviors for mod_negotiation's Multiviews feature. Multiviews allows a request for a file, e.g. index.html, to match any negotiated extensions following the base request, e.g. index.html.en, index.html.fr, or index.html.gz. The NegotiatedOnly option provides that every extension following the base name must correlate to a recognized mod_mime extension for content negotiation, e.g. Charset, Content-Type, Language, or Encoding. This is the strictest implementation with the fewest unexpected side effects, and is the default behavior. To include extensions associated with Handlers and/or Filters, set the MultiviewsMatch directive to either Handlers, Filters, or both option keywords. If all other factors are equal, the smallest file will be served, e.g. in deciding between index.html.cgi of 500 bytes and index.html.pl of 1000 bytes, the .cgi file would win in this example. Users of .asis files might prefer to use the Handler option, if .asis files are associated with the asis-handler. You may finally allow Any extensions to match, even if mod_mime doesn't recognize the extension. This can cause unpredictable results, such as serving .old or .bak files the webmaster never expected to be served. For example, the following configuration will allow handlers and filters to participate in Multviews, but will exclude unknown files: MultiviewsMatch Handlers Filters MultiviewsMatch is not allowed in a <Location> or <LocationMatch> section. See also Options mod_negotiation
RemoveCharset Directive
Description:
Removes any character set associations for a set of file extensions
Syntax:
RemoveCharset extension [extension] ...
Context:
virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The RemoveCharset directive removes any character set associations for files with the given extensions. This allows .htaccess files in subdirectories to undo any associations inherited from parent directories or the server config files. The extension argument is case-insensitive and can be specified with or without a leading dot.
Example
RemoveCharset .html .shtml
RemoveEncoding Directive
Description:
Removes any content encoding associations for a set of file extensions
Syntax:
RemoveEncoding extension [extension] ...
Context:
virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The RemoveEncoding directive removes any encoding associations for files with the given extensions. This allows .htaccess files in subdirectories to undo any associations inherited from parent directories or the server config files. An example of its use might be:
/foo/.htaccess:
AddEncoding x-gzip .gz
AddType text/plain .asc
<Files "*.gz.asc">
RemoveEncoding .gz
</Files> This will cause foo.gz to be marked as being encoded with the gzip method, but foo.gz.asc as an unencoded plaintext file.
Note RemoveEncoding directives are processed after any AddEncoding directives, so it is possible they may undo the effects of the latter if both occur within the same directory configuration. The extension argument is case-insensitive and can be specified with or without a leading dot.
RemoveHandler Directive
Description:
Removes any handler associations for a set of file extensions
Syntax:
RemoveHandler extension [extension] ...
Context:
virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The RemoveHandler directive removes any handler associations for files with the given extensions. This allows .htaccess files in subdirectories to undo any associations inherited from parent directories or the server config files. An example of its use might be:
/foo/.htaccess:
AddHandler server-parsed .html
/foo/bar/.htaccess:
RemoveHandler .html This has the effect of returning .html files in the /foo/bar directory to being treated as normal files, rather than as candidates for parsing (see the mod_include module). The extension argument is case-insensitive and can be specified with or without a leading dot.
RemoveInputFilter Directive
Description:
Removes any input filter associations for a set of file extensions
Syntax:
RemoveInputFilter extension [extension] ...
Context:
virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The RemoveInputFilter directive removes any input filter associations for files with the given extensions. This allows .htaccess files in subdirectories to undo any associations inherited from parent directories or the server config files. The extension argument is case-insensitive and can be specified with or without a leading dot. See also AddInputFilter SetInputFilter
RemoveLanguage Directive
Description:
Removes any language associations for a set of file extensions
Syntax:
RemoveLanguage extension [extension] ...
Context:
virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The RemoveLanguage directive removes any language associations for files with the given extensions. This allows .htaccess files in subdirectories to undo any associations inherited from parent directories or the server config files. The extension argument is case-insensitive and can be specified with or without a leading dot.
RemoveOutputFilter Directive
Description:
Removes any output filter associations for a set of file extensions
Syntax:
RemoveOutputFilter extension [extension] ...
Context:
virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The RemoveOutputFilter directive removes any output filter associations for files with the given extensions. This allows .htaccess files in subdirectories to undo any associations inherited from parent directories or the server config files. The extension argument is case-insensitive and can be specified with or without a leading dot.
Example
RemoveOutputFilter shtml See also AddOutputFilter
RemoveType Directive
Description:
Removes any content type associations for a set of file extensions
Syntax:
RemoveType extension [extension] ...
Context:
virtual host, directory, .htaccess
Override:
FileInfo
Status:
Base
Module:
mod_mime
The RemoveType directive removes any media type associations for files with the given extensions. This allows .htaccess files in subdirectories to undo any associations inherited from parent directories or the server config files. An example of its use might be:
/foo/.htaccess:
RemoveType .cgi This will remove any special handling of .cgi files in the /foo/ directory and any beneath it, causing responses containing those files to omit the HTTP Content-Type header field.
Note RemoveType directives are processed after any AddType directives, so it is possible they may undo the effects of the latter if both occur within the same directory configuration. The extension argument is case-insensitive and can be specified with or without a leading dot.
TypesConfig Directive
Description:
The location of the mime.types file
Syntax:
TypesConfig file-path
Default:
TypesConfig conf/mime.types
Context:
server config
Status:
Base
Module:
mod_mime
The TypesConfig directive sets the location of the media types configuration file. File-path is relative to the ServerRoot. This file sets the default list of mappings from filename extensions to content types. Most administrators use the mime.types file provided by their OS, which associates common filename extensions with the official list of IANA registered media types maintained at http://www.iana.org/assignments/media-types/index.html as well as a large number of unofficial types. This simplifies the httpd.conf file by providing the majority of media-type definitions, and may be overridden by AddType directives as needed. You should not edit the mime.types file, because it may be replaced when you upgrade your server. The file contains lines in the format of the arguments to an AddType directive: media-type [extension] ... The case of the extension does not matter. Blank lines, and lines beginning with a hash character (#) are ignored. Empty lines are there for completeness (of the mime.types file). Apache httpd can still determine these types with mod_mime_magic. Please do not send requests to the Apache HTTP Server Project to add any new entries in the distributed mime.types file unless (1) they are already registered with IANA, and (2) they use widely accepted, non-conflicting filename extensions across platforms. category/x-subtype requests will be automatically rejected, as will any new two-letter extensions as they will likely conflict later with the already crowded language and character set namespace. See also mod_mime_magic
|
aws_lambda resource [edit on GitHub] Use the aws_lambda resource to test a specific lambda. Syntax describe aws_lambda do
it { should exist}
its ('handler') { should eq 'main.on_event'}
its ('version') { should eq '$LATEST' }
its ('runtime') { should eq 'python3.7' }
end
Parameters This resource expects the name of the function. Properties All properties as defined by the Aws8b7c:f320:99b9:690f:4595:cd17:293a:c069lam8b7c:f320:99b9:690f:4595:cd17:293a:c069Types8b7c:f320:99b9:690f:4595:cd17:293a:c069GetFunctionResponse Examples tests that all lambdas with a particular tag is correctly deployed describe aws_lambda('my_new_lambda') do
it { should exist}
its ('handler') { should eq 'main.on_event'}
its ('version') { should eq '$LATEST' }
its ('runtime') { should eq 'python3.7' }
end
Matchers This InSpec audit resource uses the standard matchers. For a full list of available matchers, please visit our matchers page. AWS Permissions Your Principal will need the lambda:GetFunction action with Effect set to Allow. You can find detailed documentation at AWS Lambda
|
Interface Formattable public interface Formattable The Formattable interface must be implemented by any class that needs to perform custom formatting using the 's' conversion specifier of Formatter. This interface allows basic control for formatting arbitrary objects. For example, the following class prints out different representations of a stock's name depending on the flags and length constraints:
import java.nio.CharBuffer;
import java.util.Formatter;
import java.util.Formattable;
import java.util.Locale;
import static java.util.FormattableFlags.*;
...
public class StockName implements Formattable {
private String symbol, companyName, frenchCompanyName;
public StockName(String symbol, String companyName,
String frenchCompanyName) {
...
}
...
public void formatTo(Formatter fmt, int f, int width, int precision) {
StringBuilder sb = new StringBuilder();
// decide form of name
String name = companyName;
if (fmt.locale().equals(Locale.FRANCE))
name = frenchCompanyName;
boolean alternate = (f & ALTERNATE) == ALTERNATE;
boolean usesymbol = alternate || (precision != -1 && precision < 10);
String out = (usesymbol ? symbol : name);
// apply precision
if (precision == -1 || out.length() < precision) {
// write it all
sb.append(out);
} else {
sb.append(out.substring(0, precision - 1)).append('*');
}
// apply width and justification
int len = sb.length();
if (len < width)
for (int i = 0; i < width - len; i++)
if ((f & LEFT_JUSTIFY) == LEFT_JUSTIFY)
sb.append(' ');
else
sb.insert(0, ' ');
fmt.format(sb.toString());
}
public String toString() {
return String.format("%s - %s", symbol, companyName);
}
}
When used in conjunction with the Formatter, the above class produces the following output for various format strings.
Formatter fmt = new Formatter();
StockName sn = new StockName("HUGE", "Huge Fruit, Inc.",
"Fruit Titanesque, Inc.");
fmt.format("%s", sn); // -> "Huge Fruit, Inc."
fmt.format("%s", sn.toString()); // -> "HUGE - Huge Fruit, Inc."
fmt.format("%#s", sn); // -> "HUGE"
fmt.format("%-10.8s", sn); // -> "HUGE "
fmt.format("%.12s", sn); // -> "Huge Fruit,*"
fmt.format(Locale.FRANCE, "%25s", sn); // -> " Fruit Titanesque, Inc."
Formattables are not necessarily safe for multithreaded access. Thread safety is optional and may be enforced by classes that extend and implement this interface.
Unless otherwise specified, passing a null argument to any method in this interface will cause a NullPointerException to be thrown.
Since: 1.5 Method Summary
Modifier and Type
Method
Description
void
formatTo(Formatter formatter,
int flags,
int width,
int precision)
Formats the object using the provided formatter.
Method Details formatTo void formatTo(Formatter formatter, int flags, int width, int precision) Formats the object using the provided formatter. Parameters:
formatter - The formatter. Implementing classes may call formatter.out() or formatter.locale() to obtain the Appendable or Locale used by this formatter respectively.
flags - The flags modify the output format. The value is interpreted as a bitmask. Any combination of the following flags may be set: FormattableFlags.LEFT_JUSTIFY, FormattableFlags.UPPERCASE, and FormattableFlags.ALTERNATE. If no flags are set, the default formatting of the implementing class will apply.
width - The minimum number of characters to be written to the output. If the length of the converted value is less than the width then the output will be padded by ' ' until the total number of characters equals width. The padding is at the beginning by default. If the FormattableFlags.LEFT_JUSTIFY flag is set then the padding will be at the end. If width is -1 then there is no minimum.
precision - The maximum number of characters to be written to the output. The precision is applied before the width, thus the output will be truncated to precision characters even if the width is greater than the precision. If precision is -1 then there is no explicit limit on the number of characters. Throws:
IllegalFormatException - If any of the parameters are invalid. For specification of all possible formatting errors, see the Details section of the formatter class specification.
|
std.variant This module implements a discriminated union type (a.k.a. tagged union, algebraic type). Such types are useful for type-uniform binary interfaces, interfacing with scripting languages, and comfortable exploratory programming.
A Variant object can hold a value of any type, with very few restrictions (such as shared types and noncopyable types). Setting the value is as immediate as assigning to the Variant object. To read back the value of the appropriate type T, use the get method. To query whether a Variant currently holds a value of type T, use peek. To fetch the exact type currently held, call type, which returns the TypeInfo of the current value. In addition to Variant, this module also defines the Algebraic type constructor. Unlike Variant, Algebraic only allows a finite set of types, which are specified in the instantiation (e.g. Algebraic!(int, string) may only hold an int or a string).
Credits
Reviewed by Brad Roberts. Daniel Keep provided a detailed code review prompting the following improvements: (1) better support for arrays; (2) support for associative arrays; (3) friendlier behavior towards the garbage collector.
License:
Boost License 1.0.
Authors:
Andrei Alexandrescu
Source
std/variant.d
Examples:
Variant a; // Must assign before use, otherwise exception ensues
// Initialize with an integer; make the type int
Variant b = 42;
writeln(b.type); // typeid (int)
// Peek at the value
assert(b.peek!(int) !is null && *b.peek!(int) == 42);
// Automatically convert per language rules
auto x = b.get!(real);
// Assign any other type, including other variants
a = b;
a = 3.14;
writeln(a.type); // typeid (double)
// Implicit conversions work just as with built-in types
assert(a < b);
// Check for convertibility
assert(!a.convertsTo!(int)); // double not convertible to int
// Strings and all other arrays are supported
a = "now I'm a string";
writeln(a); // "now I'm a string"
// can also assign arrays
a = new int[42];
writeln(a.length); // 42
a[5] = 7;
writeln(a[5]); // 7
// Can also assign class values
class Foo {}
auto foo = new Foo;
a = foo;
assert(*a.peek!(Foo) == foo); // and full type information is preserved
template maxSize(T...)
Gives the sizeof the largest type given.
Examples:
static assert(maxSize!(int, long) == 8);
static assert(maxSize!(bool, byte) == 1);
struct Cat { int a, b, c; }
static assert(maxSize!(bool, Cat) == 12);
struct VariantN(size_t maxDataSize, AllowedTypesParam...);
Back-end type seldom used directly by user code. Two commonly-used types using VariantN are:
Algebraic: A closed discriminated union with a limited type universe (e.g., Algebraic!(int, double, string) only accepts these three types and rejects anything else).
Variant: An open discriminated union allowing an unbounded set of types. If any of the types in the Variant are larger than the largest built-in type, they will automatically be boxed. This means that even large types will only be the size of a pointer within the Variant, but this also implies some overhead. Variant can accommodate all primitive types and all user-defined types.
Both Algebraic and Variant share VariantN's interface. (See their respective documentations below.) VariantN is a discriminated union type parameterized with the largest size of the types stored (maxDataSize) and with the list of allowed types (AllowedTypes). If the list is empty, then any type up of size up to maxDataSize (rounded up for alignment) can be stored in a VariantN object without being boxed (types larger than this will be boxed).
Examples:
alias Var = VariantN!(maxSize!(int, double, string));
Var a; // Must assign before use, otherwise exception ensues
// Initialize with an integer; make the type int
Var b = 42;
writeln(b.type); // typeid (int)
// Peek at the value
assert(b.peek!(int) !is null && *b.peek!(int) == 42);
// Automatically convert per language rules
auto x = b.get!(real);
// Assign any other type, including other variants
a = b;
a = 3.14;
writeln(a.type); // typeid (double)
// Implicit conversions work just as with built-in types
assert(a < b);
// Check for convertibility
assert(!a.convertsTo!(int)); // double not convertible to int
// Strings and all other arrays are supported
a = "now I'm a string";
writeln(a); // "now I'm a string"
Examples:
can also assign arrays alias Var = VariantN!(maxSize!(int[]));
Var a = new int[42];
writeln(a.length); // 42
a[5] = 7;
writeln(a[5]); // 7
Examples:
Can also assign class values alias Var = VariantN!(maxSize!(int*)); // classes are pointers
Var a;
class Foo {}
auto foo = new Foo;
a = foo;
assert(*a.peek!(Foo) == foo); // and full type information is preserved
alias AllowedTypes = This2Variant!(VariantN, AllowedTypesParam);
The list of allowed types. If empty, any type is allowed. enum bool allowed(T);
Tells whether a type T is statically allowed for storage inside a VariantN object by looking T up in AllowedTypes. this(T)(T value);
Constructs a VariantN value given an argument of a generic type. Statically rejects disallowed types. this(T : VariantN!(tsize, Types), size_t tsize, Types...)(T value) Constraints: if (!is(T : VariantN) && (Types.length > 0) && allSatisfy!(allowed, Types));
Allows assignment from a subset algebraic type VariantN opAssign(T)(T rhs);
Assigns a VariantN from a generic argument. Statically rejects disallowed types. const pure nothrow @property bool hasValue();
Returns true if and only if the VariantN object holds a valid value (has been initialized with, or assigned from, a valid value).
Examples:
Variant a;
assert(!a.hasValue);
Variant b;
a = b;
assert(!a.hasValue); // still no value
a = 5;
assert(a.hasValue);
inout @property inout(T)* peek(T)();
If the VariantN object holds a value of the exact type T, returns a pointer to that value. Otherwise, returns null. In cases where T is statically disallowed, peek will not compile.
Examples:
Variant a = 5;
auto b = a.peek!(int);
assert(b !is null);
*b = 6;
writeln(a); // 6
const nothrow @property @trusted TypeInfo type();
Returns the typeid of the currently held value. const @property bool convertsTo(T)();
Returns true if and only if the VariantN object holds an object implicitly convertible to type T. Implicit convertibility is defined as per ImplicitConversionTargets. inout @property inout(T) get(T)(); inout @property auto get(uint index)() Constraints: if (index < AllowedTypes.length);
Returns the value stored in the VariantN object, either by specifying the needed type or the index in the list of allowed types. The latter overload only applies to bounded variants (e.g. Algebraic).
Parameters:
T The requested type. The currently stored value must implicitly convert to the requested type, in fact DecayStaticToDynamicArray!T. If an implicit conversion is not possible, throws a VariantException.
index The index of the type among AllowedTypesParam, zero-based.
@property T coerce(T)();
Returns the value stored in the VariantN object, explicitly converted (coerced) to the requested type T. If T is a string type, the value is formatted as a string. If the VariantN object is a string, a parse of the string to type T is attempted. If a conversion is not possible, throws a VariantException. string toString();
Formats the stored value as a string. const bool opEquals(T)(auto ref T rhs) Constraints: if (allowed!T || is(immutable(T) == immutable(VariantN)));
Comparison for equality used by the "==" and "!=" operators. int opCmp(T)(T rhs) Constraints: if (allowed!T);
Ordering comparison used by the "<", "<=", ">", and ">=" operators. In case comparison is not sensible between the held value and rhs, an exception is thrown. const nothrow @safe size_t toHash();
Computes the hash of the held value. VariantN opBinary(string op, T)(T rhs) Constraints: if ((op == "+" || op == "-" || op == "*" || op == "/" || op == "^^" || op == "%") && is(typeof(opArithmetic!(T, op)(rhs)))); VariantN opBinary(string op, T)(T rhs) Constraints: if ((op == "&" || op == "|" || op == "^" || op == ">>" || op == "<<" || op == ">>>") && is(typeof(opLogic!(T, op)(rhs)))); VariantN opBinaryRight(string op, T)(T lhs) Constraints: if ((op == "+" || op == "*") && is(typeof(opArithmetic!(T, op)(lhs)))); VariantN opBinaryRight(string op, T)(T lhs) Constraints: if ((op == "&" || op == "|" || op == "^") && is(typeof(opLogic!(T, op)(lhs)))); VariantN opBinary(string op, T)(T rhs) Constraints: if (op == "~"); VariantN opOpAssign(string op, T)(T rhs);
Arithmetic between VariantN objects and numeric values. All arithmetic operations return a VariantN object typed depending on the types of both values involved. The conversion rules mimic D's built-in rules for arithmetic conversions. inout inout(Variant) opIndex(K)(K i); Variant opIndexAssign(T, N)(T value, N i); Variant opIndexOpAssign(string op, T, N)(T value, N i);
Array and associative array operations. If a VariantN contains an (associative) array, it can be indexed into. Otherwise, an exception is thrown.
Examples:
Variant a = new int[10];
a[5] = 42;
writeln(a[5]); // 42
a[5] += 8;
writeln(a[5]); // 50
int[int] hash = [ 42:24 ];
a = hash;
writeln(a[42]); // 24
a[42] /= 2;
writeln(a[42]); // 12
@property size_t length();
If the VariantN contains an (associative) array, returns the length of that array. Otherwise, throws an exception. int opApply(Delegate)(scope Delegate dg) Constraints: if (is(Delegate == delegate));
If the VariantN contains an array, applies dg to each element of the array in turn. Otherwise, throws an exception. template Algebraic(T...)
Algebraic data type restricted to a closed set of possible types. It's an alias for VariantN with an appropriately-constructed maximum size. Algebraic is useful when it is desirable to restrict what a discriminated type could hold to the end of defining simpler and more efficient manipulation.
Examples:
auto v = Algebraic!(int, double, string)(5);
assert(v.peek!(int));
v = 3.14;
assert(v.peek!(double));
// auto x = v.peek!(long); // won't compile, type long not allowed
// v = '1'; // won't compile, type char not allowed
Examples:
Self-Referential Types A useful and popular use of algebraic data structures is for defining self-referential data structures, i.e. structures that embed references to values of their own type within. This is achieved with Algebraic by using This as a placeholder whenever a reference to the type being defined is needed. The Algebraic instantiation will perform alpha renaming on its constituent types, replacing This with the self-referenced type. The structure of the type involving This may be arbitrarily complex. import std.typecons : Tuple, tuple;
// A tree is either a leaf or a branch of two other trees
alias Tree(Leaf) = Algebraic!(Leaf, Tuple!(This*, This*));
Tree!int tree = tuple(new Tree!int(42), new Tree!int(43));
Tree!int* right = tree.get!1[1];
writeln(*right); // 43
// An object is a double, a string, or a hash of objects
alias Obj = Algebraic!(double, string, This[string]);
Obj obj = "hello";
writeln(obj.get!1); // "hello"
obj = 42.0;
writeln(obj.get!0); // 42
obj = ["customer": Obj("John"), "paid": Obj(23.95)];
writeln(obj.get!2["customer"]); // "John"
alias Variant = VariantN!32LU.VariantN;
Alias for VariantN instantiated with the largest size of creal, char[], and void delegate(). This ensures that Variant is large enough to hold all of D's predefined types unboxed, including all numeric types, pointers, delegates, and class references. You may want to use VariantN directly with a different maximum size either for storing larger types unboxed, or for saving memory.
Examples:
Variant a; // Must assign before use, otherwise exception ensues
// Initialize with an integer; make the type int
Variant b = 42;
writeln(b.type); // typeid (int)
// Peek at the value
assert(b.peek!(int) !is null && *b.peek!(int) == 42);
// Automatically convert per language rules
auto x = b.get!(real);
// Assign any other type, including other variants
a = b;
a = 3.14;
writeln(a.type); // typeid (double)
// Implicit conversions work just as with built-in types
assert(a < b);
// Check for convertibility
assert(!a.convertsTo!(int)); // double not convertible to int
// Strings and all other arrays are supported
a = "now I'm a string";
writeln(a); // "now I'm a string"
Examples:
can also assign arrays Variant a = new int[42];
writeln(a.length); // 42
a[5] = 7;
writeln(a[5]); // 7
Examples:
Can also assign class values Variant a;
class Foo {}
auto foo = new Foo;
a = foo;
assert(*a.peek!(Foo) == foo); // and full type information is preserved
Variant[] variantArray(T...)(T args);
Returns an array of variants constructed from args.
This is by design. During construction the Variant needs static type information about the type being held, so as to store a pointer to function for fast retrieval.
Examples:
auto a = variantArray(1, 3.14, "Hi!");
writeln(a[1]); // 3.14
auto b = Variant(a); // variant array as variant
writeln(b[1]); // 3.14
class VariantException: object.Exception;
Thrown in three cases:
An uninitialized Variant is used in any way except assignment and hasValue; A get or coerce is attempted with an incompatible target type; A comparison between Variant objects of incompatible types is attempted.
Examples:
import std.exception : assertThrown;
Variant v;
// uninitialized use
assertThrown!VariantException(v + 1);
assertThrown!VariantException(v.length);
// .get with an incompatible target type
assertThrown!VariantException(Variant("a").get!int);
// comparison between incompatible types
assertThrown!VariantException(Variant(3) < Variant("a"));
TypeInfo source;
The source type in the conversion or comparison TypeInfo target;
The target type in the conversion or comparison template visit(Handlers...) if (Handlers.length > 0)
Applies a delegate or function to the given Algebraic depending on the held type, ensuring that all types are handled by the visiting functions.
The delegate or function having the currently held value as parameter is called with variant's current value. Visiting handlers are passed in the template parameter list. It is statically ensured that all held types of variant are handled across all handlers. visit allows delegates and static functions to be passed as parameters. If a function with an untyped parameter is specified, this function is called when the variant contains a type that does not match any other function. This can be used to apply the same function across multiple possible types. Exactly one generic function is allowed. If a function without parameters is specified, this function is called when variant doesn't hold a value. Exactly one parameter-less function is allowed. Duplicate overloads matching the same type in one of the visitors are disallowed.
Returns:
The return type of visit is deduced from the visiting functions and must be the same across all overloads.
Throws:
VariantException if variant doesn't hold a value and no parameter-less fallback function is specified.
Examples:
Algebraic!(int, string) variant;
variant = 10;
assert(variant.visit!((string s) => cast(int) s.length,
(int i) => i)()
== 10);
variant = "string";
assert(variant.visit!((int i) => i,
(string s) => cast(int) s.length)()
== 6);
// Error function usage
Algebraic!(int, string) emptyVar;
auto rslt = emptyVar.visit!((string s) => cast(int) s.length,
(int i) => i,
() => -1)();
writeln(rslt); // -1
// Generic function usage
Algebraic!(int, float, real) number = 2;
writeln(number.visit!(x => x += 1)); // 3
// Generic function for int/float with separate behavior for string
Algebraic!(int, float, string) something = 2;
assert(something.visit!((string s) => s.length, x => x) == 2); // generic
something = "asdf";
assert(something.visit!((string s) => s.length, x => x) == 4); // string
// Generic handler and empty handler
Algebraic!(int, float, real) empty2;
writeln(empty2.visit!(x => x + 1, () => -1)); // -1
auto visit(VariantType)(VariantType variant) Constraints: if (isAlgebraic!VariantType);
template tryVisit(Handlers...) if (Handlers.length > 0)
Behaves as visit but doesn't enforce that all types are handled by the visiting functions.
If a parameter-less function is specified it is called when either variant doesn't hold a value or holds a type which isn't handled by the visiting functions.
Returns:
The return type of tryVisit is deduced from the visiting functions and must be the same across all overloads.
Throws:
VariantException if variant doesn't hold a value or variant holds a value which isn't handled by the visiting functions, when no parameter-less fallback function is specified.
Examples:
Algebraic!(int, string) variant;
variant = 10;
auto which = -1;
variant.tryVisit!((int i) { which = 0; })();
writeln(which); // 0
// Error function usage
variant = "test";
variant.tryVisit!((int i) { which = 0; },
() { which = -100; })();
writeln(which); // -100
auto tryVisit(VariantType)(VariantType variant) Constraints: if (isAlgebraic!VariantType);
|
Top / Right / Bottom / Left
Utilities for controlling the placement of positioned elements.
Quick reference
Class
Properties
inset-0
top: 0px; right: 0px; bottom: 0px; left: 0px;
inset-x-0
left: 0px; right: 0px;
inset-y-0
top: 0px; bottom: 0px;
top-0
top: 0px;
right-0
right: 0px;
bottom-0
bottom: 0px;
left-0
left: 0px;
inset-px
top: 1px; right: 1px; bottom: 1px; left: 1px;
inset-x-px
left: 1px; right: 1px;
inset-y-px
top: 1px; bottom: 1px;
top-px
top: 1px;
right-px
right: 1px;
bottom-px
bottom: 1px;
left-px
left: 1px;
inset-0.5
top: 0.125rem; /* 2px */ right: 0.125rem; /* 2px */ bottom: 0.125rem; /* 2px */ left: 0.125rem; /* 2px */
inset-x-0.5
left: 0.125rem; /* 2px */ right: 0.125rem; /* 2px */
inset-y-0.5
top: 0.125rem; /* 2px */ bottom: 0.125rem; /* 2px */
top-0.5
top: 0.125rem; /* 2px */
right-0.5
right: 0.125rem; /* 2px */
bottom-0.5
bottom: 0.125rem; /* 2px */
left-0.5
left: 0.125rem; /* 2px */
inset-1
top: 0.25rem; /* 4px */ right: 0.25rem; /* 4px */ bottom: 0.25rem; /* 4px */ left: 0.25rem; /* 4px */
inset-x-1
left: 0.25rem; /* 4px */ right: 0.25rem; /* 4px */
inset-y-1
top: 0.25rem; /* 4px */ bottom: 0.25rem; /* 4px */
top-1
top: 0.25rem; /* 4px */
right-1
right: 0.25rem; /* 4px */
bottom-1
bottom: 0.25rem; /* 4px */
left-1
left: 0.25rem; /* 4px */
inset-1.5
top: 0.375rem; /* 6px */ right: 0.375rem; /* 6px */ bottom: 0.375rem; /* 6px */ left: 0.375rem; /* 6px */
inset-x-1.5
left: 0.375rem; /* 6px */ right: 0.375rem; /* 6px */
inset-y-1.5
top: 0.375rem; /* 6px */ bottom: 0.375rem; /* 6px */
top-1.5
top: 0.375rem; /* 6px */
right-1.5
right: 0.375rem; /* 6px */
bottom-1.5
bottom: 0.375rem; /* 6px */
left-1.5
left: 0.375rem; /* 6px */
inset-2
top: 0.5rem; /* 8px */ right: 0.5rem; /* 8px */ bottom: 0.5rem; /* 8px */ left: 0.5rem; /* 8px */
inset-x-2
left: 0.5rem; /* 8px */ right: 0.5rem; /* 8px */
inset-y-2
top: 0.5rem; /* 8px */ bottom: 0.5rem; /* 8px */
top-2
top: 0.5rem; /* 8px */
right-2
right: 0.5rem; /* 8px */
bottom-2
bottom: 0.5rem; /* 8px */
left-2
left: 0.5rem; /* 8px */
inset-2.5
top: 0.625rem; /* 10px */ right: 0.625rem; /* 10px */ bottom: 0.625rem; /* 10px */ left: 0.625rem; /* 10px */
inset-x-2.5
left: 0.625rem; /* 10px */ right: 0.625rem; /* 10px */
inset-y-2.5
top: 0.625rem; /* 10px */ bottom: 0.625rem; /* 10px */
top-2.5
top: 0.625rem; /* 10px */
right-2.5
right: 0.625rem; /* 10px */
bottom-2.5
bottom: 0.625rem; /* 10px */
left-2.5
left: 0.625rem; /* 10px */
inset-3
top: 0.75rem; /* 12px */ right: 0.75rem; /* 12px */ bottom: 0.75rem; /* 12px */ left: 0.75rem; /* 12px */
inset-x-3
left: 0.75rem; /* 12px */ right: 0.75rem; /* 12px */
inset-y-3
top: 0.75rem; /* 12px */ bottom: 0.75rem; /* 12px */
top-3
top: 0.75rem; /* 12px */
right-3
right: 0.75rem; /* 12px */
bottom-3
bottom: 0.75rem; /* 12px */
left-3
left: 0.75rem; /* 12px */
inset-3.5
top: 0.875rem; /* 14px */ right: 0.875rem; /* 14px */ bottom: 0.875rem; /* 14px */ left: 0.875rem; /* 14px */
inset-x-3.5
left: 0.875rem; /* 14px */ right: 0.875rem; /* 14px */
inset-y-3.5
top: 0.875rem; /* 14px */ bottom: 0.875rem; /* 14px */
top-3.5
top: 0.875rem; /* 14px */
right-3.5
right: 0.875rem; /* 14px */
bottom-3.5
bottom: 0.875rem; /* 14px */
left-3.5
left: 0.875rem; /* 14px */
inset-4
top: 1rem; /* 16px */ right: 1rem; /* 16px */ bottom: 1rem; /* 16px */ left: 1rem; /* 16px */
inset-x-4
left: 1rem; /* 16px */ right: 1rem; /* 16px */
inset-y-4
top: 1rem; /* 16px */ bottom: 1rem; /* 16px */
top-4
top: 1rem; /* 16px */
right-4
right: 1rem; /* 16px */
bottom-4
bottom: 1rem; /* 16px */
left-4
left: 1rem; /* 16px */
inset-5
top: 1.25rem; /* 20px */ right: 1.25rem; /* 20px */ bottom: 1.25rem; /* 20px */ left: 1.25rem; /* 20px */
inset-x-5
left: 1.25rem; /* 20px */ right: 1.25rem; /* 20px */
inset-y-5
top: 1.25rem; /* 20px */ bottom: 1.25rem; /* 20px */
top-5
top: 1.25rem; /* 20px */
right-5
right: 1.25rem; /* 20px */
bottom-5
bottom: 1.25rem; /* 20px */
left-5
left: 1.25rem; /* 20px */
inset-6
top: 1.5rem; /* 24px */ right: 1.5rem; /* 24px */ bottom: 1.5rem; /* 24px */ left: 1.5rem; /* 24px */
inset-x-6
left: 1.5rem; /* 24px */ right: 1.5rem; /* 24px */
inset-y-6
top: 1.5rem; /* 24px */ bottom: 1.5rem; /* 24px */
top-6
top: 1.5rem; /* 24px */
right-6
right: 1.5rem; /* 24px */
bottom-6
bottom: 1.5rem; /* 24px */
left-6
left: 1.5rem; /* 24px */
inset-7
top: 1.75rem; /* 28px */ right: 1.75rem; /* 28px */ bottom: 1.75rem; /* 28px */ left: 1.75rem; /* 28px */
inset-x-7
left: 1.75rem; /* 28px */ right: 1.75rem; /* 28px */
inset-y-7
top: 1.75rem; /* 28px */ bottom: 1.75rem; /* 28px */
top-7
top: 1.75rem; /* 28px */
right-7
right: 1.75rem; /* 28px */
bottom-7
bottom: 1.75rem; /* 28px */
left-7
left: 1.75rem; /* 28px */
inset-8
top: 2rem; /* 32px */ right: 2rem; /* 32px */ bottom: 2rem; /* 32px */ left: 2rem; /* 32px */
inset-x-8
left: 2rem; /* 32px */ right: 2rem; /* 32px */
inset-y-8
top: 2rem; /* 32px */ bottom: 2rem; /* 32px */
top-8
top: 2rem; /* 32px */
right-8
right: 2rem; /* 32px */
bottom-8
bottom: 2rem; /* 32px */
left-8
left: 2rem; /* 32px */
inset-9
top: 2.25rem; /* 36px */ right: 2.25rem; /* 36px */ bottom: 2.25rem; /* 36px */ left: 2.25rem; /* 36px */
inset-x-9
left: 2.25rem; /* 36px */ right: 2.25rem; /* 36px */
inset-y-9
top: 2.25rem; /* 36px */ bottom: 2.25rem; /* 36px */
top-9
top: 2.25rem; /* 36px */
right-9
right: 2.25rem; /* 36px */
bottom-9
bottom: 2.25rem; /* 36px */
left-9
left: 2.25rem; /* 36px */
inset-10
top: 2.5rem; /* 40px */ right: 2.5rem; /* 40px */ bottom: 2.5rem; /* 40px */ left: 2.5rem; /* 40px */
inset-x-10
left: 2.5rem; /* 40px */ right: 2.5rem; /* 40px */
inset-y-10
top: 2.5rem; /* 40px */ bottom: 2.5rem; /* 40px */
top-10
top: 2.5rem; /* 40px */
right-10
right: 2.5rem; /* 40px */
bottom-10
bottom: 2.5rem; /* 40px */
left-10
left: 2.5rem; /* 40px */
inset-11
top: 2.75rem; /* 44px */ right: 2.75rem; /* 44px */ bottom: 2.75rem; /* 44px */ left: 2.75rem; /* 44px */
inset-x-11
left: 2.75rem; /* 44px */ right: 2.75rem; /* 44px */
inset-y-11
top: 2.75rem; /* 44px */ bottom: 2.75rem; /* 44px */
top-11
top: 2.75rem; /* 44px */
right-11
right: 2.75rem; /* 44px */
bottom-11
bottom: 2.75rem; /* 44px */
left-11
left: 2.75rem; /* 44px */
inset-12
top: 3rem; /* 48px */ right: 3rem; /* 48px */ bottom: 3rem; /* 48px */ left: 3rem; /* 48px */
inset-x-12
left: 3rem; /* 48px */ right: 3rem; /* 48px */
inset-y-12
top: 3rem; /* 48px */ bottom: 3rem; /* 48px */
top-12
top: 3rem; /* 48px */
right-12
right: 3rem; /* 48px */
bottom-12
bottom: 3rem; /* 48px */
left-12
left: 3rem; /* 48px */
inset-14
top: 3.5rem; /* 56px */ right: 3.5rem; /* 56px */ bottom: 3.5rem; /* 56px */ left: 3.5rem; /* 56px */
inset-x-14
left: 3.5rem; /* 56px */ right: 3.5rem; /* 56px */
inset-y-14
top: 3.5rem; /* 56px */ bottom: 3.5rem; /* 56px */
top-14
top: 3.5rem; /* 56px */
right-14
right: 3.5rem; /* 56px */
bottom-14
bottom: 3.5rem; /* 56px */
left-14
left: 3.5rem; /* 56px */
inset-16
top: 4rem; /* 64px */ right: 4rem; /* 64px */ bottom: 4rem; /* 64px */ left: 4rem; /* 64px */
inset-x-16
left: 4rem; /* 64px */ right: 4rem; /* 64px */
inset-y-16
top: 4rem; /* 64px */ bottom: 4rem; /* 64px */
top-16
top: 4rem; /* 64px */
right-16
right: 4rem; /* 64px */
bottom-16
bottom: 4rem; /* 64px */
left-16
left: 4rem; /* 64px */
inset-20
top: 5rem; /* 80px */ right: 5rem; /* 80px */ bottom: 5rem; /* 80px */ left: 5rem; /* 80px */
inset-x-20
left: 5rem; /* 80px */ right: 5rem; /* 80px */
inset-y-20
top: 5rem; /* 80px */ bottom: 5rem; /* 80px */
top-20
top: 5rem; /* 80px */
right-20
right: 5rem; /* 80px */
bottom-20
bottom: 5rem; /* 80px */
left-20
left: 5rem; /* 80px */
inset-24
top: 6rem; /* 96px */ right: 6rem; /* 96px */ bottom: 6rem; /* 96px */ left: 6rem; /* 96px */
inset-x-24
left: 6rem; /* 96px */ right: 6rem; /* 96px */
inset-y-24
top: 6rem; /* 96px */ bottom: 6rem; /* 96px */
top-24
top: 6rem; /* 96px */
right-24
right: 6rem; /* 96px */
bottom-24
bottom: 6rem; /* 96px */
left-24
left: 6rem; /* 96px */
inset-28
top: 7rem; /* 112px */ right: 7rem; /* 112px */ bottom: 7rem; /* 112px */ left: 7rem; /* 112px */
inset-x-28
left: 7rem; /* 112px */ right: 7rem; /* 112px */
inset-y-28
top: 7rem; /* 112px */ bottom: 7rem; /* 112px */
top-28
top: 7rem; /* 112px */
right-28
right: 7rem; /* 112px */
bottom-28
bottom: 7rem; /* 112px */
left-28
left: 7rem; /* 112px */
inset-32
top: 8rem; /* 128px */ right: 8rem; /* 128px */ bottom: 8rem; /* 128px */ left: 8rem; /* 128px */
inset-x-32
left: 8rem; /* 128px */ right: 8rem; /* 128px */
inset-y-32
top: 8rem; /* 128px */ bottom: 8rem; /* 128px */
top-32
top: 8rem; /* 128px */
right-32
right: 8rem; /* 128px */
bottom-32
bottom: 8rem; /* 128px */
left-32
left: 8rem; /* 128px */
inset-36
top: 9rem; /* 144px */ right: 9rem; /* 144px */ bottom: 9rem; /* 144px */ left: 9rem; /* 144px */
inset-x-36
left: 9rem; /* 144px */ right: 9rem; /* 144px */
inset-y-36
top: 9rem; /* 144px */ bottom: 9rem; /* 144px */
top-36
top: 9rem; /* 144px */
right-36
right: 9rem; /* 144px */
bottom-36
bottom: 9rem; /* 144px */
left-36
left: 9rem; /* 144px */
inset-40
top: 10rem; /* 160px */ right: 10rem; /* 160px */ bottom: 10rem; /* 160px */ left: 10rem; /* 160px */
inset-x-40
left: 10rem; /* 160px */ right: 10rem; /* 160px */
inset-y-40
top: 10rem; /* 160px */ bottom: 10rem; /* 160px */
top-40
top: 10rem; /* 160px */
right-40
right: 10rem; /* 160px */
bottom-40
bottom: 10rem; /* 160px */
left-40
left: 10rem; /* 160px */
inset-44
top: 11rem; /* 176px */ right: 11rem; /* 176px */ bottom: 11rem; /* 176px */ left: 11rem; /* 176px */
inset-x-44
left: 11rem; /* 176px */ right: 11rem; /* 176px */
inset-y-44
top: 11rem; /* 176px */ bottom: 11rem; /* 176px */
top-44
top: 11rem; /* 176px */
right-44
right: 11rem; /* 176px */
bottom-44
bottom: 11rem; /* 176px */
left-44
left: 11rem; /* 176px */
inset-48
top: 12rem; /* 192px */ right: 12rem; /* 192px */ bottom: 12rem; /* 192px */ left: 12rem; /* 192px */
inset-x-48
left: 12rem; /* 192px */ right: 12rem; /* 192px */
inset-y-48
top: 12rem; /* 192px */ bottom: 12rem; /* 192px */
top-48
top: 12rem; /* 192px */
right-48
right: 12rem; /* 192px */
bottom-48
bottom: 12rem; /* 192px */
left-48
left: 12rem; /* 192px */
inset-52
top: 13rem; /* 208px */ right: 13rem; /* 208px */ bottom: 13rem; /* 208px */ left: 13rem; /* 208px */
inset-x-52
left: 13rem; /* 208px */ right: 13rem; /* 208px */
inset-y-52
top: 13rem; /* 208px */ bottom: 13rem; /* 208px */
top-52
top: 13rem; /* 208px */
right-52
right: 13rem; /* 208px */
bottom-52
bottom: 13rem; /* 208px */
left-52
left: 13rem; /* 208px */
inset-56
top: 14rem; /* 224px */ right: 14rem; /* 224px */ bottom: 14rem; /* 224px */ left: 14rem; /* 224px */
inset-x-56
left: 14rem; /* 224px */ right: 14rem; /* 224px */
inset-y-56
top: 14rem; /* 224px */ bottom: 14rem; /* 224px */
top-56
top: 14rem; /* 224px */
right-56
right: 14rem; /* 224px */
bottom-56
bottom: 14rem; /* 224px */
left-56
left: 14rem; /* 224px */
inset-60
top: 15rem; /* 240px */ right: 15rem; /* 240px */ bottom: 15rem; /* 240px */ left: 15rem; /* 240px */
inset-x-60
left: 15rem; /* 240px */ right: 15rem; /* 240px */
inset-y-60
top: 15rem; /* 240px */ bottom: 15rem; /* 240px */
top-60
top: 15rem; /* 240px */
right-60
right: 15rem; /* 240px */
bottom-60
bottom: 15rem; /* 240px */
left-60
left: 15rem; /* 240px */
inset-64
top: 16rem; /* 256px */ right: 16rem; /* 256px */ bottom: 16rem; /* 256px */ left: 16rem; /* 256px */
inset-x-64
left: 16rem; /* 256px */ right: 16rem; /* 256px */
inset-y-64
top: 16rem; /* 256px */ bottom: 16rem; /* 256px */
top-64
top: 16rem; /* 256px */
right-64
right: 16rem; /* 256px */
bottom-64
bottom: 16rem; /* 256px */
left-64
left: 16rem; /* 256px */
inset-72
top: 18rem; /* 288px */ right: 18rem; /* 288px */ bottom: 18rem; /* 288px */ left: 18rem; /* 288px */
inset-x-72
left: 18rem; /* 288px */ right: 18rem; /* 288px */
inset-y-72
top: 18rem; /* 288px */ bottom: 18rem; /* 288px */
top-72
top: 18rem; /* 288px */
right-72
right: 18rem; /* 288px */
bottom-72
bottom: 18rem; /* 288px */
left-72
left: 18rem; /* 288px */
inset-80
top: 20rem; /* 320px */ right: 20rem; /* 320px */ bottom: 20rem; /* 320px */ left: 20rem; /* 320px */
inset-x-80
left: 20rem; /* 320px */ right: 20rem; /* 320px */
inset-y-80
top: 20rem; /* 320px */ bottom: 20rem; /* 320px */
top-80
top: 20rem; /* 320px */
right-80
right: 20rem; /* 320px */
bottom-80
bottom: 20rem; /* 320px */
left-80
left: 20rem; /* 320px */
inset-96
top: 24rem; /* 384px */ right: 24rem; /* 384px */ bottom: 24rem; /* 384px */ left: 24rem; /* 384px */
inset-x-96
left: 24rem; /* 384px */ right: 24rem; /* 384px */
inset-y-96
top: 24rem; /* 384px */ bottom: 24rem; /* 384px */
top-96
top: 24rem; /* 384px */
right-96
right: 24rem; /* 384px */
bottom-96
bottom: 24rem; /* 384px */
left-96
left: 24rem; /* 384px */
inset-auto
top: auto; right: auto; bottom: auto; left: auto;
inset-1/2
top: 50%; right: 50%; bottom: 50%; left: 50%;
inset-1/3
top: 33.333333%; right: 33.333333%; bottom: 33.333333%; left: 33.333333%;
inset-2/3
top: 66.666667%; right: 66.666667%; bottom: 66.666667%; left: 66.666667%;
inset-1/4
top: 25%; right: 25%; bottom: 25%; left: 25%;
inset-2/4
top: 50%; right: 50%; bottom: 50%; left: 50%;
inset-3/4
top: 75%; right: 75%; bottom: 75%; left: 75%;
inset-full
top: 100%; right: 100%; bottom: 100%; left: 100%;
inset-x-auto
left: auto; right: auto;
inset-x-1/2
left: 50%; right: 50%;
inset-x-1/3
left: 33.333333%; right: 33.333333%;
inset-x-2/3
left: 66.666667%; right: 66.666667%;
inset-x-1/4
left: 25%; right: 25%;
inset-x-2/4
left: 50%; right: 50%;
inset-x-3/4
left: 75%; right: 75%;
inset-x-full
left: 100%; right: 100%;
inset-y-auto
top: auto; bottom: auto;
inset-y-1/2
top: 50%; bottom: 50%;
inset-y-1/3
top: 33.333333%; bottom: 33.333333%;
inset-y-2/3
top: 66.666667%; bottom: 66.666667%;
inset-y-1/4
top: 25%; bottom: 25%;
inset-y-2/4
top: 50%; bottom: 50%;
inset-y-3/4
top: 75%; bottom: 75%;
inset-y-full
top: 100%; bottom: 100%;
top-auto
top: auto;
top-1/2
top: 50%;
top-1/3
top: 33.333333%;
top-2/3
top: 66.666667%;
top-1/4
top: 25%;
top-2/4
top: 50%;
top-3/4
top: 75%;
top-full
top: 100%;
right-auto
right: auto;
right-1/2
right: 50%;
right-1/3
right: 33.333333%;
right-2/3
right: 66.666667%;
right-1/4
right: 25%;
right-2/4
right: 50%;
right-3/4
right: 75%;
right-full
right: 100%;
bottom-auto
bottom: auto;
bottom-1/2
bottom: 50%;
bottom-1/3
bottom: 33.333333%;
bottom-2/3
bottom: 66.666667%;
bottom-1/4
bottom: 25%;
bottom-2/4
bottom: 50%;
bottom-3/4
bottom: 75%;
bottom-full
bottom: 100%;
left-auto
left: auto;
left-1/2
left: 50%;
left-1/3
left: 33.333333%;
left-2/3
left: 66.666667%;
left-1/4
left: 25%;
left-2/4
left: 50%;
left-3/4
left: 75%;
left-full
left: 100%;
Basic usage
Placing a positioned element
Use the {top|right|bottom|left|inset}-{size} utilities to set the horizontal or vertical position of a positioned element.
<!-- Pin to top left corner -->
<div class="relative h-32 w-32 ...">
<div class="absolute left-0 top-0 h-16 w-16 ...">01</div>
</div>
<!-- Span top edge -->
<div class="relative h-32 w-32 ...">
<div class="absolute inset-x-0 top-0 h-16 ...">02</div>
</div>
<!-- Pin to top right corner -->
<div class="relative h-32 w-32 ...">
<div class="absolute top-0 right-0 h-16 w-16 ...">03</div>
</div>
<!-- Span left edge -->
<div class="relative h-32 w-32 ...">
<div class="absolute inset-y-0 left-0 w-16 ...">04</div>
</div>
<!-- Fill entire parent -->
<div class="relative h-32 w-32 ...">
<div class="absolute inset-0 ...">05</div>
</div>
<!-- Span right edge -->
<div class="relative h-32 w-32 ...">
<div class="absolute inset-y-0 right-0 w-16 ...">06</div>
</div>
<!-- Pin to bottom left corner -->
<div class="relative h-32 w-32 ...">
<div class="absolute bottom-0 left-0 h-16 w-16 ...">07</div>
</div>
<!-- Span bottom edge -->
<div class="relative h-32 w-32 ...">
<div class="absolute inset-x-0 bottom-0 h-16 ...">08</div>
</div>
<!-- Pin to bottom right corner -->
<div class="relative h-32 w-32 ...">
<div class="absolute bottom-0 right-0 h-16 w-16 ...">09</div>
</div>
Using negative values
To use a negative top/right/bottom/left value, prefix the class name with a dash to convert it to a negative value.
<div class="relative h-32 w-32 ...">
<div class="absolute h-14 w-14 -left-4 -top-4 ..."></div>
</div>
Applying conditionally
Hover, focus, and other states
Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use hover:top-6 to only apply the top-6 utility on hover.
<div class="top-4 hover:top-6">
<!-- ... -->
</div>
For a complete list of all available state modifiers, check out the Hover, Focus, & Other States documentation.
Breakpoints and media queries
You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use md:top-6 to apply the top-6 utility at only medium screen sizes and above.
<div class="top-4 md:top-6">
<!-- ... -->
</div>
To learn more, check out the documentation on Responsive Design, Dark Mode and other media query modifiers.
Using custom values
Customizing your theme
By default, Tailwind provides top/right/bottom/left/inset utilities for a combination of the default spacing scale, auto, full as well as some additional fraction values.
You can customize your spacing scale by editing theme.spacing or theme.extend.spacing in your tailwind.config.js file.
tailwind.config.js
module.exports = {
theme: {
extend: {
spacing: {
'3px': '3px',
}
}
}
}
Alternatively, you can customize just the top/right/bottom/left/inset scale by editing theme.inset or theme.extend.inset in your tailwind.config.js file.
tailwind.config.js
module.exports = {
theme: {
extend: {
inset: {
'3px': '3px',
}
}
}
}
Learn more about customizing the default theme in the theme customization documentation.
Arbitrary values
If you need to use a one-off top/right/bottom/left value that doesn’t make sense to include in your theme, use square brackets to generate a property on the fly using any arbitrary value.
<div class="top-[3px]">
<!-- ... -->
</div>
Learn more about arbitrary value support in the arbitrary values documentation.
|
DateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069modify date_modify (PHP 5 >= 5.2.0, PHP 7, PHP 8)
DateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069modify -- date_modify — Alters the timestamp Description Object-oriented style public DateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069modify(string $modifier): DateTime|false Procedural style date_modify(DateTime $object, string $modifier): DateTime|false Alter the timestamp of a DateTime object by incrementing or decrementing in a format accepted by DateTimeImmutabl8b7c:f320:99b9:690f:4595:cd17:293a:c069__construct(). Parameters object
Procedural style only: A DateTime object returned by date_create(). The function modifies this object.
modifier
A date/time string. Valid formats are explained in Date and Time Formats. Return Values Returns the DateTime object for method chaining or false on failure. Examples Example #1 DateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069modify() example Object-oriented style <?php
$date = new DateTime('2006-12-12');
$date->modify('+1 day');
echo $date->format('Y-m-d');
?> Procedural style <?php
$date = date_create('2006-12-12');
date_modify($date, '+1 day');
echo date_format($date, 'Y-m-d');
?> The above examples will output:
2006-12-13
Example #2 Beware when adding or subtracting months <?php
$date = new DateTime('2000-12-31');
$date->modify('+1 month');
echo $date->format('Y-m-d') . "\n";
$date->modify('+1 month');
echo $date->format('Y-m-d') . "\n";
?> The above example will output:
2001-01-31
2001-03-03
See Also strtotime() - Parse about any English textual datetime description into a Unix timestamp DateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069add() - Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object DateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069sub() - Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object DateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069setDate() - Sets the date DateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069setISODate() - Sets the ISO date DateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069setTime() - Sets the time DateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069setTimestamp() - Sets the date and time based on an Unix timestamp
|
matplotlib.animation.PillowWriter classmatplotlib.animation.PillowWriter(fps=5, metadata=None, codec=None, bitrate=None)[source]
__init__(fps=5, metadata=None, codec=None, bitrate=None)[source]
Methods
__init__([fps, metadata, codec, bitrate])
finish() Finish any processing for writing the movie.
grab_frame(**savefig_kwargs) Grab the image information from the figure and save as a movie frame.
isAvailable()
saving(fig, outfile, dpi, *args, **kwargs) Context manager to facilitate writing the movie file.
setup(fig, outfile[, dpi]) Setup for writing the movie file. Attributes
frame_size A tuple (width, height) in pixels of a movie frame. finish()[source]
Finish any processing for writing the movie.
grab_frame(**savefig_kwargs)[source]
Grab the image information from the figure and save as a movie frame. All keyword arguments in savefig_kwargs are passed on to the savefig call that saves the figure.
classmethodisAvailable()[source]
setup(fig, outfile, dpi=None)[source]
Setup for writing the movie file. Parameters
figFigure
The figure object that contains the information for frames.
outfilestr
The filename of the resulting movie file.
dpifloat, default: fig.dpi
The DPI (or resolution) for the file. This controls the size in pixels of the resulting movie file.
|
VisibilityEnabler Inherits: VisibilityNotifier < CullInstance < Spatial < Node < Object Enables certain nodes only when approximately visible. Description The VisibilityEnabler will disable RigidBody and AnimationPlayer nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself. If you just want to receive notifications, use VisibilityNotifier instead. Note: VisibilityEnabler uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account (unless you are using Portals). The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an Area node as a child of a Camera node and/or Vector3.dot. Note: VisibilityEnabler will not affect nodes added after scene initialization. Properties
bool freeze_bodies true
bool pause_animations true Methods
bool is_enabler_enabled ( Enabler enabler ) const
void set_enabler ( Enabler enabler, bool enabled ) Enumerations enum Enabler:
ENABLER_PAUSE_ANIMATIONS = 0 --- This enabler will pause AnimationPlayer nodes.
ENABLER_FREEZE_BODIES = 1 --- This enabler will freeze RigidBody nodes.
ENABLER_MAX = 2 --- Represents the size of the Enabler enum. Property Descriptions bool freeze_bodies
Default true
Setter set_enabler(value)
Getter is_enabler_enabled() If true, RigidBody nodes will be paused. bool pause_animations
Default true
Setter set_enabler(value)
Getter is_enabler_enabled() If true, AnimationPlayer nodes will be paused. Method Descriptions bool is_enabler_enabled ( Enabler enabler ) const Returns whether the enabler identified by given Enabler constant is active. void set_enabler ( Enabler enabler, bool enabled ) Sets active state of the enabler identified by given Enabler constant.
|
incremental Basic type definitions the module graph needs in order to support incremental compilations. Imports options, lineinfos Types IncrementalCtx = object Source Edit Consts nimIncremental = false Source Edit Templates template init(incr: IncrementalCtx) Source Edit template addModuleDep(incr: var IncrementalCtx; conf: ConfigRef;
module, fileIdx: FileIndex; isIncludeFile: bool) Source Edit
|
community.general.sefcontext – Manages SELinux file context mapping definitions Note This plugin is part of the community.general collection (version 1.3.2). To install it use: ansible-galaxy collection install community.general. To use it in a playbook, specify: community.general.sefcontext. Synopsis Requirements Parameters Notes Examples Synopsis Manages SELinux file context mapping definitions. Similar to the semanage fcontext command. Requirements The below requirements are needed on the host that executes this module. libselinux-python policycoreutils-python Parameters Parameter Choices/Defaults Comments ftype string
Choices:
a ← b c d f l p s The file type that should have SELinux contexts applied. The following file type options are available:
a for all files,
b for block devices,
c for character devices,
d for directories,
f for regular files,
l for symbolic links,
p for named pipes,
s for socket files. ignore_selinux_state boolean
Choices:
no ← yes Useful for scenarios (chrooted environment) that you can't get the real SELinux state. reload boolean
Choices: no
yes ← Reload SELinux policy after commit. Note that this does not apply SELinux file contexts to existing files. selevel string SELinux range for the specified target.
aliases: serange setype string / required SELinux type for the specified target. seuser string SELinux user for the specified target. state string
Choices: absent
present ← Whether the SELinux file context must be absent or present. target string / required Target path (expression).
aliases: path Notes Note The changes are persistent across reboots. The community.general.sefcontext module does not modify existing files to the new SELinux context(s), so it is advisable to first create the SELinux file contexts before creating files, or run restorecon manually for the existing files that require the new SELinux file contexts. Not applying SELinux fcontexts to existing files is a deliberate decision as it would be unclear what reported changes would entail to, and there’s no guarantee that applying SELinux fcontext does not pick up other unrelated prior changes. Examples - name: Allow apache to modify files in /srv/git_repos
community.general.sefcontext:
target: '/srv/git_repos(/.*)?'
setype: httpd_git_rw_content_t
state: present
- name: Apply new SELinux file context to filesystem
ansible.builtin.command: restorecon -irv /srv/git_repos
Authors Dag Wieers (@dagwieers)
© 2012–2018 Michael DeHaan |
List Of Virtual Tables
1. Introduction 2. Virtual Tables
1. Introduction A virtual table is an object that presents an SQL table interface but which is not stored in the database file, at least not directly. The virtual table mechanism is a feature of SQLite that allows SQLite to access and manipulate resources other than bits in the database file using the powerful SQL query language.
The table below lists a few of the virtual tables implementations available for SQLite. Developers can deploy these virtual tables in their own applications, or use the implementations shown below as templates for writing their own virtual tables.
The list below is not exhaustive. Other virtual table implementation exist in the SQLite source tree and elsewhere. The list below tries to capture the more interesting virtual table implementations.
2. Virtual Tables
Name
Description
approximate_match A demonstration of how to use a virtual table to implement approximate string matching.
bytecode A table-valued function that shows the bytecodes of a prepared statement.
carray A table-valued function that allows a C-language array of integers, doubles, or strings to be used as table in a query.
closure Compute the transitive closure of a set.
completion Suggests completions for partially-entered words during interactive SQL input. Used by the CLI to help implement tab-completion.
csv A virtual table that represents a comma-separated-value or CSV file (RFC 4180) as a read-only table so that it can be used as part of a larger query.
dbstat Provides information about the purpose and use of each page in a database file. Used in the implementation of the sqlite3_analyzer utility program.
files_of_checkin Provides information about all files in a single check-in in the Fossil version control system. This virtual table is not part of the SQLite project but is included because it provides an example of how to use virtual tables and because it is used to help version control the SQLite sources.
fsdir A table-valued function returning one row for each file in a selected file hierarchy of the host computer. Used by the CLI to help implement the .archive command.
FTS3 A high-performance full-text search index.
FTS5 A higher-performance full-text search index
generate_series A table-valued function returning a sequence of increasing integers, modeled after the table-valued function by the same name in PostgreSQL.
json_each A table-valued function for decomposing a JSON string.
json_tree A table-valued function for decomposing a JSON string.
OsQuery Hundreds of virtual tables that publish various aspects of the host computer, such as the process table, user lists, active network connections, and so forth. OsQuery is a separate project, started by Facebook, hosted on GitHub, and intended for security analysis and intrusion detection OsQuery is not a part of the SQLite project, but is included in this list because it demonstrates how the SQL language and the SQLite virtual table mechanism can be leveraged to provide elegant solutions to important real-world problems.
pragma Built-in table-valued functions that return the results of PRAGMA statements for use within ordinary SQL queries.
RTree An implementation of the Guttmann R*Tree spatial index idea.
spellfix1 A virtual table that implements a spelling correction engine.
sqlite_btreeinfo This experimental table-valued function provides information about a single B-tree in a database file, such as the depth, and estimated number of pages and number of entries, and so forth.
sqlite_dbpage Key/value store for the raw database file content. The key is the page number and the value is binary page content.
sqlite_memstat Provides SQL access to the sqlite3_status64() and sqlite3_db_status() interfaces.
sqlite_stmt A table-valued function containing one row for each prepared statement associated with an open database connection.
swarmvtab An experimental module providing on-demand read-only access to multiple tables spread across multiple databases, via a single virtual table abstraction.
tables_used A table-valued function that shows the tables and indexes that are accessed by a prepared statement.
tclvar Represents the global variables of a TCL Interpreter as an SQL table. Used as part of the SQLite test suite.
templatevtab A template virtual table implementation useful as a starting point for developers who want to write their own virtual tables
unionvtab An experimental module providing on-demand read-only access to multiple tables spread across multiple databases, via a single virtual table abstraction.
vfsstat A table-valued function which, in combination with a co-packaged VFS shim provides information on the number of system calls performed by SQLite.
vtablog A virtual table that prints diagnostic information on stdout when its key methods are invoked. Intended for interactive analysis and debugging of virtual table interfaces.
wholenumber A virtual table returns all integers between 1 and 4294967295.
zipfile Represent a ZIP Archive as an SQL table. Works for both reading and writing. Used by the CLI to implement the ability to read and write ZIP Archives.
This page last modified on 2022-06-15 10:18:44 UTC
SQLite is in the Public Domain.
https://sqlite.org/vtablist.html
|
JsonDescriptor class JsonDescriptor extends Descriptor JSON descriptor. Methods describe(OutputInterface $output, object $object, array $options = array()) Describes an InputArgument instance. from Descriptor Details
describe(OutputInterface $output, object $object, array $options = array())
Describes an InputArgument instance. Parameters OutputInterface $output object $object array $options
|
Package name guidelines
Skip to content
npm Docs
npmjs.comStatusSupport
About npm
Getting started
Packages and modules
Introduction to packages and modules
Contributing packages to the registry
Creating a package.json fileCreating Node.js modulesAbout package README filesCreating and publishing unscoped public packagesCreating and publishing scoped public packagesCreating and publishing private packagesPackage name guidelinesSpecifying dependencies and devDependencies in a package.json fileAbout semantic versioningAdding dist-tags to packages
Updating and managing your published packages
Getting packages from the registry
Securing your code
Integrations
Organizations
Policies
Threats and Mitigations
npm CLI
When choosing a name for your package, choose a name that
is unique
is descriptive
meets npm policy guidelines. For example, do not give your package an offensive name, and do not use someone else's trademarked name or violate the npm trademark policy.
Additionally, when choosing a name for an unscoped package, also choose a name that
is not already owned by someone else
is not spelled in a similar way to another package name
will not confuse others about authorship
Edit this page on GitHub
|
fortinet.fortimanager.fmgr_system_ha – HA configuration. Note This plugin is part of the fortinet.fortimanager collection (version 2.1.3). You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list. To install it, use: ansible-galaxy collection install fortinet.fortimanager. To use it in a playbook, specify: fortinet.fortimanager.fmgr_system_ha. New in version 2.10: of fortinet.fortimanager Synopsis Parameters Notes Examples Return Values Synopsis This module is able to configure a FortiManager device. Examples include all parameters and values which need to be adjusted to data sources before usage. Parameters Parameter Choices/Defaults Comments bypass_validation boolean
Choices:
no ← yes only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters enable_log boolean
Choices:
no ← yes Enable/Disable logging for task proposed_method string
Choices: update set add The overridden method for the underlying Json RPC request rc_failed list / elements=string the rc codes list with which the conditions to fail will be overriden rc_succeeded list / elements=string the rc codes list with which the conditions to succeed will be overriden state string / required
Choices: present absent the directive to create, update or delete an object system_ha dictionary the top level parameters set clusterid integer Default:1 Cluster ID range (1 - 64). file-quota integer Default:4096 File quota in MB (2048 - 20480). hb-interval integer Default:5 Heartbeat interval (1 - 255). hb-lost-threshold integer Default:3 Heartbeat lost threshold (1 - 255). local-cert string set the ha local certificate. mode string
Choices:
standalone ← master slave primary secondary Mode. standalone - Standalone. master - Master. slave - Slave. password string no description peer list / elements=string no description id integer Default:0 Id. ip string Default:"308.323.7201" IP address of peer. ip6 string Default:"8b7c:f320:99b9:690f:4595:cd17:293a:c069" IP address (V6) of peer. serial-number string Serial number of peer. status string
Choices: disable
enable ← Peer admin status. disable - Disable. enable - Enable. workspace_locking_adom string the adom to lock for FortiManager running in workspace mode, the value can be global and others including root workspace_locking_timeout integer Default:300 the maximum time in seconds to wait for other user to release the workspace lock Notes Note Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work. To create or update an object, use state present directive. To delete an object, use state absent directive. Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded Examples - hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: HA configuration.
fmgr_system_ha:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
system_ha:
clusterid: <value of integer>
file-quota: <value of integer>
hb-interval: <value of integer>
hb-lost-threshold: <value of integer>
mode: <value in [standalone, master, slave, ...]>
password: <value of string>
peer:
-
id: <value of integer>
ip: <value of string>
ip6: <value of string>
serial-number: <value of string>
status: <value in [disable, enable]>
local-cert: <value of string>
Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description request_url string always The full url requested Sample: /sys/login/user response_code integer always The status of api request response_message string always The descriptive message of the api response Sample: OK. Authors Link Zheng (@chillancezen) Jie Xue (@JieX19) Frank Shen (@fshen01) Hongbin Lu (@fgtdev-hblu)
© 2012–2018 Michael DeHaan |
survexp.fit Compute Expected Survival Description Compute expected survival times. Usage
survexp.fit(group, x, y, times, death, ratetable)
Arguments
group if there are multiple survival curves this identifies the group, otherwise it is a constant. Must be an integer.
x A matrix whose columns match the dimensions of the ratetable, in the correct order.
y the follow up time for each subject.
times the vector of times at which a result will be computed.
death a logical value, if TRUE the conditional survival is computed, if FALSE the cohort survival is computed. See survexp for more details.
ratetable a rate table, such as survexp.uswhite.
Details For conditional survival y must be the time of last follow-up or death for each subject. For cohort survival it must be the potential censoring time for each subject, ignoring death. For an exact estimate times should be a superset of y, so that each subject at risk is at risk for the entire sub-interval of time. For a large data set, however, this can use an inordinate amount of storage and/or compute time. If the times spacing is more coarse than this, an actuarial approximation is used which should, however, be extremely accurate as long as all of the returned values are > .99. For a subgroup of size 1 and times > y, the conditional method reduces to exp(-h) where h is the expected cumulative hazard for the subject over his/her observation time. This is used to compute individual expected survival. Value A list containing the number of subjects and the expected survival(s) at each time point. If there are multiple groups, these will be matrices with one column per group. Warning Most users will call the higher level routine survexp. Consequently, this function has very few error checks on its input arguments. See Also survexp, survexp.us.
Copyright ( |
matplotlib.axis.Axis.grid
Axis.grid(b=None, which='major', **kwargs)
Set the axis grid on or off; b is a boolean. Use which = ‘major’ | ‘minor’ | ‘both’ to set the grid for major or minor ticks. If b is None and len(kwargs)==0, toggle the grid state. If kwargs are supplied, it is assumed you want the grid on and b will be set to True. kwargs are used to set the line properties of the grids, e.g., xax.grid(color=’r’, linestyle=’-‘, linewidth=2)
|
mpl_toolkits.axisartist.grid_finder.FixedLocator
class mpl_toolkits.axisartist.grid_finder.FixedLocator(locs) [source]
Bases: object
set_factor(f) [source]
Examples using mpl_toolkits.axisartist.grid_finder.FixedLocator
Demo Floating Axes
|
Symfony\Component\Validator\Context Classes ExecutionContext The context used and created by {@link ExecutionContextFactory}. ExecutionContextFactory Creates new {@link ExecutionContext} instances. Interfaces ExecutionContextFactoryInterface Creates instances of {@link ExecutionContextInterface}. ExecutionContextInterface The context of a validation run.
|
dart:math distanceTo method double distanceTo(
Point<T> other ) Returns the distance between this and other. var distanceTo = const Point(0, 0).distanceTo(const Point(0, 0)); // 0.0
distanceTo = const Point(0, 0).distanceTo(const Point(10, 0)); // 10.0
distanceTo = const Point(0, 0).distanceTo(const Point(0, -10)); // 10.0
distanceTo = const Point(-10, 0).distanceTo(const Point(100, 0)); // 110.0 Implementation double distanceTo(Point<T> other) {
var dx = x - other.x;
var dy = y - other.y;
return sqrt(dx * dx + dy * dy);
}
|
Class SchemaFactoryLoader
java.lang.Object javax.xml.validation.SchemaFactoryLoader public abstract class SchemaFactoryLoader extends Object
Factory that creates SchemaFactory. DO NOT USE THIS CLASS This class was introduced as a part of an early proposal during the JSR-206 standardization process. The proposal was eventually abandoned but this class accidentally remained in the source tree, and made its way into the final version.
This class does not participate in any JAXP 1.3 or JAXP 1.4 processing. It must not be used by users or JAXP implementations.
Since: 1.5 Constructor Summary SchemaFactoryLoader()
Modifier
Constructor
Description
protected
A do-nothing constructor.
Method Summary
Modifier and Type
Method
Description
abstract SchemaFactory
newFactory(String schemaLanguage)
Creates a new SchemaFactory object for the specified schema language.
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Details SchemaFactoryLoader protected SchemaFactoryLoader() A do-nothing constructor. Method Details newFactory public abstract SchemaFactory newFactory(String schemaLanguage) Creates a new SchemaFactory object for the specified schema language. Parameters:
schemaLanguage - See the list of available schema languages. Returns:
null if the callee fails to create one. Throws:
NullPointerException - If the schemaLanguage parameter is null.
|
Qt 3D C++ Classes The Qt 3D module provides the foundations and core types used for near-realtime simulations built on the Qt 3D framework. Namespaces
Qt3DAnimation
Contains classes from the Qt3DAnimation module
Qt3DCore
Contains classes that are the foundation for Qt 3D simulation framework, as well as classes that provide the ability to render using the Qt 3D framework
Qt3DExtras
Contains classes from the Qt3DExtras module
Qt3DInput
Contains classes that enable user input
Qt3DLogic
Contains classes that enable frame synchronization
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069Quick
Contains classes used for implementing QML functionality into Qt3D applications
Qt3DRender
Contains classes that enable 2D and 3D rendering
Classes
Qt 3D Core Module
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QChannelMappingCreatedChangeBase
Base class for handling creation changes for QAbstractSkeleton sub-classes
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractAspect
The base class for aspects that provide a vertical slice of behavior
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QAspectEngine
Responsible for handling all the QAbstractAspect subclasses that have been registered with the scene
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QComponentAddedChange
Used to notify when a component is added to an entity
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QComponentRemovedChange
Used to notify when a component is removed from an entity
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QDynamicPropertyUpdatedChange
Used to notify when a dynamic property value is updated
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNodeCommand
The base class for all CommandRequested QSceneChange events
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNodeCreatedChange
Used to notify when a node is created
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNodeCreatedChangeBase
The base class for all NodeCreated QSceneChange events
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNodeDestroyedChange
Used to notify when a node is destroyed
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QPropertyNodeAddedChange
Used to notify when a node is added to a property
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QPropertyNodeRemovedChange
Used to notify when a node is removed from a property
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QPropertyUpdatedChange
Used to notify when a property value is updated
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QPropertyUpdatedChangeBase
The base class for all PropertyUpdated QSceneChange events
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QPropertyValueAddedChange
Used to notify when a value is added to a property
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QPropertyValueAddedChangeBase
The base class for all PropertyValueAdded QSceneChange events
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QPropertyValueRemovedChange
Used to notify when a value is added to a property
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QPropertyValueRemovedChangeBase
The base class for all PropertyValueRemoved QSceneChange events
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QSceneChange
Base class for changes that can be sent and received by Qt3D's change notification system
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QStaticPropertyUpdatedChangeBase
The base class for all static PropertyUpdated QSceneChange events
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QStaticPropertyValueAddedChangeBase
The base class for all static PropertyValueAdded QSceneChange events
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QStaticPropertyValueRemovedChangeBase
The base class for all static PropertyValueRemoved QSceneChange events
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QAspectJob
Base class for jobs executed in an aspect
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QBackendNode
Base class for all Qt3D backend nodes
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QBackendNodeMapper
Creates and maps backend nodes to their respective frontend nodes
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QComponent
Base class of scene nodes that can be aggregated by Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QEntity instances as a component
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QEntity
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QEntity is a Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode subclass that can aggregate several Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QComponent instances that will specify its behavior
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode
The base class of all Qt3D node classes used to build a Qt3D scene
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNodeId
Uniquely identifies a QNode
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractSkeleton
A skeleton contains the joints for a skinned mesh
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QArmature
Used to calculate skinning transform matrices and set them on shaders
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QJoint
Used to transforms parts of skinned meshes
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QSkeleton
Holds the data for a skeleton to be used with skinned meshes
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QSkeletonLoader
Used to load a skeleton of joints from file
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QTransform
Used to perform transforms on meshes
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069Quick8b7c:f320:99b9:690f:4595:cd17:293a:c069QQmlAspectEngine
Environment for the QAspectEngine and a method for instantiating QML components
Qt 3D Input Module
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractPhysicalDeviceProxy
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractPhysicalDeviceProxy acts as a proxy for an actual Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QQAbstractPhysicalDevice device
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QInputDeviceIntegration
Abstract base class used to define new input methods such as game controllers
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractActionInput
The base class for the Action Input and all Aggregate Action Inputs
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractAxisInput
QAbstractActionInput is the base class for all Axis Input
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractPhysicalDevice
The base class used by Qt3d to interact with arbitrary input devices
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QAction
Links a set of QAbstractActionInput that trigger the same event
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QActionInput
Stores Device and Buttons used to trigger an input event
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QAnalogAxisInput
An axis input controlled by an analog input The axis value is controlled like a traditional analog input such as a joystick
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QAxis
Stores QAbstractAxisInputs used to trigger an input event
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QAxisAccumulator
Processes velocity or acceleration data from a QAxis
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QAxisSetting
Stores settings for the specified list of Axis
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QButtonAxisInput
An axis input controlled by buttons The axis value is controlled by buttons rather than a traditional analog input such as a joystick
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QInputAspect
Responsible for creating physical devices and handling associated jobs
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QInputChord
Represents a set of QAbstractActionInput's that must be triggerd at once
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QInputSequence
Represents a set of QAbstractActionInput's that must be triggerd one after the other
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QInputSettings
Holds the pointer to an input event source object
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QKeyboardDevice
In charge of dispatching keyboard events to attached QQKeyboardHandler objects
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QKeyboardHandler
Provides keyboard event notification
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QKeyEvent
Event type send by KeyBoardHandler
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QLogicalDevice
Allows the user to define a set of actions that they wish to use within an application
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QMouseDevice
Delegates mouse events to the attached MouseHandler objects
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QMouseEvent
Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QMouseEvent contains parameters that describe a mouse event
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QWheelEvent
Contains parameters that describe a mouse wheel event
Qt3DInput8b7c:f320:99b9:690f:4595:cd17:293a:c069QMouseHandler
Provides a means of being notified about mouse events when attached to a QMouseDevice instance
Qt 3D Logic Module
Qt3DLogi8b7c:f320:99b9:690f:4595:cd17:293a:c069QFrameAction
Provides a way to have a synchronous function executed each frame
Qt3DLogi8b7c:f320:99b9:690f:4595:cd17:293a:c069QLogicAspect
Responsible for handling frame synchronization jobs
Qt 3D Render Module
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QBlitFramebuffer
FrameGraph node to transfer a rectangle of pixel values from one region of a render target to another
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QBufferCapture
Exchanges buffer data between GPU and CPU
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QCameraSelector
Class to allow for selection of camera to be used
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QClearBuffers
Class to clear buffers
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QDispatchCompute
FrameGraph node to issue work for the compute shader on GPU
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QFrameGraphNode
Base class of all FrameGraph configuration nodes
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QFrameGraphNodeCreatedChangeBase
A base class for changes in the FrameGraphNode
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QFrustumCulling
Enable frustum culling for the FrameGraph
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QLayerFilter
Controls layers drawn in a frame graph branch
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QMemoryBarrier
Class to emplace a memory barrier
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QNoDraw
When a Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QNoDraw node is present in a FrameGraph branch, this prevents the renderer from rendering any primitive
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QProximityFilter
Select entities which are within a distance threshold of a target entity
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderCapture
Frame graph node for render capture
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderCaptureReply
Receives the result of render capture request
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderPassFilter
Provides storage for vectors of Filter Keys and Parameters
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderStateSet
FrameGraph node offers a way of specifying a set of QRenderState objects to be applied during the execution of a framegraph branch
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderSurfaceSelector
Provides a way of specifying the render surface
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderTargetSelector
Provides a way of specifying a render target
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QSortPolicy
Provides storage for the sort types to be used
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTechniqueFilter
A QFrameGraphNode used to select QTechniques to use
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QViewport
A viewport on the Qt3D Scene
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractFunctor
Abstract base class for all functors
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QCamera
Defines a view point through which the scene will be rendered
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QCameraLens
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QCameraLens specifies the projection matrix that will be used to define a Camera for a 3D scene
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QComputeCommand
QComponent to issue work for the compute shader on GPU
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QLayer
Way of filtering which entities will be rendered
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QLevelOfDetail
Way of controlling the complexity of rendered entities based on their size on the screen
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QLevelOfDetailBoundingSphere
Simple spherical volume, defined by its center and radius
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QLevelOfDetailSwitch
Provides a way of enabling child entities based on distance or screen size
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QPickingSettings
Specifies how entity picking is handled
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderAspect
Class
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderSettings
Holds settings related to rendering process and host the active FrameGraph
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderTarget
Encapsulates a target (usually a frame buffer object) which the renderer can render into
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderTargetOutput
Allows the specification of an attachment of a render target (whether it is a color texture, a depth texture, etc... )
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QAttribute
Defines an attribute and how data should be read from a QBuffer
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QBuffer
Provides a data store for raw data to later be used as vertices or uniforms
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QBufferDataGenerator
Provides a mechanism to generate buffer data from a job
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QGeometry
Encapsulates geometry
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QGeometryRenderer
Encapsulates geometry rendering
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QMesh
A custom mesh loader
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QSceneLoader
Provides the facility to load an existing Scene
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractLight
Encapsulate a QAbstractLight object in a Qt 3D scene
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QDirectionalLight
Encapsulate a Directional Light object in a Qt 3D scene
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QEnvironmentLight
Encapsulate an environment light object in a Qt 3D scene
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QPointLight
Encapsulate a Point Light object in a Qt 3D scene
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QSpotLight
Encapsulate a Spot Light object in a Qt 3D scene
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QEffect
Base class for effects in a Qt 3D scene
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QFilterKey
Storage for filter keys and their values
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QGraphicsApiFilter
Identifies the API required for the attached QTechnique
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QMaterial
Provides an abstract class that should be the base of all material component classes in a scene
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QParameter
Provides storage for a name and value pair. This maps to a shader uniform
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderPass
Encapsulates a Render Pass
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QShaderData
Provides a way of specifying values of a Uniform Block or a shader structure
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QShaderProgram
Encapsulates a Shader Program
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QShaderProgramBuilder
Generates a Shader Program content from loaded graphs
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTechnique
Encapsulates a Technique
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractRayCaster
An abstract base class for ray casting in 3d scenes
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QObjectPicker
Instantiates a component that can be used to interact with a QEntity by a process known as picking
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QPickEvent
Holds information when an object is picked
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QPickLineEvent
Holds information when a segment of a line is picked
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QPickPointEvent
Holds information when a segment of a point cloud is picked
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QPickTriangleEvent
Holds information when a triangle is picked
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRayCaster
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRayCaster is used to perform ray casting tests in 3d world coordinates
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRayCasterHit
Details of a hit when casting a ray through a model
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QScreenRayCaster
Performe ray casting test based on screen coordinates
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QAlphaCoverage
Enable alpha-to-coverage multisampling mode
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QAlphaTest
Specify alpha reference test
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QBlendEquation
Specifies the equation used for both the RGB blend equation and the Alpha blend equation
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QBlendEquationArguments
Encapsulates blending information: specifies how the incoming values (what's going to be drawn) are going to affect the existing values (what is already drawn)
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QClipPlane
Enables an additional OpenGL clipping plane that can be in shaders using gl_ClipDistance
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QColorMask
Allows specifying which color components should be written to the currently bound frame buffer
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QCullFace
Specifies whether front or back face culling is enabled
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QDepthTest
Tests the fragment shader's depth value against the depth of a sample being written to
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QDithering
Enable dithering
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QFrontFace
Defines front and back facing polygons
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QLineWidth
Specifies the width of rasterized lines
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QMultiSampleAntiAliasing
Enable multisample antialiasing
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QNoDepthMask
Disable depth write
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QPointSize
Specifies the size of rasterized points. May either be set statically or by shader programs
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QPolygonOffset
Sets the scale and steps to calculate depth values for polygon offsets
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderState
An abstract base class for all render states
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QScissorTest
Discards fragments that fall outside of a certain rectangular portion of the screen
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QSeamlessCubemap
Enables seamless cubemap texture filtering
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QStencilMask
Controls the front and back writing of individual bits in the stencil planes
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QStencilOperation
Specifies stencil operation
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QStencilOperationArguments
Sets the actions to be taken when stencil and depth tests fail
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QStencilTest
Specifies arguments for the stecil test
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QStencilTestArguments
Specifies arguments for stencil test
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractTexture
A base class to be used to provide textures
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractTextureImage
Encapsulates the necessary information to create an OpenGL texture image
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QPaintedTextureImage
A QAbstractTextureImage that can be written through a QPainter
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTexture1D
A QAbstractTexture with a Target1D target format
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTexture1DArray
A QAbstractTexture with a Target1DArray target format
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTexture2D
A QAbstractTexture with a Target2D target format
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTexture2DArray
A QAbstractTexture with a Target2DArray target format
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTexture2DMultisample
A QAbstractTexture with a Target2DMultisample target format
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTexture2DMultisampleArray
A QAbstractTexture with a Target2DMultisampleArray target format
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTexture3D
A QAbstractTexture with a Target3D target format
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTextureBuffer
A QAbstractTexture with a TargetBuffer target format
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTextureCubeMap
A QAbstractTexture with a TargetCubeMap target format
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTextureCubeMapArray
A QAbstractTexture with a TargetCubeMapArray target format
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTextureLoader
Handles the texture loading and setting the texture's properties
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTextureRectangle
A QAbstractTexture with a TargetRectangle target format
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTextureData
Stores texture information such as the target, height, width, depth, layers, wrap, and if mipmaps are enabled
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTextureImage
Encapsulates the necessary information to create an OpenGL texture image from an image source
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTextureImageData
Stores data representing a texture
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTextureImageDataGenerator
Provides texture image data for QAbstractTextureImage
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QTextureWrapMode
Defines the wrap mode a Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractTexture should apply to a texture
Qt 3D Extras Module
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QExtrudedTextGeometry
Allows creation of a 3D extruded text in 3D space
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QExtrudedTextMesh
A 3D extruded Text mesh
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractCameraController
Basic functionality for camera controllers
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QDiffuseSpecularMaterial
Default implementation of the phong lighting effect
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QFirstPersonCameraController
Allows controlling the scene camera from the first person perspective
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QForwardRenderer
Default FrameGraph implementation of a forward renderer
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QGoochMaterial
Material that implements the Gooch shading model, popular in CAD and CAM applications
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QMetalRoughMaterial
Default implementation of PBR lighting
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QMorphPhongMaterial
Default implementation of the phong lighting effect
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QOrbitCameraController
Allows controlling the scene camera along orbital path
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QPerVertexColorMaterial
Default implementation for rendering the color properties set for each vertex
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QSkyboxEntity
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QSkyboxEntity is a convenience Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QEntity subclass that can be used to insert a skybox in a 3D scene
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QTextureMaterial
Default implementation of a simple unlit texture material
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QConeGeometry
Allows creation of a cone in 3D space. * * * * * The QConeGeometry class is most commonly used internally by the QConeMesh * but can also be used in custom Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QGeometryRenderer subclasses. The class * allows for creation of both a cone and a truncated cone
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QConeMesh
A conical mesh
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QCuboidGeometry
Allows creation of a cuboid in 3D space. * * * * * The QCuboidGeometry class is most commonly used internally by the QCuboidMesh * but can also be used in custom Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QGeometryRenderer subclasses
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QCuboidMesh
A cuboid mesh
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QCylinderGeometry
Allows creation of a cylinder in 3D space. * * * * * The QCylinderGeometry class is most commonly used internally by the QCylinderMesh * but can also be used in custom Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QGeometryRenderer subclasses
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QCylinderMesh
A cylindrical mesh
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QPlaneGeometry
Allows creation of a plane in 3D space. * * * * The QPlaneGeometry class is most commonly used internally by the QPlaneMesh * but can also be used in custom Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QGeometryRenderer subclasses
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QPlaneMesh
A square planar mesh
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QSphereGeometry
Allows creation of a sphere in 3D space. * * * * * The QSphereGeometry class is most commonly used internally by the QSphereMesh * but can also be used in custom Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QGeometryRenderer subclasses
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QSphereMesh
A spherical mesh
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QTorusGeometry
Allows creation of a torus in 3D space. * * * * * The QTorusGeometry class is most commonly used internally by the QTorusMesh * but can also be used in custom Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QGeometryRenderer subclasses
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QTorusMesh
A toroidal mesh
Qt3DExtras8b7c:f320:99b9:690f:4595:cd17:293a:c069QText2DEntity
Allows creation of a 2D text in 3D space
Qt 3D Animation Module
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractAnimation
An abstract base class for Qt3D animations
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractAnimationClip
The base class for types providing key frame animation data
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractClipAnimator
The base class for types providing animation playback capabilities
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QAbstractClipBlendNode
The base class for types used to construct animation blend trees
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QAdditiveClipBlend
Performs an additive blend of two animation clips based on an additive factor
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QAnimationAspect
Provides key-frame animation capabilities to Qt 3D
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QAnimationClipLoader
Enables loading key frame animation data from a file
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QAnimationController
A controller class for animations
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QAnimationGroup
A class grouping animations together
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QBlendedClipAnimator
Component providing animation playback capabilities of a tree of blend nodes
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QClipAnimator
Component providing simple animation playback capabilities
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QClipBlendNodeCreatedChangeBase
Base class for changes in QClipBlendNode
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QKeyFrame
A base class for handling keyframes
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QKeyframeAnimation
A class implementing simple keyframe animation to a QTransform
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QLerpClipBlend
Performs a linear interpolation of two animation clips based on a normalized factor
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QMorphingAnimation
A class implementing blend-shape morphing animation
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QMorphTarget
A class providing morph targets to blend-shape animation
Qt3DAnimation8b7c:f320:99b9:690f:4595:cd17:293a:c069QVertexBlendAnimation
A class implementing vertex-blend morphing animation
Qt 3D Scene2D Module
Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069Quick8b7c:f320:99b9:690f:4595:cd17:293a:c069QScene2D
This class enables rendering qml into a texture, which then can be used as a part of 3D scene
|
Random
kotlin-stdlib / kotlin.random / Random
Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
fun Random(seed: Int): Random
Returns a repeatable random number generator seeded with the given seed Int value. Two generators with the same seed produce the same sequence of values within the same version of Kotlin runtime. Note: Future versions of Kotlin may change the algorithm of this seeded number generator so that it will return a sequence of values different from the current one for a given seed. On JVM the returned generator is NOT thread-safe. Do not invoke it from multiple threads without proper synchronization. import kotlin.math.sin
import kotlin.random.Random
import kotlin.test.assertTrue
fun main(args: Array<String>) {
//sampleStart
fun getRandomList(random: Random): List<Int> =
List(10) { random.nextInt(0, 100) }
val randomValues1 = getRandomList(Random(42))
// prints the same sequence every time
println(randomValues1) // [33, 40, 41, 2, 41, 32, 21, 40, 69, 87]
val randomValues2 = getRandomList(Random(42))
// random with the same seed produce the same sequence
println("randomValues1 == randomValues2 is ${randomValues1 == randomValues2}") // true
val randomValues3 = getRandomList(Random(0))
// random with another seed produce another sequence
println(randomValues3) // [14, 48, 57, 67, 82, 7, 61, 27, 14, 59]
//sampleEnd
}
Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
fun Random(seed: Long): Random
Returns a repeatable random number generator seeded with the given seed Long value. Two generators with the same seed produce the same sequence of values within the same version of Kotlin runtime. Note: Future versions of Kotlin may change the algorithm of this seeded number generator so that it will return a sequence of values different from the current one for a given seed. On JVM the returned generator is NOT thread-safe. Do not invoke it from multiple threads without proper synchronization. import kotlin.math.sin
import kotlin.random.Random
import kotlin.test.assertTrue
fun main(args: Array<String>) {
//sampleStart
fun getRandomList(random: Random): List<Int> =
List(10) { random.nextInt(0, 100) }
val randomValues1 = getRandomList(Random(42))
// prints the same sequence every time
println(randomValues1) // [33, 40, 41, 2, 41, 32, 21, 40, 69, 87]
val randomValues2 = getRandomList(Random(42))
// random with the same seed produce the same sequence
println("randomValues1 == randomValues2 is ${randomValues1 == randomValues2}") // true
val randomValues3 = getRandomList(Random(0))
// random with another seed produce another sequence
println(randomValues3) // [14, 48, 57, 67, 82, 7, 61, 27, 14, 59]
//sampleEnd
}
|
dart:mirrors
operator == abstract method bool operator ==(other) Whether this mirror is equal to other. The equality holds if and only if
other is a mirror of the same kind, and
The library being reflected by this mirror and the library being reflected by other are the same library in the same isolate.
Source bool operator ==(other);
|
oneandone_ssh_key Manages SSH Keys on 1&1 Example Usage resource "oneandone_ssh_key" "sshkey" {
name = "test_ssh_key"
description = "testing_ssh_keys"
}
Argument Reference The following arguments are supported:
description - (Optional) Description for the ssh key
name - (Required) The name of the storage
public_key - (Optional) Public key to import. If not given, new SSH key pair will be created and the private key is returned in the response
|
function taxonomy_term_delete taxonomy_term_delete($tid) Delete a term. Parameters $tid: The term ID. Return value Status constant indicating deletion. File
modules/taxonomy/taxonomy.module, line 706 Enables the organization of content into categories. Code function taxonomy_term_delete($tid) {
$transaction = db_transaction();
try {
$tids = array($tid);
while ($tids) {
$children_tids = $orphans = array();
foreach ($tids as $tid) {
// See if any of the term's children are about to be become orphans:
if ($children = taxonomy_get_children($tid)) {
foreach ($children as $child) {
// If the term has multiple parents, we don't delete it.
$parents = taxonomy_get_parents($child->tid);
if (count($parents) == 1) {
$orphans[] = $child->tid;
}
}
}
if ($term = taxonomy_term_load($tid)) {
db_delete('taxonomy_term_data')
->condition('tid', $tid)
->execute();
db_delete('taxonomy_term_hierarchy')
->condition('tid', $tid)
->execute();
field_attach_delete('taxonomy_term', $term);
module_invoke_all('taxonomy_term_delete', $term);
module_invoke_all('entity_delete', $term, 'taxonomy_term');
taxonomy_terms_static_reset();
}
}
$tids = $orphans;
}
return SAVED_DELETED;
}
catch (Exception $e) {
$transaction->rollback();
watchdog_exception('taxonomy', $e);
throw $e;
}
}
|
matplotlib.axes.Axes.get_navigate_mode Axes.get_navigate_mode()
Get the navigation toolbar button status: 'PAN', 'ZOOM', or None
Examples using matplotlib.axes.Axes.get_navigate_mode
|
ReQL command: indexWait
Command syntax table.indexWait([, index...]) → array
Description Wait for the specified indexes on this table to be ready, or for all indexes on this table to be ready if no indexes are specified. The result is an array containing one object for each table index: {
"index": <indexName>,
"ready": true,
"function": <binary>,
"multi": <bool>,
"geo": <bool>,
"outdated": <bool>
}
See the indexStatus documentation for a description of the field values. Example: Wait for all indexes on the table test to be ready: r.table("test").indexWait().run(conn);
Example: Wait for the index timestamp to be ready: r.table("test").indexWait("timestamp").run(conn);
Related commands indexStatus
|
Geolocation.clearWatch()
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers. The Geolocation.clearWatch() method is used to unregister location/error monitoring handlers previously installed using Geolocation.watchPosition().
Syntax
clearWatch(id)
Parameters
id The ID number returned by the Geolocation.watchPosition() method when installing the handler you wish to remove.
Examples
var id, target, option;
function success(pos) {
var crd = pos.coords;
if (target.latitude === crd.latitude && target.longitude === crd.longitude) {
console.log('Congratulations, you\'ve reached the target!');
navigator.geolocation.clearWatch(id);
}
};
function error(err) {
console.warn('ERROR(' + err.code + '): ' + err.message);
};
target = {
latitude : 0,
longitude: 0,
}
options = {
enableHighAccuracy: false,
timeout: 5000,
maximumAge: 0
};
id = navigator.geolocation.watchPosition(success, error, options);
Specifications
Specification
Geolocation API # clearwatch-method
Browser compatibility
Desktop
Mobile
Chrome
Edge
Firefox
Internet Explorer
Opera
Safari
WebView Android
Chrome Android
Firefox for Android
Opera Android
Safari on IOS
Samsung Internet
clearWatch
5
12
3.5
9
10.6
5
≤37
18
4
11
≤3
1.0
See also
Using geolocation Geolocation Geolocation.watchPosition() Geolocation.getCurrentPosition()
Found a problem with this page?
Edit on GitHub
Source on GitHub
Report a problem with this content on GitHub
Want to fix the problem yourself? See our Contribution guide.
Last modified: Apr 18, 2022, by MDN contributors
|
protected property MenuLinkDefaultForm8b7c:f320:99b9:690f:4595:cd17:293a:c069$menuLinkManager The menu link manager. Type: \Drupal\Core\Menu\MenuLinkManagerInterface File
core/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php, line 36 Class
MenuLinkDefaultForm Provides an edit form for static menu links. Namespace Drupal\Core\Menu\Form Code protected $menuLinkManager;
|
awx.awx.tower_job_list – List Ansible Tower jobs. Note This plugin is part of the awx.awx collection (version 14.1.0). To install it use: ansible-galaxy collection install awx.awx. To use it in a playbook, specify: awx.awx.tower_job_list. Synopsis Parameters Notes Examples Return Values Synopsis List Ansible Tower jobs. See https://www.ansible.com/tower for an overview. Parameters Parameter Choices/Defaults Comments all_pages boolean
Choices:
no ← yes Fetch all the pages and return a single result. page integer Page number of the results to fetch. query dictionary Query used to further filter the list of jobs. {"foo":"bar"} will be passed at ?foo=bar
status string
Choices: pending waiting running error failed canceled successful Only list jobs with this status. tower_config_file path Path to the Tower or AWX config file. If provided, the other locations for config files will not be considered. tower_host string URL to your Tower or AWX instance. If value not set, will try environment variable TOWER_HOST and then config files If value not specified by any means, the value of (609)462-2449 will be used tower_oauthtoken raw added in 3.7 of awx.awx The Tower OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the tower_token module. If value not set, will try environment variable TOWER_OAUTH_TOKEN and then config files tower_password string Password for your Tower or AWX instance. If value not set, will try environment variable TOWER_PASSWORD and then config files tower_username string Username for your Tower or AWX instance. If value not set, will try environment variable TOWER_USERNAME and then config files validate_certs boolean
Choices: no yes Whether to allow insecure connections to Tower or AWX. If no, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable TOWER_VERIFY_SSL and then config files
aliases: tower_verify_ssl Notes Note If no config_file is provided we will attempt to use the tower-cli library defaults to find your Tower host information.
config_file should contain Tower configuration in the following format host=hostname username=username password=password Examples - name: List running jobs for the testing.yml playbook
tower_job_list:
status: running
query: {"playbook": "testing.yml"}
tower_config_file: "~/tower_cli.cfg"
register: testing_jobs
Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description count integer success Total count of objects return Sample: 51 next integer success next page available for the listing Sample: 3 previous integer success previous page available for the listing Sample: 1 results list / elements=string success a list of job objects represented as dictionaries Sample: [{'allow_simultaneous': False, 'artifacts': {}, 'ask_credential_on_launch': False, 'ask_inventory_on_launch': False, 'ask_job_type_on_launch': False, 'failed': False, 'finished': '2017-02-22T15:09:05.633942Z', 'force_handlers': False, 'forks': 0, 'id': 2, 'inventory': 1, 'job_explanation': '', 'job_tags': '', 'job_template': 5, 'job_type': 'run'}, '...'] Authors Wayne Witzel III (@wwitzel3)
© 2012–2018 Michael DeHaan |
public static function DateTimePlus8b7c:f320:99b9:690f:4595:cd17:293a:c069rrayToISO public static DateTimePlus8b7c:f320:99b9:690f:4595:cd17:293a:c069rrayToISO($array, $force_valid_date = FALSE) Creates an ISO date from an array of values. Parameters array $array: An array of date values keyed by date part. bool $force_valid_date: (optional) Whether to force a full date by filling in missing values. Defaults to FALSE. Return value string The date as an ISO string. File
core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 490 Class
DateTimePlus Wraps DateTime(). Namespace Drupal\Component\Datetime Code public static function arrayToISO($array, $force_valid_date = FALSE) {
$array = stati8b7c:f320:99b9:690f:4595:cd17:293a:c069prepareArray($array, $force_valid_date);
$input_time = '';
if ($array['year'] !== '') {
$input_time = stati8b7c:f320:99b9:690f:4595:cd17:293a:c069datePad(intval($array['year']), 4);
if ($force_valid_date || $array['month'] !== '') {
$input_time .= '-' . stati8b7c:f320:99b9:690f:4595:cd17:293a:c069datePad(intval($array['month']));
if ($force_valid_date || $array['day'] !== '') {
$input_time .= '-' . stati8b7c:f320:99b9:690f:4595:cd17:293a:c069datePad(intval($array['day']));
}
}
}
if ($array['hour'] !== '') {
$input_time .= $input_time ? 'T' : '';
$input_time .= stati8b7c:f320:99b9:690f:4595:cd17:293a:c069datePad(intval($array['hour']));
if ($force_valid_date || $array['minute'] !== '') {
$input_time .= ':' . stati8b7c:f320:99b9:690f:4595:cd17:293a:c069datePad(intval($array['minute']));
if ($force_valid_date || $array['second'] !== '') {
$input_time .= ':' . stati8b7c:f320:99b9:690f:4595:cd17:293a:c069datePad(intval($array['second']));
}
}
}
return $input_time;
}
|
st8b7c:f320:99b9:690f:4595:cd17:293a:c069optional<T>8b7c:f320:99b9:690f:4595:cd17:293a:c069~optional ~optional();
(since C++17) (until C++20) constexpr ~optional();
(since C++20) If the object contains a value and the type T is not trivially destructible (see st8b7c:f320:99b9:690f:4595:cd17:293a:c069is_trivially_destructible), destroys the contained value by calling its destructor, as if by value().T8b7c:f320:99b9:690f:4595:cd17:293a:c069~T().
Otherwise, does nothing.
Notes If T is trivially-destructible, then this destructor is also trivial, so st8b7c:f320:99b9:690f:4595:cd17:293a:c069optional<T> is also trivially-destructible.
Defect reports The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR Applied to Behavior as published Correct behavior
P2231R1 C++20 the destructor was not constexpr while non-trivial destructors can be constexpr in C++20 made constexpr
|
dart:web_gl UNMASKED_VENDOR_WEBGL constant int const UNMASKED_VENDOR_WEBGL Implementation static const int UNMASKED_VENDOR_WEBGL = 0x9245;
|
FindPython Find Python interpreter, compiler and development environment (include directories and libraries). Three components are supported:
Interpreter: search for Python interpreter.
Compiler: search for Python compiler. Only offered by IronPython.
Development: search for development artifacts (include directories and libraries). If no COMPONENTS is specified, Interpreter is assumed. To ensure consistent versions between components Interpreter, Compiler and Development, specify all components at the same time: find_package (Python COMPONENTS Interpreter Development)
This module looks preferably for version 3 of Python. If not found, version 2 is searched. To manage concurrent versions 3 and 2 of Python, use FindPython3 and FindPython2 modules rather than this one. Imported Targets This module defines the following Imported Targets:
Python8b7c:f320:99b9:690f:4595:cd17:293a:c069Interpreter Python interpreter. Target defined if component Interpreter is found.
Python8b7c:f320:99b9:690f:4595:cd17:293a:c069ompiler Python compiler. Target defined if component Compiler is found.
Python8b7c:f320:99b9:690f:4595:cd17:293a:c069Python Python library. Target defined if component Development is found. Result Variables This module will set the following variables in your project (see Standard Variable Names):
Python_FOUND System has the Python requested components.
Python_Interpreter_FOUND System has the Python interpreter.
Python_EXECUTABLE Path to the Python interpreter.
Python_INTERPRETER_ID
A short string unique to the interpreter. Possible values include:
Python ActivePython Anaconda Canopy IronPython
Python_STDLIB
Standard platform independent installation directory. Information returned by distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=True).
Python_STDARCH
Standard platform dependent installation directory. Information returned by distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=True).
Python_SITELIB
Third-party platform independent installation directory. Information returned by distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False).
Python_SITEARCH
Third-party platform dependent installation directory. Information returned by distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=False).
Python_Compiler_FOUND System has the Python compiler.
Python_COMPILER Path to the Python compiler. Only offered by IronPython.
Python_COMPILER_ID
A short string unique to the compiler. Possible values include:
IronPython
Python_Development_FOUND System has the Python development artifacts.
Python_INCLUDE_DIRS The Python include directories.
Python_LIBRARIES The Python libraries.
Python_LIBRARY_DIRS The Python library directories.
Python_RUNTIME_LIBRARY_DIRS The Python runtime library directories.
Python_VERSION Python version.
Python_VERSION_MAJOR Python major version.
Python_VERSION_MINOR Python minor version.
Python_VERSION_PATCH Python patch version. Hints
Python_ROOT_DIR Define the root directory of a Python installation.
Python_USE_STATIC_LIBS
If not defined, search for shared libraries and static libraries in that order. If set to TRUE, search only for static libraries. If set to FALSE, search only for shared libraries. Commands This module defines the command Python_add_library which have the same semantic as add_library() but take care of Python module naming rules (only applied if library is of type MODULE) and add dependency to target Python8b7c:f320:99b9:690f:4595:cd17:293a:c069Python: Python_add_library (my_module MODULE src1.cpp)
If library type is not specified, MODULE is assumed.
|
torch.float_power
torch.float_power(input, exponent, *, out=None) → Tensor
Raises input to the power of exponent, elementwise, in double precision. If neither input is complex returns a torch.float64 tensor, and if one or more inputs is complex returns a torch.complex128 tensor. Note This function always computes in double precision, unlike torch.pow(), which implements more typical type promotion. This is useful when the computation needs to be performed in a wider or more precise dtype, or the results of the computation may contain fractional values not representable in the input dtypes, like when an integer base is raised to a negative integer exponent. Parameters
input (Tensor or Number) – the base value(s)
exponent (Tensor or Number) – the exponent value(s) Keyword Arguments
out (Tensor, optional) – the output tensor. Example: >>> a = torch.randint(10, (4,))
>>> a
tensor([6, 4, 7, 1])
>>> torch.float_power(a, 2)
tensor([36., 16., 49., 1.], dtype=torch.float64)
>>> a = torch.arange(1, 5)
>>> a
tensor([ 1, 2, 3, 4])
>>> exp = torch.tensor([2, -3, 4, -5])
>>> exp
tensor([ 2, -3, 4, -5])
>>> torch.float_power(a, exp)
tensor([1.0000e+00, 1.2500e-01, 8.1000e+01, 9.7656e-04], dtype=torch.float64)
|
IUserIdentity Package system.base Inheritance interface IUserIdentity Subclasses
CBaseUserIdentity, CUserIdentity
Since 1.0 Source Code framework/base/interfaces.php IUserIdentity interface is implemented by a user identity class. An identity represents a way to authenticate a user and retrieve information needed to uniquely identity the user. It is normally used with the user application component. Public Methods Method
Description
Defined By authenticate() Authenticates the user. IUserIdentity getId() Returns a value that uniquely represents the identity. IUserIdentity getIsAuthenticated() Returns a value indicating whether the identity is authenticated. IUserIdentity getName() Returns the display name for the identity (e.g. username). IUserIdentity getPersistentStates() Returns the additional identity information that needs to be persistent during the user session. IUserIdentity Method Details authenticate() method abstract public boolean authenticate() {return} boolean whether authentication succeeds. Source Code: framework/base/interfaces.php#255 (show) public function authenticate(); Authenticates the user. The information needed to authenticate the user are usually provided in the constructor. getId() method abstract public mixed getId() {return} mixed a value that uniquely represents the identity (e.g. primary key value). Source Code: framework/base/interfaces.php#265 (show) public function getId(); Returns a value that uniquely represents the identity. getIsAuthenticated() method abstract public boolean getIsAuthenticated() {return} boolean whether the identity is valid. Source Code: framework/base/interfaces.php#260 (show) public function getIsAuthenticated(); Returns a value indicating whether the identity is authenticated. getName() method abstract public string getName() {return} string the display name for the identity. Source Code: framework/base/interfaces.php#270 (show) public function getName(); Returns the display name for the identity (e.g. username). getPersistentStates() method abstract public array getPersistentStates() {return} array additional identity information that needs to be persistent during the user session (excluding id). Source Code: framework/base/interfaces.php#275 (show) public function getPersistentStates(); Returns the additional identity information that needs to be persistent during the user session.
|
WP_Image_Editor_Imagick8b7c:f320:99b9:690f:4595:cd17:293a:c069__destruct() Source File: wp-includes/class-wp-image-editor-imagick.php. View all references public function __destruct() {
if ( $this->image instanceof Imagick ) {
// We don't need the original in memory anymore.
$this->image->clear();
$this->image->destroy();
}
}
|
VarDumper class VarDumper Methods static dump($var)
static setHandler($callable)
Details static
dump($var)
Parameters $var static
setHandler($callable)
Parameters $callable
|
Category: Properties of jQuery Object Instances
Each jQuery object created with the jQuery() function contains a number of properties alongside its methods. These properties allow us to inspect various attributes of the object. .context The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. .jquery A string containing the jQuery version number. .length The number of elements in the jQuery object. .selector A selector representing selector passed to jQuery(), if any, when creating the original set.
|
tf.keras.preprocessing.image.random_brightness Performs a random brightness shift. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.keras.preprocessing.image.random_brightness, `tf.compat.v2.keras.preprocessing.image.random_brightness`
tf.keras.preprocessing.image.random_brightness(
x, brightness_range
)
Arguments x: Input tensor. Must be 3D.
brightness_range: Tuple of floats; brightness range.
channel_axis: Index of axis for channels in the input tensor.
Returns Numpy image tensor.
Raises ValueError if `brightness_range` isn't a tuple.
|
fortios_vpn_ipsec_manualkey – Configure IPsec manual keys in Fortinet’s FortiOS and FortiGate New in version 2.8. Synopsis Requirements Parameters Notes Examples Return Values Status Synopsis This module is able to configure a FortiGate or FortiOS by allowing the user to set and modify vpn_ipsec feature and manualkey category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.2 Requirements The below requirements are needed on the host that executes this module. fortiosapi>=0.9.8 Parameters Parameter Choices/Defaults Comments host - / required FortiOS or FortiGate ip address. https boolean
Choices: no
yes ← Indicates if the requests towards FortiGate must use HTTPS protocol password - Default:"" FortiOS or FortiGate password. username - / required FortiOS or FortiGate username. vdom - Default:"root" Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. vpn_ipsec_manualkey - Default:null Configure IPsec manual keys. authentication -
Choices: None md5 sha1 sha256 sha384 sha512 Authentication algorithm. Must be the same for both ends of the tunnel. authkey - Hexadecimal authentication key in 16-digit (8-byte) segments separated by hyphens. enckey - Hexadecimal encryption key in 16-digit (8-byte) segments separated by hyphens. encryption -
Choices: None des Encryption algorithm. Must be the same for both ends of the tunnel. interface - Name of the physical, aggregate, or VLAN interface. Source system.interface.name. local-gw - Local gateway. localspi - Local SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules. name - / required IPsec tunnel name. npu-offload -
Choices: enable disable Enable/disable NPU offloading. remote-gw - Peer gateway. remotespi - Remote SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules. state -
Choices: present absent Indicates whether to create or remove the object Notes Note Requires fortiosapi library developed by Fortinet Run as a local_action in your playbook Examples - hosts: localhost
vars:
host: "(339)478-7661"
username: "admin"
password: ""
vdom: "root"
tasks:
- name: Configure IPsec manual keys.
fortios_vpn_ipsec_manualkey:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "False"
vpn_ipsec_manualkey:
state: "present"
authentication: "null"
authkey: "<your_own_value>"
enckey: "<your_own_value>"
encryption: "null"
interface: "<your_own_value> (source system.interface.name)"
local-gw: "<your_own_value>"
localspi: "<your_own_value>"
name: "default_name_10"
npu-offload: "enable"
remote-gw: "<your_own_value>"
remotespi: "<your_own_value>"
Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description build string always Build number of the fortigate image Sample: 1547 http_method string always Last method used to provision the content into FortiGate Sample: PUT http_status string always Last result given by FortiGate on last operation applied Sample: 200 mkey string success Master key (id) used in the last call to FortiGate Sample: id name string always Name of the table used to fulfill the request Sample: urlfilter path string always Path of the table used to fulfill the request Sample: webfilter revision string always Internal revision number Sample: 30.131-20-80328 serial string always Serial number of the unit Sample: FGVMEVYYQT3AB5352 status string always Indication of the operation's result Sample: success vdom string always Virtual domain used Sample: root version string always Version of the FortiGate Sample: v5.6.3 Status This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors Miguel Angel Munoz (@mamunozgonzalez) Nicolas Thomas (@thomnico) Hint If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan |
UKLungDeaths Monthly Deaths from Lung Diseases in the UK Description Three time series giving the monthly deaths from bronchitis, emphysema and asthma in the UK, 1974–1979, both sexes (ldeaths), males (mdeaths) and females (fdeaths). Usage
ldeaths
fdeaths
mdeaths
Source P. J. Diggle (1990) Time Series: A Biostatistical Introduction. Oxford, table A.3 Examples
require(stats); require(graphics) # for time
plot(ldeaths)
plot(mdeaths, fdeaths)
## Better labels:
yr <- floor(tt <- time(mdeaths))
plot(mdeaths, fdeaths,
xy.labels = paste(month.abb[12*(tt - yr)], yr-1900, sep = "'"))
Copyright ( |
[Java] Enum AnnotationCollectorMode
groovy.transform.AnnotationCollectorMode
Enum Constants Summary
Enum constants classes
Enum constant Description DUPLICATE PREFER_COLLECTOR PREFER_COLLECTOR_MERGED PREFER_EXPLICIT PREFER_EXPLICIT_MERGED Inherited Methods Summary
Inherited Methods
Methods inherited from class Name class Enum name, equals, toString, hashCode, compareTo, compareTo, valueOf, getDeclaringClass, ordinal, wait, wait, wait, getClass, notify, notifyAll Enum Constant Detail
AnnotationCollectorMode DUPLICATE
AnnotationCollectorMode PREFER_COLLECTOR
AnnotationCollectorMode PREFER_COLLECTOR_MERGED
AnnotationCollectorMode PREFER_EXPLICIT
AnnotationCollectorMode PREFER_EXPLICIT_MERGED
|
numpy.polynomial.chebyshev.Chebyshev.interpolate method
classmethod Chebyshev.interpolate(func, deg, domain=None, args=()) [source]
Interpolate a function at the Chebyshev points of the first kind. Returns the series that interpolates func at the Chebyshev points of the first kind scaled and shifted to the domain. The resulting series tends to a minmax approximation of func when the function is continuous in the domain. New in version 1.14.0.
Parameters:
func : function
The function to be interpolated. It must be a function of a single variable of the form f(x, a, b, c...), where a, b, c... are extra arguments passed in the args parameter.
deg : int
Degree of the interpolating polynomial.
domain : {None, [beg, end]}, optional
Domain over which func is interpolated. The default is None, in which case the domain is [-1, 1].
args : tuple, optional
Extra arguments to be used in the function call. Default is no extra arguments.
Returns:
polynomial : Chebyshev instance
Interpolating Chebyshev instance. Notes See numpy.polynomial.chebfromfunction for more details.
|
fortios_report_theme – Report themes configuration in Fortinet’s FortiOS and FortiGate New in version 2.8. Synopsis Requirements Parameters Notes Examples Return Values Status Synopsis This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify report feature and theme category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.5 Requirements The below requirements are needed on the host that executes this module. fortiosapi>=0.9.8 Parameters Parameter Choices/Defaults Comments host string FortiOS or FortiGate IP address. https boolean
Choices: no
yes ← Indicates if the requests towards FortiGate must use HTTPS protocol. password string Default:"" FortiOS or FortiGate password. report_theme dictionary Default:null Report themes configuration bullet_list_style string Bullet list style. column_count string
Choices: 1 2 3 Report page column count. default_html_style string Default HTML report style. default_pdf_style string Default PDF report style. graph_chart_style string Graph chart style. heading1_style string Report heading style. heading2_style string Report heading style. heading3_style string Report heading style. heading4_style string Report heading style. hline_style string Horizontal line style. image_style string Image style. name string / required Report theme name. normal_text_style string Normal text style. numbered_list_style string Numbered list style. page_footer_style string Report page footer style. page_header_style string Report page header style. page_orient string
Choices: portrait landscape Report page orientation. page_style string Report page style. report_subtitle_style string Report subtitle style. report_title_style string Report title style. state string
Choices: present absent Deprecated Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. Indicates whether to create or remove the object. table_chart_caption_style string Table chart caption style. table_chart_even_row_style string Table chart even row style. table_chart_head_style string Table chart head row style. table_chart_odd_row_style string Table chart odd row style. table_chart_style string Table chart style. toc_heading1_style string Table of contents heading style. toc_heading2_style string Table of contents heading style. toc_heading3_style string Table of contents heading style. toc_heading4_style string Table of contents heading style. toc_title_style string Table of contents title style. ssl_verify boolean added in 2.9
Choices: no
yes ← Ensures FortiGate certificate must be verified by a proper CA. state string added in 2.9
Choices: present absent Indicates whether to create or remove the object. This attribute was present already in previous version in a deeper level. It has been moved out to this outer level. username string FortiOS or FortiGate username. vdom string Default:"root" Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. Notes Note Requires fortiosapi library developed by Fortinet Run as a local_action in your playbook Examples - hosts: localhost
vars:
host: "201-923-1705"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: Report themes configuration
fortios_report_theme:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "False"
state: "present"
report_theme:
bullet_list_style: "<your_own_value>"
column_count: "1"
default_html_style: "<your_own_value>"
default_pdf_style: "<your_own_value>"
graph_chart_style: "<your_own_value>"
heading1_style: "<your_own_value>"
heading2_style: "<your_own_value>"
heading3_style: "<your_own_value>"
heading4_style: "<your_own_value>"
hline_style: "<your_own_value>"
image_style: "<your_own_value>"
name: "default_name_14"
normal_text_style: "<your_own_value>"
numbered_list_style: "<your_own_value>"
page_footer_style: "<your_own_value>"
page_header_style: "<your_own_value>"
page_orient: "portrait"
page_style: "<your_own_value>"
report_subtitle_style: "<your_own_value>"
report_title_style: "<your_own_value>"
table_chart_caption_style: "<your_own_value>"
table_chart_even_row_style: "<your_own_value>"
table_chart_head_style: "<your_own_value>"
table_chart_odd_row_style: "<your_own_value>"
table_chart_style: "<your_own_value>"
toc_heading1_style: "<your_own_value>"
toc_heading2_style: "<your_own_value>"
toc_heading3_style: "<your_own_value>"
toc_heading4_style: "<your_own_value>"
toc_title_style: "<your_own_value>"
Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description build string always Build number of the fortigate image Sample: 1547 http_method string always Last method used to provision the content into FortiGate Sample: PUT http_status string always Last result given by FortiGate on last operation applied Sample: 200 mkey string success Master key (id) used in the last call to FortiGate Sample: id name string always Name of the table used to fulfill the request Sample: urlfilter path string always Path of the table used to fulfill the request Sample: webfilter revision string always Internal revision number Sample: 30.633-28-39748 serial string always Serial number of the unit Sample: FGVMEVYYQT3AB5352 status string always Indication of the operation's result Sample: success vdom string always Virtual domain used Sample: root version string always Version of the FortiGate Sample: v5.6.3 Status This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors Miguel Angel Munoz (@mamunozgonzalez) Nicolas Thomas (@thomnico) Hint If you notice any issues in this documentation, you can edit this document to improve it.
© 2012–2018 Michael DeHaan |
Assignment operators Assignment operators modify the value of the object.
Operator name Syntax Overloadable Prototype examples (for class T)
Inside class definition Outside class definition
simple assignment a = b Yes T& T8b7c:f320:99b9:690f:4595:cd17:293a:c069operator =(const T2& b); N/A
addition assignment a += b Yes T& T8b7c:f320:99b9:690f:4595:cd17:293a:c069operator +=(const T2& b); T& operator +=(T& a, const T2& b);
subtraction assignment a -= b Yes T& T8b7c:f320:99b9:690f:4595:cd17:293a:c069operator -=(const T2& b); T& operator -=(T& a, const T2& b);
multiplication assignment a *= b Yes T& T8b7c:f320:99b9:690f:4595:cd17:293a:c069operator *=(const T2& b); T& operator *=(T& a, const T2& b);
division assignment a /= b Yes T& T8b7c:f320:99b9:690f:4595:cd17:293a:c069operator /=(const T2& b); T& operator /=(T& a, const T2& b);
modulo assignment a %= b Yes T& T8b7c:f320:99b9:690f:4595:cd17:293a:c069operator %=(const T2& b); T& operator %=(T& a, const T2& b);
bitwise AND assignment a &= b Yes T& T8b7c:f320:99b9:690f:4595:cd17:293a:c069operator &=(const T2& b); T& operator &=(T& a, const T2& b);
bitwise OR assignment a |= b Yes T& T8b7c:f320:99b9:690f:4595:cd17:293a:c069operator |=(const T2& b); T& operator |=(T& a, const T2& b);
bitwise XOR assignment a ^= b Yes T& T8b7c:f320:99b9:690f:4595:cd17:293a:c069operator ^=(const T2& b); T& operator ^=(T& a, const T2& b);
bitwise left shift assignment a <<= b Yes T& T8b7c:f320:99b9:690f:4595:cd17:293a:c069operator <<=(const T2& b); T& operator <<=(T& a, const T2& b);
bitwise right shift assignment a >>= b Yes T& T8b7c:f320:99b9:690f:4595:cd17:293a:c069operator >>=(const T2& b); T& operator >>=(T& a, const T2& b);
Notes
All built-in assignment operators return *this, and most user-defined overloads also return *this so that the user-defined operators can be used in the same manner as the built-ins. However, in a user-defined operator overload, any type can be used as return type (including void).
T2 can be any type including T
Explanation copy assignment operator replaces the contents of the object a with a copy of the contents of b (b is not modified). For class types, this is a special member function, described in copy assignment operator.
move assignment operator replaces the contents of the object a with the contents of b, avoiding copying if possible (b may be modified). For class types, this is a special member function, described in move assignment operator.
(since C++11)
For non-class types, copy and move assignment are indistinguishable and are referred to as direct assignment.
compound assignment operators replace the contents of the object a with the result of a binary operation between the previous value of a and the value of b.
Builtin direct assignment The direct assignment expressions have the form.
lhs = rhs (1)
lhs = {} (2) (since C++11)
lhs = { rhs } (3) (since C++11)
For the built-in operator, lhs may have any non-const scalar type and rhs must be implicitly convertible to the type of lhs.
The direct assignment operator expects a modifiable lvalue as its left operand and an rvalue expression or a braced-init-list (since C++11) as its right operand, and returns an lvalue identifying the left operand after modification. The result is a bit-field if the left operand is a bit-field.
For non-class types, the right operand is first implicitly converted to the cv-unqualified type of the left operand, and then its value is copied into the object identified by left operand.
When the left operand has reference type, the assignment operator modifies the referred-to object.
If the left and the right operands identify overlapping objects, the behavior is undefined (unless the overlap is exact and the type is the same).
If the right operand is a braced-init-list.
if the expression E1 has scalar type,
the expression E1 = {} is equivalent to E1 = T{}, where T is the type of E1.
the expression E1 = {E2} is equivalent to E1 = T{E2}, where T is the type of E1.
if the expression E1 has class type, the syntax E1 = {args...} generates a call to the assignment operator with the braced-init-list as the argument, which then selects the appropriate assignment operator following the rules of overload resolution. Note that, if a non-template assignment operator from some non-class type is available, it is preferred over the copy/move assignment in E1 = {} because {} to non-class is an identity conversion, which outranks the user-defined conversion from {} to a class type.
(since C++11)
Using an lvalue of volatile-qualified non-class type as left operand of built-in direct assignment operator is deprecated, unless the assignment expression appears in an unevaluated context or is a discarded-value expression.
(since C++20)
In overload resolution against user-defined operators, for every type T, the following function signatures participate in overload resolution:
T*& operator=(T*&, T*);
T*volatile & operator=(T*volatile &, T*);
For every enumeration or pointer to member type T, optionally volatile-qualified, the following function signature participates in overload resolution:
T& operator=(T&, T);
For every pair A1 and A2, where A1 is an arithmetic type (optionally volatile-qualified) and A2 is a promoted arithmetic type, the following function signature participates in overload resolution:
A1& operator=(A1&, A2);
Example #include <iostream>
int main()
{
int n = 0; // not an assignment
n = 1; // direct assignment
st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << n << ' ';
n = {}; // zero-initialization, then assignment
st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << n << ' ';
n = 'a'; // integral promotion, then assignment
st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << n << ' ';
n = {'b'}; // explicit cast, then assignment
st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << n << ' ';
n = 1.0; // floating-point conversion, then assignment
st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << n << ' ';
// n = {1.0}; // compiler error (narrowing conversion)
int& r = n; // not an assignment
r = 2; // assignment through reference
st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << n << '\n';
[[maybe_unused]]
int* p;
p = &n; // direct assignment
p = nullptr; // null-pointer conversion, then assignment
struct { int a; st8b7c:f320:99b9:690f:4595:cd17:293a:c069string s; } obj;
obj = {1, "abc"}; // assignment from a braced-init-list
st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << obj.a << ':' << obj.s << '\n';
} Output:
1 0 97 98 1 2
1:abc Builtin compound assignment The compound assignment expressions have the form.
lhs op rhs (1)
lhs op {} (2) (since C++11)
lhs op { rhs } (3) (since C++11)
op - one of *=, /= %=, += -=, <<=, >>=, &=, ^=, |=
lhs - for the built-in operator, lhs may have any arithmetic type, except when op is += or -=, which also accept pointer types with the same restrictions as + and -
rhs - for the built-in operator, rhs must be implicitly convertible to lhs
The behavior of every builtin compound-assignment expression E1 op= E2 (where E1 is a modifiable lvalue expression and E2 is an rvalue expression or a braced-init-list (since C++11)) is exactly the same as the behavior of the expression E1 = E1 op E2, except that the expression E1 is evaluated only once and that it behaves as a single operation with respect to indeterminately-sequenced function calls (e.g. in f(a += b, g()), the += is either not started at all or is completed as seen from inside g()).
Using an lvalue of volatile-qualified non-class type as left operand of built-in compound assignment operator other than |=, &=, or ^= is deprecated.
(since C++20)
In overload resolution against user-defined operators, for every pair A1 and A2, where A1 is an arithmetic type (optionally volatile-qualified) and A2 is a promoted arithmetic type, the following function signatures participate in overload resolution:
A1& operator*=(A1&, A2);
A1& operator/=(A1&, A2);
A1& operator+=(A1&, A2);
A1& operator-=(A1&, A2);
For every pair I1 and I2, where I1 is an integral type (optionally volatile-qualified) and I2 is a promoted integral type, the following function signatures participate in overload resolution:
I1& operator%=(I1&, I2);
I1& operator<<=(I1&, I2);
I1& operator>>=(I1&, I2);
I1& operator&=(I1&, I2);
I1& operator^=(I1&, I2);
I1& operator|=(I1&, I2);
For every optionally cv-qualified object type T, the following function signatures participate in overload resolution:
T*& operator+=(T*&, st8b7c:f320:99b9:690f:4595:cd17:293a:c069ptrdiff_t);
T*& operator-=(T*&, st8b7c:f320:99b9:690f:4595:cd17:293a:c069ptrdiff_t);
T*volatile & operator+=(T*volatile &, st8b7c:f320:99b9:690f:4595:cd17:293a:c069ptrdiff_t);
T*volatile & operator-=(T*volatile &, st8b7c:f320:99b9:690f:4595:cd17:293a:c069ptrdiff_t);
Example Defect reports The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR Applied to Behavior as published Correct behavior
CWG 1527 C++11 for assignments to class type objects, the right operandcould be an initializer list only when the assignmentis defined by a user-defined assignment operator removed user-definedassignment constraint
CWG 1538 C++11 E1 = {E2} was equivalent to E1 = T(E2)(T is the type of E1), this introduced a C-style cast it is equivalentto E1 = T{E2}
P2327R1 C++20 bitwise compound assignment operators for volatile typeswere deprecated while being useful for some platforms they are not deprecated
See also Operator precedence.
Operator overloading.
Common operators
assignment incrementdecrement arithmetic logical comparison memberaccess other
a = b a += b a -= b a *= b a /= b a %= b a &= b a |= b a ^= b a <<= b a >>= b.
++a --a a++ a--
+a -a a + b a - b a * b a / b a % b ~a a & b a | b a ^ b a << b a >> b.
!a a && b a || b.
a == b a != b a < b a > b a <= b a >= b a <=> b.
a[b] *a &a a->b a.b a->*b a.*b.
a(...) a, b a ? b : c.
Special operators
static_cast converts one type to another related type dynamic_cast converts within inheritance hierarchies const_cast adds or removes cv qualifiers reinterpret_cast converts type to unrelated type C-style cast converts one type to another by a mix of static_cast, const_cast, and reinterpret_cast new creates objects with dynamic storage duration delete destructs objects previously created by the new expression and releases obtained memory area sizeof queries the size of a type sizeof... queries the size of a parameter pack (since C++11) typeid queries the type information of a type noexcept checks if an expression can throw an exception (since C++11) alignof queries alignment requirements of a type (since C++11).
C documentation for Assignment operators
|
win_nssm - NSSM - the Non-Sucking Service Manager New in version 2.0. Synopsis Requirements (on host that executes module) Options
Examples Status Synopsis nssm is a service helper which doesn’t suck. See https://nssm.cc/ for more information. Requirements (on host that executes module) nssm >= 2.24.0 # (install via win_chocolatey) win_chocolatey: name=nssm
Options parameter required default choices comments app_parameters
no Parameters to be passed to the application when it starts. Use either this or app_parameters_free_form, not both app_parameters_free_form(added in 2.3.0)
no Single string of parameters to be passed to the service. Use either this or app_parameters, not both application
no The application binary to run as a service Specify this whenever the service may need to be installed (state: present, started, stopped, restarted) Note that the application name must look like the following, if the directory includes spaces: nssm install service "c:\\Program Files\\app.exe\\" "C:\\Path with spaces\\" See commit 0b386fc1984ab74ee59b7bed14b7e8f57212c22b in the nssm.git project for more info: https://git.nssm.cc/?p=nssm.git;a=commit;h=0b386fc1984ab74ee59b7bed14b7e8f57212c22b dependencies
no Service dependencies that has to be started to trigger startup, separated by comma. name
yes Name of the service to operate on password
no Password to be used for service startup start_mode
no auto
auto
manual
disabled
If auto is selected, the service will [email protected]. manual means that the service will start only when another service needs it. disabled means that the service will stay off, regardless if it is needed or not. state
no started
present
started
stopped
restarted
absent
State of the service on the system Note that NSSM actions like "pause", "continue", "rotate" do not fit the declarative style of ansible, so these should be implemented via the ansible command module stderr_file
no Path to receive error output stdout_file
no Path to receive output user
no User to be used for service startup Examples # Install and start the foo service
- win_nssm:
name: foo
application: C:\windows\foo.exe
# Install and start the foo service with a key-value pair argument
# This will yield the following command: C:\windows\foo.exe bar "true"
- win_nssm:
name: foo
application: C:\windows\foo.exe
app_parameters:
bar: true
# Install and start the foo service with a key-value pair argument, where the argument needs to start with a dash
# This will yield the following command: C:\windows\\foo.exe -bar "true"
- win_nssm:
name: foo
application: C:\windows\foo.exe
app_parameters:
"-bar": true
# Install and start the foo service with a single parameter
# This will yield the following command: C:\windows\\foo.exe bar
- win_nssm:
name: foo
application: C:\windows\foo.exe
app_parameters:
_: bar
# Install and start the foo service with a mix of single params, and key value pairs
# This will yield the following command: C:\windows\\foo.exe bar -file output.bat
- win_nssm:
name: foo
application: C:\windows\foo.exe
app_parameters:
_: bar
"-file": "output.bat"
# Use the single line parameters option to specify an arbitrary string of parameters
# for the service executable
- name: Make sure the Consul service runs
win_nssm:
name: consul
application: C:\consul\consul.exe
app_parameters_free_form: agent -config-dir=C:\consul\config
stdout_file: C:\consul\log.txt
stderr_file: C:\consul\error.txt
# Install and start the foo service, redirecting stdout and stderr to the same file
- win_nssm:
name: foo
application: C:\windows\foo.exe
stdout_file: C:\windows\foo.log
stderr_file: C:\windows\foo.log
# Install and start the foo service, but wait for dependencies tcpip and adf
- win_nssm:
name: foo
application: C:\windows\foo.exe
dependencies: 'adf,tcpip'
# Install and start the foo service with dedicated user
- win_nssm:
name: foo
application: C:\windows\foo.exe
user: foouser
password: secret
# Install the foo service but do not start it automatically
- win_nssm:
name: foo
application: C:\windows\foo.exe
state: present
start_mode: manual
# Remove the foo service
- win_nssm:
name: foo
state: absent
Status This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface. For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan |
Overflow Adjust the overflow property on the fly with four default values and classes. These classes are not responsive by default. <div class="overflow-auto">...</div>
<div class="overflow-hidden">...</div>
<div class="overflow-visible">...</div>
<div class="overflow-scroll">...</div>
Using Sass variables, you may customize the overflow utilities by changing the $overflows variable in _variables.scss. Sass
Utilities API
Overflow utilities are declared in our utilities API in scss/_utilities.scss. Learn how to use the utilities API. "overflow": (
property: overflow,
values: auto hidden visible scroll,
),
© 2011–2021 Twitter, Inc. |
pandas.DataFrame.iat
DataFrame.iat
Fast integer location scalar accessor. Similarly to iloc, iat provides integer based lookups. You can also set using these indexers.
|
class ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069Helpers8b7c:f320:99b9:690f:4595:cd17:293a:c069ormBuilder
Parent:
Object
A FormBuilder object is associated with a particular model object and allows you to generate fields associated with the model object. The FormBuilder object is yielded when using form_for or fields_for. For example: <%= form_for @person do |person_form| %>
Name: <%= person_form.text_field :name %>
Admin: <%= person_form.check_box :admin %>
<% end %> In the above block, a FormBuilder object is yielded as the person_form variable. This allows you to generate the text_field and check_box fields by specifying their eponymous methods, which modify the underlying template and associates the +@person+ model object with the form. The FormBuilder object can be thought of as serving as a proxy for the methods in the FormHelper module. This class, however, allows you to call methods with the model object you are building the form for. You can create your own custom FormBuilder templates by subclassing this class. For example: class MyFormBuilder < ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069Helpers8b7c:f320:99b9:690f:4595:cd17:293a:c069ormBuilder
def div_radio_button(method, tag_value, options = {})
@template.content_tag(:div,
@template.radio_button(
@object_name, method, tag_value, objectify_options(options)
)
)
end
end
The above code creates a new method div_radio_button which wraps a div around the new radio button. Note that when options are passed in, you must call objectify_options in order for the model object to get correctly passed to the method. If objectify_options is not called, then the newly created helper will not be linked back to the model. The div_radio_button code from above can now be used as follows: <%= form_for @person, :builder => MyFormBuilder do |f| %>
I am a child: <%= f.div_radio_button(:admin, "child") %>
I am an adult: <%= f.div_radio_button(:admin, "adult") %>
<% end -%> The standard set of helper methods for form building are located in the field_helpers class attribute. Attributes index[R] multipart[R] multipart?[R] object[RW] object_name[RW] options[RW] Public Class Methods _to_partial_path() Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 1661
def self._to_partial_path
@_to_partial_path ||= name.demodulize.underscore.sub!(/_builder$/, "")
end new(object_name, object, template, options) Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 1673
def initialize(object_name, object, template, options)
@nested_child_index = {}
@object_name, @object, @template, @options = object_name, object, template, options
@default_options = @options ? @options.slice(:index, :namespace, :skip_default_ids, :allow_method_names_outside_object) : {}
convert_to_legacy_options(@options)
if @object_name.to_s.match(/\[\]$/)
if (object ||= @template.instance_variable_get("@#{Regexp.last_match.pre_match}")) && object.respond_to?(:to_param)
@auto_index = object.to_param
else
raise ArgumentError, "object[] naming but object param and @object var don't exist or don't respond to to_param: #{object.inspect}"
end
end
@multipart = nil
@index = options[:index] || options[:child_index]
end Public Instance Methods button(value = nil, options = {}, &block) Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 2259
def button(value = nil, options = {}, &block)
value, options = nil, value if value.is_a?(Hash)
value ||= submit_default_value
@template.button_tag(value, options, &block)
end Add the submit button for the given form. When no value is given, it checks if the object is a new resource or not to create the proper label: <%= form_for @post do |f| %>
<%= f.button %>
<% end %> In the example above, if @post is a new record, it will use “Create Post” as button label, otherwise, it uses “Update Post”. Those labels can be customized using I18n, under the helpers.submit key (the same as submit helper) and accept the %{model} as translation interpolation: en:
helpers:
submit:
create: "Create a %{model}"
update: "Confirm changes to %{model}" It also searches for a key specific for the given object: en:
helpers:
submit:
post:
create: "Add %{model}" Examples button("Create post")
# => <button name='button' type='submit'>Create post</button>
button do
content_tag(:strong, 'Ask me!')
end
# => <button name='button' type='submit'>
# <strong>Ask me!</strong>
# </button>
check_box(method, options = {}, checked_value = "1", unchecked_value = "0") Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 2101
def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
@template.check_box(@object_name, method, objectify_options(options), checked_value, unchecked_value)
end Returns a checkbox tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). This object must be an instance object (@object) and not a local object. It's intended that method returns an integer and if that integer is above zero, then the checkbox is checked. Additional options on the input tag can be passed as a hash with options. The checked_value defaults to 1 while the default unchecked_value is set to 0 which is convenient for boolean values. Gotcha The HTML specification says unchecked check boxes are not successful, and thus web browsers do not send them. Unfortunately this introduces a gotcha: if an Invoice model has a paid flag, and in the form that edits a paid invoice the user unchecks its check box, no paid parameter is sent. So, any mass-assignment idiom like @invoice.update(params[:invoice])
wouldn't update the flag. To prevent this the helper generates an auxiliary hidden field before the very check box. The hidden field has the same name and its attributes mimic an unchecked check box. This way, the client either sends only the hidden field (representing the check box is unchecked), or both fields. Since the HTML specification says key/value pairs have to be sent in the same order they appear in the form, and parameters extraction gets the last occurrence of any repeated key in the query string, that works for ordinary forms. Unfortunately that workaround does not work when the check box goes within an array-like parameter, as in <%= fields_for "project[invoice_attributes][]", invoice, index: nil do |form| %>
<%= form.check_box :paid %>
...
<% end %> because parameter name repetition is precisely what Rails seeks to distinguish the elements of the array. For each item with a checked check box you get an extra ghost item with only that attribute, assigned to “0”. In that case it is preferable to either use check_box_tag or to use hashes instead of arrays. # Let's say that @post.validated? is 1:
check_box("validated")
# => <input name="post[validated]" type="hidden" value="0" />
# <input checked="checked" type="checkbox" id="post_validated" name="post[validated]" value="1" />
# Let's say that @puppy.gooddog is "no":
check_box("gooddog", {}, "yes", "no")
# => <input name="puppy[gooddog]" type="hidden" value="no" />
# <input type="checkbox" id="puppy_gooddog" name="puppy[gooddog]" value="yes" />
# Let's say that @eula.accepted is "no":
check_box("accepted", { class: 'eula_check' }, "yes", "no")
# => <input name="eula[accepted]" type="hidden" value="no" />
# <input type="checkbox" class="eula_check" id="eula_accepted" name="eula[accepted]" value="yes" />
collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block) Show source
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 864
def collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
@template.collection_check_boxes(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_options.merge(html_options), &block)
end Wraps ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069Helpers8b7c:f320:99b9:690f:4595:cd17:293a:c069ormOptionsHelper#collection_check_boxes for form builders: <%= form_for @post do |f| %>
<%= f.collection_check_boxes :author_ids, Author.all, :id, :name_with_initial %>
<%= f.submit %>
<% end %> Please refer to the documentation of the base helper for details. collection_radio_buttons(method, collection, value_method, text_method, options = {}, html_options = {}, &block) Show source
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 876
def collection_radio_buttons(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
@template.collection_radio_buttons(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_options.merge(html_options), &block)
end Wraps ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069Helpers8b7c:f320:99b9:690f:4595:cd17:293a:c069ormOptionsHelper#collection_radio_buttons for form builders: <%= form_for @post do |f| %>
<%= f.collection_radio_buttons :author_id, Author.all, :id, :name_with_initial %>
<%= f.submit %>
<% end %> Please refer to the documentation of the base helper for details. collection_select(method, collection, value_method, text_method, options = {}, html_options = {}) Show source
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 828
def collection_select(method, collection, value_method, text_method, options = {}, html_options = {})
@template.collection_select(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_options.merge(html_options))
end Wraps ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069Helpers8b7c:f320:99b9:690f:4595:cd17:293a:c069ormOptionsHelper#collection_select for form builders: <%= form_for @post do |f| %>
<%= f.collection_select :person_id, Author.all, :id, :name_with_initial, prompt: true %>
<%= f.submit %>
<% end %> Please refer to the documentation of the base helper for details. emitted_hidden_id?() Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 2265
def emitted_hidden_id?
@emitted_hidden_id ||= nil
end fields(scope = nil, model: nil, **options, &block) Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 1983
def fields(scope = nil, model: nil, **options, &block)
options[:allow_method_names_outside_object] = true
options[:skip_default_ids] = true
convert_to_legacy_options(options)
fields_for(scope || model, model, **options, &block)
end See the docs for the ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069ormHelper.fields helper method. fields_for(record_name, record_object = nil, fields_options = {}, &block) Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 1945
def fields_for(record_name, record_object = nil, fields_options = {}, &block)
fields_options, record_object = record_object, nil if record_object.is_a?(Hash) && record_object.extractable_options?
fields_options[:builder] ||= options[:builder]
fields_options[:namespace] = options[:namespace]
fields_options[:parent_builder] = self
case record_name
when String, Symbol
if nested_attributes_association?(record_name)
return fields_for_with_nested_attributes(record_name, record_object, fields_options, block)
end
else
record_object = record_name.is_a?(Array) ? record_name.last : record_name
record_name = model_name_from_record_or_class(record_object).param_key
end
object_name = @object_name
index = if options.has_key?(:index)
options[:index]
elsif defined?(@auto_index)
object_name = object_name.to_s.sub(/\[\]$/, "")
@auto_index
end
record_name = if index
"#{object_name}[#{index}][#{record_name}]"
elsif record_name.to_s.end_with?("[]")
record_name = record_name.to_s.sub(/(.*)\[\]$/, "[\\1][#{record_object.id}]")
"#{object_name}#{record_name}"
else
"#{object_name}[#{record_name}]"
end
fields_options[:child_index] = index
@template.fields_for(record_name, record_object, fields_options, &block)
end Creates a scope around a specific model object like form_for, but doesn't create the form tags themselves. This makes #fields_for suitable for specifying additional model objects in the same form. Although the usage and purpose of fields_for is similar to form_for's, its method signature is slightly different. Like form_for, it yields a FormBuilder object associated with a particular model object to a block, and within the block allows methods to be called on the builder to generate fields associated with the model object. Fields may reflect a model object in two ways - how they are named (hence how submitted values appear within the params hash in the controller) and what default values are shown when the form the fields appear in is first displayed. In order for both of these features to be specified independently, both an object name (represented by either a symbol or string) and the object itself can be passed to the method separately - <%= form_for @person do |person_form| %>
First name: <%= person_form.text_field :first_name %>
Last name : <%= person_form.text_field :last_name %>
<%= fields_for :permission, @person.permission do |permission_fields| %>
Admin? : <%= permission_fields.check_box :admin %>
<% end %>
<%= person_form.submit %>
<% end %> In this case, the checkbox field will be represented by an HTML input tag with the name attribute permission[admin], and the submitted value will appear in the controller as params[:permission][:admin]. If @person.permission is an existing record with an attribute admin, the initial state of the checkbox when first displayed will reflect the value of @person.permission.admin. Often this can be simplified by passing just the name of the model object to fields_for - <%= fields_for :permission do |permission_fields| %>
Admin?: <%= permission_fields.check_box :admin %>
<% end %> …in which case, if :permission also happens to be the name of an instance variable @permission, the initial state of the input field will reflect the value of that variable's attribute @permission.admin. Alternatively, you can pass just the model object itself (if the first argument isn't a string or symbol fields_for will realize that the name has been omitted) - <%= fields_for @person.permission do |permission_fields| %>
Admin?: <%= permission_fields.check_box :admin %>
<% end %> and fields_for will derive the required name of the field from the class of the model object, e.g. if @person.permission, is of class Permission, the field will still be named permission[admin]. Note: This also works for the methods in FormOptionHelper and DateHelper that are designed to work with an object as base, like FormOptionHelper#collection_select and ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069Helpers8b7c:f320:99b9:690f:4595:cd17:293a:c069teHelper#datetime_select. Nested Attributes Examples When the object belonging to the current scope has a nested attribute writer for a certain attribute, #fields_for will yield a new scope for that attribute. This allows you to create forms that set or change the attributes of a parent object and its associations in one go. Nested attribute writers are normal setter methods named after an association. The most common way of defining these writers is either with accepts_nested_attributes_for in a model definition or by defining a method with the proper name. For example: the attribute writer for the association :address is called address_attributes=. Whether a one-to-one or one-to-many style form builder will be yielded depends on whether the normal reader method returns a single object or an array of objects. One-to-one Consider a Person class which returns a single Address from the address reader method and responds to the address_attributes= writer method: class Person
def address
@address
end
def address_attributes=(attributes)
# Process the attributes hash
end
end
This model can now be used with a nested #fields_for, like so: <%= form_for @person do |person_form| %>
...
<%= person_form.fields_for :address do |address_fields| %>
Street : <%= address_fields.text_field :street %>
Zip code: <%= address_fields.text_field :zip_code %>
<% end %>
...
<% end %> When address is already an association on a Person you can use accepts_nested_attributes_for to define the writer method for you: class Person < ActiveRecor8b7c:f320:99b9:690f:4595:cd17:293a:c069Base
has_one :address
accepts_nested_attributes_for :address
end
If you want to destroy the associated model through the form, you have to enable it first using the :allow_destroy option for accepts_nested_attributes_for: class Person < ActiveRecor8b7c:f320:99b9:690f:4595:cd17:293a:c069Base
has_one :address
accepts_nested_attributes_for :address, allow_destroy: true
end
Now, when you use a form element with the _destroy parameter, with a value that evaluates to true, you will destroy the associated model (eg. 1, '1', true, or 'true'): <%= form_for @person do |person_form| %>
...
<%= person_form.fields_for :address do |address_fields| %>
...
Delete: <%= address_fields.check_box :_destroy %>
<% end %>
...
<% end %> One-to-many Consider a Person class which returns an array of Project instances from the projects reader method and responds to the projects_attributes= writer method: class Person
def projects
[@project1, @project2]
end
def projects_attributes=(attributes)
# Process the attributes hash
end
end
Note that the projects_attributes= writer method is in fact required for #fields_for to correctly identify :projects as a collection, and the correct indices to be set in the form markup. When projects is already an association on Person you can use accepts_nested_attributes_for to define the writer method for you: class Person < ActiveRecor8b7c:f320:99b9:690f:4595:cd17:293a:c069Base
has_many :projects
accepts_nested_attributes_for :projects
end
This model can now be used with a nested fields_for. The block given to the nested #fields_for call will be repeated for each instance in the collection: <%= form_for @person do |person_form| %>
...
<%= person_form.fields_for :projects do |project_fields| %>
<% if project_fields.object.active? %>
Name: <%= project_fields.text_field :name %>
<% end %>
<% end %>
...
<% end %> It's also possible to specify the instance to be used: <%= form_for @person do |person_form| %>
...
<% @person.projects.each do |project| %>
<% if project.active? %>
<%= person_form.fields_for :projects, project do |project_fields| %>
Name: <%= project_fields.text_field :name %>
<% end %>
<% end %>
<% end %>
...
<% end %> Or a collection to be used: <%= form_for @person do |person_form| %>
...
<%= person_form.fields_for :projects, @active_projects do |project_fields| %>
Name: <%= project_fields.text_field :name %>
<% end %>
...
<% end %> If you want to destroy any of the associated models through the form, you have to enable it first using the :allow_destroy option for accepts_nested_attributes_for: class Person < ActiveRecor8b7c:f320:99b9:690f:4595:cd17:293a:c069Base
has_many :projects
accepts_nested_attributes_for :projects, allow_destroy: true
end
This will allow you to specify which models to destroy in the attributes hash by adding a form element for the _destroy parameter with a value that evaluates to true (eg. 1, '1', true, or 'true'): <%= form_for @person do |person_form| %>
...
<%= person_form.fields_for :projects do |project_fields| %>
Delete: <%= project_fields.check_box :_destroy %>
<% end %>
...
<% end %> When a collection is used you might want to know the index of each object into the array. For this purpose, the index method is available in the FormBuilder object. <%= form_for @person do |person_form| %>
...
<%= person_form.fields_for :projects do |project_fields| %>
Project #<%= project_fields.index %>
...
<% end %>
...
<% end %> Note that #fields_for will automatically generate a hidden field to store the ID of the record. There are circumstances where this hidden field is not needed and you can pass include_id: false to prevent #fields_for from rendering it automatically. file_field(method, options = {}) Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 2183
def file_field(method, options = {})
self.multipart = true
@template.file_field(@object_name, method, objectify_options(options))
end Returns a file upload input tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown. Using this method inside a form_for block will set the enclosing form's encoding to multipart/form-data. Options
Creates standard HTML attributes for the tag.
:disabled - If set to true, the user will not be able to use this input.
:multiple - If set to true, *in most updated browsers* the user will be allowed to select multiple files.
:accept - If set to one or multiple mime-types, the user will be suggested a filter when choosing a file. You still need to set up model validations.
Examples # Let's say that @user has avatar:
file_field(:avatar)
# => <input type="file" id="user_avatar" name="user[avatar]" />
# Let's say that @post has image:
file_field(:image, :multiple => true)
# => <input type="file" id="post_image" name="post[image][]" multiple="multiple" />
# Let's say that @post has attached:
file_field(:attached, accept: 'text/html')
# => <input accept="text/html" type="file" id="post_attached" name="post[attached]" />
# Let's say that @post has image:
file_field(:image, accept: 'image/png,image/gif,image/jpeg')
# => <input type="file" id="post_image" name="post[image]" accept="image/png,image/gif,image/jpeg" />
# Let's say that @attachment has file:
file_field(:file, class: 'file_input')
# => <input type="file" id="attachment_file" name="attachment[file]" class="file_input" />
grouped_collection_select(method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {}) Show source
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 840
def grouped_collection_select(method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {})
@template.grouped_collection_select(@object_name, method, collection, group_method, group_label_method, option_key_method, option_value_method, objectify_options(options), @default_options.merge(html_options))
end Wraps ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069Helpers8b7c:f320:99b9:690f:4595:cd17:293a:c069ormOptionsHelper#grouped_collection_select for form builders: <%= form_for @city do |f| %>
<%= f.grouped_collection_select :country_id, @continents, :countries, :name, :id, :name %>
<%= f.submit %>
<% end %> Please refer to the documentation of the base helper for details. hidden_field(method, options = {}) Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 2145
def hidden_field(method, options = {})
@emitted_hidden_id = true if method == :id
@template.hidden_field(@object_name, method, objectify_options(options))
end Returns a hidden input tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown. Examples # Let's say that @signup.pass_confirm returns true:
hidden_field(:pass_confirm)
# => <input type="hidden" id="signup_pass_confirm" name="signup[pass_confirm]" value="true" />
# Let's say that @post.tag_list returns "blog, ruby":
hidden_field(:tag_list)
# => <input type="hidden" id="post_tag_list" name="post[tag_list]" value="blog, ruby" />
# Let's say that @user.token returns "abcde":
hidden_field(:token)
# => <input type="hidden" id="user_token" name="user[token]" value="abcde" />
label(method, text = nil, options = {}, &block) Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 2040
def label(method, text = nil, options = {}, &block)
@template.label(@object_name, method, text, objectify_options(options), &block)
end Returns a label tag tailored for labelling an input field for a specified attribute (identified by method) on an object assigned to the template (identified by object). The text of label will default to the attribute name unless a translation is found in the current I18n locale (through helpers.label.<modelname>.<attribute>) or you specify it explicitly. Additional options on the label tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown, except for the :value option, which is designed to target labels for #radio_button tags (where the value is used in the ID of the input tag). Examples label(:title)
# => <label for="post_title">Title</label>
You can localize your labels based on model and attribute names. For example you can define the following in your locale (e.g. en.yml) helpers:
label:
post:
body: "Write your entire text here" Which then will result in label(:body)
# => <label for="post_body">Write your entire text here</label>
Localization can also be based purely on the translation of the attribute-name (if you are using ActiveRecord): activerecord:
attributes:
post:
cost: "Total cost"
label(:cost)
# => <label for="post_cost">Total cost</label>
label(:title, "A short title")
# => <label for="post_title">A short title</label>
label(:title, "A short title", class: "title_label")
# => <label for="post_title" class="title_label">A short title</label>
label(:privacy, "Public Post", value: "public")
# => <label for="post_privacy_public">Public Post</label>
label(:terms) do
raw('Accept <a href="/terms">Terms</a>.')
end
# => <label for="post_terms">Accept <a href="/terms">Terms</a>.</label> multipart=(multipart) Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 1653
def multipart=(multipart)
@multipart = multipart
if parent_builder = @options[:parent_builder]
parent_builder.multipart = multipart
end
end radio_button(method, tag_value, options = {}) Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 2123
def radio_button(method, tag_value, options = {})
@template.radio_button(@object_name, method, tag_value, objectify_options(options))
end Returns a radio button tag for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). If the current value of method is tag_value the radio button will be checked. To force the radio button to be checked pass checked: true in the options hash. You may pass HTML options there as well. # Let's say that @post.category returns "rails":
radio_button("category", "rails")
radio_button("category", "java")
# => <input type="radio" id="post_category_rails" name="post[category]" value="rails" checked="checked" />
# <input type="radio" id="post_category_java" name="post[category]" value="java" />
# Let's say that @user.receive_newsletter returns "no":
radio_button("receive_newsletter", "yes")
radio_button("receive_newsletter", "no")
# => <input type="radio" id="user_receive_newsletter_yes" name="user[receive_newsletter]" value="yes" />
# <input type="radio" id="user_receive_newsletter_no" name="user[receive_newsletter]" value="no" checked="checked" />
select(method, choices = nil, options = {}, html_options = {}, &block) Show source
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 816
def select(method, choices = nil, options = {}, html_options = {}, &block)
@template.select(@object_name, method, choices, objectify_options(options), @default_options.merge(html_options), &block)
end Wraps ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069Helpers8b7c:f320:99b9:690f:4595:cd17:293a:c069ormOptionsHelper#select for form builders: <%= form_for @post do |f| %>
<%= f.select :person_id, Person.all.collect { |p| [ p.name, p.id ] }, include_blank: true %>
<%= f.submit %>
<% end %> Please refer to the documentation of the base helper for details. submit(value = nil, options = {}) Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 2215
def submit(value = nil, options = {})
value, options = nil, value if value.is_a?(Hash)
value ||= submit_default_value
@template.submit_tag(value, options)
end Add the submit button for the given form. When no value is given, it checks if the object is a new resource or not to create the proper label: <%= form_for @post do |f| %>
<%= f.submit %>
<% end %> In the example above, if @post is a new record, it will use “Create Post” as submit button label, otherwise, it uses “Update Post”. Those labels can be customized using I18n, under the helpers.submit key and accept the %{model} as translation interpolation: en:
helpers:
submit:
create: "Create a %{model}"
update: "Confirm changes to %{model}" It also searches for a key specific for the given object: en:
helpers:
submit:
post:
create: "Add %{model}" time_zone_select(method, priority_zones = nil, options = {}, html_options = {}) Show source
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 852
def time_zone_select(method, priority_zones = nil, options = {}, html_options = {})
@template.time_zone_select(@object_name, method, priority_zones, objectify_options(options), @default_options.merge(html_options))
end Wraps ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069Helpers8b7c:f320:99b9:690f:4595:cd17:293a:c069ormOptionsHelper#time_zone_select for form builders: <%= form_for @user do |f| %>
<%= f.time_zone_select :time_zone, nil, include_blank: true %>
<%= f.submit %>
<% end %> Please refer to the documentation of the base helper for details. to_model() Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 1669
def to_model
self
end to_partial_path() Show source
# File actionview/lib/action_view/helpers/form_helper.rb, line 1665
def to_partial_path
self.class._to_partial_path
end
|
st8b7c:f320:99b9:690f:4595:cd17:293a:c069pmr8b7c:f320:99b9:690f:4595:cd17:293a:c069null_memory_resource Defined in header <memory_resource> st8b7c:f320:99b9:690f:4595:cd17:293a:c069pmr8b7c:f320:99b9:690f:4595:cd17:293a:c069memory_resource* null_memory_resource() noexcept;
(since C++17) Returns a pointer to a memory_resource that doesn't perform any allocation.
Return value Returns a pointer p to a static storage duration object of a type derived from st8b7c:f320:99b9:690f:4595:cd17:293a:c069pmr8b7c:f320:99b9:690f:4595:cd17:293a:c069memory_resource, with the following properties:
its allocate() function always throws st8b7c:f320:99b9:690f:4595:cd17:293a:c069bad_alloc;
its deallocate() function has no effect;
for any memory_resource r, p->is_equal(r) returns &r == p.
The same value is returned every time this function is called.
Example
The program demos the main usage of null_memory_resouce: ensure that a memory pool which requires memory allocated on the stack will NOT allocate memory on the heap if it needs more memory.
#include <array>
#include <cstddef>
#include <iostream>
#include <memory_resource>
#include <string>
#include <unordered_map>
int main()
{
// allocate memory on the stack
st8b7c:f320:99b9:690f:4595:cd17:293a:c069array<st8b7c:f320:99b9:690f:4595:cd17:293a:c069byte, 20000> buf;
// without fallback memory allocation on heap
st8b7c:f320:99b9:690f:4595:cd17:293a:c069pmr8b7c:f320:99b9:690f:4595:cd17:293a:c069monotonic_buffer_resource pool{ buf.data(), buf.size(),
st8b7c:f320:99b9:690f:4595:cd17:293a:c069pmr8b7c:f320:99b9:690f:4595:cd17:293a:c069null_memory_resource() };
// allocate too much memory
st8b7c:f320:99b9:690f:4595:cd17:293a:c069pmr8b7c:f320:99b9:690f:4595:cd17:293a:c069unordered_map<long, st8b7c:f320:99b9:690f:4595:cd17:293a:c069pmr8b7c:f320:99b9:690f:4595:cd17:293a:c069string> coll{ &pool };
try
{
for (st8b7c:f320:99b9:690f:4595:cd17:293a:c069size_t i = 0; i < buf.size(); ++i)
{
coll.emplace(i, "just a string with number " + st8b7c:f320:99b9:690f:4595:cd17:293a:c069to_string(i));
if (i && i % 50 == 0)
st8b7c:f320:99b9:690f:4595:cd17:293a:c069clog << "size: " << i << "...\n";
}
}
catch(const st8b7c:f320:99b9:690f:4595:cd17:293a:c069bad_alloc& e)
{
st8b7c:f320:99b9:690f:4595:cd17:293a:c069cerr << e.what() << '\n';
}
st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << "size: " << coll.size() << '\n';
} Possible output:
size: 50...
size: 100...
size: 150...
st8b7c:f320:99b9:690f:4595:cd17:293a:c069bad_alloc
size: 183
|
dart:core operator / method double operator /(
BigInt other ) Double division operator. Matching the similar operator on int, this operation first performs toDouble on both this big integer and other, then does double.operator/ on those values and returns the result. Note: The initial toDouble conversion may lose precision. Example: print(BigInt.from(1) / BigInt.from(2)); // 0.5
print(BigInt.from(1.99999) / BigInt.from(2)); // 0.5 Implementation double operator /(BigInt other);
|
Timestamp
package java.security implements Serializable
Available on java
Constructor
new(param1:Date, param2:CertPath)
Methods
equals(param1:Dynamic):Bool
getSignerCertPath():CertPath
getTimestamp():Date
hashCode():Int
toString():String
|
dart:html
Z constant int Z = 90
|
fortinet.fortios.fortios_antivirus_profile – Configure AntiVirus profiles in Fortinet’s FortiOS and FortiGate. Note This plugin is part of the fortinet.fortios collection (version 2.1.2). You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list. To install it, use: ansible-galaxy collection install fortinet.fortios. To use it in a playbook, specify: fortinet.fortios.fortios_antivirus_profile. New in version 2.10: of fortinet.fortios Synopsis Requirements Parameters Notes Examples Return Values Synopsis This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify antivirus feature and profile category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0 Requirements The below requirements are needed on the host that executes this module. ansible>=2.9.0 Parameters Parameter Choices/Defaults Comments access_token string Token-based authentication. Generated from GUI of Fortigate. antivirus_profile dictionary Configure AntiVirus profiles. analytics_accept_filetype integer Only submit files matching this DLP file-pattern to FortiSandbox. Source dlp.filepattern.id. analytics_bl_filetype integer Only submit files matching this DLP file-pattern to FortiSandbox. Source dlp.filepattern.id. analytics_db string
Choices: disable enable Enable/disable using the FortiSandbox signature database to supplement the AV signature databases. analytics_ignore_filetype integer Do not submit files matching this DLP file-pattern to FortiSandbox. Source dlp.filepattern.id. analytics_max_upload integer Maximum size of files that can be uploaded to FortiSandbox (1 - 395 MBytes). analytics_wl_filetype integer Do not submit files matching this DLP file-pattern to FortiSandbox. Source dlp.filepattern.id. av_block_log string
Choices: enable disable Enable/disable logging for AntiVirus file blocking. av_virus_log string
Choices: enable disable Enable/disable AntiVirus logging. cifs dictionary Configure CIFS AntiVirus options. archive_block list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to block. archive_log list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to log. av_scan string
Choices: disable block monitor Enable AntiVirus scan service. emulator string
Choices: enable disable Enable/disable the virus emulator. external_blocklist string
Choices: disable block monitor Enable external-blocklist. options list / elements=string
Choices: scan avmonitor quarantine Enable/disable CIFS AntiVirus scanning, monitoring, and quarantine. outbreak_prevention string
Choices: disabled files full-archive disable block monitor Enable Virus Outbreak Prevention service. quarantine string
Choices: disable enable Enable/disable quarantine for infected files. comment string Comment. content_disarm dictionary AV Content Disarm and Reconstruction settings. cover_page string
Choices: disable enable Enable/disable inserting a cover page into the disarmed document. detect_only string
Choices: disable enable Enable/disable only detect disarmable files, do not alter content. error_action string
Choices: block log-only ignore Action to be taken if CDR engine encounters an unrecoverable error. office_action string
Choices: disable enable Enable/disable stripping of PowerPoint action events in Microsoft Office documents. office_dde string
Choices: disable enable Enable/disable stripping of Dynamic Data Exchange events in Microsoft Office documents. office_embed string
Choices: disable enable Enable/disable stripping of embedded objects in Microsoft Office documents. office_hylink string
Choices: disable enable Enable/disable stripping of hyperlinks in Microsoft Office documents. office_linked string
Choices: disable enable Enable/disable stripping of linked objects in Microsoft Office documents. office_macro string
Choices: disable enable Enable/disable stripping of macros in Microsoft Office documents. original_file_destination string
Choices: fortisandbox quarantine discard Destination to send original file if active content is removed. pdf_act_form string
Choices: disable enable Enable/disable stripping of actions that submit data to other targets in PDF documents. pdf_act_gotor string
Choices: disable enable Enable/disable stripping of links to other PDFs in PDF documents. pdf_act_java string
Choices: disable enable Enable/disable stripping of actions that execute JavaScript code in PDF documents. pdf_act_launch string
Choices: disable enable Enable/disable stripping of links to external applications in PDF documents. pdf_act_movie string
Choices: disable enable Enable/disable stripping of embedded movies in PDF documents. pdf_act_sound string
Choices: disable enable Enable/disable stripping of embedded sound files in PDF documents. pdf_embedfile string
Choices: disable enable Enable/disable stripping of embedded files in PDF documents. pdf_hyperlink string
Choices: disable enable Enable/disable stripping of hyperlinks from PDF documents. pdf_javacode string
Choices: disable enable Enable/disable stripping of JavaScript code in PDF documents. ems_threat_feed string
Choices: disable enable Enable/disable use of EMS threat feed when performing AntiVirus scan. extended_log string
Choices: enable disable Enable/disable extended logging for antivirus. external_blocklist list / elements=string One or more external malware block lists. name string / required External blocklist. Source system.external-resource.name. external_blocklist_archive_scan string
Choices: disable enable Enable/disable external-blocklist archive scanning. external_blocklist_enable_all string
Choices: disable enable Enable/disable all external blocklists. feature_set string
Choices: flow proxy Flow/proxy feature set. ftgd_analytics string
Choices: disable suspicious everything Settings to control which files are uploaded to FortiSandbox. ftp dictionary Configure FTP AntiVirus options. archive_block list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to block. archive_log list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to log. av_scan string
Choices: disable block monitor Enable AntiVirus scan service. emulator string
Choices: enable disable Enable/disable the virus emulator. external_blocklist string
Choices: disable block monitor Enable external-blocklist. options list / elements=string
Choices: scan avmonitor quarantine Enable/disable FTP AntiVirus scanning, monitoring, and quarantine. outbreak_prevention string
Choices: disabled files full-archive disable block monitor Enable FortiGuard Virus Outbreak Prevention service. quarantine string
Choices: disable enable Enable/disable quarantine for infected files. http dictionary Configure HTTP AntiVirus options. archive_block list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to block. archive_log list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to log. av_scan string
Choices: disable block monitor Enable AntiVirus scan service. content_disarm string
Choices: disable enable Enable Content Disarm and Reconstruction for this protocol. emulator string
Choices: enable disable Enable/disable the virus emulator. external_blocklist string
Choices: disable block monitor Enable external-blocklist. options list / elements=string
Choices: scan avmonitor quarantine Enable/disable HTTP AntiVirus scanning, monitoring, and quarantine. outbreak_prevention string
Choices: disabled files full-archive disable block monitor Enable FortiGuard Virus Outbreak Prevention service. quarantine string
Choices: disable enable Enable/disable quarantine for infected files. imap dictionary Configure IMAP AntiVirus options. archive_block list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to block. archive_log list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to log. av_scan string
Choices: disable block monitor Enable AntiVirus scan service. content_disarm string
Choices: disable enable Enable Content Disarm and Reconstruction for this protocol. emulator string
Choices: enable disable Enable/disable the virus emulator. executables string
Choices: default virus Treat Windows executable files as viruses for the purpose of blocking or monitoring. external_blocklist string
Choices: disable block monitor Enable external-blocklist. options list / elements=string
Choices: scan avmonitor quarantine Enable/disable IMAP AntiVirus scanning, monitoring, and quarantine. outbreak_prevention string
Choices: disabled files full-archive disable block monitor Enable FortiGuard Virus Outbreak Prevention service. quarantine string
Choices: disable enable Enable/disable quarantine for infected files. inspection_mode string
Choices: proxy flow-based Inspection mode. mapi dictionary Configure MAPI AntiVirus options. archive_block list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to block. archive_log list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to log. av_scan string
Choices: disable block monitor Enable AntiVirus scan service. emulator string
Choices: enable disable Enable/disable the virus emulator. executables string
Choices: default virus Treat Windows executable files as viruses for the purpose of blocking or monitoring. external_blocklist string
Choices: disable block monitor Enable external-blocklist. options list / elements=string
Choices: scan avmonitor quarantine Enable/disable MAPI AntiVirus scanning, monitoring, and quarantine. outbreak_prevention string
Choices: disabled files full-archive disable block monitor Enable FortiGuard Virus Outbreak Prevention service. quarantine string
Choices: disable enable Enable/disable quarantine for infected files. mobile_malware_db string
Choices: disable enable Enable/disable using the mobile malware signature database. nac_quar dictionary Configure AntiVirus quarantine settings. expiry string Duration of quarantine. infected string
Choices: none quar-src-ip Enable/Disable quarantining infected hosts to the banned user list. log string
Choices: enable disable Enable/disable AntiVirus quarantine logging. name string / required Profile name. nntp dictionary Configure NNTP AntiVirus options. archive_block list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to block. archive_log list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to log. av_scan string
Choices: disable block monitor Enable AntiVirus scan service. emulator string
Choices: enable disable Enable/disable the virus emulator. external_blocklist string
Choices: disable block monitor Enable external-blocklist. options list / elements=string
Choices: scan avmonitor quarantine Enable/disable NNTP AntiVirus scanning, monitoring, and quarantine. outbreak_prevention string
Choices: disabled files full-archive disable block monitor Enable FortiGuard Virus Outbreak Prevention service. quarantine string
Choices: disable enable Enable/disable quarantine for infected files. outbreak_prevention dictionary Configure Virus Outbreak Prevention settings. external_blocklist string
Choices: disable enable Enable/disable external malware blocklist. ftgd_service string
Choices: disable enable Enable/disable FortiGuard Virus outbreak prevention service. outbreak_prevention_archive_scan string
Choices: disable enable Enable/disable outbreak-prevention archive scanning. pop3 dictionary Configure POP3 AntiVirus options. archive_block list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to block. archive_log list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to log. av_scan string
Choices: disable block monitor Enable AntiVirus scan service. content_disarm string
Choices: disable enable Enable Content Disarm and Reconstruction for this protocol. emulator string
Choices: enable disable Enable/disable the virus emulator. executables string
Choices: default virus Treat Windows executable files as viruses for the purpose of blocking or monitoring. external_blocklist string
Choices: disable block monitor Enable external-blocklist. options list / elements=string
Choices: scan avmonitor quarantine Enable/disable POP3 AntiVirus scanning, monitoring, and quarantine. outbreak_prevention string
Choices: disabled files full-archive disable block monitor Enable FortiGuard Virus Outbreak Prevention service. quarantine string
Choices: disable enable Enable/disable quarantine for infected files. replacemsg_group string Replacement message group customized for this profile. Source system.replacemsg-group.name. scan_mode string
Choices: quick full default legacy Choose between full scan mode and quick scan mode. smb dictionary Configure SMB AntiVirus options. archive_block string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to block. archive_log string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to log. emulator string
Choices: enable disable Enable/disable the virus emulator. options string
Choices: scan avmonitor quarantine Enable/disable SMB AntiVirus scanning, monitoring, and quarantine. outbreak_prevention string
Choices: disabled files full-archive Enable FortiGuard Virus Outbreak Prevention service. smtp dictionary Configure SMTP AntiVirus options. archive_block list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to block. archive_log list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to log. av_scan string
Choices: disable block monitor Enable AntiVirus scan service. content_disarm string
Choices: disable enable Enable Content Disarm and Reconstruction for this protocol. emulator string
Choices: enable disable Enable/disable the virus emulator. executables string
Choices: default virus Treat Windows executable files as viruses for the purpose of blocking or monitoring. external_blocklist string
Choices: disable block monitor Enable external-blocklist. options list / elements=string
Choices: scan avmonitor quarantine Enable/disable SMTP AntiVirus scanning, monitoring, and quarantine. outbreak_prevention string
Choices: disabled files full-archive disable block monitor Enable FortiGuard Virus Outbreak Prevention service. quarantine string
Choices: disable enable Enable/disable quarantine for infected files. ssh dictionary Configure SFTP and SCP AntiVirus options. archive_block list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to block. archive_log list / elements=string
Choices: encrypted corrupted partiallycorrupted multipart nested mailbomb fileslimit timeout unhandled Select the archive types to log. av_scan string
Choices: disable block monitor Enable AntiVirus scan service. emulator string
Choices: enable disable Enable/disable the virus emulator. external_blocklist string
Choices: disable block monitor Enable external-blocklist. options list / elements=string
Choices: scan avmonitor quarantine Enable/disable SFTP and SCP AntiVirus scanning, monitoring, and quarantine. outbreak_prevention string
Choices: disabled files full-archive disable block monitor Enable Virus Outbreak Prevention service. quarantine string
Choices: disable enable Enable/disable quarantine for infected files. enable_log boolean
Choices:
no ← yes Enable/Disable logging for task. state string / required
Choices: present absent Indicates whether to create or remove the object. vdom string Default:"root" Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. Notes Note Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks Examples - hosts: fortigates
collections:
- fortinet.fortios
connection: httpapi
vars:
vdom: "root"
ansible_httpapi_use_ssl: yes
ansible_httpapi_validate_certs: no
ansible_httpapi_port: 443
tasks:
- name: Configure AntiVirus profiles.
fortios_antivirus_profile:
vdom: "{{ vdom }}"
state: "present"
access_token: "<your_own_value>"
antivirus_profile:
analytics_accept_filetype: "3 (source dlp.filepattern.id)"
analytics_bl_filetype: "4 (source dlp.filepattern.id)"
analytics_db: "disable"
analytics_ignore_filetype: "6 (source dlp.filepattern.id)"
analytics_max_upload: "7"
analytics_wl_filetype: "8 (source dlp.filepattern.id)"
av_block_log: "enable"
av_virus_log: "enable"
cifs:
archive_block: "encrypted"
archive_log: "encrypted"
av_scan: "disable"
emulator: "enable"
external_blocklist: "disable"
options: "scan"
outbreak_prevention: "disabled"
quarantine: "disable"
comment: "Comment."
content_disarm:
cover_page: "disable"
detect_only: "disable"
error_action: "block"
office_action: "disable"
office_dde: "disable"
office_embed: "disable"
office_hylink: "disable"
office_linked: "disable"
office_macro: "disable"
original_file_destination: "fortisandbox"
pdf_act_form: "disable"
pdf_act_gotor: "disable"
pdf_act_java: "disable"
pdf_act_launch: "disable"
pdf_act_movie: "disable"
pdf_act_sound: "disable"
pdf_embedfile: "disable"
pdf_hyperlink: "disable"
pdf_javacode: "disable"
ems_threat_feed: "disable"
extended_log: "enable"
external_blocklist:
-
name: "default_name_44 (source system.external-resource.name)"
external_blocklist_archive_scan: "disable"
external_blocklist_enable_all: "disable"
feature_set: "flow"
ftgd_analytics: "disable"
ftp:
archive_block: "encrypted"
archive_log: "encrypted"
av_scan: "disable"
emulator: "enable"
external_blocklist: "disable"
options: "scan"
outbreak_prevention: "disabled"
quarantine: "disable"
http:
archive_block: "encrypted"
archive_log: "encrypted"
av_scan: "disable"
content_disarm: "disable"
emulator: "enable"
external_blocklist: "disable"
options: "scan"
outbreak_prevention: "disabled"
quarantine: "disable"
imap:
archive_block: "encrypted"
archive_log: "encrypted"
av_scan: "disable"
content_disarm: "disable"
emulator: "enable"
executables: "default"
external_blocklist: "disable"
options: "scan"
outbreak_prevention: "disabled"
quarantine: "disable"
inspection_mode: "proxy"
mapi:
archive_block: "encrypted"
archive_log: "encrypted"
av_scan: "disable"
emulator: "enable"
executables: "default"
external_blocklist: "disable"
options: "scan"
outbreak_prevention: "disabled"
quarantine: "disable"
mobile_malware_db: "disable"
nac_quar:
expiry: "<your_own_value>"
infected: "none"
log: "enable"
name: "default_name_95"
nntp:
archive_block: "encrypted"
archive_log: "encrypted"
av_scan: "disable"
emulator: "enable"
external_blocklist: "disable"
options: "scan"
outbreak_prevention: "disabled"
quarantine: "disable"
outbreak_prevention:
external_blocklist: "disable"
ftgd_service: "disable"
outbreak_prevention_archive_scan: "disable"
pop3:
archive_block: "encrypted"
archive_log: "encrypted"
av_scan: "disable"
content_disarm: "disable"
emulator: "enable"
executables: "default"
external_blocklist: "disable"
options: "scan"
outbreak_prevention: "disabled"
quarantine: "disable"
replacemsg_group: "<your_own_value> (source system.replacemsg-group.name)"
scan_mode: "quick"
smb:
archive_block: "encrypted"
archive_log: "encrypted"
emulator: "enable"
options: "scan"
outbreak_prevention: "disabled"
smtp:
archive_block: "encrypted"
archive_log: "encrypted"
av_scan: "disable"
content_disarm: "disable"
emulator: "enable"
executables: "default"
external_blocklist: "disable"
options: "scan"
outbreak_prevention: "disabled"
quarantine: "disable"
ssh:
archive_block: "encrypted"
archive_log: "encrypted"
av_scan: "disable"
emulator: "enable"
external_blocklist: "disable"
options: "scan"
outbreak_prevention: "disabled"
quarantine: "disable"
Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description build string always Build number of the fortigate image Sample: 1547 http_method string always Last method used to provision the content into FortiGate Sample: PUT http_status string always Last result given by FortiGate on last operation applied Sample: 200 mkey string success Master key (id) used in the last call to FortiGate Sample: id name string always Name of the table used to fulfill the request Sample: urlfilter path string always Path of the table used to fulfill the request Sample: webfilter revision string always Internal revision number Sample: 30.766-70-40998 serial string always Serial number of the unit Sample: FGVMEVYYQT3AB5352 status string always Indication of the operation's result Sample: success vdom string always Virtual domain used Sample: root version string always Version of the FortiGate Sample: v5.6.3 Authors Link Zheng (@chillancezen) Jie Xue (@JieX19) Hongbin Lu (@fgtdev-hblu) Frank Shen (@frankshen01) Miguel Angel Munoz (@mamunozgonzalez) Nicolas Thomas (@thomnico)
© 2012–2018 Michael DeHaan |
XRHitTestResult
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers. The XRHitTestResult interface of the WebXR Device API contains a single result of a hit test. You can get an array of XRHitTestResult objects for a frame by calling XRFrame.getHitTestResults().
Properties
None.
Methods
XRHitTestResult.createAnchor() Returns a Promise that resolves with an XRAnchor created from the hit test result. XRHitTestResult.getPose() Returns the XRPose of the hit test result relative to the given base space.
Examples
Getting XRHitTestResult objects within the frame loop
In addition to showing XRHitTestResult within a frame loop, this example demonstrates a few things you must do before requesting this object. While setting up the session, specify "hit-test" as one of the requiredFeatures. Next, call XRSession.requestHitTestSource() with the desired references. (Obtain this by calling XRSession.requestReferenceSpace().) This returns a XRHitTestSource. That you will use in the frame loop to get XRHitTestResult objects. const xrSession = navigator.xr.requestSession("immersive-ar", {
requiredFeatures: ["local", "hit-test"]
});
let hitTestSource = null;
xrSession.requestHitTestSource({
space : viewerSpace, // obtained from xrSession.requestReferenceSpace("viewer");
offsetRay : new XRRay({y: 0.5})
}).then((viewerHitTestSource) => {
hitTestSource = viewerHitTestSource;
});
// frame loop
function onXRFrame(time, xrFrame) {
let hitTestResults = xrFrame.getHitTestResults(hitTestSource);
// do things with the hit test results
}
Getting the hit test result's pose
Use getPose() to query the result's pose. let hitTestResults = xrFrame.getHitTestResults(hitTestSource);
if (hitTestResults.length > 0) {
let pose = hitTestResults[0].getPose(referenceSpace);
}
Creating an anchor from a hit test result
Once you find intersections on real-world surfaces using hit testing, you can create an XRAnchor to attach a virtual object to that location. hitTestResult.createAnchor().then((anchor) => {
// add anchored objects to the scene
}, (error) => {
console.error("Could not create anchor: " + error);
});
Specifications
Specification
WebXR Hit Test Module # xr-hit-test-result-interface
Browser compatibility
Desktop
Mobile
Chrome
Edge
Firefox
Internet Explorer
Opera
Safari
WebView Android
Chrome Android
Firefox for Android
Opera Android
Safari on IOS
Samsung Internet
XRHitTestResult
81
81
No
No
No
No
No
81
No
No
No
13.0
createAnchor
85
85
No
No
No
No
No
85
No
No
No
14.0
getPose
81
81
No
No
No
No
No
81
No
No
No
13.0
See also
XRTransientInputHitTestResult XRPose XRAnchor
Found a problem with this page?
Edit on GitHub
Source on GitHub
Report a problem with this content on GitHub
Want to fix the problem yourself? See our Contribution guide.
Last modified: Feb 18, 2022, by MDN contributors
|
Class RMIClassLoader
java.lang.Object java.rmi.server.RMIClassLoader public class RMIClassLoader extends Object
RMIClassLoader comprises static methods to support dynamic class loading with RMI. Included are methods for loading classes from a network location (one or more URLs) and obtaining the location from which an existing class should be loaded by remote parties. These methods are used by the RMI runtime when marshalling and unmarshalling classes contained in the arguments and return values of remote method calls, and they also may be invoked directly by applications in order to mimic RMI's dynamic class loading behavior. The implementation of the following static methods
loadClass(URL,String)
loadClass(String,String)
loadClass(String,String,ClassLoader)
loadProxyClass(String,String[],ClassLoader)
getClassLoader(String)
getClassAnnotation(Class)
is provided by an instance of RMIClassLoaderSpi, the service provider interface for those methods. When one of the methods is invoked, its behavior is to delegate to a corresponding method on the service provider instance. The details of how each method delegates to the provider instance is described in the documentation for each particular method. The service provider instance is chosen as follows:
If the system property java.rmi.server.RMIClassLoaderSpi is defined, then if its value equals the string "default", the provider instance will be the value returned by an invocation of the getDefaultProviderInstance() method, and for any other value, if a class named with the value of the property can be loaded by the system class loader (see ClassLoader.getSystemClassLoader()) and that class is assignable to RMIClassLoaderSpi and has a public no-argument constructor, then that constructor will be invoked to create the provider instance. If the property is defined but any other of those conditions are not true, then an unspecified Error will be thrown to code that attempts to use RMIClassLoader, indicating the failure to obtain a provider instance.
If a resource named META-INF/services/java.rmi.server.RMIClassLoaderSpi is visible to the system class loader, then the contents of that resource are interpreted as a provider-configuration file, and the first class name specified in that file is used as the provider class name. If a class with that name can be loaded by the system class loader and that class is assignable to RMIClassLoaderSpi and has a public no-argument constructor, then that constructor will be invoked to create the provider instance. If the resource is found but a provider cannot be instantiated as described, then an unspecified Error will be thrown to code that attempts to use RMIClassLoader, indicating the failure to obtain a provider instance.
Otherwise, the provider instance will be the value returned by an invocation of the getDefaultProviderInstance() method.
Since: 1.1 See Also: RMIClassLoaderSpi Method Summary
Modifier and Type
Method
Description
static String
getClassAnnotation(Class<?> cl)
Returns the annotation string (representing a location for the class definition) that RMI will use to annotate the class descriptor when marshalling objects of the given class.
static ClassLoader
getClassLoader(String codebase)
Returns a class loader that loads classes from the given codebase URL path.
static RMIClassLoaderSpi
getDefaultProviderInstance()
Returns the canonical instance of the default provider for the service provider interface RMIClassLoaderSpi.
static Object
getSecurityContext(ClassLoader loader)
Deprecated. no replacement.
static Class<?>
loadClass(String name)
Deprecated. replaced by loadClass(String,String) method
static Class<?>
loadClass(String codebase,
String name)
Loads a class from a codebase URL path.
static Class<?>
loadClass(String codebase,
String name,
ClassLoader defaultLoader)
Loads a class from a codebase URL path, optionally using the supplied loader.
static Class<?>
loadClass(URL codebase,
String name)
Loads a class from a codebase URL.
static Class<?>
loadProxyClass(String codebase,
String[] interfaces,
ClassLoader defaultLoader)
Loads a dynamic proxy class (see Proxy) that implements a set of interfaces with the given names from a codebase URL path.
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Method Details loadClass @Deprecated public static Class<?> loadClass(String name) throws MalformedURLException, ClassNotFoundException
Deprecated. replaced by loadClass(String,String) method Loads the class with the specified name. This method delegates to loadClass(String,String), passing null as the first argument and name as the second argument.
Parameters:
name - the name of the class to load Returns: the Class object representing the loaded class Throws:
MalformedURLException - if a provider-specific URL used to load classes is invalid
ClassNotFoundException - if a definition for the class could not be found at the codebase location See Also: loadClass(String,String) loadClass public static Class<?> loadClass(URL codebase, String name) throws MalformedURLException, ClassNotFoundException Loads a class from a codebase URL. If codebase is null, then this method will behave the same as loadClass(String,String) with a null codebase and the given class name. This method delegates to the RMIClassLoaderSpi.loadClass(String,String,ClassLoader) method of the provider instance, passing the result of invoking URL.toString() on the given URL (or null if codebase is null) as the first argument, name as the second argument, and null as the third argument.
Parameters:
codebase - the URL to load the class from, or null
name - the name of the class to load Returns: the Class object representing the loaded class Throws:
MalformedURLException - if codebase is null and a provider-specific URL used to load classes is invalid
ClassNotFoundException - if a definition for the class could not be found at the specified URL loadClass public static Class<?> loadClass(String codebase, String name) throws MalformedURLException, ClassNotFoundException Loads a class from a codebase URL path. This method delegates to the RMIClassLoaderSpi.loadClass(String,String,ClassLoader) method of the provider instance, passing codebase as the first argument, name as the second argument, and null as the third argument.
Parameters:
codebase - the list of URLs (separated by spaces) to load the class from, or null
name - the name of the class to load Returns: the Class object representing the loaded class Throws:
MalformedURLException - if codebase is non-null and contains an invalid URL, or if codebase is null and a provider-specific URL used to load classes is invalid
ClassNotFoundException - if a definition for the class could not be found at the specified location Since: 1.2 loadClass public static Class<?> loadClass(String codebase, String name, ClassLoader defaultLoader) throws MalformedURLException, ClassNotFoundException Loads a class from a codebase URL path, optionally using the supplied loader. This method should be used when the caller would like to make available to the provider implementation an additional contextual class loader to consider, such as the loader of a caller on the stack. Typically, a provider implementation will attempt to resolve the named class using the given defaultLoader, if specified, before attempting to resolve the class from the codebase URL path. This method delegates to the RMIClassLoaderSpi.loadClass(String,String,ClassLoader) method of the provider instance, passing codebase as the first argument, name as the second argument, and defaultLoader as the third argument.
Parameters:
codebase - the list of URLs (separated by spaces) to load the class from, or null
name - the name of the class to load
defaultLoader - additional contextual class loader to use, or null
Returns: the Class object representing the loaded class Throws:
MalformedURLException - if codebase is non-null and contains an invalid URL, or if codebase is null and a provider-specific URL used to load classes is invalid
ClassNotFoundException - if a definition for the class could not be found at the specified location Since: 1.4 loadProxyClass public static Class<?> loadProxyClass(String codebase, String[] interfaces, ClassLoader defaultLoader) throws ClassNotFoundException, MalformedURLException Loads a dynamic proxy class (see Proxy) that implements a set of interfaces with the given names from a codebase URL path. The interfaces will be resolved similar to classes loaded via the loadClass(String,String) method using the given codebase.
This method delegates to the RMIClassLoaderSpi.loadProxyClass(String,String[],ClassLoader) method of the provider instance, passing codebase as the first argument, interfaces as the second argument, and defaultLoader as the third argument.
Parameters:
codebase - the list of URLs (space-separated) to load classes from, or null
interfaces - the names of the interfaces for the proxy class to implement
defaultLoader - additional contextual class loader to use, or null
Returns: a dynamic proxy class that implements the named interfaces Throws:
MalformedURLException - if codebase is non-null and contains an invalid URL, or if codebase is null and a provider-specific URL used to load classes is invalid
ClassNotFoundException - if a definition for one of the named interfaces could not be found at the specified location, or if creation of the dynamic proxy class failed (such as if Proxy.getProxyClass(ClassLoader,Class[]) would throw an IllegalArgumentException for the given interface list) Since: 1.4 getClassLoader public static ClassLoader getClassLoader(String codebase) throws MalformedURLException, SecurityException Returns a class loader that loads classes from the given codebase URL path. The class loader returned is the class loader that the loadClass(String,String) method would use to load classes for the same codebase argument.
This method delegates to the RMIClassLoaderSpi.getClassLoader(String) method of the provider instance, passing codebase as the argument.
If there is a security manger, its checkPermission method will be invoked with a RuntimePermission("getClassLoader") permission; this could result in a SecurityException. The provider implementation of this method may also perform further security checks to verify that the calling context has permission to connect to all of the URLs in the codebase URL path.
Parameters:
codebase - the list of URLs (space-separated) from which the returned class loader will load classes from, or null
Returns: a class loader that loads classes from the given codebase URL path Throws:
MalformedURLException - if codebase is non-null and contains an invalid URL, or if codebase is null and a provider-specific URL used to identify the class loader is invalid
SecurityException - if there is a security manager and the invocation of its checkPermission method fails, or if the caller does not have permission to connect to all of the URLs in the codebase URL path Since: 1.3 getClassAnnotation public static String getClassAnnotation(Class<?> cl) Returns the annotation string (representing a location for the class definition) that RMI will use to annotate the class descriptor when marshalling objects of the given class. This method delegates to the RMIClassLoaderSpi.getClassAnnotation(Class) method of the provider instance, passing cl as the argument.
Parameters:
cl - the class to obtain the annotation for Returns: a string to be used to annotate the given class when it gets marshalled, or null
Throws:
NullPointerException - if cl is null
Since: 1.2 getDefaultProviderInstance public static RMIClassLoaderSpi getDefaultProviderInstance() Returns the canonical instance of the default provider for the service provider interface RMIClassLoaderSpi. If the system property java.rmi.server.RMIClassLoaderSpi is not defined, then the RMIClassLoader static methods
loadClass(URL,String)
loadClass(String,String)
loadClass(String,String,ClassLoader)
loadProxyClass(String,String[],ClassLoader)
getClassLoader(String)
getClassAnnotation(Class)
will use the canonical instance of the default provider as the service provider instance. If there is a security manager, its checkPermission method will be invoked with a RuntimePermission("setFactory") permission; this could result in a SecurityException.
The default service provider instance implements RMIClassLoaderSpi as follows:
The getClassAnnotation method returns a String representing the codebase URL path that a remote party should use to download the definition for the specified class. The format of the returned string is a path of URLs separated by spaces. The codebase string returned depends on the defining class loader of the specified class:
If the class loader is the system class loader (see ClassLoader.getSystemClassLoader()), a parent of the system class loader such as the loader used for installed extensions, or the bootstrap class loader (which may be represented by null), then the value of the java.rmi.server.codebase property (or possibly an earlier cached value) is returned, or null is returned if that property is not set.
Otherwise, if the class loader is an instance of URLClassLoader, then the returned string is a space-separated list of the external forms of the URLs returned by invoking the getURLs methods of the loader. If the URLClassLoader was created by this provider to service an invocation of its loadClass or loadProxyClass methods, then no permissions are required to get the associated codebase string. If it is an arbitrary other URLClassLoader instance, then if there is a security manager, its checkPermission method will be invoked once for each URL returned by the getURLs method, with the permission returned by invoking openConnection().getPermission() on each URL; if any of those invocations throws a SecurityException or an IOException, then the value of the java.rmi.server.codebase property (or possibly an earlier cached value) is returned, or null is returned if that property is not set.
Finally, if the class loader is not an instance of URLClassLoader, then the value of the java.rmi.server.codebase property (or possibly an earlier cached value) is returned, or null is returned if that property is not set.
For the implementations of the methods described below, which all take a String parameter named codebase that is a space-separated list of URLs, each invocation has an associated codebase loader that is identified using the codebase argument in conjunction with the current thread's context class loader (see Thread.getContextClassLoader()). When there is a security manager, this provider maintains an internal table of class loader instances (which are at least instances of URLClassLoader) keyed by the pair of their parent class loader and their codebase URL path (an ordered list of URLs). If the codebase argument is null, the codebase URL path is the value of the system property java.rmi.server.codebase or possibly an earlier cached value. For a given codebase URL path passed as the codebase argument to an invocation of one of the below methods in a given context, the codebase loader is the loader in the table with the specified codebase URL path and the current thread's context class loader as its parent. If no such loader exists, then one is created and added to the table. The table does not maintain strong references to its contained loaders, in order to allow them and their defined classes to be garbage collected when not otherwise reachable. In order to prevent arbitrary untrusted code from being implicitly loaded into a virtual machine with no security manager, if there is no security manager set, the codebase loader is just the current thread's context class loader (the supplied codebase URL path is ignored, so remote class loading is disabled).
The getClassLoader method returns the codebase loader for the specified codebase URL path. If there is a security manager, then if the calling context does not have permission to connect to all of the URLs in the codebase URL path, a SecurityException will be thrown.
The loadClass method attempts to load the class with the specified name as follows:
If the defaultLoader argument is non-null, it first attempts to load the class with the specified name using the defaultLoader, such as by evaluating
Class.forName(name, false, defaultLoader)
If the class is successfully loaded from the defaultLoader, that class is returned. If an exception other than ClassNotFoundException is thrown, that exception is thrown to the caller. Next, the loadClass method attempts to load the class with the specified name using the codebase loader for the specified codebase URL path. If there is a security manager, then the calling context must have permission to connect to all of the URLs in the codebase URL path; otherwise, the current thread's context class loader will be used instead of the codebase loader.
The loadProxyClass method attempts to return a dynamic proxy class with the named interface as follows:
If the defaultLoader argument is non-null and all of the named interfaces can be resolved through that loader, then,
if all of the resolved interfaces are public, then it first attempts to obtain a dynamic proxy class (using Proxy.getProxyClass) for the resolved interfaces defined in the codebase loader; if that attempt throws an IllegalArgumentException, it then attempts to obtain a dynamic proxy class for the resolved interfaces defined in the defaultLoader. If both attempts throw IllegalArgumentException, then this method throws a ClassNotFoundException. If any other exception is thrown, that exception is thrown to the caller.
if all of the non-public resolved interfaces are defined in the same class loader, then it attempts to obtain a dynamic proxy class for the resolved interfaces defined in that loader.
otherwise, a LinkageError is thrown (because a class that implements all of the specified interfaces cannot be defined in any loader).
Otherwise, if all of the named interfaces can be resolved through the codebase loader, then,
if all of the resolved interfaces are public, then it attempts to obtain a dynamic proxy class for the resolved interfaces in the codebase loader. If the attempt throws an IllegalArgumentException, then this method throws a ClassNotFoundException.
if all of the non-public resolved interfaces are defined in the same class loader, then it attempts to obtain a dynamic proxy class for the resolved interfaces defined in that loader.
otherwise, a LinkageError is thrown (because a class that implements all of the specified interfaces cannot be defined in any loader).
Otherwise, a ClassNotFoundException is thrown for one of the named interfaces that could not be resolved.
Returns: the canonical instance of the default service provider Throws:
SecurityException - if there is a security manager and the invocation of its checkPermission method fails Since: 1.4 getSecurityContext @Deprecated public static Object getSecurityContext(ClassLoader loader)
Deprecated. no replacement. As of the Java 2 platform v1.2, RMI no longer uses this method to obtain a class loader's security context. Returns the security context of the given class loader. Parameters:
loader - a class loader from which to get the security context Returns: the security context See Also: SecurityManager.getSecurityContext()
|
Module snmpm Module Summary Interface functions to the SNMP toolkit manager Description
The module snmpm contains interface functions to the SNMP manager. Common Data Types The following data types are used in the functions below: oid() = [byte()] - The oid() type is used to represent an ASN.1 OBJECT IDENTIFIER
snmp_reply() = {error_status(), error_index(), varbinds()}
error_status() = noError | atom()
error_index() = integer()
varbinds() = [varbind()]
atl_type() = read | write | read_write
target_name() = string() - Is a unique *non-empty* string
vars_and_vals() = [var_and_val()]
var_and_val() = {oid(), value_type(), value()} | {oid(), value()}
value_type() = o ('OBJECT IDENTIFIER') |
i ('INTEGER') |
u ('Unsigned32') |
g ('Unsigned32') |
s ('OCTET SRING') |
b ('BITS') |
ip ('IpAddress') |
op ('Opaque') |
c32 ('Counter32') |
c64 ('Counter64') |
tt ('TimeTicks')
value() = term()
community() = string()
sec_model() = any | v1 | v2c | usm
sec_name() = string()
sec_level() = noAuthNoPriv | authNoPriv | authPriv See also the data types in snmpa_conf. Exports monitor() -> Ref Types Ref = reference() Monitor the SNMP manager. In case of a crash, the calling (monitoring) process will get a 'DOWN' message (see the erlang module for more info). demonitor(Ref) -> void() Types Ref = reference() Turn off monitoring of the SNMP manager. notify_started(Timeout) -> Pid Types Timeout = integer() Pid = pid() Request a notification (message) when the SNMP manager has started. The Timeout is the time the request is valid. The value has to be greater then zero. The Pid is the process handling the supervision of the SNMP manager start. When the manager has started a completion message will be sent to the client from this process: {snmpm_started, Pid}. If the SNMP manager was not started in time, a timeout message will be sent to the client: {snmpm_start_timeout, Pid}. A client application that is dependent on the SNMP manager will use this function in order to be notified of when the manager has started. There are two situations when this is useful: During the start of a system, when a client application could start prior to the SNMP manager but is dependent upon it, and therefore has to wait for it to start. When the SNMP manager has crashed, the dependent client application has to wait for the SNMP manager to be restarted before it can reconnect. The function returns the pid() of a handler process, that does the supervision on behalf of the client application. Note that the client application is linked to this handler. This function is used in conjunction with the monitor function. cancel_notify_started(Pid) -> void() Types Pid = pid() Cancel a previous request to be notified of SNMP manager start. register_user(Id, Module, Data) -> ok | {error, Reason} register_user(Id, Module, Data, DefaultAgentConfig) -> ok | {error, Reason} Types Id = term() Module = snmpm_user() Data = term() DefaultAgentConfig = [default_agent_config()] default_agent_config() = {Item, Val} Item = community | timeout | max_message_size | version | sec_model | sec_name | sec_level Val = term() Reason = term() snmpm_user() = Module implementing the snmpm_user behaviour Register the manager entity (=user) responsible for specific agent(s). Module is the callback module (snmpm_user behaviour) which will be called whenever something happens (detected agent, incoming reply or incoming trap/notification). Note that this could have already been done as a consequence of the node config. (see users.conf). The argument DefaultAgentConfig is used as default values when this user register agents. The type of Val depends on Item: community = string()
timeout = integer() | snmp_timer()
max_message_size = integer()
version = v1 | v2 | v3
sec_model = any | v1 | v2c | usm
sec_name = string()
sec_level = noAuthNoPriv | authNoPriv | authPriv register_user_monitor(Id, Module, Data) -> ok | {error, Reason} register_user_monitor(Id, Module, Data, DefaultAgentConfig) -> ok | {error, Reason} Types Id = term() Module = snmpm_user() DefaultAgentConfig = [default_agent_config()] default_agent_config() = {Item, Val} Item = community | timeout | max_message_size | version | sec_model | sec_name | sec_level Val = term() Data = term() Reason = term() snmpm_user() = Module implementing the snmpm_user behaviour Register the monitored manager entity (=user) responsible for specific agent(s). The process performing the registration will be monitored. Which means that if that process should die, all agents registered by that user process will be unregistered. All outstanding requests will be canceled. Module is the callback module (snmpm_user behaviour) which will be called whenever something happens (detected agent, incoming reply or incoming trap/notification). Note that this could have already been done as a consequence of the node config. (see users.conf). The argument DefaultAgentConfig is used as default values when this user register agents. The type of Val depends on Item: community = string()
timeout = integer() | snmp_timer()
max_message_size = integer()
version = v1 | v2 | v3
sec_model = any | v1 | v2c | usm
sec_name = string()
sec_level = noAuthNoPriv | authNoPriv | authPriv unregister_user(Id) -> ok | {error, Reason} Types Id = term() Unregister the user. which_users() -> Users Types Users = [UserId] UserId = term() Get a list of the identities of all registered users. register_agent(UserId, TargetName, Config) -> ok | {error, Reason} Types UserId = term() TargetName = target_name() Config = [agent_config()] agent_config() = {Item, Val} Item = engine_id | address | port | community | timeout | max_message_size | version | sec_model | sec_name | sec_level | tdomain Val = term() Reason = term() Explicitly instruct the manager to handle this agent, with UserId as the responsible user. Called to instruct the manager that this agent shall be handled. This function is used when the user knows in advance which agents the manager shall handle. Note that there is an alternate way to do the same thing: Add the agent to the manager config files (see agents.conf). TargetName is a non-empty string, uniquely identifying the agent. The type of Val depends on Item: [mandatory] engine_id = string()
[mandatory] tadress = transportAddress() % Depends on tdomain
[optional] port = inet:port_number()
[optional] tdomain = transportDomain()
[optional] community = string()
[optional] timeout = integer() | snmp_timer()
[optional] max_message_size = integer()
[optional] version = v1 | v2 | v3
[optional] sec_model = any | v1 | v2c | usm
[optional] sec_name = string()
[optional] sec_level = noAuthNoPriv | authNoPriv | authPriv Note that if no tdomain is given, the default value, transportDomainUdpIpv4, is used. Note that if no port is given and if taddress does not contain a port number, the default value is used. unregister_agent(UserId, TargetName) -> ok | {error, Reason} Types UserId = term() TargetName = target_name() Unregister the agent. agent_info(TargetName, Item) -> {ok, Val} | {error, Reason} Types TargetName = target_name() Item = atom() Reason = term() Retrieve agent config. update_agent_info(UserId, TargetName, Info) -> ok | {error, Reason} OTP R14B04 update_agent_info(UserId, TargetName, Item, Val) -> ok | {error, Reason} Types UserId = term() TargetName = target_name() Info = [{item(), item_value()}] Item = item() item() = atom() Val = item_value() item_value() = term() Reason = term() Update agent config. The function update_agent_info/3 should be used when several values needs to be updated atomically. See function register_agent for more info about what kind of items are allowed. which_agents() -> Agents which_agents(UserId) -> Agents Types UserId = term() Agents = [TargetName] TargetName = target_name() Get a list of all registered agents or all agents registered by a specific user. register_usm_user(EngineID, UserName, Conf) -> ok | {error, Reason} Types EngineID = string() UserName = string() Conf = [usm_config()] usm_config() = {Item, Val} Item = sec_name | auth | auth_key | priv | priv_key Val = term() Reason = term() Explicitly instruct the manager to handle this USM user. Note that there is an alternate way to do the same thing: Add the usm user to the manager config files (see usm.conf). The type of Val depends on Item: sec_name = string()
auth = usmNoAuthProtocol | usmHMACMD5AuthProtocol | usmHMACSHAAuthProtocol | usmHMAC128SHA224AuthProtocol | usmHMAC192SH256AuthProtocol | usmHMAC256SHA384AuthProtocol | usmHMAC384SHA512AuthProtocol
auth_key = [integer()] (length 16 if auth = usmHMACMD5AuthProtocol,
length 20 if auth = usmHMACSHAAuthProtocol,
length 28 if auth = usmHMAC128SHA224AuthProtocol,
length 32 if auth = usmHMAC192SHA256AuthProtocol,
length 48 if auth = usmHMAC256SHA384AuthProtocol,
length 64 if auth = usmHMAC384SHA512AuthProtocol)
priv = usmNoPrivProtocol | usmDESPrivProtocol | usmAesCfb128Protocol
priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb128Protocol). unregister_usm_user(EngineID, UserName) -> ok | {error, Reason} Types EngineID = string() UserName = string() Reason = term() Unregister this USM user. usm_user_info(EngineID, UserName, Item) -> {ok, Val} | {error, Reason} Types EngineID = string() UsmName = string() Item = sec_name | auth | auth_key | priv | priv_key Reason = term() Retrieve usm user config. update_usm_user_info(EngineID, UserName, Item, Val) -> ok | {error, Reason} Types EngineID = string() UsmName = string() Item = sec_name | auth | auth_key | priv | priv_key Val = term() Reason = term() Update usm user config. which_usm_users() -> UsmUsers Types UsmUsers = [{EngineID,UserName}] EngineID = string() UsmName = string() Get a list of all registered usm users. which_usm_users(EngineID) -> UsmUsers Types UsmUsers = [UserName] UserName = string() Get a list of all registered usm users with engine-id EngineID. sync_get2(UserId, TargetName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} OTP R14B03 sync_get2(UserId, TargetName, Oids, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} OTP R14B03 Types UserId = term() TargetName = target_name() Oids = [oid()] SendOpts = send_opts() send_opts() = [send_opt()] send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} SnmpReply = snmp_reply() Remaining = integer() Reason = {send_failed, ReqId, ActualReason} | {invalid_sec_info, SecInfo, SnmpInfo} | term() ReqId = term() ActualReason = term() SecInfo = [sec_info()] sec_info() = {sec_tag(), ExpectedValue, ReceivedValue} sec_tag() = atom() ExpectedValue = ReceivedValue = term() SnmpInfo = term() Synchronous get-request. Remaining is the remaining time of the given (or default) timeout time. When Reason is {send_failed, ...} it means that the net_if process failed to send the message. This could happen because of any number of reasons, i.e. encoding error. ActualReason is the actual reason in this case. The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this application makes, with one exception, no use of this info, so the only use for it in such a option (when using the built in net-if) would be tracing. The one usage exception is: Any tuple with snmpm_extra_info_tag as its first element is reserved for internal use. Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) are override options. That is, for this request, they override any configuration done when the agent was registered. For SnmpInfo, see the user callback function handle_report. async_get2(UserId, TargetName, Oids) -> {ok, ReqId} | {error, Reason} OTP R14B03 async_get2(UserId, TargetName, Oids, SendOpts) -> {ok, ReqId} | {error, Reason} OTP R14B03 Types UserId = term() TargetName = target_name() Oids = [oid()] SendOpts = send_opts() send_opts() = [send_opt()] send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} ReqId = term() Reason = term() Asynchronous get-request. The reply, if it arrives, will be delivered to the user through a call to the snmpm_user callback function handle_pdu. The send option timeout specifies for how long the request is valid (after which the manager is free to delete it). The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this application makes, with one exception, no use of this info, so the only use for it in such a option (when using the built in net-if) would be tracing. The one usage exception is: Any tuple with snmpm_extra_info_tag as its first element is reserved for internal use. Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) are override options. That is, for this request, they override any configuration done when the agent was registered. sync_get_next2(UserId, TargetName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} OTP R14B03 sync_get_next2(UserId, TargetName, Oids, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} OTP R14B03 Types UserId = term() TargetName = target_name() Oids = [oid()] SendOpts = send_opts() send_opts() = [send_opt()] send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} SnmpReply = snmp_reply() Remaining = integer() Reason = {send_failed, ReqId, ActualReason} | {invalid_sec_info, SecInfo, SnmpInfo} | term() ReqId = term() ActualReason = term() SecInfo = [sec_info()] sec_info() = {sec_tag(), ExpectedValue, ReceivedValue} sec_tag() = atom() ExpectedValue = ReceivedValue = term() SnmpInfo = term() Synchronous get-next-request. Remaining is the remaining time of the given (or default) timeout time. When Reason is {send_failed, ...} it means that the net_if process failed to send the message. This could happen because of any number of reasons, i.e. encoding error. ActualReason is the actual reason in this case. The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this application makes, with one exception, no use of this info, so the only use for it in such a option (when using the built in net-if) would be tracing. The one usage exception is: Any tuple with snmpm_extra_info_tag as its first element is reserved for internal use. Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) are override options. That is, for this request, they override any configuration done when the agent was registered. For SnmpInfo, see the user callback function handle_report. async_get_next2(UserId, TargetName, Oids) -> {ok, ReqId} | {error, Reason} OTP R14B03 async_get_next2(UserId, TargetName, Oids, SendOpts) -> {ok, ReqId} | {error, Reason} OTP R14B03 Types UserId = term() TargetName = target_name() Oids = [oid()] send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} ReqId = integer() Reason = term() Asynchronous get-next-request. The reply will be delivered to the user through a call to the snmpm_user callback function handle_pdu. The send option timeout specifies for how long the request is valid (after which the manager is free to delete it). The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this application makes, with one exception, no use of this info, so the only use for it in such a option (when using the built in net-if) would be tracing. The one usage exception is: Any tuple with snmpm_extra_info_tag as its first element is reserved for internal use. Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) are override options. That is, for this request, they override any configuration done when the agent was registered. sync_set2(UserId, TargetName, VarsAndVals) -> {ok, SnmpReply, Remaining} | {error, Reason} OTP R14B03 sync_set2(UserId, TargetName, VarsAndVals, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} OTP R14B03 Types UserId = term() TargetName = target_name() VarsAndVals = vars_and_vals() SendOpts = send_opts() send_opts() = [send_opt()] send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} SnmpReply = snmp_reply() Remaining = integer() Reason = {send_failed, ReqId, ActualReason} | {invalid_sec_info, SecInfo, SnmpInfo} | term() ReqId = term() ActualReason = term() SecInfo = [sec_info()] sec_info() = {sec_tag(), ExpectedValue, ReceivedValue} sec_tag() = atom() ExpectedValue = ReceivedValue = term() SnmpInfo = term() Synchronous set-request. Remaining is the remaining time of the given (or default) timeout time. When Reason is {send_failed, ...} it means that the net_if process failed to send the message. This could happen because of any number of reasons, i.e. encoding error. ActualReason is the actual reason in this case. When var_and_val() is {oid(), value()}, the manager makes an educated guess based on the loaded mibs. The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this application makes, with one exception, no use of this info, so the only use for it in such a option (when using the built in net-if) would be tracing. The one usage exception is: Any tuple with snmpm_extra_info_tag as its first element is reserved for internal use. Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) are override options. That is, for this request, they override any configuration done when the agent was registered. For SnmpInfo, see the user callback function handle_report. async_set2(UserId, TargetName, VarsAndVals) -> {ok, ReqId} | {error, Reason} OTP R14B03 async_set2(UserId, TargetName, VarsAndVals, SendOpts) -> {ok, ReqId} | {error, Reason} OTP R14B03 Types UserId = term() TargetName = target_name() VarsAndVals = vars_and_vals() SendOpts = send_opts() send_opts() = [send_opt()] send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} ReqId = term() Reason = term() Asynchronous set-request. The reply will be delivered to the user through a call to the snmpm_user callback function handle_pdu. The send option timeout specifies for how long the request is valid (after which the manager is free to delete it). When var_and_val() is {oid(), value()}, the manager makes an educated guess based on the loaded mibs. The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this application makes, with one exception, no use of this info, so the only use for it in such a option (when using the built in net-if) would be tracing. The one usage exception is: Any tuple with snmpm_extra_info_tag as its first element is reserved for internal use. Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) are override options. That is, for this request, they override any configuration done when the agent was registered. sync_get_bulk2(UserId, TragetName, NonRep, MaxRep, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} OTP R14B03 sync_get_bulk2(UserId, TragetName, NonRep, MaxRep, Oids, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} OTP R14B03 Types UserId = term() TargetName = target_name() NonRep = integer() MaxRep = integer() Oids = [oid()] SendOpts = send_opts() send_opts() = [send_opt()] send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} SnmpReply = snmp_reply() Remaining = integer() Reason = {send_failed, ReqId, ActualReason} | {invalid_sec_info, SecInfo, SnmpInfo} | term() ReqId = term() ActualReason = term() SecInfo = [sec_info()] sec_info() = {sec_tag(), ExpectedValue, ReceivedValue} sec_tag() = atom() ExpectedValue = ReceivedValue = term() SnmpInfo = term() Synchronous get-bulk-request (See RFC1905). Remaining is the remaining time of the given (or default) timeout time. When Reason is {send_failed, ...} it means that the net_if process failed to send the message. This could happen because of any number of reasons, i.e. encoding error. ActualReason is the actual reason in this case. The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this application makes, with one exception, no use of this info, so the only use for it in such a option (when using the built in net-if) would be tracing. The one usage exception is: Any tuple with snmpm_extra_info_tag as its first element is reserved for internal use. Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) are override options. That is, for this request, they override any configuration done when the agent was registered. For SnmpInfo, see the user callback function handle_report. async_get_bulk2(UserId, TargetName, NonRep, MaxRep, Oids) -> {ok, ReqId} | {error, Reason} OTP R14B03 async_get_bulk2(UserId, TargetName, NonRep, MaxRep, Oids, SendOpts) -> {ok, ReqId} | {error, Reason} OTP R14B03 Types UserId = term() TargetName = target_name() NonRep = integer() MaxRep = integer() Oids = [oid()] SendOpts = send_opts() send_opts() = [send_opt()] send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} ReqId = integer() Reason = term() Asynchronous get-bulk-request (See RFC1905). The reply will be delivered to the user through a call to the snmpm_user callback function handle_pdu. The send option timeout specifies for how long the request is valid (after which the manager is free to delete it). The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this application makes no use of this info, so the only use for it in such a configuration (when using the built in net-if) would be tracing. Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) are override options. That is, for this request, they override any configuration done when the agent was registered. cancel_async_request(UserId, ReqId) -> ok | {error, Reason} Types UserId = term() ReqId = term() Reason = term() Cancel a previous asynchronous request. log_to_txt(LogDir) OTP R16B03 log_to_txt(LogDir, Block | Mibs) log_to_txt(LogDir, Mibs, Block | OutFile) -> ok | {ok, Cnt} | {error, Reason} log_to_txt(LogDir, Mibs, OutFile, Block | LogName) -> ok | {ok, Cnt} | {error, Reason} log_to_txt(LogDir, Mibs, OutFile, LogName, Block | LogFile) -> ok | {ok, Cnt} | {error, Reason} log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Block | Start) -> ok | {ok, Cnt} | {error, Reason} log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Block, Start) -> ok | {ok, Cnt} | {error, Reason} log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start, Stop) -> ok | {ok, Cnt} | {error, Reason} log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Block, Start, Stop) -> ok | {ok, Cnt} | {error, Reason} OTP R16B03 Types LogDir = string() Mibs = [MibName] MibName = string() Block = boolean() OutFile = string() LogName = string() LogFile = string() Start = Stop = null | calendar:datetime() | {local_time, calendar:datetime()} | {universal_time, calendar:datetime()} Cnt = {NumOK, NumERR} NumOK = non_neg_integer() NumERR = pos_integer() Reason = disk_log_open_error() | file_open_error() | term() disk_log_open_error() = {LogName, term()} file_open_error() = {OutFile, term()} Converts an Audit Trail Log to a readable text file. OutFile defaults to "./snmpm_log.txt". LogName defaults to "snmpm_log". LogFile defaults to "snmpm.log". The Block argument indicates if the log should be blocked during conversion. This could be useful when converting large logs (when otherwise the log could wrap during conversion). Defaults to true. See snmp:log_to_txt for more info. log_to_io(LogDir) -> ok | {ok, Cnt} | {error, Reason} OTP R15B01 log_to_io(LogDir, Block | Mibs) -> ok | {ok, Cnt} | {error, Reason} OTP R15B01 log_to_io(LogDir, Mibs) -> ok | {error, Reason} OTP R15B01 log_to_io(LogDir, Mibs, Block | LogName) -> ok | {ok, Cnt} | {error, Reason} OTP R15B01 log_to_io(LogDir, Mibs, LogName, Block | LogFile) -> ok | {ok, Cnt} | {error, Reason} OTP R15B01 log_to_io(LogDir, Mibs, LogName, LogFile, Block | Start) -> ok | {ok, Cnt} | {error, Reason} OTP R15B01 log_to_io(LogDir, Mibs, LogName, LogFile, Block, Start) -> ok | {ok, Cnt} | {error, Reason} OTP R15B01 log_to_io(LogDir, Mibs, LogName, LogFile, Start, Stop) -> ok | {ok, Cnt} | {error, Reason} OTP R15B01 log_to_io(LogDir, Mibs, LogName, LogFile, Block, Start, Stop) -> ok | {ok, Cnt} | {error, Reason} OTP R16B03 Types LogDir = string() Mibs = [MibName] MibName = string() Block = boolean() LogName = string() LogFile = string() Start = Stop = null | calendar:datetime() | {local_time, calendar:datetime()} | {universal_time, calendar:datetime()} Cnt = {NumOK, NumERR} NumOK = non_neg_integer() NumERR = pos_integer() Reason = disk_log_open_error() | file_open_error() | term() disk_log_open_error() = {LogName, term()} file_open_error() = {OutFile, term()} Converts an Audit Trail Log to a readable format and prints it on stdio. LogName defaults to "snmpm_log". LogFile defaults to "snmpm.log". The Block argument indicates if the log should be blocked during conversion. This could be useful when converting large logs (when otherwise the log could wrap during conversion). Defaults to true. See snmp:log_to_io for more info. change_log_size(NewSize) -> ok | {error, Reason} Types NewSize = {MaxBytes, MaxFiles} MaxBytes = integer() MaxFiles = integer() Reason = term() Changes the log size of the Audit Trail Log. The application must be configured to use the audit trail log function. Please refer to disk_log(3) in Kernel Reference Manual for a description of how to change the log size. The change is permanent, as long as the log is not deleted. That means, the log size is remembered across reboots. set_log_type(NewType) -> {ok, OldType} | {error, Reason} Types NewType = OldType = atl_type() Reason = term() Changes the run-time Audit Trail log type. Note that this has no effect on the application configuration as defined by configuration files, so a node restart will revert the config to whatever is in those files. This function is primarily useful in testing/debugging scenarios. load_mib(Mib) -> ok | {error, Reason} Types Mib = MibName MibName = string() Reason = term() Load a Mib into the manager. The MibName is the name of the Mib, including the path to where the compiled mib is found. For example, Dir = code:priv_dir(my_app) ++ "/mibs/",
snmpm:load_mib(Dir ++ "MY-MIB"). unload_mib(Mib) -> ok | {error, Reason} Types Mib = MibName MibName = string() Reason = term() Unload a Mib from the manager. The MibName is the name of the Mib, including the path to where the compiled mib is found. For example, Dir = code:priv_dir(my_app) ++ "/mibs/",
snmpm:unload_mib(Dir ++ "MY-MIB"). which_mibs() -> Mibs Types Mibs = [{MibName, MibFile}] MibName = atom() MibFile = string() Get a list of all the mib's loaded into the manager. name_to_oid(Name) -> {ok, Oids} | {error, Reason} Types Name = atom() Oids = [oid()] Transform a alias-name to its oid. Note that an alias-name is only unique within the mib, so when loading several mib's into a manager, there might be several instances of the same aliasname. oid_to_name(Oid) -> {ok, Name} | {error, Reason} Types Oid = oid() Name = atom() Reason = term() Transform a oid to its aliasname. oid_to_type(Oid) -> {ok, Type} | {error, Reason} Types Oid = oid() Type = atom() Reason = term() Retrieve the type (asn1 bertype) of an oid. backup(BackupDir) -> ok | {error, Reason} Types BackupDir = string() Backup persistent data handled by the manager. BackupDir cannot be identical to DbDir. info() -> [{Key, Value}] Types Key = atom() Value = term() Returns a list (a dictionary) containing information about the manager. Information includes statistics counters, miscellaneous info about each process (e.g. memory allocation), and so on. verbosity(Ref, Verbosity) -> void() Types Ref = server | config | net_if | note_store | all Verbosity = verbosity() verbosity() = silence | info | log | debug | trace Sets verbosity for the designated process. For the lowest verbosity silence, nothing is printed. The higher the verbosity, the more is printed. restart(Ref) -> void() OTP 22.3 Types Ref = net_if Restart the indicated process (Ref). Note that its not without risk to restart a process, and should therefore be used with care. format_reason(Reason) -> string() format_reason(Prefix, Reason) -> string() Types Reason = term() Prefix = integer() | string() This utility function is used to create a formatted (pretty printable) string of the error reason received from either: The Reason returned value if any of the sync/async get/get-next/set/get-bulk functions returns {error, Reason} The Reason parameter in the handle_error user callback function. Prefix should either be an indentation string (e.g. a list of spaces) or a positive integer (which will be used to create the indentation string of that length). Copyright © 1997-2022 Ericsson AB. All Rights Reserved.
|
Troubleshooting Ansible for VMware Debugging Ansible for VMware
Known issues with Ansible for VMware
Network settings with vmware_guest in Ubuntu 18.04 Potential Workarounds
This section lists things that can go wrong and possible ways to fix them. Debugging Ansible for VMware When debugging or creating a new issue, you will need information about your VMware infrastructure. You can get this information using govc, For example: $ export GOVC_USERNAME=ESXI_OR_VCENTER_USERNAME
$ export GOVC_PASSWORD=ESXI_OR_VCENTER_PASSWORD
$ export GOVC_URL=https://ESXI_OR_VCENTER_HOSTNAME:443
$ govc find /
Known issues with Ansible for VMware Network settings with vmware_guest in Ubuntu 18.04 Setting the network with vmware_guest in Ubuntu 18.04 is known to be broken, due to missing support for netplan in the open-vm-tools. This issue is tracked via: https://github.com/vmware/open-vm-tools/issues/240 https://github.com/ansible/ansible/issues/41133 Potential Workarounds There are several workarounds for this issue. Modify the Ubuntu 18.04 images and installing ifupdown in them via sudo apt install ifupdown. If so you need to remove netplan via sudo apt remove netplan.io and you need stop systemd-networkd via sudo systemctl disable systemctl-networkd. Generate the systemd-networkd files with a task in your VMware Ansible role: - name: make sure cache directory exists
file: path="{{ inventory_dir }}/cache" state=directory
delegate_to: localhost
- name: generate network templates
template: src=network.j2 dest="{{ inventory_dir }}/cache/{{ inventory_hostname }}.network"
delegate_to: localhost
- name: copy generated files to vm
vmware_guest_file_operation:
hostname: "{{ vmware_general.hostname }}"
username: "{{ vmware_username }}"
password: "{{ vmware_password }}"
datacenter: "{{ vmware_general.datacenter }}"
validate_certs: "{{ vmware_general.validate_certs }}"
vm_id: "{{ inventory_hostname }}"
vm_username: root
vm_password: "{{ template_password }}"
copy:
src: "{{ inventory_dir }}/cache/{{ inventory_hostname }}.network"
dest: "/etc/systemd/network/ens160.network"
overwrite: False
delegate_to: localhost
- name: restart systemd-networkd
vmware_vm_shell:
hostname: "{{ vmware_general.hostname }}"
username: "{{ vmware_username }}"
password: "{{ vmware_password }}"
datacenter: "{{ vmware_general.datacenter }}"
folder: /vm
vm_id: "{{ inventory_hostname}}"
vm_username: root
vm_password: "{{ template_password }}"
vm_shell: /bin/systemctl
vm_shell_args: " restart systemd-networkd"
delegate_to: localhost
- name: restart systemd-resolved
vmware_vm_shell:
hostname: "{{ vmware_general.hostname }}"
username: "{{ vmware_username }}"
password: "{{ vmware_password }}"
datacenter: "{{ vmware_general.datacenter }}"
folder: /vm
vm_id: "{{ inventory_hostname}}"
vm_username: root
vm_password: "{{ template_password }}"
vm_shell: /bin/systemctl
vm_shell_args: " restart systemd-resolved"
delegate_to: localhost
Wait for netplan support in open-vm-tools
© 2012–2018 Michael DeHaan |
get_previous_comments_link( string $label = '' ): string|void Retrieves the link to the previous comments page. Parameters $label string Optional Label for comments link text. Default: '' Return string|void HTML-formatted link for the previous page of comments. Source File: wp-includes/link-template.php. View all references function get_previous_comments_link( $label = '' ) {
if ( ! is_singular() ) {
return;
}
$page = get_query_var( 'cpage' );
if ( (int) $page <= 1 ) {
return;
}
$prevpage = (int) $page - 1;
if ( empty( $label ) ) {
$label = __( '« Older Comments' );
}
/**
* Filters the anchor tag attributes for the previous comments page link.
*
* @since 2.7.0
*
* @param string $attributes Attributes for the anchor tag.
*/
return '<a href="' . esc_url( get_comments_pagenum_link( $prevpage ) ) . '" ' . apply_filters( 'previous_comments_link_attributes', '' ) . '>' . preg_replace( '/&([^#])(?![a-z]{1,8};)/i', '&$1', $label ) . '</a>';
}
Hooks apply_filters( 'previous_comments_link_attributes', string $attributes )
Filters the anchor tag attributes for the previous comments page link. Related Uses Uses Description is_singular() wp-includes/query.php Determines whether the query is for an existing single post of any post type (post, attachment, page, custom post types). get_query_var() wp-includes/query.php Retrieves the value of a query variable in the WP_Query class. get_comments_pagenum_link() wp-includes/link-template.php Retrieves the comments page number link. __() wp-includes/l10n.php Retrieves the translation of $text. esc_url() wp-includes/formatting.php Checks and cleans a URL. apply_filters() wp-includes/plugin.php Calls the callback functions that have been added to a filter hook.
Used By Used By Description get_the_comments_navigation() wp-includes/link-template.php Retrieves navigation to next/previous set of comments, when applicable. previous_comments_link() wp-includes/link-template.php Displays the link to the previous comments page.
Changelog Version Description 2.7.1 Introduced.
|
dart:core
length property int length The length of the string. Returns the number of UTF-16 code units in this string. The number of runes might be fewer, if the string contains characters outside the Basic Multilingual Plane (plane 0): 'Dart'.length; // 4
'Dart'.runes.length; // 4
var clef = '\u{1D11E}';
clef.length; // 2
clef.runes.length; // 1
Source int get length;
|
matplotlib.pyplot.rc_context
matplotlib.pyplot.rc_context(rc=None, fname=None) [source]
Return a context manager for managing rc settings. This allows one to do: with mpl.rc_context(fname='screen.rc'):
plt.plot(x, a)
with mpl.rc_context(fname='print.rc'):
plt.plot(x, b)
plt.plot(x, c)
The 'a' vs 'x' and 'c' vs 'x' plots would have settings from 'screen.rc', while the 'b' vs 'x' plot would have settings from 'print.rc'. A dictionary can also be passed to the context manager: with mpl.rc_context(rc={'text.usetex': True}, fname='screen.rc'):
plt.plot(x, a)
The 'rc' dictionary takes precedence over the settings loaded from 'fname'. Passing a dictionary only is also valid. For example a common usage is: with mpl.rc_context(rc={'interactive': False}):
fig, ax = plt.subplots()
ax.plot(range(3), range(3))
fig.savefig('A.png', format='png')
plt.close(fig)
Examples using matplotlib.pyplot.rc_context
Usetex Baseline Test
Automatically setting tick labels
|
ec2_lc_find - Find AWS Autoscaling Launch Configurations New in version 2.2. Synopsis Requirements (on host that executes module) Options Examples
Return Values Status Synopsis Returns list of matching Launch Configurations for a given name, along with other useful information Results can be sorted and sliced It depends on boto Based on the work by Tom Bamford (https://github.com/tombamford) Requirements (on host that executes module) python >= 2.6 boto3 Options parameter required default choices comments limit
no How many results to show. Corresponds to Python slice notation like list[:limit]. name_regex
yes A Launch Configuration to match It'll be compiled as regex region
yes The AWS region to use. aliases: aws_region, ec2_region sort_order
no ascending
ascending
descending
Order in which to sort results. Examples # Note: These examples do not set authentication details, see the AWS Guide for details.
# Search for the Launch Configurations that start with "app"
- ec2_lc_find:
name_regex: app.*
sort_order: descending
limit: 2
Return Values Common return values are documented here Return Values, the following are the fields unique to this module: name description returned type sample arn Name of the AMI when Launch Configuration was found string arn:aws:autoscaling:eu-west-1:12345:launchConfiguration:d82f050e-e315:launchConfigurationName/yourproject associate_public_address Assign public address or not when Launch Configuration was found boolean True block_device_mappings Launch Configuration block device mappings property when Launch Configuration was found list [] classic_link_vpc_security_groups Launch Configuration classic link vpc security groups property when Launch Configuration was found list [] created_time When it was created when Launch Configuration was found string 2016-06-29T14:59:22.222000+00:00 ebs_optimized Launch Configuration EBS optimized property when Launch Configuration was found boolean False image_id AMI id when Launch Configuration was found string ami-0d75df7e instance_monitoring Launch Configuration instance monitoring property when Launch Configuration was found string {'Enabled': False} instance_type Type of ec2 instance when Launch Configuration was found string t2.small kernel_id Launch Configuration kernel to use when Launch Configuration was found string keyname Launch Configuration ssh key when Launch Configuration was found string mykey name Name of the Launch Configuration when Launch Configuration was found string myapp-v123 ram_disk_id Launch Configuration ram disk property when Launch Configuration was found string security_groups Launch Configuration security groups when Launch Configuration was found list [] user_data User data used to start instance when Launch Configuration was found string ZXhwb3J0IENMT1VE Status This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface. For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan |
open
NAME
SYNOPSIS
DESCRIPTION
NONPERLIO FUNCTIONALITY
IMPLEMENTATION DETAILS
SEE ALSO
NAME open - perl pragma to set default PerlIO layers for input and output SYNOPSIS use open IN => ":crlf", OUT => ":bytes";
use open OUT => ':utf8';
use open IO => ":encoding(iso-8859-7)";
use open IO => ':locale';
use open ':encoding(utf8)';
use open ':locale';
use open ':encoding(iso-8859-7)';
use open ':std';
DESCRIPTION Full-fledged support for I/O layers is now implemented provided Perl is configured to use PerlIO as its IO system (which is now the default). The open pragma serves as one of the interfaces to declare default "layers" (also known as "disciplines") for all I/O. Any two-argument open(), readpipe() (aka qx//) and similar operators found within the lexical scope of this pragma will use the declared defaults. Even three-argument opens may be affected by this pragma when they don't specify IO layers in MODE. With the IN subpragma you can declare the default layers of input streams, and with the OUT subpragma you can declare the default layers of output streams. With the IO subpragma you can control both input and output streams simultaneously. If you have a legacy encoding, you can use the :encoding(...) tag. If you want to set your encoding layers based on your locale environment variables, you can use the :locale tag. For example: $ENV{LANG} = 'ru_RU.KOI8-R';
# the :locale will probe the locale environment variables like LANG
use open OUT => ':locale';
open(O, ">koi8");
print O chr(0x430); # Unicode CYRILLIC SMALL LETTER A = KOI8-R 0xc1
close O;
open(I, "<koi8");
printf "%#x\n", ord(<I>), "\n"; # this should print 0xc1
close I;
These are equivalent use open ':encoding(utf8)';
use open IO => ':encoding(utf8)';
as are these use open ':locale';
use open IO => ':locale';
and these use open ':encoding(iso-8859-7)';
use open IO => ':encoding(iso-8859-7)';
The matching of encoding names is loose: case does not matter, and many encodings have several aliases. See Enco8b7c:f320:99b9:690f:4595:cd17:293a:c069Supported for details and the list of supported locales. When open() is given an explicit list of layers (with the three-arg syntax), they override the list declared using this pragma. open() can also be given a single colon (:) for a layer name, to override this pragma and use the default (:raw on Unix, :crlf on Windows). The :std subpragma on its own has no effect, but if combined with the :utf8 or :encoding subpragmas, it converts the standard filehandles (STDIN, STDOUT, STDERR) to comply with encoding selected for input/output handles. For example, if both input and out are chosen to be :encoding(utf8) , a :std will mean that STDIN, STDOUT, and STDERR are also in :encoding(utf8) . On the other hand, if only output is chosen to be in :encoding(koi8r) , a :std will cause only the STDOUT and STDERR to be in koi8r . The :locale subpragma implicitly turns on :std . The logic of :locale is described in full in encoding, but in short it is first trying nl_langinfo(CODESET) and then guessing from the LC_ALL and LANG locale environment variables. Directory handles may also support PerlIO layers in the future. NONPERLIO FUNCTIONALITY If Perl is not built to use PerlIO as its IO system then only the two pseudo-layers :bytes and :crlf are available. The :bytes layer corresponds to "binary mode" and the :crlf layer corresponds to "text mode" on platforms that distinguish between the two modes when opening files (which is many DOS-like platforms, including Windows). These two layers are no-ops on platforms where binmode() is a no-op, but perform their functions everywhere if PerlIO is enabled. IMPLEMENTATION DETAILS There is a class method in PerlIO8b7c:f320:99b9:690f:4595:cd17:293a:c069Layer find which is implemented as XS code. It is called by import to validate the layers: PerlIO8b7c:f320:99b9:690f:4595:cd17:293a:c069Layer8b7c:f320:99b9:690f:4595:cd17:293a:c069->find("perlio")
The return value (if defined) is a Perl object, of class PerlIO8b7c:f320:99b9:690f:4595:cd17:293a:c069Layer which is created by the C code in perlio.c. As yet there is nothing useful you can do with the object at the perl level. SEE ALSO binmode, open, perlunicode, PerlIO, encoding
|
statsmodels.regression.recursive_ls.RecursiveLSResults.cov_params_robust_oim
RecursiveLSResults.cov_params_robust_oim()
(array) The QMLE variance / covariance matrix. Computed using the method from Harvey (1989) as the evaluated hessian.
© 2009–2012 Statsmodels Developers© 2006–2008 Scipy Developers |
cdh - change to a recently visited directory Synopsis cdh [ directory ]
Description cdh with no arguments presents a list of recently visited directories. You can then select one of the entries by letter or number. You can also press tab to use the completion pager to select an item from the list. If you give it a single argument it is equivalent to cd directory. Note that the cd command limits directory history to the 25 most recently visited directories. The history is stored in the $dirprev and $dirnext variables which this command manipulates. If you make those universal variables your cd history is shared among all fish instances. See Also See also the prevd and pushd commands which also work with the recent cd history and are provided for compatibility with other shells.
|
Class RemoteExecutionControl
java.lang.Object
jdk.jshell.execution.DirectExecutionControl jdk.jshell.execution.RemoteExecutionControl All Implemented Interfaces:
AutoCloseable, ExecutionControl
public class RemoteExecutionControl extends DirectExecutionControl implements ExecutionControl The remote agent runs in the execution process (separate from the main JShell process). This agent loads code over a socket from the main JShell process, executes the code, and other misc, Specialization of DirectExecutionControl which adds stop support controlled by an external process. Designed to work with JdiDefaultExecutionControl. Since: 9 Nested Class Summary Nested classes/interfaces declared in interface jdk.jshell.spi.ExecutionControl
ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException
Constructor Summary
Constructor
Description
RemoteExecutionControl()
Create an instance using the default class loading.
RemoteExecutionControl(LoaderDelegate loaderDelegate)
Creates an instance, delegating loader operations to the specified delegate.
Method Summary
Modifier and Type
Method
Description
protected void
clientCodeEnter()
Marks entry into user code.
static void
main(String[] args)
Launch the agent, connecting to the JShell-core over the socket specified in the command-line argument.
void
redefine(ExecutionControl.ClassBytecodes[] cbcs)
Redefine processing on the remote end is only to register the redefined classes
void
stop()
Interrupts a running invoke.
String
varValue(String className,
String varName)
Returns the value of a variable.
Methods declared in class jdk.jshell.execution.DirectExecutionControl
addToClasspath, classesRedefined, clientCodeLeave, close, extensionCommand, findClass, invoke, invoke, load, stop, throwConvertedInvocationException, throwConvertedOtherException, valueString, varValue
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods declared in interface jdk.jshell.spi.ExecutionControl
addToClasspath, close, extensionCommand, invoke, load
Constructor Details RemoteExecutionControl public RemoteExecutionControl(LoaderDelegate loaderDelegate) Creates an instance, delegating loader operations to the specified delegate. Parameters:
loaderDelegate - the delegate to handle loading classes RemoteExecutionControl public RemoteExecutionControl() Create an instance using the default class loading. Method Details main public static void main(String[] args) throws Exception Launch the agent, connecting to the JShell-core over the socket specified in the command-line argument. Parameters:
args - standard command-line arguments, expectation is the socket number is the only argument Throws:
Exception - any unexpected exception redefine public void redefine(ExecutionControl.ClassBytecodes[] cbcs) throws ExecutionControl.ClassInstallException, ExecutionControl.NotImplementedException, ExecutionControl.EngineTerminationException Redefine processing on the remote end is only to register the redefined classes Specified by:
redefine in interface ExecutionControl
Parameters:
cbcs - the class name and bytecodes to redefine Throws:
ExecutionControl.ClassInstallException - exception occurred redefining the classes, some or all were not redefined
ExecutionControl.NotImplementedException - if not implemented
ExecutionControl.EngineTerminationException - the execution engine has terminated stop public void stop() throws ExecutionControl.EngineTerminationException, ExecutionControl.InternalException Description copied from class: DirectExecutionControl Interrupts a running invoke. Not supported.
Specified by:
stop in interface ExecutionControl
Overrides:
stop in class DirectExecutionControl
Throws:
ExecutionControl.EngineTerminationException - the execution engine has terminated
ExecutionControl.InternalException - an internal problem occurred varValue public String varValue(String className, String varName) throws ExecutionControl.RunException, ExecutionControl.EngineTerminationException, ExecutionControl.InternalException Description copied from interface: ExecutionControl Returns the value of a variable. Specified by:
varValue in interface ExecutionControl
Parameters:
className - the name of the wrapper class of the variable
varName - the name of the variable Returns: the value of the variable Throws:
ExecutionControl.UserException - formatting the value raised a user exception
ExecutionControl.ResolutionException - formatting the value attempted to directly or indirectly invoke an unresolved snippet
ExecutionControl.StoppedException - if the formatting the value was canceled by ExecutionControl.stop()
ExecutionControl.EngineTerminationException - the execution engine has terminated
ExecutionControl.InternalException - an internal problem occurred ExecutionControl.RunException clientCodeEnter protected void clientCodeEnter() Description copied from class: DirectExecutionControl Marks entry into user code. Overrides:
clientCodeEnter in class DirectExecutionControl
|
Class Phalcon\Forms\Form
extends abstract class Phalcon\DI\Injectable implements Phalcon\Events\EventsAwareInterface, Phalcon\DI\InjectionAwareInterface, Countable, Iterator, Traversable This component allows to build forms using an object-oriented interface Methods public __construct ([object $entity], [array $userOptions]) Phalcon\Forms\Form constructor public Phalcon\Forms\Form setAction (string $action) Sets the form’s action public string getAction () Returns the form’s action public Phalcon\Forms\Form setUserOption (string $option, mixed $value) Sets an option for the form public mixed getUserOption (string $option, [mixed $defaultValue]) Returns the value of an option if present public Phalcon\Forms\ElementInterface setUserOptions (array $options) Sets options for the element public array getUserOptions () Returns the options for the element public Phalcon\Forms\Form setEntity (object $entity) Sets the entity related to the model public object getEntity () Returns the entity related to the model public Phalcon\Forms\ElementInterface [] getElements () Returns the form elements added to the form public Phalcon\Forms\Form bind (array $data, object $entity, [array $whitelist]) Binds data to the entity public boolean isValid ([array $data], [object $entity]) Validates the form public Phalcon\Validation\Message\Group getMessages ([boolean $byItemName]) Returns the messages generated in the validation public Phalcon\Validation\Message\Group [] getMessagesFor (unknown $name) Returns the messages generated for a specific element public boolean hasMessagesFor (unknown $name) Check if messages were generated for a specific element public Phalcon\Forms\Form add (Phalcon\Forms\ElementInterface $element, [string $postion], [unknown $type]) Adds an element to the form public string render (string $name, [array $attributes]) Renders a specific item in the form public Phalcon\Forms\ElementInterface get (string $name) Returns an element added to the form by its name public string label (string $name, [unknown $attributes]) Generate the label of a element added to the form including HTML public string getLabel (string $name) Returns a label for an element public mixed getValue (string $name) Gets a value from the internal related entity or from the default value public boolean has (string $name) Check if the form contains an element public boolean remove (string $name) Removes an element from the form public Phalcon\Forms\Form clear ([array $fields]) Clears every element in the form to its default value public int count () Returns the number of elements in the form public rewind () Rewinds the internal iterator public Phalcon\Validation\Message current () Returns the current element in the iterator public int key () Returns the current position/key in the iterator public next () Moves the internal iteration pointer to the next position public boolean valid () Check if the current element in the iterator is valid public setDI (Phalcon\DiInterface $dependencyInjector) inherited from Phalcon\DI\Injectable
Sets the dependency injector public Phalcon\DiInterface getDI () inherited from Phalcon\DI\Injectable
Returns the internal dependency injector public setEventsManager (Phalcon\Events\ManagerInterface $eventsManager) inherited from Phalcon\DI\Injectable
Sets the event manager public Phalcon\Events\ManagerInterface getEventsManager () inherited from Phalcon\DI\Injectable
Returns the internal event manager public __get (unknown $property) inherited from Phalcon\DI\Injectable
Magic method __get
|
2.9. Neural network models (unsupervised)
2.9.1. Restricted Boltzmann machines Restricted Boltzmann machines (RBM) are unsupervised nonlinear feature learners based on a probabilistic model. The features extracted by an RBM or a hierarchy of RBMs often give good results when fed into a linear classifier such as a linear SVM or a perceptron. The model makes assumptions regarding the distribution of inputs. At the moment, scikit-learn only provides BernoulliRBM, which assumes the inputs are either binary values or values between 0 and 1, each encoding the probability that the specific feature would be turned on. The RBM tries to maximize the likelihood of the data using a particular graphical model. The parameter learning algorithm used (Stochastic Maximum Likelihood) prevents the representations from straying far from the input data, which makes them capture interesting regularities, but makes the model less useful for small datasets, and usually not useful for density estimation. The method gained popularity for initializing deep neural networks with the weights of independent RBMs. This method is known as unsupervised pre-training. Examples: Restricted Boltzmann Machine features for digit classification
447-547-1108. Graphical model and parametrization The graphical model of an RBM is a fully-connected bipartite graph. The nodes are random variables whose states depend on the state of the other nodes they are connected to. The model is therefore parameterized by the weights of the connections, as well as one intercept (bias) term for each visible and hidden unit, omitted from the image for simplicity. The energy function measures the quality of a joint assignment: \[E(\mathbf{v}, \mathbf{h}) = -\sum_i \sum_j w_{ij}v_ih_j - \sum_i b_iv_i - \sum_j c_jh_j\] In the formula above, \(\mathbf{b}\) and \(\mathbf{c}\) are the intercept vectors for the visible and hidden layers, respectively. The joint probability of the model is defined in terms of the energy: \[P(\mathbf{v}, \mathbf{h}) = \frac{e^{-E(\mathbf{v}, \mathbf{h})}}{Z}\] The word restricted refers to the bipartite structure of the model, which prohibits direct interaction between hidden units, or between visible units. This means that the following conditional independencies are assumed: \[\begin{split}h_i \bot h_j | \mathbf{v} \\ v_i \bot v_j | \mathbf{h}\end{split}\] The bipartite structure allows for the use of efficient block Gibbs sampling for inference.
447-547-1108. Bernoulli Restricted Boltzmann machines In the BernoulliRBM, all units are binary stochastic units. This means that the input data should either be binary, or real-valued between 0 and 1 signifying the probability that the visible unit would turn on or off. This is a good model for character recognition, where the interest is on which pixels are active and which aren’t. For images of natural scenes it no longer fits because of background, depth and the tendency of neighbouring pixels to take the same values. The conditional probability distribution of each unit is given by the logistic sigmoid activation function of the input it receives: \[\begin{split}P(v_i=1|\mathbf{h}) = \sigma(\sum_j w_{ij}h_j + b_i) \\ P(h_i=1|\mathbf{v}) = \sigma(\sum_i w_{ij}v_i + c_j)\end{split}\] where \(\sigma\) is the logistic sigmoid function: \[\sigma(x) = \frac{1}{1 + e^{-x}}\]
447-547-1108. Stochastic Maximum Likelihood learning The training algorithm implemented in BernoulliRBM is known as Stochastic Maximum Likelihood (SML) or Persistent Contrastive Divergence (PCD). Optimizing maximum likelihood directly is infeasible because of the form of the data likelihood: \[\log P(v) = \log \sum_h e^{-E(v, h)} - \log \sum_{x, y} e^{-E(x, y)}\] For simplicity the equation above is written for a single training example. The gradient with respect to the weights is formed of two terms corresponding to the ones above. They are usually known as the positive gradient and the negative gradient, because of their respective signs. In this implementation, the gradients are estimated over mini-batches of samples. In maximizing the log-likelihood, the positive gradient makes the model prefer hidden states that are compatible with the observed training data. Because of the bipartite structure of RBMs, it can be computed efficiently. The negative gradient, however, is intractable. Its goal is to lower the energy of joint states that the model prefers, therefore making it stay true to the data. It can be approximated by Markov chain Monte Carlo using block Gibbs sampling by iteratively sampling each of \(v\) and \(h\) given the other, until the chain mixes. Samples generated in this way are sometimes referred as fantasy particles. This is inefficient and it is difficult to determine whether the Markov chain mixes. The Contrastive Divergence method suggests to stop the chain after a small number of iterations, \(k\), usually even 1. This method is fast and has low variance, but the samples are far from the model distribution. Persistent Contrastive Divergence addresses this. Instead of starting a new chain each time the gradient is needed, and performing only one Gibbs sampling step, in PCD we keep a number of chains (fantasy particles) that are updated \(k\) Gibbs steps after each weight update. This allows the particles to explore the space more thoroughly. References:
“A fast learning algorithm for deep belief nets” G. Hinton, S. Osindero, Y.-W. Teh, 2006
“Training Restricted Boltzmann Machines using Approximations to the Likelihood Gradient” T. Tieleman, 2008
|
[Java] Class MissingClassException
groovy.lang.MissingClassException
public class MissingClassException
extends GroovyRuntimeException An exception occurred if a dynamic method dispatch fails with an unknown class. Note that the Missing*Exception classes were named for consistency and to avoid conflicts with JDK exceptions of the same name. Constructor Summary
Constructors
Constructor and description MissingClassException(String type, ASTNode node, String message)
MissingClassException(ClassNode type, String message)
Methods Summary
Methods
Type Params Return Type Name and description public String
getType()
Returns:
The type that could not be resolved
Inherited Methods Summary
Inherited Methods
Methods inherited from class Name class GroovyRuntimeException getLocationText, getMessage, getMessageWithoutLocationText, getModule, getNode, setModule Constructor Detail public MissingClassException(String type, ASTNode node, String message) public MissingClassException(ClassNode type, String message) Method Detail public String getType()
Returns:
The type that could not be resolved
|
8.136 ISHFTC — Shift bits circularly
Description:
ISHFTC returns a value corresponding to I with the rightmost SIZE bits shifted circularly SHIFT places; that is, bits shifted out one end are shifted into the opposite end. A value of SHIFT greater than zero corresponds to a left shift, a value of zero corresponds to no shift, and a value less than zero corresponds to a right shift. The absolute value of SHIFT must be less than SIZE. If the SIZE argument is omitted, it is taken to be equivalent to BIT_SIZE(I).
Standard:
Fortran 95 and later
Class:
Elemental function
Syntax:
RESULT = ISHFTC(I, SHIFT [, SIZE])
Arguments:
I
The type shall be INTEGER.
SHIFT
The type shall be INTEGER.
SIZE
(Optional) The type shall be INTEGER; the value must be greater than zero and less than or equal to BIT_SIZE(I).
Return value:
The return value is of type INTEGER and of the same kind as I.
See also:
ISHFT
|
google_logging_folder_exclusion Manages a folder-level logging exclusion. For more information see the official documentation and Excluding Logs. Note that you must have the "Logs Configuration Writer" IAM role (roles/logging.configWriter) granted to the credentials used with Terraform. Example Usage resource "google_logging_folder_exclusion" "my-exclusion" {
name = "my-instance-debug-exclusion"
folder = "${google_folder.my-folder.name}"
description = "Exclude GCE instance debug logs"
# Exclude all DEBUG or lower severity messages relating to instances
filter = "resource.type = gce_instance AND severity <= DEBUG"
}
resource "google_folder" "my-folder" {
display_name = "My folder"
parent = "organizations/123456"
}
Argument Reference The following arguments are supported:
folder - (Required) The folder to be exported to the sink. Note that either [FOLDER_ID] or "folders/[FOLDER_ID]" is accepted.
name - (Required) The name of the logging exclusion.
description - (Optional) A human-readable description.
disabled - (Optional) Whether this exclusion rule should be disabled or not. This defaults to false.
filter - (Required) The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter. Import Folder-level logging exclusions can be imported using their URI, e.g. $ terraform import google_logging_folder_exclusion.my_exclusion folders/my-folder/exclusions/my-exclusion
|
Class scala.Predef.ArrayCharSequence
implicit final class ArrayCharSequence extends CharSequence
Source
Predef.scala
Linear Supertypes
Instance Constructors
new ArrayCharSequence(__arrayOfChars: Array[Char])
Value Members
final def !=(arg0: Any): Boolean
Test two objects for inequality.
returns
true if !(this == that), false otherwise.
Definition Classes
AnyRef → Any
final def ##(): Int
Equivalent to x.hashCode except for boxed numeric types and null. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. For null returns a hashcode where null.hashCode throws a NullPointerException.
returns
a hash value consistent with ==
Definition Classes
AnyRef → Any
final def ==(arg0: Any): Boolean
The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).
returns
true if the receiver object is equivalent to the argument; false otherwise.
Definition Classes
AnyRef → Any
final def asInstanceOf[T0]: T0
Cast the receiver object to be of type T0.
Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression 1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expression List(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.
returns
the receiver object.
Definition Classes
Any
Exceptions thrown
ClassCastException if the receiver object is not an instance of the erasure of type T0.
def charAt(index: Int): Char
Definition Classes
ArrayCharSequence → CharSequence
def chars(): IntStream
Definition Classes
CharSequence
def clone(): AnyRef
Create a copy of the receiver object.
The default implementation of the clone method is platform dependent.
returns
a copy of the receiver object.
Attributes
protected[lang]
Definition Classes
AnyRef
Annotations
@throws( ... ) @native()
Note
not specified by SLS as a member of AnyRef
def codePoints(): IntStream
Definition Classes
CharSequence
final def eq(arg0: AnyRef): Boolean
Tests whether the argument (that) is a reference to the receiver object (this).
The eq method implements an equivalence relation on non-null instances of AnyRef, and has three additional properties:
It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false.For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false.
null.eq(null) returns true.
When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).
returns
true if the argument is a reference to the receiver object; false otherwise.
Definition Classes
AnyRef
def equals(arg0: Any): Boolean
The equality method for reference types. Default implementation delegates to eq.
See also equals in scala.Any.
returns
true if the receiver object is equivalent to the argument; false otherwise.
Definition Classes
AnyRef → Any
def finalize(): Unit
Called by the garbage collector on the receiver object when there are no more references to the object.
The details of when and if the finalize method is invoked, as well as the interaction between finalize and non-local returns and exceptions, are all platform dependent.
Attributes
protected[lang]
Definition Classes
AnyRef
Annotations
@throws( classOf[java.lang.Throwable] )
Note
not specified by SLS as a member of AnyRef
final def getClass(): java.lang.Class[_]
Returns the runtime class representation of the object.
returns
a class object corresponding to the runtime type of the receiver.
Definition Classes
AnyRef → Any
Annotations
@native()
def hashCode(): Int
The hashCode method for reference types. See hashCode in scala.Any.
returns
the hash code value for this object.
Definition Classes
AnyRef → Any
Annotations
@native()
final def isInstanceOf[T0]: Boolean
Test whether the dynamic type of the receiver object is T0.
Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression 1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.
returns
true if the receiver object is an instance of erasure of type T0; false otherwise.
Definition Classes
Any
def length(): Int
Definition Classes
ArrayCharSequence → CharSequence
final def ne(arg0: AnyRef): Boolean
Equivalent to !(this eq that).
returns
true if the argument is not a reference to the receiver object; false otherwise.
Definition Classes
AnyRef
final def notify(): Unit
Wakes up a single thread that is waiting on the receiver object's monitor.
Definition Classes
AnyRef
Annotations
@native()
Note
not specified by SLS as a member of AnyRef
final def notifyAll(): Unit
Wakes up all threads that are waiting on the receiver object's monitor.
Definition Classes
AnyRef
Annotations
@native()
Note
not specified by SLS as a member of AnyRef
def subSequence(start: Int, end: Int): CharSequence
Definition Classes
ArrayCharSequence → CharSequence
final def synchronized[T0](arg0: ⇒ T0): T0
Definition Classes
AnyRef
def toString(): String
Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.
returns
a String representation of the object.
Definition Classes
ArrayCharSequence → CharSequence → AnyRef → Any
final def wait(): Unit
Definition Classes
AnyRef
Annotations
@throws( ... )
final def wait(arg0: Long, arg1: Int): Unit
Definition Classes
AnyRef
Annotations
@throws( ... )
final def wait(arg0: Long): Unit
Definition Classes
AnyRef
Annotations
@throws( ... ) @native()
Shadowed Implicit Value Members
def +(other: String): String
Implicit
This member is added by an implicit conversion from ArrayCharSequence to any2stringadd[ArrayCharSequence] performed by method any2stringadd in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: any2stringadd[ArrayCharSequence]).+(other)
Definition Classes
any2stringadd
def +(other: String): String
Implicit
This member is added by an implicit conversion from ArrayCharSequence to any2stringadd[ArrayCharSequence] performed by method any2stringadd in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: any2stringadd[ArrayCharSequence]).+(other)
Definition Classes
any2stringadd
def ->[B](y: B): (ArrayCharSequence, B)
Implicit
This member is added by an implicit conversion from ArrayCharSequence to ArrowAssoc[ArrayCharSequence] performed by method ArrowAssoc in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: ArrowAssoc[ArrayCharSequence]).->(y)
Definition Classes
ArrowAssoc
Annotations
@inline()
def ->[B](y: B): (ArrayCharSequence, B)
Implicit
This member is added by an implicit conversion from ArrayCharSequence to ArrowAssoc[ArrayCharSequence] performed by method ArrowAssoc in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: ArrowAssoc[ArrayCharSequence]).->(y)
Definition Classes
ArrowAssoc
Annotations
@inline()
def ensuring(cond: (ArrayCharSequence) ⇒ Boolean, msg: ⇒ Any): ArrayCharSequence
Implicit
This member is added by an implicit conversion from ArrayCharSequence to Ensuring[ArrayCharSequence] performed by method Ensuring in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: Ensuring[ArrayCharSequence]).ensuring(cond, msg)
Definition Classes
Ensuring
def ensuring(cond: (ArrayCharSequence) ⇒ Boolean): ArrayCharSequence
Implicit
This member is added by an implicit conversion from ArrayCharSequence to Ensuring[ArrayCharSequence] performed by method Ensuring in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: Ensuring[ArrayCharSequence]).ensuring(cond)
Definition Classes
Ensuring
def ensuring(cond: Boolean, msg: ⇒ Any): ArrayCharSequence
Implicit
This member is added by an implicit conversion from ArrayCharSequence to Ensuring[ArrayCharSequence] performed by method Ensuring in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: Ensuring[ArrayCharSequence]).ensuring(cond, msg)
Definition Classes
Ensuring
def ensuring(cond: Boolean): ArrayCharSequence
Implicit
This member is added by an implicit conversion from ArrayCharSequence to Ensuring[ArrayCharSequence] performed by method Ensuring in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: Ensuring[ArrayCharSequence]).ensuring(cond)
Definition Classes
Ensuring
def ensuring(cond: (ArrayCharSequence) ⇒ Boolean, msg: ⇒ Any): ArrayCharSequence
Implicit
This member is added by an implicit conversion from ArrayCharSequence to Ensuring[ArrayCharSequence] performed by method Ensuring in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: Ensuring[ArrayCharSequence]).ensuring(cond, msg)
Definition Classes
Ensuring
def ensuring(cond: (ArrayCharSequence) ⇒ Boolean): ArrayCharSequence
Implicit
This member is added by an implicit conversion from ArrayCharSequence to Ensuring[ArrayCharSequence] performed by method Ensuring in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: Ensuring[ArrayCharSequence]).ensuring(cond)
Definition Classes
Ensuring
def ensuring(cond: Boolean, msg: ⇒ Any): ArrayCharSequence
Implicit
This member is added by an implicit conversion from ArrayCharSequence to Ensuring[ArrayCharSequence] performed by method Ensuring in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: Ensuring[ArrayCharSequence]).ensuring(cond, msg)
Definition Classes
Ensuring
def ensuring(cond: Boolean): ArrayCharSequence
Implicit
This member is added by an implicit conversion from ArrayCharSequence to Ensuring[ArrayCharSequence] performed by method Ensuring in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: Ensuring[ArrayCharSequence]).ensuring(cond)
Definition Classes
Ensuring
def formatted(fmtstr: String): String
Returns string formatted according to given format string. Format strings are as for String.format (@see java.lang.String.format).
Implicit
This member is added by an implicit conversion from ArrayCharSequence to StringFormat[ArrayCharSequence] performed by method StringFormat in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: StringFormat[ArrayCharSequence]).formatted(fmtstr)
Definition Classes
StringFormat
Annotations
@inline()
def formatted(fmtstr: String): String
Returns string formatted according to given format string. Format strings are as for String.format (@see java.lang.String.format).
Implicit
This member is added by an implicit conversion from ArrayCharSequence to StringFormat[ArrayCharSequence] performed by method StringFormat in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: StringFormat[ArrayCharSequence]).formatted(fmtstr)
Definition Classes
StringFormat
Annotations
@inline()
def →[B](y: B): (ArrayCharSequence, B)
Implicit
This member is added by an implicit conversion from ArrayCharSequence to ArrowAssoc[ArrayCharSequence] performed by method ArrowAssoc in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: ArrowAssoc[ArrayCharSequence]).→(y)
Definition Classes
ArrowAssoc
def →[B](y: B): (ArrayCharSequence, B)
Implicit
This member is added by an implicit conversion from ArrayCharSequence to ArrowAssoc[ArrayCharSequence] performed by method ArrowAssoc in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:(arrayCharSequence: ArrowAssoc[ArrayCharSequence]).→(y)
Definition Classes
ArrowAssoc
|
fortios_firewall_proxy_address – Web proxy address configuration in Fortinet’s FortiOS and FortiGate New in version 2.8. Synopsis Requirements Parameters Notes Examples Return Values Status Synopsis This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify firewall feature and proxy_address category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.5 Requirements The below requirements are needed on the host that executes this module. fortiosapi>=0.9.8 Parameters Parameter Choices/Defaults Comments firewall_proxy_address dictionary Default:null Web proxy address configuration. case_sensitivity string
Choices: disable enable Enable to make the pattern case sensitive. category list FortiGuard category ID. id integer / required Fortiguard category id. color integer Integer value to determine the color of the icon in the GUI (1 - 32). comment string Optional comments. header string HTTP header name as a regular expression. header_group list HTTP header group. case_sensitivity string
Choices: disable enable Case sensitivity in pattern. header string HTTP header regular expression. header_name string HTTP header. id integer / required ID. header_name string Name of HTTP header. host string Address object for the host. Source firewall.address.name firewall.addrgrp.name firewall.proxy-address.name. host_regex string Host name as a regular expression. method string
Choices: get post put head connect trace options delete HTTP request methods to be used. name string / required Address name. path string URL path as a regular expression. query string Match the query part of the URL as a regular expression. referrer string
Choices: enable disable Enable/disable use of referrer field in the HTTP header to match the address. state string
Choices: present absent Deprecated Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. Indicates whether to create or remove the object. tagging list Config object tagging. category string Tag category. Source system.object-tagging.category. name string / required Tagging entry name. tags list Tags. name string / required Tag name. Source system.object-tagging.tags.name. type string
Choices: host-regex url category method ua header src-advanced dst-advanced Proxy address type. ua string
Choices: chrome ms firefox safari other Names of browsers to be used as user agent. uuid string Universally Unique Identifier (UUID; automatically assigned but can be manually reset). visibility string
Choices: enable disable Enable/disable visibility of the object in the GUI. host string FortiOS or FortiGate IP address. https boolean
Choices: no
yes ← Indicates if the requests towards FortiGate must use HTTPS protocol. password string Default:"" FortiOS or FortiGate password. ssl_verify boolean added in 2.9
Choices: no
yes ← Ensures FortiGate certificate must be verified by a proper CA. state string added in 2.9
Choices: present absent Indicates whether to create or remove the object. This attribute was present already in previous version in a deeper level. It has been moved out to this outer level. username string FortiOS or FortiGate username. vdom string Default:"root" Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. Notes Note Requires fortiosapi library developed by Fortinet Run as a local_action in your playbook Examples - hosts: localhost
vars:
host: "657.837.7661"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: Web proxy address configuration.
fortios_firewall_proxy_address:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
https: "False"
state: "present"
firewall_proxy_address:
case_sensitivity: "disable"
category:
-
id: "5"
color: "6"
comment: "Optional comments."
header: "<your_own_value>"
header_group:
-
case_sensitivity: "disable"
header: "<your_own_value>"
header_name: "<your_own_value>"
id: "13"
header_name: "<your_own_value>"
host: "myhostname (source firewall.address.name firewall.addrgrp.name firewall.proxy-address.name)"
host_regex: "myhostname"
method: "get"
name: "default_name_18"
path: "<your_own_value>"
query: "<your_own_value>"
referrer: "enable"
tagging:
-
category: "<your_own_value> (source system.object-tagging.category)"
name: "default_name_24"
tags:
-
name: "default_name_26 (source system.object-tagging.tags.name)"
type: "host-regex"
ua: "chrome"
uuid: "<your_own_value>"
visibility: "enable"
Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description build string always Build number of the fortigate image Sample: 1547 http_method string always Last method used to provision the content into FortiGate Sample: PUT http_status string always Last result given by FortiGate on last operation applied Sample: 200 mkey string success Master key (id) used in the last call to FortiGate Sample: id name string always Name of the table used to fulfill the request Sample: urlfilter path string always Path of the table used to fulfill the request Sample: webfilter revision string always Internal revision number Sample: 30.252-79-47198 serial string always Serial number of the unit Sample: FGVMEVYYQT3AB5352 status string always Indication of the operation's result Sample: success vdom string always Virtual domain used Sample: root version string always Version of the FortiGate Sample: v5.6.3 Status This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors Miguel Angel Munoz (@mamunozgonzalez) Nicolas Thomas (@thomnico) Hint If you notice any issues in this documentation, you can edit this document to improve it.
© 2012–2018 Michael DeHaan |
WP_REST_Templates_Controller8b7c:f320:99b9:690f:4595:cd17:293a:c069prepare_item_for_database( WP_REST_Request $request ): stdClass Prepares a single template for create or update. Parameters $request WP_REST_Request Required Request object. Return stdClass Changes to pass to wp_update_post. Source File: wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php. View all references protected function prepare_item_for_database( $request ) {
$template = $request['id'] ? get_block_template( $request['id'], $this->post_type ) : null;
$changes = new stdClass();
if ( null === $template ) {
$changes->post_type = $this->post_type;
$changes->post_status = 'publish';
$changes->tax_input = array(
'wp_theme' => isset( $request['theme'] ) ? $request['theme'] : wp_get_theme()->get_stylesheet(),
);
} elseif ( 'custom' !== $template->source ) {
$changes->post_name = $template->slug;
$changes->post_type = $this->post_type;
$changes->post_status = 'publish';
$changes->tax_input = array(
'wp_theme' => $template->theme,
);
$changes->meta_input = array(
'origin' => $template->source,
);
} else {
$changes->post_name = $template->slug;
$changes->ID = $template->wp_id;
$changes->post_status = 'publish';
}
if ( isset( $request['content'] ) ) {
if ( is_string( $request['content'] ) ) {
$changes->post_content = $request['content'];
} elseif ( isset( $request['content']['raw'] ) ) {
$changes->post_content = $request['content']['raw'];
}
} elseif ( null !== $template && 'custom' !== $template->source ) {
$changes->post_content = $template->content;
}
if ( isset( $request['title'] ) ) {
if ( is_string( $request['title'] ) ) {
$changes->post_title = $request['title'];
} elseif ( ! empty( $request['title']['raw'] ) ) {
$changes->post_title = $request['title']['raw'];
}
} elseif ( null !== $template && 'custom' !== $template->source ) {
$changes->post_title = $template->title;
}
if ( isset( $request['description'] ) ) {
$changes->post_excerpt = $request['description'];
} elseif ( null !== $template && 'custom' !== $template->source ) {
$changes->post_excerpt = $template->description;
}
if ( 'wp_template' === $this->post_type && isset( $request['is_wp_suggestion'] ) ) {
$changes->meta_input = wp_parse_args(
array(
'is_wp_suggestion' => $request['is_wp_suggestion'],
),
$changes->meta_input = array()
);
}
if ( 'wp_template_part' === $this->post_type ) {
if ( isset( $request['area'] ) ) {
$changes->tax_input['wp_template_part_area'] = _filter_block_template_part_area( $request['area'] );
} elseif ( null !== $template && 'custom' !== $template->source && $template->area ) {
$changes->tax_input['wp_template_part_area'] = _filter_block_template_part_area( $template->area );
} elseif ( ! $template->area ) {
$changes->tax_input['wp_template_part_area'] = WP_TEMPLATE_PART_AREA_UNCATEGORIZED;
}
}
if ( ! empty( $request['author'] ) ) {
$post_author = (int) $request['author'];
if ( get_current_user_id() !== $post_author ) {
$user_obj = get_userdata( $post_author );
if ( ! $user_obj ) {
return new WP_Error(
'rest_invalid_author',
__( 'Invalid author ID.' ),
array( 'status' => 400 )
);
}
}
$changes->post_author = $post_author;
}
return $changes;
}
Related Uses Uses Description _filter_block_template_part_area() wp-includes/block-template-utils.php Checks whether the input ‘area’ is a supported value. get_block_template() wp-includes/block-template-utils.php Retrieves a single unified template object using its id. WP_Them8b7c:f320:99b9:690f:4595:cd17:293a:c069get_stylesheet() wp-includes/class-wp-theme.php Returns the directory name of the theme’s “stylesheet” files, inside the theme root. wp_get_theme() wp-includes/theme.php Gets a WP_Theme object for a theme. __() wp-includes/l10n.php Retrieves the translation of $text. get_userdata() wp-includes/pluggable.php Retrieves user info by user ID. wp_parse_args() wp-includes/functions.php Merges user defined arguments into defaults array. get_current_user_id() wp-includes/user.php Gets the current user’s ID. WP_Error8b7c:f320:99b9:690f:4595:cd17:293a:c069__construct() wp-includes/class-wp-error.php Initializes the error.
Used By Used By Description WP_REST_Templates_Controller8b7c:f320:99b9:690f:4595:cd17:293a:c069update_item() wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php Updates a single template. WP_REST_Templates_Controller8b7c:f320:99b9:690f:4595:cd17:293a:c069reate_item() wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php Creates a single template.
Changelog Version Description 5.8.0 Introduced.
|
netapp_e_storagepool – NetApp E-Series manage disk groups and disk pools New in version 2.2. Synopsis Parameters Notes Examples Return Values Status Synopsis Create or remove disk groups and disk pools for NetApp E-series storage arrays. Parameters Parameter Choices/Defaults Comments api_password - / required The password to authenticate with the SANtricity Web Services Proxy or Embedded Web Services API. api_url - / required The url to the SANtricity Web Services Proxy or Embedded Web Services API. api_username - / required The username to authenticate with the SANtricity Web Services Proxy or Embedded Web Services API. criteria_drive_count - The number of disks to use for building the storage pool. The pool will be expanded if this number exceeds the number of disks already in place criteria_drive_interface_type -
Choices: sas sas4k fibre fibre520b scsi sata pata The interface type to use when selecting drives for the storage pool (no value means all interface types will be considered) criteria_drive_min_size - The minimum individual drive size (in size_unit) to consider when choosing drives for the storage pool. criteria_drive_require_fde - Whether full disk encryption ability is required for drives to be added to the storage pool criteria_drive_type -
Choices: hdd ssd The type of disk (hdd or ssd) to use when searching for candidates to use. criteria_min_usable_capacity - The minimum size of the storage pool (in size_unit). The pool will be expanded if this value exceeds itscurrent size. criteria_size_unit -
Choices: bytes b kb mb
gb ← tb pb eb zb yb The unit used to interpret size parameters erase_secured_drives boolean
Choices: no yes Whether to erase secured disks before adding to storage pool name - / required The name of the storage pool to manage raid_level - / required
Choices: raidAll raid0 raid1 raid3 raid5 raid6 raidDiskPool Only required when the requested state is 'present'. The RAID level of the storage pool to be created. remove_volumes - Default:"no" Prior to removing a storage pool, delete all volumes in the pool. reserve_drive_count - Set the number of drives reserved by the storage pool for reconstruction operations. Only valide on raid disk pools. secure_pool boolean
Choices: no yes Whether to convert to a secure storage pool. Will only work if all drives in the pool are security capable. ssid - / required The ID of the array to manage. This value must be unique for each array. state - / required
Choices: present absent Whether the specified storage pool should exist or not. Note that removing a storage pool currently requires the removal of all defined volumes first. validate_certs boolean
Choices: no
yes ← Should https certificates be validated? Notes Note The E-Series Ansible modules require either an instance of the Web Services Proxy (WSP), to be available to manage the storage-system, or an E-Series storage-system that supports the Embedded Web Services API. Embedded Web Services is currently available on the E2800, E5700, EF570, and newer hardware models.
netapp_e_storage_system may be utilized for configuring the systems managed by a WSP instance. Examples - name: No disk groups
netapp_e_storagepool:
ssid: "{{ ssid }}"
name: "{{ item }}"
state: absent
api_url: "{{ netapp_api_url }}"
api_username: "{{ netapp_api_username }}"
api_password: "{{ netapp_api_password }}"
validate_certs: "{{ netapp_api_validate_certs }}"
Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description msg string success Success message Sample: Json facts for the pool that was created. Status This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors Kevin Hulquest (@hulquest) Hint If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan |
aws_service_discovery_private_dns_namespace Provides a Service Discovery Private DNS Namespace resource. Example Usage resource "aws_vpc" "example" {
cidr_block = "(820)882-3394/16"
}
resource "aws_service_discovery_private_dns_namespace" "example" {
name = "hoge.example.local"
description = "example"
vpc = "${aws_vpc.example.id}"
}
Argument Reference The following arguments are supported:
name - (Required) The name of the namespace.
vpc - (Required) The ID of VPC that you want to associate the namespace with.
description - (Optional) The description that you specify for the namespace when you create it. Attributes Reference In addition to all arguments above, the following attributes are exported:
id - The ID of a namespace.
arn - The ARN that Amazon Route 53 assigns to the namespace when you create it.
hosted_zone - The ID for the hosted zone that Amazon Route 53 creates when you create a namespace.
|
publish function deprecated operator
Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called before it begins emitting items to those Observers that have subscribed to it. Deprecation Notes Will be removed in v8. Use the connectable observable, the connect operator or the share operator instead. See the overloads below for equivalent replacement examples of this operator's behaviors. Details: https://rxjs.dev/deprecations/multicasting publish<T, R>(selector?: OperatorFunction<T, R>): MonoTypeOperatorFunction<T> | OperatorFunction<T, R> Parameters selector OperatorFunction<T, R> Optional. Default is undefined. Optional selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all notifications of the source from the time of the subscription on. Returns MonoTypeOperatorFunction<T> | OperatorFunction<T, R>: A function that returns a ConnectableObservable that upon connection causes the source Observable to emit items to its Observers. Description Makes a cold Observable hot Examples Make source$ hot by applying publish operator, then merge each inner observable into a single one and subscribe import { zip, interval, of, map, publish, merge, tap } from 'rxjs';
const source$ = zip(interval(2000), of(1, 2, 3, 4, 5, 6, 7, 8, 9))
.pipe(map(([, number]) => number));
source$
.pipe(
publish(multicasted$ =>
merge(
multicasted$.pipe(tap(x => console.log('Stream 1:', x))),
multicasted$.pipe(tap(x => console.log('Stream 2:', x))),
multicasted$.pipe(tap(x => console.log('Stream 3:', x)))
)
)
)
.subscribe();
// Results every two seconds
// Stream 1: 1
// Stream 2: 1
// Stream 3: 1
// ...
// Stream 1: 9
// Stream 2: 9
// Stream 3: 9 See Also
publishLast
publishReplay
publishBehavior
|
Module Initialization Code Begin your module by including the header file emacs-module.h and defining the GPL compatibility symbol: #include <emacs-module.h>
int plugin_is_GPL_compatible;
The emacs-module.h file is installed into your system’s include tree as part of the Emacs installation. Alternatively, you can find it in the Emacs source tree. Next, write an initialization function for the module. Function: int emacs_module_init (struct emacs_runtime *runtime)
Emacs calls this function when it loads a module. If a module does not export a function named emacs_module_init, trying to load the module will signal an error. The initialization function should return zero if the initialization succeeds, non-zero otherwise. In the latter case, Emacs will signal an error, and the loading of the module will fail. If the user presses C-g during the initialization, Emacs ignores the return value of the initialization function and quits (see Quitting). (If needed, you can catch user quitting inside the initialization function, see should_quit.) The argument runtime is a pointer to a C struct that includes 2 public fields: size, which provides the size of the structure in bytes; and get_environment, which provides a pointer to a function that allows the module initialization function access to the Emacs environment object and its interfaces. The initialization function should perform whatever initialization is required for the module. In addition, it can perform the following tasks: Compatibility verification
A module can verify that the Emacs executable which loads the module is compatible with the module, by comparing the size member of the runtime structure with the value compiled into the module: int
emacs_module_init (struct emacs_runtime *runtime)
{
if (runtime->size < sizeof (*runtime))
return 1;
}
If the size of the runtime object passed to the module is smaller than what it expects, it means the module was compiled for an Emacs version newer (later) than the one which attempts to load it, i.e. the module might be incompatible with the Emacs binary. In addition, a module can verify the compatibility of the module API with what the module expects. The following sample code assumes it is part of the emacs_module_init function shown above: emacs_env *env = runtime->get_environment (runtime);
if (env->size < sizeof (*env))
return 2;
This calls the get_environment function using the pointer provided in the runtime structure to retrieve a pointer to the API’s environment, a C struct which also has a size field holding the size of the structure in bytes. Finally, you can write a module that will work with older versions of Emacs, by comparing the size of the environment passed by Emacs with known sizes, like this: emacs_env *env = runtime->get_environment (runtime);
if (env->size >= sizeof (struct emacs_env_26))
emacs_version = 26; /* Emacs 26 or later. */
else if (env->size >= sizeof (struct emacs_env_25))
emacs_version = 25;
else
return 2; /* Unknown or unsupported version. */
This works because later Emacs versions always add members to the environment, never remove any members, so the size can only grow with new Emacs releases. Given the version of Emacs, the module can use only the parts of the module API that existed in that version, since those parts are identical in later versions. emacs-module.h defines a preprocessor macro EMACS_MAJOR_VERSION. It expands to an integer literal which is the latest major version of Emacs supported by the header. See Version Info. Note that the value of EMACS_MAJOR_VERSION is a compile-time constant and does not represent the version of Emacs that is currently running and has loaded your module. If you want your module to be compatible with various versions of emacs-module.h as well as various versions of Emacs, you can use conditional compilation based on EMACS_MAJOR_VERSION. We recommend that modules always perform the compatibility verification, unless they do their job entirely in the initialization function, and don’t access any Lisp objects or use any Emacs functions accessible through the environment structure. Binding module functions to Lisp symbols This gives the module functions names so that Lisp code could call it by that name. We describe how to do this in Module Functions below.
Copyright |
header_remove (PHP 5 >= 5.3.0, PHP 7, PHP 8)
header_remove — Remove previously set headers Description header_remove(?string $name = null): void Removes an HTTP header previously set using header(). Parameters
name
The header name to be removed. When null, all previously set headers are removed. Note: This parameter is case-insensitive. Return Values No value is returned. Changelog Version Description 8.0.0 name is nullable now. Examples
Example #1 Unsetting specific header. <?php
header("X-Foo: Bar");
header("X-Bar: Baz");
header_remove("X-Foo");
?> The above example will output something similar to:
X-Bar: Baz
Example #2 Unsetting all previously set headers. <?php
header("X-Foo: Bar");
header("X-Bar: Baz");
header_remove();
?> The above example will output something similar to: Notes
Caution This function will remove all headers set by PHP, including cookies, session and the X-Powered-By headers.
Note:
Headers will only be accessible and output when a SAPI that supports them is in use. See Also
header() - Send a raw HTTP header headers_sent() - Checks if or where headers have been sent
|
tf.compat.v1.GraphOptions A ProtocolMessage
Attributes
build_cost_model int64 build_cost_model
build_cost_model_after int64 build_cost_model_after
enable_bfloat16_sendrecv bool enable_bfloat16_sendrecv
enable_recv_scheduling bool enable_recv_scheduling
infer_shapes bool infer_shapes
optimizer_options OptimizerOptions optimizer_options
place_pruned_graph bool place_pruned_graph
rewrite_options RewriterConfig rewrite_options
timeline_step int32 timeline_step
|
fortinet.fortimanager.fmgr_system_mail – Alert emails. Note This plugin is part of the fortinet.fortimanager collection (version 2.0.1). To install it use: ansible-galaxy collection install fortinet.fortimanager. To use it in a playbook, specify: fortinet.fortimanager.fmgr_system_mail. New in version 2.10: of fortinet.fortimanager Synopsis Parameters Notes Examples Return Values Synopsis This module is able to configure a FortiManager device. Examples include all parameters and values which need to be adjusted to data sources before usage. Parameters Parameter Choices/Defaults Comments bypass_validation boolean
Choices:
no ← yes only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters rc_failed list / elements=string the rc codes list with which the conditions to fail will be overriden rc_succeeded list / elements=string the rc codes list with which the conditions to succeed will be overriden state string / required
Choices: present absent the directive to create, update or delete an object system_mail dictionary the top level parameters set auth string
Choices:
disable ← enable Enable authentication. disable - Disable authentication. enable - Enable authentication. id string Mail Service ID. passwd string no description port integer Default:25 SMTP server port. secure-option string
Choices:
default ← none smtps starttls Communication secure option. default - Try STARTTLS, proceed as plain text communication otherwise. none - Communication will be in plain text format. smtps - Communication will be protected by SMTPS. starttls - Communication will be protected by STARTTLS. server string SMTP server. user string SMTP account username. workspace_locking_adom string the adom to lock for FortiManager running in workspace mode, the value can be global and others including root workspace_locking_timeout integer Default:300 the maximum time in seconds to wait for other user to release the workspace lock Notes Note Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work. To create or update an object, use state present directive. To delete an object, use state absent directive. Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded Examples - hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Alert emails.
fmgr_system_mail:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
state: <value in [present, absent]>
system_mail:
auth: <value in [disable, enable]>
id: <value of string>
passwd: <value of string>
port: <value of integer>
secure-option: <value in [default, none, smtps, ...]>
server: <value of string>
user: <value of string>
Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description request_url string always The full url requested Sample: /sys/login/user response_code integer always The status of api request response_message string always The descriptive message of the api response Sample: OK. Authors Link Zheng (@chillancezen) Jie Xue (@JieX19) Frank Shen (@fshen01) Hongbin Lu (@fgtdev-hblu)
© 2012–2018 Michael DeHaan |
awx.awx.tower – Ansible dynamic inventory plugin for Ansible Tower. Note This plugin is part of the awx.awx collection (version 14.1.0). To install it use: ansible-galaxy collection install awx.awx. To use it in a playbook, specify: awx.awx.tower. Synopsis Parameters Notes Examples Synopsis Reads inventories from Ansible Tower. Supports reading configuration from both YAML config file and environment variables. If reading from the YAML file, the file name must end with tower.(yml|yaml) or tower_inventory.(yml|yaml), the path in the command would be /path/to/tower_inventory.(yml|yaml). If some arguments in the config file are missing, this plugin will try to fill in missing arguments by reading from environment variables. If reading configurations from environment variables, the path in the command must be @tower_inventory. Parameters Parameter Choices/Defaults Configuration Comments host string env:TOWER_HOST The network address of your Ansible Tower host. include_metadata boolean
Choices:
no ← yes Make extra requests to provide all group vars with metadata about the source Ansible Tower host. inventory_id raw / required env:TOWER_INVENTORY The ID of the Ansible Tower inventory that you wish to import. This is allowed to be either the inventory primary key or its named URL slug. Primary key values will be accepted as strings or integers, and URL slugs must be strings. Named URL slugs follow the syntax of "inventory_name++organization_name". oauth_token string env:TOWER_OAUTH_TOKEN The Tower OAuth token to use. password string env:TOWER_PASSWORD The password for your Ansible Tower user. username string env:TOWER_USERNAME The user that you plan to use to access inventories on Ansible Tower. verify_ssl boolean
Choices: no yes env:TOWER_VERIFY_SSL Specify whether Ansible should verify the SSL certificate of Ansible Tower host. Defaults to True, but this is handled by the shared module_utils code
aliases: validate_certs Notes Note If no config_file is provided we will attempt to use the tower-cli library defaults to find your Tower host information.
config_file should contain Tower configuration in the following format host=hostname username=username password=password Examples # Before you execute the following commands, you should make sure this file is in your plugin path,
# and you enabled this plugin.
# Example for using tower_inventory.yml file
plugin: awx.awx.tower
host: your_ansible_tower_server_network_address
username: your_ansible_tower_username
password: your_ansible_tower_password
inventory_id: the_ID_of_targeted_ansible_tower_inventory
# Then you can run the following command.
# If some of the arguments are missing, Ansible will attempt to read them from environment variables.
# ansible-inventory -i /path/to/tower_inventory.yml --list
# Example for reading from environment variables:
# Set environment variables:
# export TOWER_HOST=YOUR_TOWER_HOST_ADDRESS
# export TOWER_USERNAME=YOUR_TOWER_USERNAME
# export TOWER_PASSWORD=YOUR_TOWER_PASSWORD
# export TOWER_INVENTORY=THE_ID_OF_TARGETED_INVENTORY
# Read the inventory specified in TOWER_INVENTORY from Ansible Tower, and list them.
# The inventory path must always be @tower_inventory if you are reading all settings from environment variables.
# ansible-inventory -i @tower_inventory --list
Authors Matthew Jones (@matburt) Yunfan Zhang (@YunfanZhang42)
© 2012–2018 Michael DeHaan |
Class Phalcon\Mvc\Model\Validator\Email
extends abstract class Phalcon\Mvc\Model\Validator implements Phalcon\Mvc\Model\ValidatorInterface Allows to validate if email fields has correct values use Phalcon\Mvc\Model\Validator\Email as EmailValidator;
class Subscriptors extends Phalcon\Mvc\Model
{
public function validation()
{
$this->validate(new EmailValidator(array(
'field' => 'electronic_mail'
)));
if ($this->validationHasFailed() == true) {
return false;
}
}
}
Methods public boolean validate (Phalcon\Mvc\ModelInterface $record) Executes the validator public __construct (array $options) inherited from Phalcon\Mvc\Model\Validator
Phalcon\Mvc\Model\Validator constructor protected appendMessage () inherited from Phalcon\Mvc\Model\Validator
Appends a message to the validator public array getMessages () inherited from Phalcon\Mvc\Model\Validator
Returns messages generated by the validator public array getOptions () inherited from Phalcon\Mvc\Model\Validator
Returns all the options from the validator public mixed getOption () inherited from Phalcon\Mvc\Model\Validator
Returns an option public boolean isSetOption () inherited from Phalcon\Mvc\Model\Validator
Check whether a option has been defined in the validator options
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.