text
stringlengths
0
13M
torch.vander torch.vander(x, N=None, increasing=False) → Tensor Generates a Vandermonde matrix. The columns of the output matrix are elementwise powers of the input vector x(N−1),x(N−2),...,x0x^{(N-1)}, x^{(N-2)}, ..., x^0 . If increasing is True, the order of the columns is reversed x0,x1,...,x(N−1)x^0, x^1, ..., x^{(N-1)} . Such a matrix with a geometric progression in each row is named for Alexandre-Theophile Vandermonde. Parameters x (Tensor) – 1-D input tensor. N (int, optional) – Number of columns in the output. If N is not specified, a square array is returned (N=len(x))(N = len(x)) . increasing (bool, optional) – Order of the powers of the columns. If True, the powers increase from left to right, if False (the default) they are reversed. Returns Vandermonde matrix. If increasing is False, the first column is x(N−1)x^{(N-1)} , the second x(N−2)x^{(N-2)} and so forth. If increasing is True, the columns are x0,x1,...,x(N−1)x^0, x^1, ..., x^{(N-1)} . Return type Tensor Example: >>> x = torch.tensor([1, 2, 3, 5]) >>> torch.vander(x) tensor([[ 1, 1, 1, 1], [ 8, 4, 2, 1], [ 27, 9, 3, 1], [125, 25, 5, 1]]) >>> torch.vander(x, N=3) tensor([[ 1, 1, 1], [ 4, 2, 1], [ 9, 3, 1], [25, 5, 1]]) >>> torch.vander(x, N=3, increasing=True) tensor([[ 1, 1, 1], [ 1, 2, 4], [ 1, 3, 9], [ 1, 5, 25]])
class NameError Parent: Object Public Instance Methods missing_name() Show source # File activesupport/lib/active_support/core_ext/name_error.rb, line 12 def missing_name # Since ruby v2.3.0 `did_you_mean` gem is loaded by default. # It extends NameError#message with spell corrections which are SLOW. # We should use original_message message instead. message = respond_to?(:original_message) ? original_message : self.message if /undefined local variable or method/ !~ message $1 if /((8b7c:f320:99b9:690f:4595:cd17:293a:c069)?([A-Z]\w*)(8b7c:f320:99b9:690f:4595:cd17:293a:c069[A-Z]\w*)*)$/ =~ message end end Extract the name of the missing constant from the exception message. begin HelloWorld rescue NameError => e e.missing_name end # => "HelloWorld" missing_name?(name) Show source # File activesupport/lib/active_support/core_ext/name_error.rb, line 31 def missing_name?(name) if name.is_a? Symbol self.name == name else missing_name == name.to_s end end Was this exception raised because the given name was missing? begin HelloWorld rescue NameError => e e.missing_name?("HelloWorld") end # => true
public function Schem8b7c:f320:99b9:690f:4595:cd17:293a:c069addIndex public Schem8b7c:f320:99b9:690f:4595:cd17:293a:c069addIndex($table, $name, $fields, array $spec) Add an index. @todo remove the $spec argument whenever schema introspection is added. Parameters $table: The table to be altered. $name: The name of the index. $fields: An array of field names or field information; if field information is passed, it's an array whose first element is the field name and whose second is the maximum length in the index. For example, the following will use the full length of the `foo` field, but limit the `bar` field to 4 characters: $fields = ['foo', ['bar', 4]]; array $spec: The table specification for the table to be altered. This is used in order to be able to ensure that the index length is not too long. This schema definition can usually be obtained through hook_schema(), or in case the table was created by the Entity API, through the schema handler listed in the entity class definition. For reference, see SqlContentEntityStorageSchem8b7c:f320:99b9:690f:4595:cd17:293a:c069getDedicatedTableSchema() and SqlContentEntityStorageSchem8b7c:f320:99b9:690f:4595:cd17:293a:c069getSharedTableFieldSchema(). In order to prevent human error, it is recommended to pass in the complete table specification. However, in the edge case of the complete table specification not being available, we can pass in a partial table definition containing only the fields that apply to the index: $spec = [ // Example partial specification for a table: 'fields' => [ 'example_field' => [ 'description' => 'An example field', 'type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => '', ], ], 'indexes' => [ 'table_example_field' => ['example_field'], ], ]; Note that the above is a partial table definition and that we would usually pass a complete table definition as obtained through hook_schema() instead. Throws \Drupal\Core\Database\SchemaObjectDoesNotExistException If the specified table doesn't exist. \Drupal\Core\Database\SchemaObjectExistsException If the specified table already has an index by that name. Overrides Schem8b7c:f320:99b9:690f:4595:cd17:293a:c069addIndex See also Schema API hook_schema() File core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php, line 590 Class Schema SQLite implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\sqlite Code public function addIndex($table, $name, $fields, array $spec) { if (!$this->tableExists($table)) { throw new SchemaObjectDoesNotExistException(t("Cannot add index @name to table @table: table doesn't exist.", array('@table' => $table, '@name' => $name))); } if ($this->indexExists($table, $name)) { throw new SchemaObjectExistsException(t("Cannot add index @name to table @table: index already exists.", array('@table' => $table, '@name' => $name))); } $schema['indexes'][$name] = $fields; $statements = $this->createIndexSql($table, $schema); foreach ($statements as $statement) { $this->connection->query($statement); } }
dart:html preMultiplySelf method @DomName('DOMMatrix.preMultiplySelf') @DocsEditable() @Experimental() DomMatrix preMultiplySelf(DomMatrix other) Source @DomName('DOMMatrix.preMultiplySelf') @DocsEditable() @Experimental() // untriaged DomMatrix preMultiplySelf(DomMatrix other) => _blink.BlinkDOMMatrix.instance.preMultiplySelf_Callback_1_(this, other);
public function ThemeHandlerInter8b7c:f320:99b9:690f:4595:cd17:293a:c069addTheme public ThemeHandlerInter8b7c:f320:99b9:690f:4595:cd17:293a:c069addTheme(Extension $theme) Adds a theme extension to the internal listing. Parameters \Drupal\Core\Extension\Extension $theme: The theme extension. File core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php, line 102 Class ThemeHandlerInterface Manages the list of available themes. Namespace Drupal\Core\Extension Code public function addTheme(Extension $theme);
dart:web_audio setValueCurveAtTime method @DomName('AudioParam.setValueCurveAtTime') @DocsEditable() AudioParam setValueCurveAtTime(Float32List values, num time, num duration) Source @DomName('AudioParam.setValueCurveAtTime') @DocsEditable() AudioParam setValueCurveAtTime(Float32List values, num time, num duration) => _blink.BlinkAudioParam.instance .setValueCurveAtTime_Callback_3_(this, values, time, duration);
dart:convert startChunkedConversion method StringConversionSink startChunkedConversion( Sink<String> sink ) Implementation StringConversionSink startChunkedConversion(Sink<String> sink) { return _LineSplitterSink( sink is StringConversionSink ? sink : StringConversionSink.from(sink)); }
Puppet and MariaDB See the Puppet and MariaDB category. Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.
PendingBroadcast class PendingBroadcast (View source) Properties protected Dispatcher $events The event dispatcher implementation. protected mixed $event The event instance. Methods void __construct(Dispatcher $events, mixed $event) Create a new pending broadcast instance. $this toOthers() Broadcast the event to everyone except the current user. void __destruct() Handle the object's destruction. Details void __construct(Dispatcher $events, mixed $event) Create a new pending broadcast instance. Parameters Dispatcher $events mixed $event Return Value void $this toOthers() Broadcast the event to everyone except the current user. Return Value $this void __destruct() Handle the object's destruction. Return Value void
Comparison of CSS Selectors and XPath XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes This article seeks to document the difference between CSS Selectors and XPath for web developers to be able to better choose the right tool for the right job. XPath feature CSS equivalent ancestor, parent or preceding-sibling axis :has() selector Experimental attribute axis Attribute selectors child axis Child combinator descendant axis Descendant combinator following-sibling axis General sibling combinator or adjacent sibling combinator self axis :scope or :host selector
SVGPointList.replaceItem() The replaceItem() method of the SVGPointList interface replaces a point in the list. Syntax replaceItem(obj, index) Parameters obj An point object containing the coordinates of the point to be inserted. index The index of the item to replace. Return value The new SVGPoint object. Exceptions NoModificationAllowedError DOMException Thrown if the list is read-only. IndexSizeError DOMException Thrown if the index passed in is greater than the number of items in the list. Examples The following example shows an SVG which contains a <polyline> with five coordinate pairs. A new SVGPoint is created, then replaces the point at index 1 (the second item in the list). <svg id="svg" viewBox="-10 -10 120 120" xmlns="http://www.w3.org/2000/svg"> <polyline id="example" stroke="black" fill="none" points="50,0 21,90 98,35 2,35 79,90"/> let example = document.getElementById("example"); let svgpoint = document.getElementById("svg").createSVGPoint(); svgpoint.y = 10; svgpoint.x = 10; console.log(example.points.replaceItem(svgpoint,1)); Specifications Specification Scalable Vector Graphics (SVG) 1.1 (Second Edition) # __svg__SVGNameList__replaceItem 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 replaceItem 1 12 1.5 9 ≤12.1 3 3 18 4 ≤12.1 1 1.0 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 21, 2022, by MDN contributors
Interface Adjustable All Known Implementing Classes: JScrollBar, JScrollPane.ScrollBar, Scrollbar, ScrollPaneAdjustable public interface Adjustable The interface for objects which have an adjustable numeric value contained within a bounded range of values. Field Summary Modifier and Type Field Description static final int HORIZONTAL Indicates that the Adjustable has horizontal orientation. static final int NO_ORIENTATION Indicates that the Adjustable has no orientation. static final int VERTICAL Indicates that the Adjustable has vertical orientation. Method Summary Modifier and Type Method Description void addAdjustmentListener(AdjustmentListener l) Adds a listener to receive adjustment events when the value of the adjustable object changes. int getBlockIncrement() Gets the block value increment for the adjustable object. int getMaximum() Gets the maximum value of the adjustable object. int getMinimum() Gets the minimum value of the adjustable object. int getOrientation() Gets the orientation of the adjustable object. int getUnitIncrement() Gets the unit value increment for the adjustable object. int getValue() Gets the current value of the adjustable object. int getVisibleAmount() Gets the length of the proportional indicator. void removeAdjustmentListener(AdjustmentListener l) Removes an adjustment listener. void setBlockIncrement(int b) Sets the block value increment for the adjustable object. void setMaximum(int max) Sets the maximum value of the adjustable object. void setMinimum(int min) Sets the minimum value of the adjustable object. void setUnitIncrement(int u) Sets the unit value increment for the adjustable object. void setValue(int v) Sets the current value of the adjustable object. void setVisibleAmount(int v) Sets the length of the proportional indicator of the adjustable object. Field Details HORIZONTAL @Native static final int HORIZONTAL Indicates that the Adjustable has horizontal orientation. See Also: Constant Field Values VERTICAL @Native static final int VERTICAL Indicates that the Adjustable has vertical orientation. See Also: Constant Field Values NO_ORIENTATION @Native static final int NO_ORIENTATION Indicates that the Adjustable has no orientation. See Also: Constant Field Values Method Details getOrientation int getOrientation() Gets the orientation of the adjustable object. Returns: the orientation of the adjustable object; either HORIZONTAL, VERTICAL, or NO_ORIENTATION setMinimum void setMinimum(int min) Sets the minimum value of the adjustable object. Parameters: min - the minimum value getMinimum int getMinimum() Gets the minimum value of the adjustable object. Returns: the minimum value of the adjustable object setMaximum void setMaximum(int max) Sets the maximum value of the adjustable object. Parameters: max - the maximum value getMaximum int getMaximum() Gets the maximum value of the adjustable object. Returns: the maximum value of the adjustable object setUnitIncrement void setUnitIncrement(int u) Sets the unit value increment for the adjustable object. Parameters: u - the unit increment getUnitIncrement int getUnitIncrement() Gets the unit value increment for the adjustable object. Returns: the unit value increment for the adjustable object setBlockIncrement void setBlockIncrement(int b) Sets the block value increment for the adjustable object. Parameters: b - the block increment getBlockIncrement int getBlockIncrement() Gets the block value increment for the adjustable object. Returns: the block value increment for the adjustable object setVisibleAmount void setVisibleAmount(int v) Sets the length of the proportional indicator of the adjustable object. Parameters: v - the length of the indicator getVisibleAmount int getVisibleAmount() Gets the length of the proportional indicator. Returns: the length of the proportional indicator setValue void setValue(int v) Sets the current value of the adjustable object. If the value supplied is less than minimum or greater than maximum - visibleAmount, then one of those values is substituted, as appropriate. Calling this method does not fire an AdjustmentEvent. Parameters: v - the current value, between minimum and maximum - visibleAmount getValue int getValue() Gets the current value of the adjustable object. Returns: the current value of the adjustable object addAdjustmentListener void addAdjustmentListener(AdjustmentListener l) Adds a listener to receive adjustment events when the value of the adjustable object changes. Parameters: l - the listener to receive events See Also: AdjustmentEvent removeAdjustmentListener void removeAdjustmentListener(AdjustmentListener l) Removes an adjustment listener. Parameters: l - the listener being removed See Also: AdjustmentEvent
RTCPeerConnection.addTransceiver() The RTCPeerConnection method addTransceiver() creates a new RTCRtpTransceiver and adds it to the set of transceivers associated with the RTCPeerConnection. Each transceiver represents a bidirectional stream, with both an RTCRtpSender and an RTCRtpReceiver associated with it. Syntax addTransceiver(trackOrKind) addTransceiver(trackOrKind, init) Parameters trackOrKind A MediaStreamTrack to associate with the transceiver, or a string which is used as the kind of the receiver's track, and by extension of the RTCRtpReceiver itself. init Optional An object for specifying any options when creating the new transceiver. Possible values are: direction Optional The new transceiver's preferred directionality. This value is used to initialize the new RTCRtpTransceiver object's RTCRtpTransceiver.direction property. sendEncodings Optional A list of encodings to allow when sending RTP media from the RTCRtpSender. Each entry is of type RTCRtpEncodingParameters. streams Optional A list of MediaStream objects to add to the transceiver's RTCRtpReceiver; when the remote peer's RTCPeerConnection's track event occurs, these are the streams that will be specified by that event. Exceptions TypeError A string was specified as trackOrKind which is not valid. The string must be either "audio" or "video". Specifications Specification WebRTC 1.0: Real-Time Communication Between Browsers # dom-rtcpeerconnection-addtransceiver 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 addTransceiver 69 79 59 No No 11 69 69 59 No 11 10.0 init_direction_parameter 69 79 59 No No 11 69 69 59 No 11 10.0 init_sendEncodings_parameter 69 79 No sendEncodings is not yet implemented in Firefox. See bug 1396918. No No 14.1 69 69 No sendEncodings is not yet implemented in Firefox. See bug 1396918. No 14.5 10.0 init_streams_parameter 69 79 59 No No 12.1 69 69 59 No 12.2 10.0 See also WebRTC API Introduction to the Real-time Transport Protocol (RTP) RTCPeerConnection.addTrack() also creates transceivers RTCRtpReceiver and RTCRtpSender 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 20, 2022, by MDN contributors
public function ThemeHandlerInter8b7c:f320:99b9:690f:4595:cd17:293a:c069hasUi public ThemeHandlerInter8b7c:f320:99b9:690f:4595:cd17:293a:c069hasUi($name) Determines if a theme should be shown in the user interface. To be shown in the UI the theme has to be installed. If the theme is hidden it will not be shown unless it is the default or admin theme. Parameters string $name: The name of the theme to check. Return value bool TRUE if the theme should be shown in the UI, FALSE if not. File core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php, line 218 Class ThemeHandlerInterface Manages the list of available themes. Namespace Drupal\Core\Extension Code public function hasUi($name);
tf.compat.v1.layers.SeparableConv1D Depthwise separable 1D convolution. Inherits From: SeparableConv1D, Layer, Layer, Module tf.compat.v1.layers.SeparableConv1D( filters, kernel_size, strides=1, padding='valid', data_format='channels_last', dilation_rate=1, depth_multiplier=1, activation=None, use_bias=True, depthwise_initializer=None, pointwise_initializer=None, bias_initializer=tf.zeros_initializer(), depthwise_regularizer=None, pointwise_regularizer=None, bias_regularizer=None, activity_regularizer=None, depthwise_constraint=None, pointwise_constraint=None, bias_constraint=None, trainable=True, name=None, **kwargs ) This layer performs a depthwise convolution that acts separately on channels, followed by a pointwise convolution that mixes channels. If use_bias is True and a bias initializer is provided, it adds a bias vector to the output. It then optionally applies an activation function to produce the final output. Arguments filters Integer, the dimensionality of the output space (i.e. the number of filters in the convolution). kernel_size A single integer specifying the spatial dimensions of the filters. strides A single integer specifying the strides of the convolution. Specifying any stride value != 1 is incompatible with specifying any dilation_rate value != 1. padding One of "valid" or "same" (case-insensitive). "valid" means no padding. "same" results in padding evenly to the left/right or up/down of the input such that output has the same height/width dimension as the input. data_format A string, one of channels_last (default) or channels_first. The ordering of the dimensions in the inputs. channels_last corresponds to inputs with shape (batch, length, channels) while channels_first corresponds to inputs with shape (batch, channels, length). dilation_rate A single integer, specifying the dilation rate to use for dilated convolution. Currently, specifying any dilation_rate value != 1 is incompatible with specifying any stride value != 1. depth_multiplier The number of depthwise convolution output channels for each input channel. The total number of depthwise convolution output channels will be equal to num_filters_in * depth_multiplier. activation Activation function. Set it to None to maintain a linear activation. use_bias Boolean, whether the layer uses a bias. depthwise_initializer An initializer for the depthwise convolution kernel. pointwise_initializer An initializer for the pointwise convolution kernel. bias_initializer An initializer for the bias vector. If None, the default initializer will be used. depthwise_regularizer Optional regularizer for the depthwise convolution kernel. pointwise_regularizer Optional regularizer for the pointwise convolution kernel. bias_regularizer Optional regularizer for the bias vector. activity_regularizer Optional regularizer function for the output. depthwise_constraint Optional projection function to be applied to the depthwise kernel after being updated by an Optimizer (e.g. used for norm constraints or value constraints for layer weights). The function must take as input the unprojected variable and must return the projected variable (which must have the same shape). Constraints are not safe to use when doing asynchronous distributed training. pointwise_constraint Optional projection function to be applied to the pointwise kernel after being updated by an Optimizer. bias_constraint Optional projection function to be applied to the bias after being updated by an Optimizer. trainable Boolean, if True also add variables to the graph collection GraphKeys.TRAINABLE_VARIABLES (see tf.Variable). name A string, the name of the layer. Attributes graph scope_name
ManagesComponents trait ManagesComponents (View source) Properties protected array $componentStack The components being rendered. protected array $componentData The original data passed to the component. protected array $slots The slot contents for the component. protected array $slotStack The names of the slots being rendered. Methods void startComponent(string $name, array $data = []) Start a component rendering process. void startComponentFirst(array $names, array $data = []) Get the first view that actually exists from the given list, and start a component. string renderComponent() Render the current component. array componentData(string $name) Get the data for the given component. void slot(string $name, string|null $content = null) Start the slot rendering process. void endSlot() Save the slot content for rendering. int currentComponent() Get the index for the current component. Details void startComponent(string $name, array $data = []) Start a component rendering process. Parameters string $name array $data Return Value void void startComponentFirst(array $names, array $data = []) Get the first view that actually exists from the given list, and start a component. Parameters array $names array $data Return Value void string renderComponent() Render the current component. Return Value string protected array componentData(string $name) Get the data for the given component. Parameters string $name Return Value array void slot(string $name, string|null $content = null) Start the slot rendering process. Parameters string $name string|null $content Return Value void void endSlot() Save the slot content for rendering. Return Value void protected int currentComponent() Get the index for the current component. Return Value int
function _openid_encode_message _openid_encode_message($message) Encode a message from _openid_create_message for HTTP Post File modules/openid/openid.inc, line 349 OpenID utility functions. Code function _openid_encode_message($message) { $encoded_message = ''; $items = explode("\n", $message); foreach ($items as $item) { $parts = explode(':', $item, 2); if (count($parts) == 2) { if ($encoded_message != '') { $encoded_message .= '&'; } $encoded_message .= rawurlencode(trim($parts[0])) . '=' . rawurlencode(trim($parts[1])); } } return $encoded_message; }
Class _DynEnumStub java.lang.Object org.omg.CORBA.portable.ObjectImpl org.omg.DynamicAny._DynEnumStub All Implemented Interfaces: Serializable, Object, IDLEntity, DynAny, DynAnyOperations, DynEnum, DynEnumOperations public class _DynEnumStub extends ObjectImpl implements DynEnum DynEnum objects support the manipulation of IDL enumerated values. The current position of a DynEnum is always -1. Fields Modifier and Type Field and Description static Class _opsClass Constructors Constructor and Description _DynEnumStub() Methods Modifier and Type Method and Description String[] _ids() Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. void assign(DynAny dyn_any) Initializes the value associated with a DynAny object with the value associated with another DynAny object. int component_count() Returns the number of components of a DynAny. DynAny copy() Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. DynAny current_component() Returns the DynAny for the component at the current position. void destroy() Destroys a DynAny object. boolean equal(DynAny dyn_any) Compares two DynAny values for equality. void from_any(Any value) Initializes the value associated with a DynAny object with the value contained in an any. Any get_any() Extracts an Any value contained in the Any represented by this DynAny. String get_as_string() Returns the value of the DynEnum as an IDL identifier. int get_as_ulong() Returns the value of the DynEnum as the enumerated value's ordinal value. boolean get_boolean() Extracts the boolean value from this DynAny. char get_char() Extracts the char value from this DynAny. double get_double() Extracts the double value from this DynAny. DynAny get_dyn_any() Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny. float get_float() Extracts the float value from this DynAny. int get_long() Extracts the integer value from this DynAny. long get_longlong() Extracts the long value from this DynAny. byte get_octet() Extracts the byte value from this DynAny. Object get_reference() Extracts the reference to a CORBA Object from this DynAny. short get_short() Extracts the short value from this DynAny. String get_string() Extracts the string value from this DynAny. TypeCode get_typecode() Extracts the TypeCode object from this DynAny. int get_ulong() Extracts the integer value from this DynAny. long get_ulonglong() Extracts the long value from this DynAny. short get_ushort() Extracts the short value from this DynAny. Serializable get_val() Extracts a Serializable object from this DynAny. char get_wchar() Extracts the long value from this DynAny. String get_wstring() Extracts the string value from this DynAny. void insert_any(Any value) Inserts an Any value into the Any represented by this DynAny. void insert_boolean(boolean value) Inserts a boolean value into the DynAny. void insert_char(char value) Inserts a char value into the DynAny. void insert_double(double value) Inserts a double value into the DynAny. void insert_dyn_any(DynAny value) Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny. void insert_float(float value) Inserts a float value into the DynAny. void insert_long(int value) Inserts an integer value into the DynAny. void insert_longlong(long value) Inserts a long value into the DynAny. void insert_octet(byte value) Inserts a byte value into the DynAny. void insert_reference(Object value) Inserts a reference to a CORBA object into the DynAny. void insert_short(short value) Inserts a short value into the DynAny. void insert_string(String value) Inserts a string value into the DynAny. void insert_typecode(TypeCode value) Inserts a TypeCode object into the DynAny. void insert_ulong(int value) Inserts an integer value into the DynAny. void insert_ulonglong(long value) Inserts a long value into the DynAny. void insert_ushort(short value) Inserts a short value into the DynAny. void insert_val(Serializable value) Inserts a reference to a Serializable object into this DynAny. void insert_wchar(char value) Inserts a char value into the DynAny. void insert_wstring(String value) Inserts a string value into the DynAny. boolean next() Advances the current position to the next component. void rewind() Is equivalent to seek(0). boolean seek(int index) Sets the current position to index. void set_as_string(String value) Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter. void set_as_ulong(int value) Sets the value of the DynEnum as the enumerated value's ordinal value. Any to_any() Creates an any value from a DynAny object. TypeCode type() Returns the TypeCode associated with this DynAny object. Methods inherited from class org.omg.CORBA.portable.ObjectImpl _create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString Methods inherited from class java.lang.Object clone, finalize, getClass, notify, notifyAll, wait, wait, wait Methods inherited from interface org.omg.CORBA.Object _create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override Fields _opsClass public static final Class _opsClass Constructors _DynEnumStub public _DynEnumStub() Methods get_as_string public String get_as_string() Returns the value of the DynEnum as an IDL identifier. Specified by: get_as_string in interface DynEnumOperations set_as_string public void set_as_string(String value) throws InvalidValue Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter. Specified by: set_as_string in interface DynEnumOperations Throws: InvalidValue - If value contains a string that is not a valid IDL identifier for the corresponding enumerated type get_as_ulong public int get_as_ulong() Returns the value of the DynEnum as the enumerated value's ordinal value. Enumerators have ordinal values 0 to n-1, as they appear from left to right in the corresponding IDL definition. Specified by: get_as_ulong in interface DynEnumOperations set_as_ulong public void set_as_ulong(int value) throws InvalidValue Sets the value of the DynEnum as the enumerated value's ordinal value. Specified by: set_as_ulong in interface DynEnumOperations Throws: InvalidValue - If value contains a value that is outside the range of ordinal values for the corresponding enumerated type type public TypeCode type() Returns the TypeCode associated with this DynAny object. A DynAny object is created with a TypeCode value assigned to it. This TypeCode value determines the type of the value handled through the DynAny object. Note that the TypeCode associated with a DynAny object is initialized at the time the DynAny is created and cannot be changed during lifetime of the DynAny object. Specified by: type in interface DynAnyOperations Returns: The TypeCode associated with this DynAny object assign public void assign(DynAny dyn_any) throws TypeMismatch Initializes the value associated with a DynAny object with the value associated with another DynAny object. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components. Specified by: assign in interface DynAnyOperations Parameters: dyn_any - Throws: TypeMismatch - if the type of the passed DynAny is not equivalent to the type of target DynAny from_any public void from_any(Any value) throws TypeMismatch, InvalidValue Initializes the value associated with a DynAny object with the value contained in an any. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components. Specified by: from_any in interface DynAnyOperations Throws: TypeMismatch - if the type of the passed Any is not equivalent to the type of target DynAny InvalidValue - if the passed Any does not contain a legal value (such as a null string) to_any public Any to_any() Creates an any value from a DynAny object. A copy of the TypeCode associated with the DynAny object is assigned to the resulting any. The value associated with the DynAny object is copied into the any. Specified by: to_any in interface DynAnyOperations Returns: a new Any object with the same value and TypeCode equal public boolean equal(DynAny dyn_any) Compares two DynAny values for equality. Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys have equal values. The current position of the two DynAnys being compared has no effect on the result of equal. Specified by: equal in interface DynAnyOperations Returns: true of the DynAnys are equal, false otherwise destroy public void destroy() Destroys a DynAny object. This operation frees any resources used to represent the data value associated with a DynAny object. It must be invoked on references obtained from one of the creation operations on the ORB interface or on a reference returned by DynAny.copy() to avoid resource leaks. Invoking destroy on component DynAny objects (for example, on objects returned by the current_component operation) does nothing. Destruction of a DynAny object implies destruction of all DynAny objects obtained from it. That is, references to components of a destroyed DynAny become invalid. Invocations on such references raise OBJECT_NOT_EXIST. It is possible to manipulate a component of a DynAny beyond the life time of the DynAny from which the component was obtained by making a copy of the component with the copy operation before destroying the DynAny from which the component was obtained. Specified by: destroy in interface DynAnyOperations copy public DynAny copy() Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. The operation is polymorphic, that is, invoking it on one of the types derived from DynAny, such as DynStruct, creates the derived type but returns its reference as the DynAny base type. Specified by: copy in interface DynAnyOperations Returns: a deep copy of the DynAny object insert_boolean public void insert_boolean(boolean value) throws TypeMismatch, InvalidValue Inserts a boolean value into the DynAny. Specified by: insert_boolean in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_octet public void insert_octet(byte value) throws TypeMismatch, InvalidValue Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type. Specified by: insert_octet in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_char public void insert_char(char value) throws TypeMismatch, InvalidValue Inserts a char value into the DynAny. Specified by: insert_char in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_short public void insert_short(short value) throws TypeMismatch, InvalidValue Inserts a short value into the DynAny. Specified by: insert_short in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_ushort public void insert_ushort(short value) throws TypeMismatch, InvalidValue Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type. Specified by: insert_ushort in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_long public void insert_long(int value) throws TypeMismatch, InvalidValue Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type. Specified by: insert_long in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_ulong public void insert_ulong(int value) throws TypeMismatch, InvalidValue Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type. Specified by: insert_ulong in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_float public void insert_float(float value) throws TypeMismatch, InvalidValue Inserts a float value into the DynAny. Specified by: insert_float in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_double public void insert_double(double value) throws TypeMismatch, InvalidValue Inserts a double value into the DynAny. Specified by: insert_double in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_string public void insert_string(String value) throws TypeMismatch, InvalidValue Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method. Specified by: insert_string in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 InvalidValue - if the string inserted is longer than the bound of a bounded string TypeMismatch - if called on a DynAny whose current component itself has components insert_reference public void insert_reference(Object value) throws TypeMismatch, InvalidValue Inserts a reference to a CORBA object into the DynAny. Specified by: insert_reference in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_typecode public void insert_typecode(TypeCode value) throws TypeMismatch, InvalidValue Inserts a TypeCode object into the DynAny. Specified by: insert_typecode in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_longlong public void insert_longlong(long value) throws TypeMismatch, InvalidValue Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type. Specified by: insert_longlong in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_ulonglong public void insert_ulonglong(long value) throws TypeMismatch, InvalidValue Inserts a long value into the DynAny. The IDL unsigned long long data type is mapped to the Java long data type. Specified by: insert_ulonglong in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_wchar public void insert_wchar(char value) throws TypeMismatch, InvalidValue Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type. Specified by: insert_wchar in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_wstring public void insert_wstring(String value) throws TypeMismatch, InvalidValue Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method. Specified by: insert_wstring in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 InvalidValue - if the string inserted is longer than the bound of a bounded string TypeMismatch insert_any public void insert_any(Any value) throws TypeMismatch, InvalidValue Inserts an Any value into the Any represented by this DynAny. Specified by: insert_any in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_dyn_any public void insert_dyn_any(DynAny value) throws TypeMismatch, InvalidValue Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny. Specified by: insert_dyn_any in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components insert_val public void insert_val(Serializable value) throws TypeMismatch, InvalidValue Inserts a reference to a Serializable object into this DynAny. The IDL ValueBase type is mapped to the Java Serializable type. Specified by: insert_val in interface DynAnyOperations Throws: InvalidValue - if this DynAny has components but has a current position of -1 TypeMismatch - if called on a DynAny whose current component itself has components get_boolean public boolean get_boolean() throws TypeMismatch, InvalidValue Extracts the boolean value from this DynAny. Specified by: get_boolean in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_octet public byte get_octet() throws TypeMismatch, InvalidValue Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type. Specified by: get_octet in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_char public char get_char() throws TypeMismatch, InvalidValue Extracts the char value from this DynAny. Specified by: get_char in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_short public short get_short() throws TypeMismatch, InvalidValue Extracts the short value from this DynAny. Specified by: get_short in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_ushort public short get_ushort() throws TypeMismatch, InvalidValue Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type. Specified by: get_ushort in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_long public int get_long() throws TypeMismatch, InvalidValue Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type. Specified by: get_long in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_ulong public int get_ulong() throws TypeMismatch, InvalidValue Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type. Specified by: get_ulong in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_float public float get_float() throws TypeMismatch, InvalidValue Extracts the float value from this DynAny. Specified by: get_float in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_double public double get_double() throws TypeMismatch, InvalidValue Extracts the double value from this DynAny. Specified by: get_double in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_string public String get_string() throws TypeMismatch, InvalidValue Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method. Specified by: get_string in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_reference public Object get_reference() throws TypeMismatch, InvalidValue Extracts the reference to a CORBA Object from this DynAny. Specified by: get_reference in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_typecode public TypeCode get_typecode() throws TypeMismatch, InvalidValue Extracts the TypeCode object from this DynAny. Specified by: get_typecode in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_longlong public long get_longlong() throws TypeMismatch, InvalidValue Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type. Specified by: get_longlong in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_ulonglong public long get_ulonglong() throws TypeMismatch, InvalidValue Extracts the long value from this DynAny. The IDL unsigned long long data type is mapped to the Java long data type. Specified by: get_ulonglong in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_wchar public char get_wchar() throws TypeMismatch, InvalidValue Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type. Specified by: get_wchar in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_wstring public String get_wstring() throws TypeMismatch, InvalidValue Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method. Specified by: get_wstring in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue get_any public Any get_any() throws TypeMismatch, InvalidValue Extracts an Any value contained in the Any represented by this DynAny. Specified by: get_any in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_dyn_any public DynAny get_dyn_any() throws TypeMismatch, InvalidValue Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny. Specified by: get_dyn_any in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 get_val public Serializable get_val() throws TypeMismatch, InvalidValue Extracts a Serializable object from this DynAny. The IDL ValueBase type is mapped to the Java Serializable type. Specified by: get_val in interface DynAnyOperations Throws: TypeMismatch - if the accessed component in the DynAny is of a type that is not equivalent to the requested type. TypeMismatch - if called on a DynAny whose current component itself has components InvalidValue - if this DynAny has components but has a current position of -1 seek public boolean seek(int index) Sets the current position to index. The current position is indexed 0 to n-1, that is, index zero corresponds to the first component. The operation returns true if the resulting current position indicates a component of the DynAny and false if index indicates a position that does not correspond to a component. Calling seek with a negative index is legal. It sets the current position to -1 to indicate no component and returns false. Passing a non-negative index value for a DynAny that does not have a component at the corresponding position sets the current position to -1 and returns false. Specified by: seek in interface DynAnyOperations rewind public void rewind() Is equivalent to seek(0). Specified by: rewind in interface DynAnyOperations next public boolean next() Advances the current position to the next component. The operation returns true while the resulting current position indicates a component, false otherwise. A false return value leaves the current position at -1. Invoking next on a DynAny without components leaves the current position at -1 and returns false. Specified by: next in interface DynAnyOperations component_count public int component_count() Returns the number of components of a DynAny. For a DynAny without components, it returns zero. The operation only counts the components at the top level. For example, if component_count is invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of the member. For sequences, the operation returns the current number of elements. For structures, exceptions, and value types, the operation returns the number of members. For arrays, the operation returns the number of elements. For unions, the operation returns 2 if the discriminator indicates that a named member is active, otherwise, it returns 1. For DynFixed and DynEnum, the operation returns zero. Specified by: component_count in interface DynAnyOperations current_component public DynAny current_component() throws TypeMismatch Returns the DynAny for the component at the current position. It does not advance the current position, so repeated calls to current_component without an intervening call to rewind, next, or seek return the same component. The returned DynAny object reference can be used to get/set the value of the current component. If the current component represents a complex type, the returned reference can be narrowed based on the TypeCode to get the interface corresponding to the to the complex type. Calling current_component on a DynAny that cannot have components, such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a DynAny whose current position is -1 returns a nil reference. The iteration operations, together with current_component, can be used to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, current_component and next can be used to initialize all the components of the value. Once the dynamic value is completely initialized, to_any creates the corresponding any value. Specified by: current_component in interface DynAnyOperations Throws: TypeMismatch - If called on a DynAny that cannot have components, such as a DynEnum or an empty exception _ids public String[] _ids() Description copied from class: ObjectImpl Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub. Specified by: _ids in class ObjectImpl Returns: the array of all repository identifiers supported by this ObjectImpl instance
git-rev-list Name git-rev-list - Lists commit objects in reverse chronological order Synopsis git rev-list [<options>] <commit>…​ [[--] <path>…​] Description List commits that are reachable by following the parent links from the given commit(s), but exclude commits that are reachable from the one(s) given with a ^ in front of them. The output is given in reverse chronological order by default. You can think of this as a set operation. Commits reachable from any of the commits given on the command line form a set, and then commits reachable from any of the ones given with ^ in front are subtracted from that set. The remaining commits are what comes out in the command’s output. Various other options and paths parameters can be used to further limit the result. Thus, the following command: $ git rev-list foo bar ^baz means "list all the commits which are reachable from foo or bar, but not from baz". A special notation "<commit1>..<commit2>" can be used as a short-hand for "^<commit1> <commit2>". For example, either of the following may be used interchangeably: $ git rev-list origin..HEAD $ git rev-list HEAD ^origin Another special notation is "<commit1>…​<commit2>" which is useful for merges. The resulting set of commits is the symmetric difference between the two operands. The following two commands are equivalent: $ git rev-list A B --not $(git merge-base --all A B) $ git rev-list A...B rev-list is a very essential Git command, since it provides the ability to build and traverse commit ancestry graphs. For this reason, it has a lot of different options that enables it to be used by commands as different as git bisect and git repack. Options Commit Limiting Besides specifying a range of commits that should be listed using the special notations explained in the description, additional commit limiting may be applied. Using more options generally further limits the output (e.g. --since=<date1> limits to commits newer than <date1>, and using it with --grep=<pattern> further limits to commits whose log message has a line that matches <pattern>), unless otherwise noted. Note that these are applied before commit ordering and formatting options, such as --reverse. -<number> -n <number> --max-count=<number> Limit the number of commits to output. --skip=<number> Skip number commits before starting to show the commit output. --since=<date> --after=<date> Show commits more recent than a specific date. --since-as-filter=<date> Show all commits more recent than a specific date. This visits all commits in the range, rather than stopping at the first commit which is older than a specific date. --until=<date> --before=<date> Show commits older than a specific date. --max-age=<timestamp> --min-age=<timestamp> Limit the commits output to specified time range. --author=<pattern> --committer=<pattern> Limit the commits output to ones with author/committer header lines that match the specified pattern (regular expression). With more than one --author=<pattern>, commits whose author matches any of the given patterns are chosen (similarly for multiple --committer=<pattern>). --grep-reflog=<pattern> Limit the commits output to ones with reflog entries that match the specified pattern (regular expression). With more than one --grep-reflog, commits whose reflog message matches any of the given patterns are chosen. It is an error to use this option unless --walk-reflogs is in use. --grep=<pattern> Limit the commits output to ones with log message that matches the specified pattern (regular expression). With more than one --grep=<pattern>, commits whose message matches any of the given patterns are chosen (but see --all-match). --all-match Limit the commits output to ones that match all given --grep, instead of ones that match at least one. --invert-grep Limit the commits output to ones with log message that do not match the pattern specified with --grep=<pattern>. -i --regexp-ignore-case Match the regular expression limiting patterns without regard to letter case. --basic-regexp Consider the limiting patterns to be basic regular expressions; this is the default. -E --extended-regexp Consider the limiting patterns to be extended regular expressions instead of the default basic regular expressions. -F --fixed-strings Consider the limiting patterns to be fixed strings (don’t interpret pattern as a regular expression). -P --perl-regexp Consider the limiting patterns to be Perl-compatible regular expressions. Support for these types of regular expressions is an optional compile-time dependency. If Git wasn’t compiled with support for them providing this option will cause it to die. --remove-empty Stop when a given path disappears from the tree. --merges Print only merge commits. This is exactly the same as --min-parents=2. --no-merges Do not print commits with more than one parent. This is exactly the same as --max-parents=1. --min-parents=<number> --max-parents=<number> --no-min-parents --no-max-parents Show only commits which have at least (or at most) that many parent commits. In particular, --max-parents=1 is the same as --no-merges, --min-parents=2 is the same as --merges. --max-parents=0 gives all root commits and --min-parents=3 all octopus merges. --no-min-parents and --no-max-parents reset these limits (to no limit) again. Equivalent forms are --min-parents=0 (any commit has 0 or more parents) and --max-parents=-1 (negative numbers denote no upper limit). --first-parent When finding commits to include, follow only the first parent commit upon seeing a merge commit. This option can give a better overview when viewing the evolution of a particular topic branch, because merges into a topic branch tend to be only about adjusting to updated upstream from time to time, and this option allows you to ignore the individual commits brought in to your history by such a merge. --exclude-first-parent-only When finding commits to exclude (with a ^), follow only the first parent commit upon seeing a merge commit. This can be used to find the set of changes in a topic branch from the point where it diverged from the remote branch, given that arbitrary merges can be valid topic branch changes. --not Reverses the meaning of the ^ prefix (or lack thereof) for all following revision specifiers, up to the next --not. --all Pretend as if all the refs in refs/, along with HEAD, are listed on the command line as <commit>. --branches[=<pattern>] Pretend as if all the refs in refs/heads are listed on the command line as <commit>. If <pattern> is given, limit branches to ones matching given shell glob. If pattern lacks ?, *, or [, /* at the end is implied. --tags[=<pattern>] Pretend as if all the refs in refs/tags are listed on the command line as <commit>. If <pattern> is given, limit tags to ones matching given shell glob. If pattern lacks ?, *, or [, /* at the end is implied. --remotes[=<pattern>] Pretend as if all the refs in refs/remotes are listed on the command line as <commit>. If <pattern> is given, limit remote-tracking branches to ones matching given shell glob. If pattern lacks ?, *, or [, /* at the end is implied. --glob=<glob-pattern> Pretend as if all the refs matching shell glob <glob-pattern> are listed on the command line as <commit>. Leading refs/, is automatically prepended if missing. If pattern lacks ?, *, or [, /* at the end is implied. --exclude=<glob-pattern> Do not include refs matching <glob-pattern> that the next --all, --branches, --tags, --remotes, or --glob would otherwise consider. Repetitions of this option accumulate exclusion patterns up to the next --all, --branches, --tags, --remotes, or --glob option (other options or arguments do not clear accumulated patterns). The patterns given should not begin with refs/heads, refs/tags, or refs/remotes when applied to --branches, --tags, or --remotes, respectively, and they must begin with refs/ when applied to --glob or --all. If a trailing /* is intended, it must be given explicitly. --reflog Pretend as if all objects mentioned by reflogs are listed on the command line as <commit>. --alternate-refs Pretend as if all objects mentioned as ref tips of alternate repositories were listed on the command line. An alternate repository is any repository whose object directory is specified in objects/info/alternates. The set of included objects may be modified by core.alternateRefsCommand, etc. See git-config[1]. --single-worktree By default, all working trees will be examined by the following options when there are more than one (see git-worktree[1]): --all, --reflog and --indexed-objects. This option forces them to examine the current working tree only. --ignore-missing Upon seeing an invalid object name in the input, pretend as if the bad input was not given. --stdin In addition to the <commit> listed on the command line, read them from the standard input. If a -- separator is seen, stop reading commits and start reading paths to limit the result. --quiet Don’t print anything to standard output. This form is primarily meant to allow the caller to test the exit status to see if a range of objects is fully connected (or not). It is faster than redirecting stdout to /dev/null as the output does not have to be formatted. --disk-usage --disk-usage=human Suppress normal output; instead, print the sum of the bytes used for on-disk storage by the selected commits or objects. This is equivalent to piping the output into git cat-file --batch-check='%(objectsize:disk)', except that it runs much faster (especially with --use-bitmap-index). See the CAVEATS section in git-cat-file[1] for the limitations of what "on-disk storage" means. With the optional value human, on-disk storage size is shown in human-readable string(e.g. 12.24 Kib, 3.50 Mib). --cherry-mark Like --cherry-pick (see below) but mark equivalent commits with = rather than omitting them, and inequivalent ones with +. --cherry-pick Omit any commit that introduces the same change as another commit on the “other side” when the set of commits are limited with symmetric difference. For example, if you have two branches, A and B, a usual way to list all commits on only one side of them is with --left-right (see the example below in the description of the --left-right option). However, it shows the commits that were cherry-picked from the other branch (for example, “3rd on b” may be cherry-picked from branch A). With this option, such pairs of commits are excluded from the output. --left-only --right-only List only commits on the respective side of a symmetric difference, i.e. only those which would be marked < resp. > by --left-right. For example, --cherry-pick --right-only A...B omits those commits from B which are in A or are patch-equivalent to a commit in A. In other words, this lists the + commits from git cherry A B. More precisely, --cherry-pick --right-only --no-merges gives the exact list. --cherry A synonym for --right-only --cherry-mark --no-merges; useful to limit the output to the commits on our side and mark those that have been applied to the other side of a forked history with git log --cherry upstream...mybranch, similar to git cherry upstream mybranch. -g --walk-reflogs Instead of walking the commit ancestry chain, walk reflog entries from the most recent one to older ones. When this option is used you cannot specify commits to exclude (that is, ^commit, commit1..commit2, and commit1...commit2 notations cannot be used). With --pretty format other than oneline and reference (for obvious reasons), this causes the output to have two extra lines of information taken from the reflog. The reflog designator in the output may be shown as ref@{Nth} (where Nth is the reverse-chronological index in the reflog) or as ref@{timestamp} (with the timestamp for that entry), depending on a few rules: If the starting point is specified as ref@{Nth}, show the index format. If the starting point was specified as ref@{now}, show the timestamp format. If neither was used, but --date was given on the command line, show the timestamp in the format requested by --date. Otherwise, show the index format. Under --pretty=oneline, the commit message is prefixed with this information on the same line. This option cannot be combined with --reverse. See also git-reflog[1]. Under --pretty=reference, this information will not be [email protected]. --merge After a failed merge, show refs that touch files having a conflict and don’t exist on all heads to merge. --boundary Output excluded boundary commits. Boundary commits are prefixed with -. --use-bitmap-index Try to speed up the traversal using the pack bitmap index (if one is available). Note that when traversing with --objects, trees and blobs will not have their associated path printed. --progress=<header> Show progress reports on stderr as objects are considered. The <header> text will be printed with each progress update. History Simplification Sometimes you are only interested in parts of the history, for example the commits modifying a particular <path>. But there are two parts of History Simplification, one part is selecting the commits and the other is how to do it, as there are various strategies to simplify the history. The following options select the commits to be shown: <paths> Commits modifying the given <paths> are selected. --simplify-by-decoration Commits that are referred by some branch or tag are selected. Note that extra commits can be shown to give a meaningful history. The following options affect the way the simplification is performed: Default mode Simplifies the history to the simplest history explaining the final state of the tree. Simplest because it prunes some side branches if the end result is the same (i.e. merging branches with the same content) --show-pulls Include all commits from the default mode, but also any merge commits that are not TREESAME to the first parent but are TREESAME to a later parent. This mode is helpful for showing the merge commits that "first introduced" a change to a branch. --full-history Same as the default mode, but does not prune some history. --dense Only the selected commits are shown, plus some to have a meaningful history. --sparse All commits in the simplified history are shown. --simplify-merges Additional option to --full-history to remove some needless merges from the resulting history, as there are no selected commits contributing to this merge. --ancestry-path[=<commit>] When given a range of commits to display (e.g. commit1..commit2 or commit2 ^commit1), only display commits in that range that are ancestors of <commit>, descendants of <commit>, or <commit> itself. If no commit is specified, use commit1 (the excluded part of the range) as <commit>. Can be passed multiple times; if so, a commit is included if it is any of the commits given or if it is an ancestor or descendant of one of them. A more detailed explanation follows. Suppose you specified foo as the <paths>. We shall call commits that modify foo !TREESAME, and the rest TREESAME. (In a diff filtered for foo, they look different and equal, respectively.) In the following, we will always refer to the same example history to illustrate the differences between simplification settings. We assume that you are filtering for a file foo in this commit graph: .-A---M---N---O---P---Q / / / / / / I B C D E Y \ / / / / / `-------------' X The horizontal line of history A---Q is taken to be the first parent of each merge. The commits are: I is the initial commit, in which foo exists with contents “asdf”, and a file quux exists with contents “quux”. Initial commits are compared to an empty tree, so I is !TREESAME. In A, foo contains just “foo”. B contains the same change as A. Its merge M is trivial and hence TREESAME to all parents. C does not change foo, but its merge N changes it to “foobar”, so it is not TREESAME to any parent. D sets foo to “baz”. Its merge O combines the strings from N and D to “foobarbaz”; i.e., it is not TREESAME to any parent. E changes quux to “xyzzy”, and its merge P combines the strings to “quux xyzzy”. P is TREESAME to O, but not to E. X is an independent root commit that added a new file side, and Y modified it. Y is TREESAME to X. Its merge Q added side to P, and Q is TREESAME to P, but not to Y. rev-list walks backwards through history, including or excluding commits based on whether --full-history and/or parent rewriting (via --parents or --children) are used. The following settings are available. Default mode Commits are included if they are not TREESAME to any parent (though this can be changed, see --sparse below). If the commit was a merge, and it was TREESAME to one parent, follow only that parent. (Even if there are several TREESAME parents, follow only one of them.) Otherwise, follow all parents. This results in: .-A---N---O / / / I---------D Note how the rule to only follow the TREESAME parent, if one is available, removed B from consideration entirely. C was considered via N, but is TREESAME. Root commits are compared to an empty tree, so I is !TREESAME. Parent/child relations are only visible with --parents, but that does not affect the commits selected in default mode, so we have shown the parent lines. --full-history without parent rewriting This mode differs from the default in one point: always follow all parents of a merge, even if it is TREESAME to one of them. Even if more than one side of the merge has commits that are included, this does not imply that the merge itself is! In the example, we get I A B N D O P Q M was excluded because it is TREESAME to both parents. E, C and B were all walked, but only B was !TREESAME, so the others do not appear. Note that without parent rewriting, it is not really possible to talk about the parent/child relationships between the commits, so we show them disconnected. --full-history with parent rewriting Ordinary commits are only included if they are !TREESAME (though this can be changed, see --sparse below). Merges are always included. However, their parent list is rewritten: Along each parent, prune away commits that are not included themselves. This results in .-A---M---N---O---P---Q / / / / / I B / D / \ / / / / `-------------' Compare to --full-history without rewriting above. Note that E was pruned away because it is TREESAME, but the parent list of P was rewritten to contain E's parent I. The same happened for C and N, and X, Y and Q. In addition to the above settings, you can change whether TREESAME affects inclusion: --dense Commits that are walked are included if they are not TREESAME to any parent. --sparse All commits that are walked are included. Note that without --full-history, this still simplifies merges: if one of the parents is TREESAME, we follow only that one, so the other sides of the merge are never walked. --simplify-merges First, build a history graph in the same way that --full-history with parent rewriting does (see above). Then simplify each commit C to its replacement C' in the final history according to the following rules: Set C' to C. Replace each parent P of C' with its simplification P'. In the process, drop parents that are ancestors of other parents or that are root commits TREESAME to an empty tree, and remove duplicates, but take care to never drop all parents that we are TREESAME to. If after this parent rewriting, C' is a root or merge commit (has zero or >1 parents), a boundary commit, or !TREESAME, it remains. Otherwise, it is replaced with its only parent. The effect of this is best shown by way of comparing to --full-history with parent rewriting. The example turns into: .-A---M---N---O / / / I B D \ / / `---------' Note the major differences in N, P, and Q over --full-history: N's parent list had I removed, because it is an ancestor of the other parent M. Still, N remained because it is !TREESAME. P's parent list similarly had I removed. P was then removed completely, because it had one parent and is TREESAME. Q's parent list had Y simplified to X. X was then removed, because it was a TREESAME root. Q was then removed completely, because it had one parent and is TREESAME. There is another simplification mode available: --ancestry-path[=<commit>] Limit the displayed commits to those which are an ancestor of <commit>, or which are a descendant of <commit>, or are <commit> itself. As an example use case, consider the following commit history: D---E-------F / \ \ B---C---G---H---I---J / \ A-------K---------------L--M A regular D..M computes the set of commits that are ancestors of M, but excludes the ones that are ancestors of D. This is useful to see what happened to the history leading to M since D, in the sense that “what does M have that did not exist in D”. The result in this example would be all the commits, except A and B (and D itself, of course). When we want to find out what commits in M are contaminated with the bug introduced by D and need fixing, however, we might want to view only the subset of D..M that are actually descendants of D, i.e. excluding C and K. This is exactly what the --ancestry-path option does. Applied to the D..M range, it results in: E-------F \ \ G---H---I---J \ L--M We can also use --ancestry-path=D instead of --ancestry-path which means the same thing when applied to the D..M range but is just more explicit. If we instead are interested in a given topic within this range, and all commits affected by that topic, we may only want to view the subset of D..M which contain that topic in their ancestry path. So, using --ancestry-path=H D..M for example would result in: E \ G---H---I---J \ L--M Whereas --ancestry-path=K D..M would result in K---------------L--M Before discussing another option, --show-pulls, we need to create a new example history. A common problem users face when looking at simplified history is that a commit they know changed a file somehow does not appear in the file’s simplified history. Let’s demonstrate a new example and show how options such as --full-history and --simplify-merges works in that case: .-A---M-----C--N---O---P / / \ \ \/ / / I B \ R-'`-Z' / \ / \/ / \ / /\ / `---X--' `---Y--' For this example, suppose I created file.txt which was modified by A, B, and X in different ways. The single-parent commits C, Z, and Y do not change file.txt. The merge commit M was created by resolving the merge conflict to include both changes from A and B and hence is not TREESAME to either. The merge commit R, however, was created by ignoring the contents of file.txt at M and taking only the contents of file.txt at X. Hence, R is TREESAME to X but not M. Finally, the natural merge resolution to create N is to take the contents of file.txt at R, so N is TREESAME to R but not C. The merge commits O and P are TREESAME to their first parents, but not to their second parents, Z and Y respectively. When using the default mode, N and R both have a TREESAME parent, so those edges are walked and the others are ignored. The resulting history graph is: I---X When using --full-history, Git walks every edge. This will discover the commits A and B and the merge M, but also will reveal the merge commits O and P. With parent rewriting, the resulting graph is: .-A---M--------N---O---P / / \ \ \/ / / I B \ R-'`--' / \ / \/ / \ / /\ / `---X--' `------' Here, the merge commits O and P contribute extra noise, as they did not actually contribute a change to file.txt. They only merged a topic that was based on an older version of file.txt. This is a common issue in repositories using a workflow where many contributors work in parallel and merge their topic branches along a single trunk: many unrelated merges appear in the --full-history results. When using the --simplify-merges option, the commits O and P disappear from the results. This is because the rewritten second parents of O and P are reachable from their first parents. Those edges are removed and then the commits look like single-parent commits that are TREESAME to their parent. This also happens to the commit N, resulting in a history view as follows: .-A---M--. / / \ I B R \ / / \ / / `---X--' In this view, we see all of the important single-parent changes from A, B, and X. We also see the carefully-resolved merge M and the not-so-carefully-resolved merge R. This is usually enough information to determine why the commits A and B "disappeared" from history in the default view. However, there are a few issues with this approach. The first issue is performance. Unlike any previous option, the --simplify-merges option requires walking the entire commit history before returning a single result. This can make the option difficult to use for very large repositories. The second issue is one of auditing. When many contributors are working on the same repository, it is important which merge commits introduced a change into an important branch. The problematic merge R above is not likely to be the merge commit that was used to merge into an important branch. Instead, the merge N was used to merge R and X into the important branch. This commit may have information about why the change X came to override the changes from A and B in its commit message. --show-pulls In addition to the commits shown in the default history, show each merge commit that is not TREESAME to its first parent but is TREESAME to a later parent. When a merge commit is included by --show-pulls, the merge is treated as if it "pulled" the change from another branch. When using --show-pulls on this example (and no other options) the resulting graph is: I---X---R---N Here, the merge commits R and N are included because they pulled the commits X and R into the base branch, respectively. These merges are the reason the commits A and B do not appear in the default history. When --show-pulls is paired with --simplify-merges, the graph includes all of the necessary information: .-A---M--. N / / \ / I B R \ / / \ / / `---X--' Notice that since M is reachable from R, the edge from N to M was simplified away. However, N still appears in the history as an important commit because it "pulled" the change R into the main branch. The --simplify-by-decoration option allows you to view only the big picture of the topology of the history, by omitting commits that are not referenced by tags. Commits are marked as !TREESAME (in other words, kept after history simplification rules described above) if (1) they are referenced by tags, or (2) they change the contents of the paths given on the command line. All other commits are marked as TREESAME (subject to be simplified away). Bisection Helpers --bisect Limit output to the one commit object which is roughly halfway between included and excluded commits. Note that the bad bisection ref refs/bisect/bad is added to the included commits (if it exists) and the good bisection refs refs/bisect/good-* are added to the excluded commits (if they exist). Thus, supposing there are no refs in refs/bisect/, if $ git rev-list --bisect foo ^bar ^baz outputs midpoint, the output of the two commands $ git rev-list foo ^midpoint $ git rev-list midpoint ^bar ^baz would be of roughly the same length. Finding the change which introduces a regression is thus reduced to a binary search: repeatedly generate and test new 'midpoint’s until the commit chain is of length one. --bisect-vars This calculates the same as --bisect, except that refs in refs/bisect/ are not used, and except that this outputs text ready to be eval’ed by the shell. These lines will assign the name of the midpoint revision to the variable bisect_rev, and the expected number of commits to be tested after bisect_rev is tested to bisect_nr, the expected number of commits to be tested if bisect_rev turns out to be good to bisect_good, the expected number of commits to be tested if bisect_rev turns out to be bad to bisect_bad, and the number of commits we are bisecting right now to bisect_all. --bisect-all This outputs all the commit objects between the included and excluded commits, ordered by their distance to the included and excluded commits. Refs in refs/bisect/ are not used. The farthest from them is displayed first. (This is the only one displayed by --bisect.) This is useful because it makes it easy to choose a good commit to test when you want to avoid to test some of them for some reason (they may not compile for example). This option can be used along with --bisect-vars, in this case, after all the sorted commit objects, there will be the same text as if --bisect-vars had been used alone. Commit Ordering By default, the commits are shown in reverse chronological order. --date-order Show no parents before all of its children are shown, but otherwise show commits in the commit timestamp order. --author-date-order Show no parents before all of its children are shown, but otherwise show commits in the author timestamp order. --topo-order Show no parents before all of its children are shown, and avoid showing commits on multiple lines of history intermixed. For example, in a commit history like this: ---1----2----4----7 \ \ 3----5----6----8--- where the numbers denote the order of commit timestamps, git rev-list and friends with --date-order show the commits in the timestamp order: 8 7 6 5 4 3 2 1. With --topo-order, they would show 8 6 5 3 7 4 2 1 (or 8 7 4 2 6 5 3 1); some older commits are shown before newer ones in order to avoid showing the commits from two parallel development track mixed together. --reverse Output the commits chosen to be shown (see Commit Limiting section above) in reverse order. Cannot be combined with --walk-reflogs. Object Traversal These options are mostly targeted for packing of Git repositories. --objects Print the object IDs of any object referenced by the listed commits. --objects foo ^bar thus means “send me all object IDs which I need to download if I have the commit object bar but not foo”. --in-commit-order Print tree and blob ids in order of the commits. The tree and blob ids are printed after they are first referenced by a commit. --objects-edge Similar to --objects, but also print the IDs of excluded commits prefixed with a “-” character. This is used by git-pack-objects[1] to build a “thin” pack, which records objects in deltified form based on objects contained in these excluded commits to reduce network traffic. --objects-edge-aggressive Similar to --objects-edge, but it tries harder to find excluded commits at the cost of increased time. This is used instead of --objects-edge to build “thin” packs for shallow repositories. --indexed-objects Pretend as if all trees and blobs used by the index are listed on the command line. Note that you probably want to use --objects, too. --unpacked Only useful with --objects; print the object IDs that are not in packs. --object-names Only useful with --objects; print the names of the object IDs that are found. This is the default behavior. --no-object-names Only useful with --objects; does not print the names of the object IDs that are found. This inverts --object-names. This flag allows the output to be more easily parsed by commands such as git-cat-file[1]. --filter=<filter-spec> Only useful with one of the --objects*; omits objects (usually blobs) from the list of printed objects. The <filter-spec> may be one of the following: The form --filter=blob:none omits all blobs. The form --filter=blob:limit=<n>[kmg] omits blobs larger than n bytes or units. n may be zero. The suffixes k, m, and g can be used to name units in KiB, MiB, or GiB. For example, blob:limit=1k is the same as blob:limit=1024. The form --filter=object:type=(tag|commit|tree|blob) omits all objects which are not of the requested type. The form --filter=sparse:oid=<blob-ish> uses a sparse-checkout specification contained in the blob (or blob-expression) <blob-ish> to omit blobs that would not be required for a sparse checkout on the requested refs. The form --filter=tree:<depth> omits all blobs and trees whose depth from the root tree is >= <depth> (minimum depth if an object is located at multiple depths in the commits traversed). <depth>=0 will not include any trees or blobs unless included explicitly in the command-line (or standard input when --stdin is used). <depth>=1 will include only the tree and blobs which are referenced directly by a commit reachable from <commit> or an explicitly-given object. <depth>=2 is like <depth>=1 while also including trees and blobs one more level removed from an explicitly-given commit or tree. Note that the form --filter=sparse:path=<path> that wants to read from an arbitrary path on the filesystem has been dropped for security reasons. Multiple --filter= flags can be specified to combine filters. Only objects which are accepted by every filter are included. The form --filter=combine:<filter1>+<filter2>+…​<filterN> can also be used to combined several filters, but this is harder than just repeating the --filter flag and is usually not necessary. Filters are joined by + and individual filters are %-encoded (i.e. URL-encoded). Besides the + and % characters, the following characters are reserved and also must be encoded: ~!@#$^&*()[]{}\;",<>?'` as well as all characters with ASCII code <= 0x20, which includes space and newline. Other arbitrary characters can also be encoded. For instance, combine:tree:3+blob:none and combine:tree%3A3+blob%3Anone are equivalent. --no-filter Turn off any previous --filter= argument. --filter-provided-objects Filter the list of explicitly provided objects, which would otherwise always be printed even if they did not match any of the filters. Only useful with --filter=. --filter-print-omitted Only useful with --filter=; prints a list of the objects omitted by the filter. Object IDs are prefixed with a “~” character. --missing=<missing-action> A debug option to help with future "partial clone" development. This option specifies how missing objects are handled. The form --missing=error requests that rev-list stop with an error if a missing object is encountered. This is the default action. The form --missing=allow-any will allow object traversal to continue if a missing object is encountered. Missing objects will silently be omitted from the results. The form --missing=allow-promisor is like allow-any, but will only allow object traversal to continue for EXPECTED promisor missing objects. Unexpected missing objects will raise an error. The form --missing=print is like allow-any, but will also print a list of the missing objects. Object IDs are prefixed with a “?” character. --exclude-promisor-objects (For internal use only.) Prefilter object traversal at promisor boundary. This is used with partial clone. This is stronger than --missing=allow-promisor because it limits the traversal, rather than just silencing errors about missing objects. --no-walk[=(sorted|unsorted)] Only show the given commits, but do not traverse their ancestors. This has no effect if a range is specified. If the argument unsorted is given, the commits are shown in the order they were given on the command line. Otherwise (if sorted or no argument was given), the commits are shown in reverse chronological order by commit time. Cannot be combined with --graph. --do-walk Overrides a previous --no-walk. Commit Formatting Using these options, git-rev-list[1] will act similar to the more specialized family of commit log tools: git-log[1], git-show[1], and git-whatchanged[1] pretty-options.txt --relative-date Synonym for --date=relative. --date=<format> Only takes effect for dates shown in human-readable format, such as when using --pretty. log.date config variable sets a default value for the log command’s --date option. By default, dates are shown in the original time zone (either committer’s or author’s). If -local is appended to the format (e.g., iso-local), the user’s local time zone is used instead. --date=relative shows dates relative to the current time, e.g. “2 hours ago”. The -local option has no effect for --date=relative. --date=local is an alias for --date=default-local. --date=iso (or --date=iso8601) shows timestamps in a ISO 8601-like format. The differences to the strict ISO 8601 format are: a space instead of the T date/time delimiter a space between time and time zone no colon between hours and minutes of the time zone --date=iso-strict (or --date=iso8601-strict) shows timestamps in strict ISO 8601 format. --date=rfc (or --date=rfc2822) shows timestamps in RFC 2822 format, often found in email messages. --date=short shows only the date, but not the time, in YYYY-MM-DD format. --date=raw shows the date as seconds since the epoch (1970-01-01 00:00:00 UTC), followed by a space, and then the timezone as an offset from UTC (a + or - with four digits; the first two are hours, and the second two are minutes). I.e., as if the timestamp were formatted with strftime("%s %z")). Note that the -local option does not affect the seconds-since-epoch value (which is always measured in UTC), but does switch the accompanying timezone value. --date=human shows the timezone if the timezone does not match the current time-zone, and doesn’t print the whole date if that matches (ie skip printing year for dates that are "this year", but also skip the whole date itself if it’s in the last few days and we can just say what weekday it was). For older dates the hour and minute is also omitted. --date=unix shows the date as a Unix epoch timestamp (seconds since 1970). As with --raw, this is always in UTC and therefore -local has no effect. --date=format:... feeds the format ... to your system strftime, except for %s, %z, and %Z, which are handled internally. Use --date=format:%c to show the date in your system locale’s preferred format. See the strftime manual for a complete list of format placeholders. When using -local, the correct syntax is --date=format-local:.... --date=default is the default format, and is similar to --date=rfc2822, with a few exceptions: there is no comma after the day-of-week the time zone is omitted when the local time zone is used --header Print the contents of the commit in raw-format; each record is separated with a NUL character. --no-commit-header Suppress the header line containing "commit" and the object ID printed before the specified format. This has no effect on the built-in formats; only custom formats are affected. --commit-header Overrides a previous --no-commit-header. --parents Print also the parents of the commit (in the form "commit parent…​"). Also enables parent rewriting, see History Simplification above. --children Print also the children of the commit (in the form "commit child…​"). Also enables parent rewriting, see History Simplification above. --timestamp Print the raw commit timestamp. --left-right Mark which side of a symmetric difference a commit is reachable from. Commits from the left side are prefixed with < and those from the right with >. If combined with --boundary, those commits are prefixed with -. For example, if you have this topology: y---b---b branch B / \ / / . / / \ o---x---a---a branch A you would get an output like this: $ git rev-list --left-right --boundary --pretty=oneline A...B >bbbbbbb... 3rd on b >bbbbbbb... 2nd on b <aaaaaaa... 3rd on a <aaaaaaa... 2nd on a -yyyyyyy... 1st on b -xxxxxxx... 1st on a --graph Draw a text-based graphical representation of the commit history on the left hand side of the output. This may cause extra lines to be printed in between commits, in order for the graph history to be drawn properly. Cannot be combined with --no-walk. This enables parent rewriting, see History Simplification above. This implies the --topo-order option by default, but the --date-order option may also be specified. --show-linear-break[=<barrier>] When --graph is not used, all history branches are flattened which can make it hard to see that the two consecutive commits do not belong to a linear branch. This option puts a barrier in between them in that case. If <barrier> is specified, it is the string that will be shown instead of the default one. --count Print a number stating how many commits would have been listed, and suppress all other output. When used together with --left-right, instead print the counts for left and right commits, separated by a tab. When used together with --cherry-mark, omit patch equivalent commits from these counts and print the count for equivalent commits separated by a tab. Pretty formats If the commit is a merge, and if the pretty-format is not oneline, email or raw, an additional line is inserted before the Author: line. This line begins with "Merge: " and the hashes of ancestral commits are printed, separated by spaces. Note that the listed commits may not necessarily be the list of the direct parent commits if you have limited your view of history: for example, if you are only interested in changes related to a certain directory or file. There are several built-in formats, and you can define additional formats by setting a pretty.<name> config option to either another format name, or a format: string, as described below (see git-config[1]). Here are the details of the built-in formats: oneline <hash> <title-line> This is designed to be as compact as possible. short commit <hash> Author: <author> <title-line> medium commit <hash> Author: <author> Date: <author-date> <title-line> <full-commit-message> full commit <hash> Author: <author> Commit: <committer> <title-line> <full-commit-message> fuller commit <hash> Author: <author> AuthorDate: <author-date> Commit: <committer> CommitDate: <committer-date> <title-line> <full-commit-message> reference <abbrev-hash> (<title-line>, <short-author-date>) This format is used to refer to another commit in a commit message and is the same as --pretty='format:%C(auto)%h (%s, %ad)'. By default, the date is formatted with --date=short unless another --date option is explicitly specified. As with any format: with format placeholders, its output is not affected by other options like --decorate and --walk-reflogs. email From <hash> <date> From: <author> Date: <author-date> Subject: [PATCH] <title-line> <full-commit-message> mboxrd Like email, but lines in the commit message starting with "From " (preceded by zero or more ">") are quoted with ">" so they aren’t confused as starting a new commit. raw The raw format shows the entire commit exactly as stored in the commit object. Notably, the hashes are displayed in full, regardless of whether --abbrev or --no-abbrev are used, and parents information show the true parent commits, without taking grafts or history simplification into account. Note that this format affects the way commits are displayed, but not the way the diff is shown e.g. with git log --raw. To get full object names in a raw diff format, use --no-abbrev. format:<format-string> The format:<format-string> format allows you to specify which information you want to show. It works a little bit like printf format, with the notable exception that you get a newline with %n instead of \n. E.g, format:"The author of %h was %an, %ar%nThe title was >>%s<<%n" would show something like this: The author of fe6e0ee was Junio C Hamano, 23 hours ago The title was >>t4119: test autocomputing -p<n> for traditional diff input.<< The placeholders are: Placeholders that expand to a single literal character: %n newline %% a raw % %x00 print a byte from a hex code Placeholders that affect formatting of later placeholders: %Cred switch color to red %Cgreen switch color to green %Cblue switch color to blue %Creset reset color %C(…​) color specification, as described under Values in the "CONFIGURATION FILE" section of git-config[1]. By default, colors are shown only when enabled for log output (by color.diff, color.ui, or --color, and respecting the auto settings of the former if we are going to a terminal). %C(auto,...) is accepted as a historical synonym for the default (e.g., %C(auto,red)). Specifying %C(always,...) will show the colors even when color is not otherwise enabled (though consider just using --color=always to enable color for the whole output, including this format and anything else git might color). auto alone (i.e. %C(auto)) will turn on auto coloring on the next placeholders until the color is switched again. %m left (<), right (>) or boundary (-) mark %w([<w>[,<i1>[,<i2>]]]) switch line wrapping, like the -w option of git-shortlog[1]. %<(<N>[,trunc|ltrunc|mtrunc]) make the next placeholder take at least N columns, padding spaces on the right if necessary. Optionally truncate at the beginning (ltrunc), the middle (mtrunc) or the end (trunc) if the output is longer than N columns. Note that truncating only works correctly with N >= 2. %<|(<N>) make the next placeholder take at least until Nth columns, padding spaces on the right if necessary %>(<N>), %>|(<N>) similar to %<(<N>), %<|(<N>) respectively, but padding spaces on the left %>>(<N>), %>>|(<N>) similar to %>(<N>), %>|(<N>) respectively, except that if the next placeholder takes more spaces than given and there are spaces on its left, use those spaces %><(<N>), %><|(<N>) similar to %<(<N>), %<|(<N>) respectively, but padding both sides (i.e. the text is centered) Placeholders that expand to information extracted from the commit: %H commit hash %h abbreviated commit hash %T tree hash %t abbreviated tree hash %P parent hashes %p abbreviated parent hashes %an author name %aN author name (respecting .mailmap, see git-shortlog[1] or git-blame[1]) %ae author email %aE author email (respecting .mailmap, see git-shortlog[1] or git-blame[1]) %al author email local-part (the part before the @ sign) %aL author local-part (see %al) respecting .mailmap, see git-shortlog[1] or git-blame[1]) %ad author date (format respects --date= option) %aD author date, RFC2822 style %ar author date, relative %at author date, UNIX timestamp %ai author date, ISO 8601-like format %aI author date, strict ISO 8601 format %as author date, short format (YYYY-MM-DD) %ah author date, human style (like the --date=human option of git-rev-list[1]) %cn committer name %cN committer name (respecting .mailmap, see git-shortlog[1] or git-blame[1]) %ce committer email %cE committer email (respecting .mailmap, see git-shortlog[1] or git-blame[1]) %cl committer email local-part (the part before the @ sign) %cL committer local-part (see %cl) respecting .mailmap, see git-shortlog[1] or git-blame[1]) %cd committer date (format respects --date= option) %cD committer date, RFC2822 style %cr committer date, relative %ct committer date, UNIX timestamp %ci committer date, ISO 8601-like format %cI committer date, strict ISO 8601 format %cs committer date, short format (YYYY-MM-DD) %ch committer date, human style (like the --date=human option of git-rev-list[1]) %d ref names, like the --decorate option of git-log[1] %D ref names without the " (", ")" wrapping. %(describe[:options]) human-readable name, like git-describe[1]; empty string for undescribable commits. The describe string may be followed by a colon and zero or more comma-separated options. Descriptions can be inconsistent when tags are added or removed at the same time. tags[=<bool-value>]: Instead of only considering annotated tags, consider lightweight tags as well. abbrev=<number>: Instead of using the default number of hexadecimal digits (which will vary according to the number of objects in the repository with a default of 7) of the abbreviated object name, use <number> digits, or as many digits as needed to form a unique object name. match=<pattern>: Only consider tags matching the given glob(7) pattern, excluding the "refs/tags/" prefix. exclude=<pattern>: Do not consider tags matching the given glob(7) pattern, excluding the "refs/tags/" prefix. %S ref name given on the command line by which the commit was reached (like git log --source), only works with git log %e encoding %s subject %f sanitized subject line, suitable for a filename %b body %B raw body (unwrapped subject and body) %GG raw verification message from GPG for a signed commit %G? show "G" for a good (valid) signature, "B" for a bad signature, "U" for a good signature with unknown validity, "X" for a good signature that has expired, "Y" for a good signature made by an expired key, "R" for a good signature made by a revoked key, "E" if the signature cannot be checked (e.g. missing key) and "N" for no signature %GS show the name of the signer for a signed commit %GK show the key used to sign a signed commit %GF show the fingerprint of the key used to sign a signed commit %GP show the fingerprint of the primary key whose subkey was used to sign a signed commit %GT show the trust level for the key used to sign a signed commit %gD reflog selector, e.g., refs/stash@{1} or refs/stash@{2 minutes ago}; the format follows the rules described for the -g option. The portion before the @ is the refname as given on the command line (so git log -g refs/heads/master would yield refs/heads/master@{0}). %gd shortened reflog selector; same as %gD, but the refname portion is shortened for human readability (so refs/heads/master becomes just master). %gn reflog identity name %gN reflog identity name (respecting .mailmap, see git-shortlog[1] or git-blame[1]) %ge reflog identity email %gE reflog identity email (respecting .mailmap, see git-shortlog[1] or git-blame[1]) %gs reflog subject %(trailers[:options]) display the trailers of the body as interpreted by git-interpret-trailers[1]. The trailers string may be followed by a colon and zero or more comma-separated options. If any option is provided multiple times the last occurrence wins. key=<key>: only show trailers with specified <key>. Matching is done case-insensitively and trailing colon is optional. If option is given multiple times trailer lines matching any of the keys are shown. This option automatically enables the only option so that non-trailer lines in the trailer block are hidden. If that is not desired it can be disabled with only=false. E.g., %(trailers:key=Reviewed-by) shows trailer lines with key Reviewed-by. only[=<bool>]: select whether non-trailer lines from the trailer block should be included. separator=<sep>: specify a separator inserted between trailer lines. When this option is not given each trailer line is terminated with a line feed character. The string <sep> may contain the literal formatting codes described above. To use comma as separator one must use %x2C as it would otherwise be parsed as next option. E.g., %(trailers:key=Ticket,separator=%x2C ) shows all trailer lines whose key is "Ticket" separated by a comma and a space. unfold[=<bool>]: make it behave as if interpret-trailer’s --unfold option was given. E.g., %(trailers:only,unfold=true) unfolds and shows all trailer lines. keyonly[=<bool>]: only show the key part of the trailer.
ReflectionExtension8b7c:f320:99b9:690f:4595:cd17:293a:c069getFunctions (PHP 5, PHP 7, PHP 8) ReflectionExtension8b7c:f320:99b9:690f:4595:cd17:293a:c069getFunctions — Gets extension functions Description public ReflectionExtension8b7c:f320:99b9:690f:4595:cd17:293a:c069getFunctions(): array Get defined functions from an extension. Parameters This function has no parameters. Return Values An associative array of ReflectionFunction objects, for each function defined in the extension with the keys being the function names. If no function are defined, an empty array is returned. Examples Example #1 ReflectionExtension8b7c:f320:99b9:690f:4595:cd17:293a:c069getFunctions() example <?php $dom = new ReflectionExtension('SimpleXML'); print_r($dom->getFunctions()); ?> The above example will output something similar to: Array ( [simplexml_load_file] => ReflectionFunction Object ( [name] => simplexml_load_file ) [simplexml_load_string] => ReflectionFunction Object ( [name] => simplexml_load_string ) [simplexml_import_dom] => ReflectionFunction Object ( [name] => simplexml_import_dom ) ) See Also ReflectionExtension8b7c:f320:99b9:690f:4595:cd17:293a:c069getClasses() - Gets classes get_extension_funcs() - Returns an array with the names of the functions of a module
CollisionShape Inherits: Spatial < Node < Object Node that represents collision shape data in 3D space. Description Editor facility for creating and editing collision shapes in 3D space. Set the shape property to configure the shape. IMPORTANT: this is an Editor-only helper to create shapes, use CollisionObject.shape_owner_get_shape to get the actual shape. You can use this node to represent all sorts of collision shapes, for example, add this to an Area to give it a detection shape, or add it to a PhysicsBody to create a solid object. Tutorials Physics introduction 3D Kinematic Character Demo 3D Platformer Demo Third Person Shooter Demo Properties bool disabled false Shape shape Methods void make_convex_from_brothers ( ) void resource_changed ( Resource resource ) Property Descriptions bool disabled Default false Setter set_disabled(value) Getter is_disabled() A disabled collision shape has no effect in the world. Shape shape Setter set_shape(value) Getter get_shape() The actual shape owned by this collision shape. Method Descriptions void make_convex_from_brothers ( ) Sets the collision shape's shape to the addition of all its convexed MeshInstance siblings geometry. void resource_changed ( Resource resource ) If this method exists within a script it will be called whenever the shape resource has been modified.
matplotlib.axis.Axis.set_pickradius Axis.set_pickradius(pickradius) [source] Set the depth of the axis used by the picker ACCEPTS: a distance in points
check_point.mgmt.cp_mgmt_run_script – Executes the script on a given list of targets. Note This plugin is part of the check_point.mgmt collection (version 1.0.6). To install it use: ansible-galaxy collection install check_point.mgmt. To use it in a playbook, specify: check_point.mgmt.cp_mgmt_run_script. New in version 2.9: of check_point.mgmt Synopsis Parameters Examples Return Values Synopsis Executes the script on a given list of targets. All operations are performed over Web Services API. Parameters Parameter Choices/Defaults Comments args string Script arguments. comments string Comments string. script string Script body. script_name string Script name. targets list / elements=string On what targets to execute this command. Targets may be identified by their name, or object unique identifier. version string Version of checkpoint. If not given one, the latest version taken. wait_for_task boolean Choices: no yes ← Wait for the task to end. Such as publish task. Examples - name: run-script cp_mgmt_run_script: script: ls -l / script_name: 'Script Example: List files under / dir' targets: - corporate-gateway Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description cp_mgmt_run_script dictionary always. The checkpoint run-script output. Authors Or Soffer (@chkp-orso) © 2012–2018 Michael DeHaan
3.12 GFORTRAN_FORMATTED_BUFFER_SIZE—Set buffer size for formatted I/O The GFORTRAN_FORMATTED_BUFFER_SIZE environment variable specifies buffer size in bytes to be used for formatted output. The default value is 8192.
contain The contain CSS property allows an author to indicate that an element and its contents are, as much as possible, independent of the rest of the document tree. Containment allows the browser to calculate layout, style, paint, size, or any combination of them for a specific area of the DOM. Changes within an element with containment applied are not propagated outside of the contained element to the rest of the page, leading to performance benefits through fewer DOM re-renders. Try it This property is useful on pages that contain a lot of widgets that are all independent, as it can be used to prevent each widget's internals from having side effects outside of the widget's bounding-box. Note: If applied (with value: paint, strict or content), this property creates: A new containing block (for the descendants whose position property is absolute or fixed). A new stacking context. A new block formatting context. Syntax /* Keyword values */ contain: none; contain: strict; contain: content; contain: size; contain: inline-size; contain: layout; contain: style; contain: paint; /* Multiple keywords */ contain: size paint; contain: size layout paint; contain: inline-size layout; /* Global values */ contain: inherit; contain: initial; contain: revert; contain: revert-layer; contain: unset; The contain property is specified as either one of the following: Using a single none, strict, or content keyword. Using one or more of size (or inline-size), layout, style, paint keywords in any order. Values none Indicates the element renders as normal, with no containment applied. strict Indicates that all containment rules are applied to the element. This is equivalent to contain: size layout paint style. content Indicates that all containment rules except size are applied to the element. This is equivalent to contain: layout paint style. size Indicates that size containment is applied to the element. The size of the element can be computed in isolation, ignoring the child elements. This value cannot be combined with inline-size. inline-size Indicates that inline size containment is applied to the element. The inline size of the element can be computed in isolation, ignoring the child elements. This value cannot be combined with size. layout Indicates that the internal layout of the element is isolated from the rest of the page, that is, nothing outside the element affects its internal layout, and vice versa. style Indicates that, for properties that can have effects on more than just an element and its descendants, those effects don't escape the containing element. Counters and quotes are scoped to the element and its contents. paint Indicates that descendants of the element don't display outside its bounds. If the containing box is offscreen, the browser does not need to paint its contained elements — these must also be offscreen as they are contained completely by that box. And if a descendant overflows the containing element's bounds, then that descendant will be clipped to the containing element's border-box. Formal definition Initial value none Applies to all elements Inherited no Computed value as specified Animation type discrete Formal syntax contain = none | strict | content | [ size || layout || style || paint ] Examples Setting up a simple layout without containment The markup below consists of two articles, each with content: <h1>My blog</h1> <article> <h2>Heading of a nice article</h2> <p>Content here.</p> </article> <article> <h2>Another heading of another article</h2> <img src="graphic.jpg" alt="photo"> <p>More content here.</p> </article> Each <article> and <img> is given a border, and the images are floated: img { float: left; border: 3px solid black; } article { border: 1px solid black; } There is an issue because the floating element is laid out beyond the bottom of the article. Adding an additional floating element In the previous example, if we insert another image at the bottom of the first article, a large portion of the DOM tree is re-laid out or repainted, and this interferes with the layout of the second article: <h1>My blog</h1> <article> <h2>Heading of a nice article</h2> <p>Content here.</p> <img src="i-just-showed-up.jpg" alt="social"> </article> <article> <h2>Another heading of another article</h2> <img src="graphic.jpg" alt="photo"> <p>More content here.</p> </article> Because of the way floats work, the first image ends up inside the area of the second article: Fixing the layout with contain If we give each article the contain property with a value of content, when new elements are inserted, the browser only needs to recalculate the containing element's subtree, and not anything outside it: img { float: left; border: 3px solid black; } article { border: 1px solid black; contain: content; } This also means that the first image no longer floats down to the second article, and instead stays inside its containing element's bounds: Using the style value for containment Style containment scopes counters and quotes to the contained element. For CSS counters, the counter-increment and counter-set properties are scoped to the element as if the element is at the root of the document. The example below takes a look at how counters work when style containment is applied: <h1>Introduction</h1> <h1>Background</h1> <div class="contain"> <h1>Contained counter</h1> </div> <h1>Conclusion</h1> body { counter-reset: headings; } h8b7c:f320:99b9:690f:4595:cd17:293a:c069before { counter-increment: headings; content: counter(headings) ": "; } .contain { contain: style; } Without containment, the counter would increment from 1 to 4 for each heading. Style containment causes the counter-increment to be scoped to the element's subtree and the counter begins again at 1. CSS quotes are similarly affected in that the content values relating to quotes are scoped to the element: <span class="open-quote"> outer <span style="contain: style;"> <span class="open-quote"> inner </span> </span> </span> <span class="close-quote">close</span> body { quotes: "«" "»" "‹" "›" } .open-quote:before { content: open-quote; } .close-quote:after { content: close-quote; } In this example, the close quote ignores the inner span because it has style containment applied: Specifications Specification CSS Containment Module Level 2 # contain-property 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 contain 52 79 69 No 39 15.4 52 52 79 41 15.4 6.0 inline-size 105 105 101 No 91 15.4 105 105 101 No 15.4 No style 52 79 103 No 39 15.4 52 52 103 41 15.4 6.0 See also CSS containment CSS content-visibility property CSS position property 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: Aug 23, 2022, by MDN contributors
[Java] Interface SourceInfo Methods Summary Methods Type Params Return Type Name and description int getColumn()get starting column int getColumnLast()get ending column int getLine()get start line int getLineLast()get ending line void setColumn(int c)set start column void setColumnLast(int colLast)set ending column void setLine(int l)set start line void setLineLast(int lineLast)set ending line Method Detail public int getColumn() get starting column Returns: the starting column public int getColumnLast() get ending column Returns: the ending column public int getLine() get start line Returns: the starting line public int getLineLast() get ending line Returns: the ending line public void setColumn(int c) set start column Parameters: c - the column public void setColumnLast(int colLast) set ending column Parameters: colLast - the column public void setLine(int l) set start line Parameters: l - the line public void setLineLast(int lineLast) set ending line Parameters: lineLast - the line
UpdateAvailableEvent interface An event emitted when a new version of the app is available. interface UpdateAvailableEvent { type: 'UPDATE_AVAILABLE' current: {...} available: {...} } See also Service worker communication guide Properties Property Description type: 'UPDATE_AVAILABLE' current: { hash: string; appData?: Object; } available: { hash: string; appData?: Object; }
Symfony\Component\DependencyInjection\ParameterBag Classes ContainerBag EnvPlaceholderParameterBag FrozenParameterBag Holds read-only parameters. ParameterBag Holds parameters. Interfaces ContainerBagInterface ParameterBagInterface ParameterBagInterface.
ColumnStore Alter Table The ALTER TABLE statement modifies existing tables. This includes adding, deleting and renaming columns as well as renaming tables. Syntax ALTER TABLE tbl_name alter_specification [, alter_specification] ... alter_specification: table_option ... | ADD [COLUMN] col_name column_definition | ADD [COLUMN] (col_name column_definition,...) | ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT} | CHANGE [COLUMN] old_col_name new_col_name column_definition | DROP [COLUMN] col_name | RENAME [TO] new_tbl_name column_definition: data_type [NOT NULL | NULL] [DEFAULT default_value] [COMMENT '[compression=0|1];'] table_options: table_option [[,] table_option] ... (see CREATE TABLE options) images here ADD The ADD clause allows you to add columns to a table. You must specify the data type after the column name.The following statement adds a priority column with an integer datatype to the orders table: ALTER TABLE orders ADD COLUMN priority INTEGER; Compression level (0 for no compression, 1 for compression) can be set at the system level. If a session default exists, this will override the system default. In turn, this can be overridden by the table level compression comment, and finally a compression comment at the column level. Online alter table add column ColumnStore engine fully supports online DDL (one session can be adding columns to a table while another session is querying that table). Since MySQL 5.1 did not support alter online alter table, MariaDB ColumnStore has provided a its own syntax to do so for adding columns to a table, one at a time only. Do not attempt to use it for any other purpose. Follow the example below as closely as possible We have also provided the following workaround. This workaround is intended for adding columns to a table, one at a time only. Do not attempt to use it for any other purpose. Follow the example below as closely as possible. Scenario: add an INT column named col7 to the existing table foo: select calonlinealter('alter table foo add column col7 int;'); alter table foo add column col7 int comment 'schema sync only'; The select statement may take several tens of seconds to run, depending on how many rows are currently in the table. Regardless, other sessions can select against the table during this time (but they won’t be able to see the new column yet). The alter table statement will take less than 1 second (depending on how busy MariaDB is) and during this brief time interval, other table reads will be held off. CHANGE The CHANGE clause allows you to rename a column in a table. Notes to CHANGE COLUMN: You cannot currently use CHANGE COLUMN to change the definition of that column. You can only change a single column at a time.The following example renames the order_qty field to quantity in the orders table: ALTER TABLE orders CHANGE COLUMN order_qty quantity INTEGER; DROP The DROP clause allows you to drop columns. All associated data is removed when the column is dropped. You can DROP COLUMN (column_name). The following example alters the orders table to drop the priority column: ALTER TABLE orders DROP COLUMN priority; RENAME The RENAME clause allows you to rename a table.The following example renames the orders table: ALTER TABLE orders RENAME TO customer_orders; Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.
community.crypto.openssl_publickey – Generate an OpenSSL public key from its private key. Note This plugin is part of the community.crypto collection (version 1.3.0). To install it use: ansible-galaxy collection install community.crypto. To use it in a playbook, specify: community.crypto.openssl_publickey. Synopsis Requirements Parameters See Also Examples Return Values Synopsis This module allows one to (re)generate OpenSSL public keys from their private keys. Keys are generated in PEM or OpenSSH format. The module can use the cryptography Python library, or the pyOpenSSL Python library. By default, it tries to detect which one is available. This can be overridden with the select_crypto_backend option. When format is OpenSSH, the cryptography backend has to be used. Please note that the PyOpenSSL backend was deprecated in Ansible 2.9 and will be removed in community.crypto 2.0.0. Requirements The below requirements are needed on the host that executes this module. Either cryptography >= 1.2.3 (older versions might work as well) Or pyOpenSSL >= 16.0.0 Needs cryptography >= 1.4 if format is OpenSSH Parameters Parameter Choices/Defaults Comments attributes string added in 2.3 of ansible.builtin The attributes the resulting file or directory should have. To get supported flags look at the man page for chattr on the target system. This string should contain the attributes in the same order as the one displayed by lsattr. The = operator is assumed as default, otherwise + or - operators need to be included in the string. aliases: attr backup boolean Choices: no ← yes Create a backup file including a timestamp so you can get the original public key back if you overwrote it with a different one by accident. force boolean Choices: no ← yes Should the key be regenerated even it it already exists. format string Choices: OpenSSH PEM ← The format of the public key. group string Name of the group that should own the file/directory, as would be fed to chown. mode raw The permissions the resulting file or directory should have. For those used to /usr/bin/chmod remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like 0644 or 01777) or quote it (like '644' or '1777') so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, u+rwx or u=rw,g=r,o=r). owner string Name of the user that should own the file/directory, as would be fed to chown. path path / required Name of the file in which the generated TLS/SSL public key will be written. privatekey_content string added in 1.0.0 of community.crypto The content of the TLS/SSL private key from which to generate the public key. Either privatekey_path or privatekey_content must be specified, but not both. If state is present, one of them is required. privatekey_passphrase string The passphrase for the private key. privatekey_path path Path to the TLS/SSL private key from which to generate the public key. Either privatekey_path or privatekey_content must be specified, but not both. If state is present, one of them is required. return_content boolean added in 1.0.0 of community.crypto Choices: no ← yes If set to yes, will return the (current or generated) public key's content as publickey. select_crypto_backend string Choices: auto ← cryptography pyopenssl Determines which crypto backend to use. The default choice is auto, which tries to use cryptography if available, and falls back to pyopenssl. If set to pyopenssl, will try to use the pyOpenSSL library. If set to cryptography, will try to use the cryptography library. selevel string The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the range. When set to _default, it will use the level portion of the policy if available. serole string The role part of the SELinux file context. When set to _default, it will use the role portion of the policy if available. setype string The type part of the SELinux file context. When set to _default, it will use the type portion of the policy if available. seuser string The user part of the SELinux file context. By default it uses the system policy, where applicable. When set to _default, it will use the user portion of the policy if available. state string Choices: absent present ← Whether the public key should exist or not, taking action if the state is different from what is stated. unsafe_writes boolean added in 2.2 of ansible.builtin Choices: no ← yes Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. See Also See also community.crypto.x509_certificate The official documentation on the community.crypto.x509_certificate module. community.crypto.x509_certificate_pipe The official documentation on the community.crypto.x509_certificate_pipe module. community.crypto.openssl_csr The official documentation on the community.crypto.openssl_csr module. community.crypto.openssl_csr_pipe The official documentation on the community.crypto.openssl_csr_pipe module. community.crypto.openssl_dhparam The official documentation on the community.crypto.openssl_dhparam module. community.crypto.openssl_pkcs12 The official documentation on the community.crypto.openssl_pkcs12 module. community.crypto.openssl_privatekey The official documentation on the community.crypto.openssl_privatekey module. community.crypto.openssl_privatekey_pipe The official documentation on the community.crypto.openssl_privatekey_pipe module. Examples - name: Generate an OpenSSL public key in PEM format community.crypto.openssl_publickey: path: /etc/ssl/public/ansible.com.pem privatekey_path: /etc/ssl/private/ansible.com.pem - name: Generate an OpenSSL public key in PEM format from an inline key community.crypto.openssl_publickey: path: /etc/ssl/public/ansible.com.pem privatekey_content: "{{ private_key_content }}" - name: Generate an OpenSSL public key in OpenSSH v2 format community.crypto.openssl_publickey: path: /etc/ssl/public/ansible.com.pem privatekey_path: /etc/ssl/private/ansible.com.pem format: OpenSSH - name: Generate an OpenSSL public key with a passphrase protected private key community.crypto.openssl_publickey: path: /etc/ssl/public/ansible.com.pem privatekey_path: /etc/ssl/private/ansible.com.pem privatekey_passphrase: ansible - name: Force regenerate an OpenSSL public key if it already exists community.crypto.openssl_publickey: path: /etc/ssl/public/ansible.com.pem privatekey_path: /etc/ssl/private/ansible.com.pem force: yes - name: Remove an OpenSSL public key community.crypto.openssl_publickey: path: /etc/ssl/public/ansible.com.pem state: absent Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description backup_file string changed and if backup is yes Name of backup file created. Sample: /path/to/publickey.pem.2019-03-09@11:22~ filename string changed or success Path to the generated TLS/SSL public key file. Sample: /etc/ssl/public/ansible.com.pem fingerprint dictionary changed or success The fingerprint of the public key. Fingerprint will be generated for each hashlib.algorithms available. Requires PyOpenSSL >= 16.0 for meaningful output. Sample: {'md5': '8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069', 'sha1': '8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:ee:71:f6:10', 'sha224': '8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:e9:f5:9b:46', 'sha256': '8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069', 'sha384': '8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069', 'sha512': '8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:8b7c:f320:99b9:690f:4595:cd17:293a:c069:01:1e:a6:60:...:0f:9b'} format string changed or success The format of the public key (PEM, OpenSSH, ...). Sample: PEM privatekey string changed or success Path to the TLS/SSL private key the public key was generated from. Will be none if the private key has been provided in privatekey_content. Sample: /etc/ssl/private/ansible.com.pem publickey string added in 1.0.0 of community.crypto if state is present and return_content is yes The (current or generated) public key's content. Authors Yanis Guenane (@Spredzy) Felix Fontein (@felixfontein) © 2012–2018 Michael DeHaan
tf.keras.metrics.mean_squared_error Computes the mean squared error between labels and predictions. View aliases Main aliases tf.keras.losses.MSE, tf.keras.losses.mean_squared_error, tf.keras.losses.mse, tf.keras.metrics.MSE, tf.keras.metrics.mse Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.losses.MSE, tf.compat.v1.keras.losses.mean_squared_error, tf.compat.v1.keras.losses.mse, tf.compat.v1.keras.metrics.MSE, tf.compat.v1.keras.metrics.mean_squared_error, tf.compat.v1.keras.metrics.mse tf.keras.metrics.mean_squared_error( y_true, y_pred ) After computing the squared distance between the inputs, the mean value over the last dimension is returned. loss = mean(square(y_true - y_pred), axis=-1) Standalone usage: y_true = np.random.randint(0, 2, size=(2, 3)) y_pred = np.random.random(size=(2, 3)) loss = tf.keras.losses.mean_squared_error(y_true, y_pred) assert loss.shape == (2,) assert np.array_equal( loss.numpy(), np.mean(np.square(y_true - y_pred), axis=-1)) Args y_true Ground truth values. shape = [batch_size, d0, .. dN]. y_pred The predicted values. shape = [batch_size, d0, .. dN]. Returns Mean squared error values. shape = [batch_size, d0, .. dN-1].
salt.output.nested Recursively display nested data This is the default outputter for most execution functions. Example output: myminion: ---------- foo: ---------- bar: baz dictionary: ---------- abc: 123 def: 456 list: - Hello - World class salt.output.nested.NestDisplay(retcode=0) Manage the nested display contents display(ret, indent, prefix, out) Recursively iterate down through data structures to determine output ustring(indent, color, msg, prefix='', suffix='', endc=None) salt.output.nested.output(ret, **kwargs) Display ret data
Merge sibling variables transform Merge sibling variables into one Example In // merge into a single VariableDeclaration var foo = "bar"; var bar = "foo"; foobar(); // merge into the next for loop var i = 0; for (var x = 0; x < 10; x++) {} Out var foo = "bar", bar = "foo"; foobar(); for (var i = 0, x = 0; x < 10; x++) {} Installation npm install babel-plugin-transform-merge-sibling-variables Usage Via .babelrc (Recommended) .babelrc { "plugins": ["transform-merge-sibling-variables"] } Via CLI babel --plugins transform-merge-sibling-variables script.js Via Node API require("babel-core").transform("code", { plugins: ["transform-merge-sibling-variables"] });
PackedSceneGLTF Inherits: PackedScene < Resource < Reference < Object Description Note: This class is only compiled in editor builds. Run-time glTF loading and saving is not available in exported projects. References to PackedSceneGLTF within a script will cause an error in an exported project. Properties Dictionary _bundled {"conn_count": 0,"conns": PoolIntArray(  ),"editable_instances": [  ],"names": PoolStringArray(  ),"node_count": 0,"node_paths": [  ],"nodes": PoolIntArray(  ),"variants": [  ],"version": 2} (overrides PackedScene) Methods Error export_gltf ( Node node, String path, int flags=0, float bake_fps=1000.0 ) Node import_gltf_scene ( String path, int flags=0, float bake_fps=1000.0, int compress_flags=2194432, GLTFState state=null ) void pack_gltf ( String path, int flags=0, float bake_fps=1000.0, int compress_flags=2194432, GLTFState state=null ) Method Descriptions Error export_gltf ( Node node, String path, int flags=0, float bake_fps=1000.0 ) Node import_gltf_scene ( String path, int flags=0, float bake_fps=1000.0, int compress_flags=2194432, GLTFState state=null ) void pack_gltf ( String path, int flags=0, float bake_fps=1000.0, int compress_flags=2194432, GLTFState state=null )
QJniEnvironment Class The QJniEnvironment class provides access to the JNI Environment (JNIEnv). More... Header: #include <QJniEnvironment> CMake: find_package(Qt6 COMPONENTS Core REQUIRED) target_link_libraries(mytarget PRIVATE Qt8b7c:f320:99b9:690f:4595:cd17:293a:c069Core) qmake: QT += core Since: Qt 6.1 List of all members, including inherited members Deprecated members Public Types enum class OutputMode { Silent, Verbose } Public Functions QJniEnvironment() ~QJniEnvironment() bool checkAndClearExceptions(QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069OutputMode outputMode = OutputMo8b7c:f320:99b9:690f:4595:cd17:293a:c069Verbose) jclass findClass(const char *className) jfieldID findField(jclass clazz, const char *fieldName, const char *signature) jmethodID findMethod(jclass clazz, const char *methodName, const char *signature) jfieldID findStaticField(jclass clazz, const char *fieldName, const char *signature) jmethodID findStaticMethod(jclass clazz, const char *methodName, const char *signature) bool isValid() const JNIEnv * jniEnv() const bool registerNativeMethods(const char *className, const JNINativeMethod [] methods, int size) bool registerNativeMethods(jclass clazz, const JNINativeMethod [] methods, int size) JNIEnv & operator*() const JNIEnv * operator->() const Static Public Members bool checkAndClearExceptions(JNIEnv *env, QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069OutputMode outputMode = OutputMo8b7c:f320:99b9:690f:4595:cd17:293a:c069Verbose) JavaVM * javaVM() Detailed Description When using JNI, the JNIEnv class is a pointer to a function table and a member function for each JNI function that indirects through the table. JNIEnv provides most of the JNI functions. Every C++ native function receives a JNIEnv as the first argument. The JNI environment cannot be shared between threads. Since JNIEnv doesn't do much error checking, such as exception checking and clearing, QJniEnvironment allows you to do that easily. For more information about JNIEnv, see Java: Interface Function Table. Note: This API has been designed and tested for use with Android. It has not been tested for other platforms. Member Type Documentation enum class QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069OutputMode Constant Value Description QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069OutputMo8b7c:f320:99b9:690f:4595:cd17:293a:c069Silent 0 The exceptions are cleaned silently QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069OutputMo8b7c:f320:99b9:690f:4595:cd17:293a:c069Verbose 1 Prints the exceptions and their stack backtrace as an error to stderr stream. Member Function Documentation QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069QJniEnvironment() Constructs a new JNI Environment object and attaches the current thread to the Java VM. QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069~QJniEnvironment() Detaches the current thread from the Java VM and destroys the QJniEnvironment object. This will clear any pending exception by calling checkAndClearExceptions(). bool QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069heckAndClearExceptions(QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069OutputMode outputMode = OutputMo8b7c:f320:99b9:690f:4595:cd17:293a:c069Verbose) Cleans any pending exceptions either silently or reporting stack backtrace, depending on the outputMode. In contrast to QJniObject, which handles exceptions internally, if you make JNI calls directly via JNIEnv, you need to clear any potential exceptions after the call using this function. For more information about JNIEnv calls that can throw an exception, see JNI Functions. Returns true when a pending exception was cleared. [static] bool QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069heckAndClearExceptions(JNIEnv *env, QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069OutputMode outputMode = OutputMo8b7c:f320:99b9:690f:4595:cd17:293a:c069Verbose) Cleans any pending exceptions for env, either silently or reporting stack backtrace, depending on the outputMode. This is useful when you already have a JNIEnv pointer such as in a native function implementation. In contrast to QJniObject, which handles exceptions internally, if you make JNI calls directly via JNIEnv, you need to clear any potential exceptions after the call using this function. For more information about JNIEnv calls that can throw an exception, see JNI Functions. Returns true when a pending exception was cleared. jclass QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069indClass(const char *className) Searches for className using all available class loaders. Qt on Android uses a custom class loader to load all the .jar files and it must be used to find any classes that are created by that class loader because these classes are not visible when using the default class loader. Returns the class pointer or null if className is not found. A use case for this function is searching for a class to call a JNI method that takes a jclass. This can be useful when doing multiple JNI calls on the same class object which can a bit faster than using a class name in each call. Additionally, this call looks for internally cached classes first before doing a JNI call, and returns such a class if found. The following code snippet creates an instance of the class CustomClass and then calls the printFromJava() method: QJniEnvironment env; jclass javaClass = env.findClass("org/qtproject/example/android/CustomClass"); QJniObject javaMessage = QJniObject8b7c:f320:99b9:690f:4595:cd17:293a:c069romString("findClass example"); QJniObject8b7c:f320:99b9:690f:4595:cd17:293a:c069llStaticMethod<void>(javaClass, "printFromJava", "(Ljava/lang/String;)V", javaMessage.object<jstring>()); Note: This call returns a global reference to the class object from the internally cached classes. [since 6.2] jfieldID QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069indField(jclass clazz, const char *fieldName, const char *signature) Searches for an member field of a class clazz. The field is specified by its fieldName and signature. Returns the field ID or nullptr if the field is not found. A usecase for this method is searching for class fields and caching their IDs, so that they could later be used for getting/setting the fields. This function was introduced in Qt 6.2. [since 6.2] jmethodID QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069indMethod(jclass clazz, const char *methodName, const char *signature) Searches for an instance method of a class clazz. The method is specified by its methodName and signature. Returns the method ID or nullptr if the method is not found. A usecase for this method is searching for class methods and caching their IDs, so that they could later be used for calling the methods. This function was introduced in Qt 6.2. [since 6.2] jfieldID QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069indStaticField(jclass clazz, const char *fieldName, const char *signature) Searches for a static field of a class clazz. The field is specified by its fieldName and signature. Returns the field ID or nullptr if the field is not found. A usecase for this method is searching for class fields and caching their IDs, so that they could later be used for getting/setting the fields. This function was introduced in Qt 6.2. [since 6.2] jmethodID QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069indStaticMethod(jclass clazz, const char *methodName, const char *signature) Searches for a static method of a class clazz. The method is specified by its methodName and signature. Returns the method ID or nullptr if the method is not found. A usecase for this method is searching for class methods and caching their IDs, so that they could later be used for calling the methods. QJniEnvironment env; jclass javaClass = env.findClass("org/qtproject/example/android/CustomClass"); jmethodID methodId = env.findStaticMethod(javaClass, "staticJavaMethod", "(Ljava/lang/String;)V"); QJniObject javaMessage = QJniObject8b7c:f320:99b9:690f:4595:cd17:293a:c069romString("findStaticMethod example"); QJniObject8b7c:f320:99b9:690f:4595:cd17:293a:c069llStaticMethod<void>(javaClass, methodId, javaMessage.object<jstring>()); This function was introduced in Qt 6.2. [since 6.2] bool QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069isValid() const Returns true if this instance holds a valid JNIEnv object. This function was introduced in Qt 6.2. [static] JavaVM *QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069javaVM() Returns the Java VM interface for the current process. Although it might be possible to have multiple Java VMs per process, Android allows only one. JNIEnv *QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069jniEnv() const Returns the JNI Environment's JNIEnv pointer. bool QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069registerNativeMethods(const char *className, const JNINativeMethod [] methods, int size) Registers the Java methods in the array methods of size size, each of which can call native C++ functions from class className. These methods must be registered before any attempt to call them. Returns true if the registration is successful, otherwise false. Each element in the methods array consists of: The Java method name Method signature The C++ functions that will be executed const JNINativeMethod methods[] = {{"callNativeOne", "(I)V", reinterpret_cast<void *>(fromJavaOne)}, {"callNativeTwo", "(I)V", reinterpret_cast<void *>(fromJavaTwo)}}; QJniEnvironment env; env.registerNativeMethods("org/qtproject/android/TestJavaClass", methods, 2); bool QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069registerNativeMethods(jclass clazz, const JNINativeMethod [] methods, int size) This is an overloaded function. This overload uses a previously cached jclass instance clazz. JNINativeMethod methods[] {{"callNativeOne", "(I)V", reinterpret_cast<void *>(fromJavaOne)}, {"callNativeTwo", "(I)V", reinterpret_cast<void *>(fromJavaTwo)}}; QJniEnvironment env; jclass clazz = env.findClass("org/qtproject/android/TestJavaClass"); env.registerNativeMethods(clazz, methods, 2); JNIEnv &QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069operator*() const Returns the JNI Environment's JNIEnv object. JNIEnv *QJniEnvironment8b7c:f320:99b9:690f:4595:cd17:293a:c069operator->() const Provides access to the JNI Environment's JNIEnv pointer.
docker_service This resource manages the lifecycle of a Docker service. By default, the creation, update and delete of services are detached. With the Converge Config the behavior of the docker cli is imitated to guarantee that for example, all tasks of a service are running or successfully updated or to inform terraform that a service could not be updated and was successfully rolled back. Example Usage The following examples show the basic and advanced usage of the Docker Service resource assuming the host machine is already part of a Swarm. Basic The following configuration starts a Docker Service with - the given image, - 1 replica - exposes the port 8080 in vip mode to the host machine - moreover, uses the container runtime resource "docker_service" "foo" { name = "foo-service" task_spec { container_spec { image = "repo.mycompany.com:8080/foo-service:v1" } } endpoint_spec { ports { target_port = "8080" } } } The following command is the equivalent: $ docker service create -d -p 8080 --name foo-service repo.mycompany.com:8080/foo-service:v1 Advanced The following configuration shows the full capabilities of a Docker Service. Currently, the Docker API 1.32 is implemented. resource "docker_volume" "test_volume" { name = "tftest-volume" } resource "docker_config" "service_config" { name = "tftest-full-myconfig" data = "ewogICJwcmVmaXgiOiAiMTIzIgp9" } resource "docker_secret" "service_secret" { name = "tftest-mysecret" data = "ewogICJrZXkiOiAiUVdFUlRZIgp9" } resource "docker_network" "test_network" { name = "tftest-network" driver = "overlay" } resource "docker_service" "foo" { name = "tftest-service-basic" task_spec { container_spec { image = "repo.mycompany.com:8080/foo-service:v1" labels { foo = "bar" } command = ["ls"] args = ["-las"] hostname = "my-fancy-service" env { MYFOO = "BAR" } dir = "/root" user = "root" groups = ["docker", "foogroup"] privileges { se_linux_context { disable = true user = "user-label" role = "role-label" type = "type-label" level = "level-label" } } read_only = true mounts = [ { target = "/mount/test" source = "${docker_volume.test_volume.name}" type = "volume" read_only = true bind_options { propagation = "private" } }, ] stop_signal = "SIGTERM" stop_grace_period = "10s" healthcheck { test = ["CMD", "curl", "-f", "http://localhost:8080/health"] interval = "5s" timeout = "2s" retries = 4 } hosts { host = "testhost" ip = "743.354.7638" } dns_config { nameservers = ["743.354.7638"] search = ["example.org"] options = ["timeout:3"] } secrets = [ { secret_id = "${docker_secret.service_secret.id}" secret_name = "${docker_secret.service_secret.name}" file_name = "/secrets.json" }, ] configs = [ { config_id = "${docker_config.service_config.id}" config_name = "${docker_config.service_config.name}" file_name = "/configs.json" }, ] } resources { limits { nano_cpus = 1000000 memory_bytes = 536870912 generic_resources { named_resources_spec = [ "GPU=UUID1" ] discrete_resources_spec = [ "SSD=3" ] } } reservation { nano_cpus = 1000000 memory_bytes = 536870912 generic_resources { named_resources_spec = [ "GPU=UUID1" } discrete_resources_spec = [ "SSD=3" ] } } } restart_policy { condition = "on-failure" delay = "3s" max_attempts = 4 window = "10s" } placement { constraints = [ "node.role==manager", ] prefs = [ "spread=node.role.manager", ] } force_update = 0 runtime = "container" networks = ["${docker_network.test_network.id}"] log_driver { name = "json-file" options { max-size = "10m" max-file = "3" } } } mode { replicated { replicas = 2 } } update_config { parallelism = 2 delay = "10s" failure_action = "pause" monitor = "5s" max_failure_ratio = "0.1" order = "start-first" } rollback_config { parallelism = 2 delay = "5ms" failure_action = "pause" monitor = "10h" max_failure_ratio = "0.9" order = "stop-first" } endpoint_spec { mode = "vip" ports { name = "random" protocol = "tcp" target_port = "8080" published_port = "8080" publish_mode = "ingress" } } } See also the TestAccDockerService_full test or all the other tests for a complete overview. Argument Reference The following arguments are supported: auth - (Optional, block) See Auth below for details. name - (Required, string) The name of the Docker service. task_spec - (Required, block) See TaskSpec below for details. mode - (Optional, block) See Mode below for details. update_config - (Optional, block) See UpdateConfig below for details. rollback_config - (Optional, block) See RollbackConfig below for details. endpoint_spec - (Optional, block) See EndpointSpec below for details. converge_config - (Optional, block) See Converge Config below for details. Auth auth can be used additionally to the registry_auth. If both properties are given the auth wins and overwrites the auth of the provider. server_address - (Required, string) The address of the registry server username - (Optional, string) The username to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_USER is also be checked. password - (Optional, string) The password to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_PASS is also be checked. TaskSpec task_spec is a block within the configuration that can be repeated only once to specify the mode configuration for the service. The task_spec block is the user modifiable task configuration and supports the following: container_spec (Required, block) See ContainerSpec below for details. resources (Optional, block) See Resources below for details. restart_policy (Optional, block) See Restart Policy below for details. placement (Optional, block) See Placement below for details. force_update (Optional, int) A counter that triggers an update even if no relevant parameters have been changed. See Docker Spec. runtime (Optional, string) Runtime is the type of runtime specified for the task executor. See Docker Runtime. networks - (Optional, set of strings) Ids of the networks in which the container will be put in. log_driver - (Optional, block) See Log Driver below for details. ContainerSpec container_spec is a block within the configuration that can be repeated only once to specify the mode configuration for the service. The container_spec block is the spec for each container and supports the following: image - (Required, string) The image used to create the Docker service. labels - (Optional, map of string/string key/value pairs) User-defined key/value metadata. command - (Optional, list of strings) The command to be run in the image. args - (Optional, list of strings) Arguments to the command. hostname - (Optional, string) The hostname to use for the container, as a valid RFC 1123 hostname. env - (Optional, map of string/string) A list of environment variables in the form VAR=value. dir - (Optional, string) The working directory for commands to run in. user - (Optional, string) The user inside the container. groups - (Optional, list of strings) A list of additional groups that the container process will run as. privileges (Optional, block) See Privileges below for details. read_only - (Optional, bool) Mount the container's root filesystem as read only. mounts - (Optional, set of blocks) See Mounts below for details. stop_signal - (Optional, string) Signal to stop the container. stop_grace_period - (Optional, string) Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h). healthcheck - (Optional, block) See Healthcheck below for details. host - (Optional, map of string/string) A list of hostname/IP mappings to add to the container's hosts file. ip - (Required string) The ip host - (Required string) The hostname dns_config - (Optional, block) See DNS Config below for details. secrets - (Optional, set of blocks) See Secrets below for details. configs - (Optional, set of blocks) See Configs below for details. isolation - (Optional, string) Isolation technology of the containers running the service. (Windows only). Valid values are: default|process|hyperv Privileges privileges is a block within the configuration that can be repeated only once to specify the mode configuration for the service. The privileges block holds the security options for the container and supports the following: credential_spec - (Optional, block) For managed service account (Windows only) file - (Optional, string) Load credential spec from this file. registry - (Optional, string) Load credential spec from this value in the Windows registry. se_linux_context - (Optional, block) SELinux labels of the container disable - (Optional, bool) Disable SELinux user - (Optional, string) SELinux user label role - (Optional, string) SELinux role label type - (Optional, string) SELinux type label level - (Optional, string) SELinux level label Mounts mount is a block within the configuration that can be repeated to specify the extra mount mappings for the container. Each mount block is the Specification for mounts to be added to containers created as part of the service and supports the following: target - (Required, string) The container path. source - (Required, string) The mount source (e.g., a volume name, a host path) type - (Required, string) The mount type: valid values are bind|volume|tmpfs. read_only - (Optional, string) Whether the mount should be read-only bind_options - (Optional, map) Optional configuration for the bind type. propagation - (Optional, string) A propagation mode with the value. volume_options - (Optional, map) Optional configuration for the volume type. no_copy - (Optional, string) Whether to populate volume with data from the target. labels - (Optional, map of key/value pairs) Adding labels. driver_config - (Optional, map) The name of the driver to create the volume. name - (Optional, string) The name of the driver to create the volume. options - (Optional, map of key/value pairs) Options for the driver. tmpf_options - (Optional, map) Optional configuration for the tmpf type. size_bytes - (Optional, int) The size for the tmpfs mount in bytes. mode - (Optional, int) The permission mode for the tmpfs mount in an integer. Healthcheck healthcheck is a block within the configuration that can be repeated only once to specify the extra healthcheck configuration for the containers of the service. The healthcheck block is a test to perform to check that the container is healthy and supports the following: test - (Required, list of strings) Command to run to check health. For example, to run curl -f http://localhost/health set the command to be ["CMD", "curl", "-f", "http://localhost/health"]. interval - (Optional, string) Time between running the check (ms|s|m|h). Default: 0s. timeout - (Optional, string) Maximum time to allow one check to run (ms|s|m|h). Default: 0s. start_period - (Optional, string) Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Default: 0s. start_period - Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Default: 0s. retries - (Optional, int) Consecutive failures needed to report unhealthy. Default: 0. DNS Config dns_config is a block within the configuration that can be repeated only once to specify the extra DNS configuration for the containers of the service. The dns_config block supports the following: nameservers - (Required, list of strings) The IP addresses of the name servers, for example, 743.354.7638 search - (Optional, list of strings)A search list for host-name lookup. options - (Optional, list of strings) A list of internal resolver variables to be modified, for example, debug, ndots:3 Secrets secrets is a block within the configuration that can be repeated to specify the extra mount mappings for the container. Each secrets block is a reference to a secret that will be exposed to the service and supports the following: secret_id - (Required, string) ConfigID represents the ID of the specific secret. secret_name - (Optional, string) The name of the secret that this references, but internally it is just provided for lookup/display purposes file_name - (Required, string) Represents the final filename in the filesystem. The specific target file that the secret data is written within the docker container, e.g. /root/secret/secret.json Configs configs is a block within the configuration that can be repeated to specify the extra mount mappings for the container. Each configs is a reference to a secret that is exposed to the service and supports the following: config_id - (Required, string) ConfigID represents the ID of the specific config. config_name - (Optional, string) The name of the config that this references, but internally it is just provided for lookup/display purposes file_name - (Required, string) Represents the final filename in the filesystem. The specific target file that the config data is written within the docker container, e.g. /root/config/config.json Resources resources is a block within the configuration that can be repeated only once to specify the mode configuration for the service. The resources block represents the requirements which apply to each container created as part of the service and supports the following: limits - (Optional, list of strings) Describes the resources which can be advertised by a node and requested by a task. nano_cpus (Optional, int) CPU shares in units of 1/1e9 (or 10-9) of the CPU. Should be at least 1000000 memory_bytes (Optional, int) The amount of memory in bytes the container allocates generic_resources (Optional, map) User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1) named_resources_spec (Optional, set of string) The String resources, delimited by = discrete_resources_spec (Optional, set of string) The Integer resources, delimited by = reservation - (Optional, list of strings) An object describing the resources which can be advertised by a node and requested by a task. nano_cpus (Optional, int) CPU shares in units of 1/1e9 (or 10-9) of the CPU. Should be at least 1000000 memory_bytes (Optional, int) The amount of memory in bytes the container allocates generic_resources (Optional, map) User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1) named_resources_spec (Optional, set of string) The String resources discrete_resources_spec (Optional, set of string) The Integer resources Restart Policy restart_policy is a block within the configuration that can be repeated only once to specify the mode configuration for the service. The restart_policy block specifies the restart policy which applies to containers created as part of this service and supports the following: condition (Optional, string) Condition for restart: (none|on-failure|any) delay (Optional, string) Delay between restart attempts (ms|s|m|h) max_attempts (Optional, string) Maximum attempts to restart a given container before giving up (default value is 0, which is ignored) window (Optional, string) The time window used to evaluate the restart policy (default value is 0, which is unbounded) (ms|s|m|h) Placement placement is a block within the configuration that can be repeated only once to specify the mode configuration for the service. The placement block specifies the placement preferences and supports the following: constraints (Optional, set of strings) An array of constraints. e.g.: node.role==manager prefs (Optional, set of string) Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: spread=node.role.manager platforms (Optional, set of) Platforms stores all the platforms that the service's image can run on architecture (Required, string) The architecture, e.g., amd64 os (Required, string) The operation system, e.g., linux Log Driver log_driver is a block within the configuration that can be repeated only once to specify the extra log_driver configuration for the containers of the service. The log_driver specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified. The block supports the following: name - (Required, string) The logging driver to use. Either (none|json-file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs). options - (Optional, a map of strings and strings) The options for the logging driver, e.g. options { awslogs-region = "us-west-2" awslogs-group = "dev/foo-service" } Mode mode is a block within the configuration that can be repeated only once to specify the mode configuration for the service. The mode block supports the following: global - (Optional, bool) set it to true to run the service in the global mode resource "docker_service" "foo" { ... mode { global = true } ... } replicated - (Optional, map), which contains atm only the amount of replicas resource "docker_service" "foo" { ... mode { replicated { replicas = 2 } } ... } NOTE on mode: if neither global nor replicated is specified, the service is started in replicated mode with 1 replica. A change of service mode is not possible. The service has to be destroyed an recreated in the new mode. UpdateConfig and RollbackConfig update_config or rollback_config is a block within the configuration that can be repeated only once to specify the extra update configuration for the containers of the service. The update_config rollback_config block supports the following: parallelism - (Optional, int) The maximum number of tasks to be updated in one iteration simultaneously (0 to update all at once). delay - (Optional, int) Delay between updates (ns|us|ms|s|m|h), e.g. 5s. failure_action - (Optional, int) Action on update failure: pause|continue|rollback. monitor - (Optional, int) Duration after each task update to monitor for failure (ns|us|ms|s|m|h) max_failure_ratio - (Optional, string) The failure rate to tolerate during an update as float. Important: the floatneed to be wrapped in a string to avoid internal casting and precision errors. order - (Optional, int) Update order either 'stop-first' or 'start-first'. EndpointSpec endpoint_spec is a block within the configuration that can be repeated only once to specify properties that can be configured to access and load balance a service. The block supports the following: mode - (Optional, string) The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip. ports - (Optional, block) See Ports below for details. Ports ports is a block within the configuration that can be repeated to specify the port mappings of the container. Each ports block supports the following: name - (Optional, string) A random name for the port. protocol - (Optional, string) Protocol that can be used over this port: tcp|udp|sctp. Default: tcp. target_port - (Required, int) Port inside the container. published_port - (Required, int) The port on the swarm hosts. If not set the value of target_port will be used. publish_mode - (Optional, string) Represents the mode in which the port is to be published: ingress|host Converge Config converge_config is a block within the configuration that can be repeated only once to specify the extra Converging configuration for the containers of the service. This is the same behavior as the docker cli. By adding this configuration, it is monitored with the given interval that, e.g., all tasks/replicas of a service are up and healthy The converge_config block supports the following: delay - (Optional, string) Time between each the check to check docker endpoint (ms|s|m|h). For example, to check if all tasks are up when a service is created, or to check if all tasks are successfully updated on an update. Default: 7s. timeout - (Optional, string) The timeout of the service to reach the desired state (s|m). Default: 3m. Attributes Reference The following attributes are exported in addition to the above configuration: id (string)
ovirt_host_pm - Module to manage power management of hosts in oVirt/RHV New in version 2.3. Synopsis Requirements Parameters Notes Examples Return Values Status Author Synopsis Module to manage power management of hosts in oVirt/RHV. Requirements The below requirements are needed on the host that executes this module. python >= 2.7 ovirt-engine-sdk-python >= 4.2.4 Parameters Parameter Choices/Defaults Comments address Address of the power management interface. auth required Dictionary with values needed to create HTTP/HTTPS connection to oVirt: username[required] - The name of the user, something like [email protected]. Default value is set by OVIRT_USERNAME environment variable. password[required] - The password of the user. Default value is set by OVIRT_PASSWORD environment variable. url[required] - A string containing the base URL of the server, usually something like `https://server.example.com/ovirt-engine/api`. Default value is set by OVIRT_URL environment variable. token - Token to be used instead of login with username/password. Default value is set by OVIRT_TOKEN environment variable. insecure - A boolean flag that indicates if the server TLS certificate and host name should be checked. ca_file - A PEM file containing the trusted CA certificates. The certificate presented by the server will be verified using these CA certificates. If `ca_file` parameter is not set, system wide CA certificate store is used. Default value is set by OVIRT_CAFILE environment variable. kerberos - A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. headers - Dictionary of HTTP headers to be added to each API call. encrypt_options If (true) options will be encrypted when send to agent. aliases: encrypt fetch_nested (added in 2.3) If True the module will fetch additional data from the API. It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying nested_attributes. name required Name of the host to manage. aliases: host nested_attributes (added in 2.3) Specifies list of the attributes which should be fetched from the API. This parameter apply only when fetch_nested is true. options Dictionary of additional fence agent options. Additional information about options can be found at https://fedorahosted.org/cluster/wiki/FenceArguments. order (added in 2.5) Integer value specifying, by default it's added at the end. password Password of the user specified in username parameter. poll_interval Default:3 Number of the seconds the module waits until another poll request on entity status is sent. port Power management interface port. slot Power management slot. state Choices: present ← absent Should the host be present/absent. timeout Default:180 The amount of time in seconds the module should wait for the instance to get into desired state. type Type of the power management. oVirt/RHV predefined values are drac5, ipmilan, rsa, bladecenter, alom, apc, apc_snmp, eps, wti, rsb, cisco_ucs, drac7, hpblade, ilo, ilo2, ilo3, ilo4, ilo_ssh, but user can have defined custom type. username Username to be used to connect to power management interface. wait True if the module should wait for the entity to get into desired state. Notes Note In order to use this module you have to install oVirt Python SDK. To ensure it’s installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.0.0 Examples # Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: # Add fence agent to host 'myhost' - ovirt_host_pm: name: myhost address: 413.849.1008 options: myoption1: x myoption2: y username: admin password: admin port: 3333 type: ipmilan # Remove ipmilan fence agent with address 413.849.1008 on host 'myhost' - ovirt_host_pm: state: absent name: myhost address: 413.849.1008 type: ipmilan Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description agent dict On success if agent is found. Dictionary of all the agent attributes. Agent attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/agent. id str On success if agent is found. ID of the agent which is managed Sample: 7de90f31-222c-436c-a1ca-7e655bd5b60c Status This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface. Author Ondra Machacek (@machacekondra) Hint If you notice any issues in this documentation you can edit this document to improve it. © 2012–2018 Michael DeHaan
Class ColorModel java.lang.Object java.awt.image.ColorModel All Implemented Interfaces: Transparency Direct Known Subclasses: ComponentColorModel, IndexColorModel, PackedColorModel public abstract class ColorModel extends Object implements Transparency The ColorModel abstract class encapsulates the methods for translating a pixel value to color components (for example, red, green, and blue) and an alpha component. In order to render an image to the screen, a printer, or another image, pixel values must be converted to color and alpha components. As arguments to or return values from methods of this class, pixels are represented as 32-bit ints or as arrays of primitive types. The number, order, and interpretation of color components for a ColorModel is specified by its ColorSpace. A ColorModel used with pixel data that does not include alpha information treats all pixels as opaque, which is an alpha value of 1.0. This ColorModel class supports two representations of pixel values. A pixel value can be a single 32-bit int or an array of primitive types. The Java(tm) Platform 1.0 and 1.1 APIs represented pixels as single byte or single int values. For purposes of the ColorModel class, pixel value arguments were passed as ints. The Java(tm) 2 Platform API introduced additional classes for representing images. With BufferedImage or RenderedImage objects, based on Raster and SampleModel classes, pixel values might not be conveniently representable as a single int. Consequently, ColorModel now has methods that accept pixel values represented as arrays of primitive types. The primitive type used by a particular ColorModel object is called its transfer type. ColorModel objects used with images for which pixel values are not conveniently representable as a single int throw an IllegalArgumentException when methods taking a single int pixel argument are called. Subclasses of ColorModel must specify the conditions under which this occurs. This does not occur with DirectColorModel or IndexColorModel objects. Currently, the transfer types supported by the Java 2D(tm) API are DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, DataBuffer.TYPE_INT, DataBuffer.TYPE_SHORT, DataBuffer.TYPE_FLOAT, and DataBuffer.TYPE_DOUBLE. Most rendering operations will perform much faster when using ColorModels and images based on the first three of these types. In addition, some image filtering operations are not supported for ColorModels and images based on the latter three types. The transfer type for a particular ColorModel object is specified when the object is created, either explicitly or by default. All subclasses of ColorModel must specify what the possible transfer types are and how the number of elements in the primitive arrays representing pixels is determined. For BufferedImages, the transfer type of its Raster and of the Raster object's SampleModel (available from the getTransferType methods of these classes) must match that of the ColorModel. The number of elements in an array representing a pixel for the Raster and SampleModel (available from the getNumDataElements methods of these classes) must match that of the ColorModel. The algorithm used to convert from pixel values to color and alpha components varies by subclass. For example, there is not necessarily a one-to-one correspondence between samples obtained from the SampleModel of a BufferedImage object's Raster and color/alpha components. Even when there is such a correspondence, the number of bits in a sample is not necessarily the same as the number of bits in the corresponding color/alpha component. Each subclass must specify how the translation from pixel values to color/alpha components is done. Methods in the ColorModel class use two different representations of color and alpha components - a normalized form and an unnormalized form. In the normalized form, each component is a float value between some minimum and maximum values. For the alpha component, the minimum is 0.0 and the maximum is 1.0. For color components the minimum and maximum values for each component can be obtained from the ColorSpace object. These values will often be 0.0 and 1.0 (e.g. normalized component values for the default sRGB color space range from 0.0 to 1.0), but some color spaces have component values with different upper and lower limits. These limits can be obtained using the getMinValue and getMaxValue methods of the ColorSpace class. Normalized color component values are not premultiplied. All ColorModels must support the normalized form. In the unnormalized form, each component is an unsigned integral value between 0 and 2n - 1, where n is the number of significant bits for a particular component. If pixel values for a particular ColorModel represent color samples premultiplied by the alpha sample, unnormalized color component values are also premultiplied. The unnormalized form is used only with instances of ColorModel whose ColorSpace has minimum component values of 0.0 for all components and maximum values of 1.0 for all components. The unnormalized form for color and alpha components can be a convenient representation for ColorModels whose normalized component values all lie between 0.0 and 1.0. In such cases the integral value 0 maps to 0.0 and the value 2n - 1 maps to 1.0. In other cases, such as when the normalized component values can be either negative or positive, the unnormalized form is not convenient. Such ColorModel objects throw an IllegalArgumentException when methods involving an unnormalized argument are called. Subclasses of ColorModel must specify the conditions under which this occurs. See Also: IndexColorModel ComponentColorModel PackedColorModel DirectColorModel Image BufferedImage RenderedImage ColorSpace SampleModel Raster DataBuffer Field Summary Modifier and Type Field Description protected int pixel_bits The total number of bits in the pixel. protected int transferType Data type of the array used to represent pixel values. Fields declared in interface java.awt.Transparency BITMASK, OPAQUE, TRANSLUCENT Constructor Summary ColorModel(int bits) ColorModel(int pixel_bits, int[] bits, ColorSpace cspace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType) Modifier Constructor Description Constructs a ColorModel that translates pixels of the specified number of bits to color/alpha components. protected Constructs a ColorModel that translates pixel values to color/alpha components. Method Summary Modifier and Type Method Description ColorModel coerceData(WritableRaster raster, boolean isAlphaPremultiplied) Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel. SampleModel createCompatibleSampleModel(int w, int h) Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel. WritableRaster createCompatibleWritableRaster(int w, int h) Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel. boolean equals(Object obj) This method simply delegates to the default implementation in Object which is identical to an == test since this class cannot enforce the issues of a proper equality test among multiple independent subclass branches. void finalize() Deprecated, for removal: This API element is subject to removal in a future version. The finalize method has been deprecated. abstract int getAlpha(int pixel) Returns the alpha component for the specified pixel, scaled from 0 to 255. int getAlpha(Object inData) Returns the alpha component for the specified pixel, scaled from 0 to 255. WritableRaster getAlphaRaster(WritableRaster raster) Returns a Raster representing the alpha channel of an image, extracted from the input Raster, provided that pixel values of this ColorModel represent color and alpha information as separate spatial bands (e.g. abstract int getBlue(int pixel) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. int getBlue(Object inData) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. final ColorSpace getColorSpace() Returns the ColorSpace associated with this ColorModel. int[] getComponents(int pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel. int[] getComponents(Object pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel. int[] getComponentSize() Returns an array of the number of bits per color/alpha component. int getComponentSize(int componentIdx) Returns the number of bits for the specified color/alpha component. int getDataElement(float[] normComponents, int normOffset) Returns a pixel value represented as an int in this ColorModel, given an array of normalized color/alpha components. int getDataElement(int[] components, int offset) Returns a pixel value represented as an int in this ColorModel, given an array of unnormalized color/alpha components. Object getDataElements(float[] normComponents, int normOffset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of normalized color/alpha components. Object getDataElements(int[] components, int offset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components. Object getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model. abstract int getGreen(int pixel) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. int getGreen(Object inData) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. float[] getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset) Returns an array of all of the color/alpha components in normalized form, given an unnormalized component array. float[] getNormalizedComponents(Object pixel, float[] normComponents, int normOffset) Returns an array of all of the color/alpha components in normalized form, given a pixel in this ColorModel. int getNumColorComponents() Returns the number of color components in this ColorModel. int getNumComponents() Returns the number of components, including alpha, in this ColorModel. int getPixelSize() Returns the number of bits per pixel described by this ColorModel. abstract int getRed(int pixel) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. int getRed(Object inData) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. int getRGB(int pixel) Returns the color/alpha components of the pixel in the default RGB color model format. int getRGB(Object inData) Returns the color/alpha components for the specified pixel in the default RGB color model format. static ColorModel getRGBdefault() Returns a DirectColorModel that describes the default format for integer RGB values used in many of the methods in the AWT image interfaces for the convenience of the programmer. final int getTransferType() Returns the transfer type of this ColorModel. int getTransparency() Returns the transparency. int[] getUnnormalizedComponents(float[] normComponents, int normOffset, int[] components, int offset) Returns an array of all of the color/alpha components in unnormalized form, given a normalized component array. final boolean hasAlpha() Returns whether or not alpha is supported in this ColorModel. int hashCode() This method simply delegates to the default implementation in Object which returns the system ID for the class. final boolean isAlphaPremultiplied() Returns whether or not the alpha has been premultiplied in the pixel values to be translated by this ColorModel. boolean isCompatibleRaster(Raster raster) Returns true if raster is compatible with this ColorModel and false if it is not. boolean isCompatibleSampleModel(SampleModel sm) Checks if the SampleModel is compatible with this ColorModel. String toString() Returns the String representation of the contents of this ColorModel object. Methods declared in class java.lang.Object clone, getClass, notify, notifyAll, wait, wait, wait Field Details pixel_bits protected int pixel_bits The total number of bits in the pixel. transferType protected int transferType Data type of the array used to represent pixel values. Constructor Details ColorModel public ColorModel(int bits) Constructs a ColorModel that translates pixels of the specified number of bits to color/alpha components. The color space is the default RGB ColorSpace, which is sRGB. Pixel values are assumed to include alpha information. If color and alpha information are represented in the pixel value as separate spatial bands, the color bands are assumed not to be premultiplied with the alpha value. The transparency type is java.awt.Transparency.TRANSLUCENT. The transfer type will be the smallest of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT that can hold a single pixel (or DataBuffer.TYPE_UNDEFINED if bits is greater than 32). Since this constructor has no information about the number of bits per color and alpha component, any subclass calling this constructor should override any method that requires this information. Parameters: bits - the number of bits of a pixel Throws: IllegalArgumentException - if the number of bits in bits is less than 1 ColorModel protected ColorModel(int pixel_bits, int[] bits, ColorSpace cspace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType) Constructs a ColorModel that translates pixel values to color/alpha components. Color components will be in the specified ColorSpace. pixel_bits is the number of bits in the pixel values. The bits array specifies the number of significant bits per color and alpha component. Its length should be the number of components in the ColorSpace if there is no alpha information in the pixel values, or one more than this number if there is alpha information. hasAlpha indicates whether or not alpha information is present. The boolean isAlphaPremultiplied specifies how to interpret pixel values in which color and alpha information are represented as separate spatial bands. If the boolean is true, color samples are assumed to have been multiplied by the alpha sample. The transparency specifies what alpha values can be represented by this color model. The transfer type is the type of primitive array used to represent pixel values. Note that the bits array contains the number of significant bits per color/alpha component after the translation from pixel values. For example, for an IndexColorModel with pixel_bits equal to 16, the bits array might have four elements with each element set to 8. Parameters: pixel_bits - the number of bits in the pixel values bits - array that specifies the number of significant bits per color and alpha component cspace - the specified ColorSpace hasAlpha - true if alpha information is present; false otherwise isAlphaPremultiplied - true if color samples are assumed to be premultiplied by the alpha samples; false otherwise transparency - what alpha values can be represented by this color model transferType - the type of the array used to represent pixel values Throws: IllegalArgumentException - if the length of the bit array is less than the number of color or alpha components in this ColorModel, or if the transparency is not a valid value. IllegalArgumentException - if the sum of the number of bits in bits is less than 1 or if any of the elements in bits is less than 0. See Also: Transparency Method Details getRGBdefault public static ColorModel getRGBdefault() Returns a DirectColorModel that describes the default format for integer RGB values used in many of the methods in the AWT image interfaces for the convenience of the programmer. The color space is the default ColorSpace, sRGB. The format for the RGB values is an integer with 8 bits each of alpha, red, green, and blue color components ordered correspondingly from the most significant byte to the least significant byte, as in: 0xAARRGGBB. Color components are not premultiplied by the alpha component. This format does not necessarily represent the native or the most efficient ColorModel for a particular device or for all images. It is merely used as a common color model format. Returns: a DirectColorModel object describing default RGB values. hasAlpha public final boolean hasAlpha() Returns whether or not alpha is supported in this ColorModel. Returns: true if alpha is supported in this ColorModel; false otherwise. isAlphaPremultiplied public final boolean isAlphaPremultiplied() Returns whether or not the alpha has been premultiplied in the pixel values to be translated by this ColorModel. If the boolean is true, this ColorModel is to be used to interpret pixel values in which color and alpha information are represented as separate spatial bands, and color samples are assumed to have been multiplied by the alpha sample. Returns: true if the alpha values are premultiplied in the pixel values to be translated by this ColorModel; false otherwise. getTransferType public final int getTransferType() Returns the transfer type of this ColorModel. The transfer type is the type of primitive array used to represent pixel values as arrays. Returns: the transfer type. Since: 1.3 getPixelSize public int getPixelSize() Returns the number of bits per pixel described by this ColorModel. Returns: the number of bits per pixel. getComponentSize public int getComponentSize(int componentIdx) Returns the number of bits for the specified color/alpha component. Color components are indexed in the order specified by the ColorSpace. Typically, this order reflects the name of the color space type. For example, for TYPE_RGB, index 0 corresponds to red, index 1 to green, and index 2 to blue. If this ColorModel supports alpha, the alpha component corresponds to the index following the last color component. Parameters: componentIdx - the index of the color/alpha component Returns: the number of bits for the color/alpha component at the specified index. Throws: ArrayIndexOutOfBoundsException - if componentIdx is greater than the number of components or less than zero NullPointerException - if the number of bits array is null getComponentSize public int[] getComponentSize() Returns an array of the number of bits per color/alpha component. The array contains the color components in the order specified by the ColorSpace, followed by the alpha component, if present. Returns: an array of the number of bits per color/alpha component getTransparency public int getTransparency() Returns the transparency. Returns either OPAQUE, BITMASK, or TRANSLUCENT. Specified by: getTransparency in interface Transparency Returns: the transparency of this ColorModel. See Also: Transparency.OPAQUE Transparency.BITMASK Transparency.TRANSLUCENT getNumComponents public int getNumComponents() Returns the number of components, including alpha, in this ColorModel. This is equal to the number of color components, optionally plus one, if there is an alpha component. Returns: the number of components in this ColorModel getNumColorComponents public int getNumColorComponents() Returns the number of color components in this ColorModel. This is the number of components returned by ColorSpace.getNumComponents(). Returns: the number of color components in this ColorModel. See Also: ColorSpace.getNumComponents() getRed public abstract int getRed(int pixel) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified as an int. An IllegalArgumentException is thrown if pixel values for this ColorModel are not conveniently representable as a single int. The returned value is not a pre-multiplied value. For example, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, the red value is 0. Parameters: pixel - a specified pixel Returns: the value of the red component of the specified pixel. getGreen public abstract int getGreen(int pixel) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified as an int. An IllegalArgumentException is thrown if pixel values for this ColorModel are not conveniently representable as a single int. The returned value is a non pre-multiplied value. For example, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, the green value is 0. Parameters: pixel - the specified pixel Returns: the value of the green component of the specified pixel. getBlue public abstract int getBlue(int pixel) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified as an int. An IllegalArgumentException is thrown if pixel values for this ColorModel are not conveniently representable as a single int. The returned value is a non pre-multiplied value, for example, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, the blue value is 0. Parameters: pixel - the specified pixel Returns: the value of the blue component of the specified pixel. getAlpha public abstract int getAlpha(int pixel) Returns the alpha component for the specified pixel, scaled from 0 to 255. The pixel value is specified as an int. An IllegalArgumentException is thrown if pixel values for this ColorModel are not conveniently representable as a single int. Parameters: pixel - the specified pixel Returns: the value of alpha component of the specified pixel. getRGB public int getRGB(int pixel) Returns the color/alpha components of the pixel in the default RGB color model format. A color conversion is done if necessary. The pixel value is specified as an int. An IllegalArgumentException thrown if pixel values for this ColorModel are not conveniently representable as a single int. The returned value is in a non pre-multiplied format. For example, if the alpha is premultiplied, this method divides it out of the color components. If the alpha value is 0, the color values are 0. Parameters: pixel - the specified pixel Returns: the RGB value of the color/alpha components of the specified pixel. See Also: getRGBdefault() getRed public int getRed(Object inData) Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value is a non pre-multiplied value. For example, if alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, the red value is 0. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. If this transferType is not supported, a UnsupportedOperationException will be thrown. Since ColorModel is an abstract class, any instance must be an instance of a subclass. Subclasses inherit the implementation of this method and if they don't override it, this method throws an exception if the subclass uses a transferType other than DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Parameters: inData - an array of pixel values Returns: the value of the red component of the specified pixel. Throws: ClassCastException - if inData is not a primitive array of type transferType ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel UnsupportedOperationException - if this transferType is not supported by this ColorModel getGreen public int getGreen(Object inData) Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value will be a non pre-multiplied value. For example, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, the green value is 0. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. If this transferType is not supported, a UnsupportedOperationException will be thrown. Since ColorModel is an abstract class, any instance must be an instance of a subclass. Subclasses inherit the implementation of this method and if they don't override it, this method throws an exception if the subclass uses a transferType other than DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Parameters: inData - an array of pixel values Returns: the value of the green component of the specified pixel. Throws: ClassCastException - if inData is not a primitive array of type transferType ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel UnsupportedOperationException - if this transferType is not supported by this ColorModel getBlue public int getBlue(Object inData) Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. The returned value is a non pre-multiplied value. For example, if the alpha is premultiplied, this method divides it out before returning the value. If the alpha value is 0, the blue value will be 0. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. If this transferType is not supported, a UnsupportedOperationException will be thrown. Since ColorModel is an abstract class, any instance must be an instance of a subclass. Subclasses inherit the implementation of this method and if they don't override it, this method throws an exception if the subclass uses a transferType other than DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Parameters: inData - an array of pixel values Returns: the value of the blue component of the specified pixel. Throws: ClassCastException - if inData is not a primitive array of type transferType ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel UnsupportedOperationException - if this transferType is not supported by this ColorModel getAlpha public int getAlpha(Object inData) Returns the alpha component for the specified pixel, scaled from 0 to 255. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. If this transferType is not supported, a UnsupportedOperationException will be thrown. Since ColorModel is an abstract class, any instance must be an instance of a subclass. Subclasses inherit the implementation of this method and if they don't override it, this method throws an exception if the subclass uses a transferType other than DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, or DataBuffer.TYPE_INT. Parameters: inData - the specified pixel Returns: the alpha component of the specified pixel, scaled from 0 to 255. Throws: ClassCastException - if inData is not a primitive array of type transferType ArrayIndexOutOfBoundsException - if inData is not large enough to hold a pixel value for this ColorModel UnsupportedOperationException - if this tranferType is not supported by this ColorModel getRGB public int getRGB(Object inData) Returns the color/alpha components for the specified pixel in the default RGB color model format. A color conversion is done if necessary. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. If inData is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if inData is not large enough to hold a pixel value for this ColorModel. The returned value will be in a non pre-multiplied format, i.e. if the alpha is premultiplied, this method will divide it out of the color components (if the alpha value is 0, the color values will be 0). Parameters: inData - the specified pixel Returns: the color and alpha components of the specified pixel. See Also: getRGBdefault() getDataElements public Object getDataElements(int rgb, Object pixel) Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model. This array can then be passed to the WritableRaster.setDataElements(int, int, java.lang.Object) method of a WritableRaster object. If the pixel variable is null, a new array will be allocated. If pixel is not null, it must be a primitive array of type transferType; otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if pixel is not large enough to hold a pixel value for this ColorModel. The pixel array is returned. If this transferType is not supported, a UnsupportedOperationException will be thrown. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException. Parameters: rgb - the integer pixel representation in the default RGB color model pixel - the specified pixel Returns: an array representation of the specified pixel in this ColorModel. Throws: ClassCastException - if pixel is not a primitive array of type transferType ArrayIndexOutOfBoundsException - if pixel is not large enough to hold a pixel value for this ColorModel UnsupportedOperationException - if this method is not supported by this ColorModel See Also: WritableRaster.setDataElements(int, int, java.lang.Object) SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer) getComponents public int[] getComponents(int pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel. The pixel value is specified as an int. An IllegalArgumentException will be thrown if pixel values for this ColorModel are not conveniently representable as a single int or if color component values for this ColorModel are not conveniently representable in the unnormalized form. For example, this method can be used to retrieve the components for a specific pixel value in a DirectColorModel. If the components array is null, a new array will be allocated. The components array will be returned. Color/alpha components are stored in the components array starting at offset (even if the array is allocated by this method). An ArrayIndexOutOfBoundsException is thrown if the components array is not null and is not large enough to hold all the color and alpha components (starting at offset). Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException. Parameters: pixel - the specified pixel components - the array to receive the color and alpha components of the specified pixel offset - the offset into the components array at which to start storing the color and alpha components Returns: an array containing the color and alpha components of the specified pixel starting at the specified offset. Throws: UnsupportedOperationException - if this method is not supported by this ColorModel getComponents public int[] getComponents(Object pixel, int[] components, int offset) Returns an array of unnormalized color/alpha components given a pixel in this ColorModel. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. If pixel is not a primitive array of type transferType, a ClassCastException is thrown. An IllegalArgumentException will be thrown if color component values for this ColorModel are not conveniently representable in the unnormalized form. An ArrayIndexOutOfBoundsException is thrown if pixel is not large enough to hold a pixel value for this ColorModel. This method can be used to retrieve the components for a specific pixel value in any ColorModel. If the components array is null, a new array will be allocated. The components array will be returned. Color/alpha components are stored in the components array starting at offset (even if the array is allocated by this method). An ArrayIndexOutOfBoundsException is thrown if the components array is not null and is not large enough to hold all the color and alpha components (starting at offset). Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException. Parameters: pixel - the specified pixel components - an array that receives the color and alpha components of the specified pixel offset - the index into the components array at which to begin storing the color and alpha components of the specified pixel Returns: an array containing the color and alpha components of the specified pixel starting at the specified offset. Throws: UnsupportedOperationException - if this method is not supported by this ColorModel getUnnormalizedComponents public int[] getUnnormalizedComponents(float[] normComponents, int normOffset, int[] components, int offset) Returns an array of all of the color/alpha components in unnormalized form, given a normalized component array. Unnormalized components are unsigned integral values between 0 and 2n - 1, where n is the number of bits for a particular component. Normalized components are float values between a per component minimum and maximum specified by the ColorSpace object for this ColorModel. An IllegalArgumentException will be thrown if color component values for this ColorModel are not conveniently representable in the unnormalized form. If the components array is null, a new array will be allocated. The components array will be returned. Color/alpha components are stored in the components array starting at offset (even if the array is allocated by this method). An ArrayIndexOutOfBoundsException is thrown if the components array is not null and is not large enough to hold all the color and alpha components (starting at offset). An IllegalArgumentException is thrown if the normComponents array is not large enough to hold all the color and alpha components [email protected]. Parameters: normComponents - an array containing normalized components normOffset - the offset into the normComponents array at which to start retrieving normalized components components - an array that receives the components from normComponents offset - the index into components at which to begin storing normalized components from normComponents Returns: an array containing unnormalized color and alpha components. Throws: IllegalArgumentException - If the component values for this ColorModel are not conveniently representable in the unnormalized form. IllegalArgumentException - if the length of normComponents minus normOffset is less than numComponents UnsupportedOperationException - if the constructor of this ColorModel called the super(bits) constructor, but did not override this method. See the constructor, ColorModel(int). getNormalizedComponents public float[] getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset) Returns an array of all of the color/alpha components in normalized form, given an unnormalized component array. Unnormalized components are unsigned integral values between 0 and 2n - 1, where n is the number of bits for a particular component. Normalized components are float values between a per component minimum and maximum specified by the ColorSpace object for this ColorModel. An IllegalArgumentException will be thrown if color component values for this ColorModel are not conveniently representable in the unnormalized form. If the normComponents array is null, a new array will be allocated. The normComponents array will be returned. Color/alpha components are stored in the normComponents array starting at normOffset (even if the array is allocated by this method). An ArrayIndexOutOfBoundsException is thrown if the normComponents array is not null and is not large enough to hold all the color and alpha components (starting at normOffset). An IllegalArgumentException is thrown if the components array is not large enough to hold all the color and alpha components [email protected]. Since ColorModel is an abstract class, any instance is an instance of a subclass. The default implementation of this method in this abstract class assumes that component values for this class are conveniently representable in the unnormalized form. Therefore, subclasses which may have instances which do not support the unnormalized form must override this method. Parameters: components - an array containing unnormalized components offset - the offset into the components array at which to start retrieving unnormalized components normComponents - an array that receives the normalized components normOffset - the index into normComponents at which to begin storing normalized components Returns: an array containing normalized color and alpha components. Throws: IllegalArgumentException - If the component values for this ColorModel are not conveniently representable in the unnormalized form. UnsupportedOperationException - if the constructor of this ColorModel called the super(bits) constructor, but did not override this method. See the constructor, ColorModel(int). UnsupportedOperationException - if this method is unable to determine the number of bits per component getDataElement public int getDataElement(int[] components, int offset) Returns a pixel value represented as an int in this ColorModel, given an array of unnormalized color/alpha components. This method will throw an IllegalArgumentException if component values for this ColorModel are not conveniently representable as a single int or if color component values for this ColorModel are not conveniently representable in the unnormalized form. An ArrayIndexOutOfBoundsException is thrown if the components array is not large enough to hold all the color and alpha components (starting at offset). Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException. Parameters: components - an array of unnormalized color and alpha components offset - the index into components at which to begin retrieving the color and alpha components Returns: an int pixel value in this ColorModel corresponding to the specified components. Throws: IllegalArgumentException - if pixel values for this ColorModel are not conveniently representable as a single int IllegalArgumentException - if component values for this ColorModel are not conveniently representable in the unnormalized form ArrayIndexOutOfBoundsException - if the components array is not large enough to hold all of the color and alpha components starting at offset UnsupportedOperationException - if this method is not supported by this ColorModel getDataElements public Object getDataElements(int[] components, int offset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components. This array can then be passed to the setDataElements method of a WritableRaster object. This method will throw an IllegalArgumentException if color component values for this ColorModel are not conveniently representable in the unnormalized form. An ArrayIndexOutOfBoundsException is thrown if the components array is not large enough to hold all the color and alpha components (starting at offset). If the obj variable is null, a new array will be allocated. If obj is not null, it must be a primitive array of type transferType; otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if obj is not large enough to hold a pixel value for this ColorModel. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException. Parameters: components - an array of unnormalized color and alpha components offset - the index into components at which to begin retrieving color and alpha components obj - the Object representing an array of color and alpha components Returns: an Object representing an array of color and alpha components. Throws: ClassCastException - if obj is not a primitive array of type transferType ArrayIndexOutOfBoundsException - if obj is not large enough to hold a pixel value for this ColorModel or the components array is not large enough to hold all of the color and alpha components starting at offset IllegalArgumentException - if component values for this ColorModel are not conveniently representable in the unnormalized form UnsupportedOperationException - if this method is not supported by this ColorModel See Also: WritableRaster.setDataElements(int, int, java.lang.Object) SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer) getDataElement public int getDataElement(float[] normComponents, int normOffset) Returns a pixel value represented as an int in this ColorModel, given an array of normalized color/alpha components. This method will throw an IllegalArgumentException if pixel values for this ColorModel are not conveniently representable as a single int. An ArrayIndexOutOfBoundsException is thrown if the normComponents array is not large enough to hold all the color and alpha components (starting at normOffset). Since ColorModel is an abstract class, any instance is an instance of a subclass. The default implementation of this method in this abstract class first converts from the normalized form to the unnormalized form and then calls getDataElement(int[], int). Subclasses which may have instances which do not support the unnormalized form must override this method. Parameters: normComponents - an array of normalized color and alpha components normOffset - the index into normComponents at which to begin retrieving the color and alpha components Returns: an int pixel value in this ColorModel corresponding to the specified components. Throws: IllegalArgumentException - if pixel values for this ColorModel are not conveniently representable as a single int ArrayIndexOutOfBoundsException - if the normComponents array is not large enough to hold all of the color and alpha components starting at normOffset Since: 1.4 getDataElements public Object getDataElements(float[] normComponents, int normOffset, Object obj) Returns a data element array representation of a pixel in this ColorModel, given an array of normalized color/alpha components. This array can then be passed to the setDataElements method of a WritableRaster object. An ArrayIndexOutOfBoundsException is thrown if the normComponents array is not large enough to hold all the color and alpha components (starting at normOffset). If the obj variable is null, a new array will be allocated. If obj is not null, it must be a primitive array of type transferType; otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if obj is not large enough to hold a pixel value for this ColorModel. Since ColorModel is an abstract class, any instance is an instance of a subclass. The default implementation of this method in this abstract class first converts from the normalized form to the unnormalized form and then calls getDataElement(int[], int, Object). Subclasses which may have instances which do not support the unnormalized form must override this method. Parameters: normComponents - an array of normalized color and alpha components normOffset - the index into normComponents at which to begin retrieving color and alpha components obj - a primitive data array to hold the returned pixel Returns: an Object which is a primitive data array representation of a pixel Throws: ClassCastException - if obj is not a primitive array of type transferType ArrayIndexOutOfBoundsException - if obj is not large enough to hold a pixel value for this ColorModel or the normComponents array is not large enough to hold all of the color and alpha components starting at normOffset Since: 1.4 See Also: WritableRaster.setDataElements(int, int, java.lang.Object) SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer) getNormalizedComponents public float[] getNormalizedComponents(Object pixel, float[] normComponents, int normOffset) Returns an array of all of the color/alpha components in normalized form, given a pixel in this ColorModel. The pixel value is specified by an array of data elements of type transferType passed in as an object reference. If pixel is not a primitive array of type transferType, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException is thrown if pixel is not large enough to hold a pixel value for this ColorModel. Normalized components are float values between a per component minimum and maximum specified by the ColorSpace object for this ColorModel. If the normComponents array is null, a new array will be allocated. The normComponents array will be returned. Color/alpha components are stored in the normComponents array starting at normOffset (even if the array is allocated by this method). An ArrayIndexOutOfBoundsException is thrown if the normComponents array is not null and is not large enough to hold all the color and alpha components (starting at normOffset). Since ColorModel is an abstract class, any instance is an instance of a subclass. The default implementation of this method in this abstract class first retrieves color and alpha components in the unnormalized form using getComponents(Object, int[], int) and then calls getNormalizedComponents(int[], int, float[], int). Subclasses which may have instances which do not support the unnormalized form must override this method. Parameters: pixel - the specified pixel normComponents - an array to receive the normalized components normOffset - the offset into the normComponents array at which to start storing normalized components Returns: an array containing normalized color and alpha components. Throws: ClassCastException - if pixel is not a primitive array of type transferType ArrayIndexOutOfBoundsException - if normComponents is not large enough to hold all color and alpha components starting at normOffset ArrayIndexOutOfBoundsException - if pixel is not large enough to hold a pixel value for this ColorModel. UnsupportedOperationException - if the constructor of this ColorModel called the super(bits) constructor, but did not override this method. See the constructor, ColorModel(int). UnsupportedOperationException - if this method is unable to determine the number of bits per component Since: 1.4 equals public boolean equals(Object obj) This method simply delegates to the default implementation in Object which is identical to an == test since this class cannot enforce the issues of a proper equality test among multiple independent subclass branches. Subclasses are encouraged to override this method and provide equality testing for their own properties in addition to equality tests for the following common base properties of ColorModel: Support for alpha component. Is alpha premultiplied. Number of bits per pixel. Type of transparency like Opaque, Bitmask or Translucent. Number of components in a pixel. ColorSpace type. Type of the array used to represent pixel values. Number of significant bits per color and alpha component. Overrides: equals in class Object Parameters: obj - the reference object with which to compare. Returns: true if this object is the same as the obj argument; false otherwise. See Also: Object.hashCode() HashMap hashCode public int hashCode() This method simply delegates to the default implementation in Object which returns the system ID for the class. Subclasses are encouraged to override this method and provide a hash for their own properties in addition to hashing the values of the following common base properties of ColorModel: Support for alpha component. Is alpha premultiplied. Number of bits per pixel. Type of transparency like Opaque, Bitmask or Translucent. Number of components in a pixel. ColorSpace type. Type of the array used to represent pixel values. Number of significant bits per color and alpha component. Overrides: hashCode in class Object Returns: a hash code value for this object. See Also: Object.equals(java.lang.Object) System.identityHashCode(java.lang.Object) getColorSpace public final ColorSpace getColorSpace() Returns the ColorSpace associated with this ColorModel. Returns: the ColorSpace of this ColorModel. coerceData public ColorModel coerceData(WritableRaster raster, boolean isAlphaPremultiplied) Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel. It may multiply or divide the color raster data by alpha, or do nothing if the data is in the correct state. If the data needs to be coerced, this method will also return an instance of this ColorModel with the isAlphaPremultiplied flag set appropriately. This method will throw a UnsupportedOperationException if it is not supported by this ColorModel. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException. Parameters: raster - the WritableRaster data isAlphaPremultiplied - true if the alpha is premultiplied; false otherwise Returns: a ColorModel object that represents the coerced data. isCompatibleRaster public boolean isCompatibleRaster(Raster raster) Returns true if raster is compatible with this ColorModel and false if it is not. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException. Parameters: raster - the Raster object to test for compatibility Returns: true if raster is compatible with this ColorModel. Throws: UnsupportedOperationException - if this method has not been implemented for this ColorModel createCompatibleWritableRaster public WritableRaster createCompatibleWritableRaster(int w, int h) Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException. Parameters: w - the width to apply to the new WritableRaster h - the height to apply to the new WritableRaster Returns: a WritableRaster object with the specified width and height. Throws: UnsupportedOperationException - if this method is not supported by this ColorModel See Also: WritableRaster SampleModel createCompatibleSampleModel public SampleModel createCompatibleSampleModel(int w, int h) Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException. Parameters: w - the width to apply to the new SampleModel h - the height to apply to the new SampleModel Returns: a SampleModel object with the specified width and height. Throws: UnsupportedOperationException - if this method is not supported by this ColorModel See Also: SampleModel isCompatibleSampleModel public boolean isCompatibleSampleModel(SampleModel sm) Checks if the SampleModel is compatible with this ColorModel. Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method since the implementation in this abstract class throws an UnsupportedOperationException. Parameters: sm - the specified SampleModel Returns: true if the specified SampleModel is compatible with this ColorModel; false otherwise. Throws: UnsupportedOperationException - if this method is not supported by this ColorModel See Also: SampleModel finalize @Deprecated(since="9", forRemoval=true) public void finalize() Deprecated, for removal: This API element is subject to removal in a future version. The finalize method has been deprecated. Subclasses that override finalize in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overriding finalize method. When overriding the finalize method, its implementation must explicitly ensure that super.finalize() is invoked as described in Object.finalize(). See the specification for Object.finalize() for further information about migration options. Disposes of system resources associated with this ColorModel once this ColorModel is no longer referenced. Overrides: finalize in class Object See Also: WeakReference PhantomReference getAlphaRaster public WritableRaster getAlphaRaster(WritableRaster raster) Returns a Raster representing the alpha channel of an image, extracted from the input Raster, provided that pixel values of this ColorModel represent color and alpha information as separate spatial bands (e.g. ComponentColorModel and DirectColorModel). This method assumes that Raster objects associated with such a ColorModel store the alpha band, if present, as the last band of image data. Returns null if there is no separate spatial alpha channel associated with this ColorModel. If this is an IndexColorModel which has alpha in the lookup table, this method will return null since there is no spatially discrete alpha channel. This method will create a new Raster (but will share the data array). Since ColorModel is an abstract class, any instance is an instance of a subclass. Subclasses must override this method to get any behavior other than returning null because the implementation in this abstract class returns null. Parameters: raster - the specified
awx.awx.group – create, update, or destroy Automation Platform Controller group. Note This plugin is part of the awx.awx collection (version 19.4.0). 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 awx.awx. To use it in a playbook, specify: awx.awx.group. Synopsis Parameters Notes Examples Synopsis Create, update, or destroy Automation Platform Controller groups. See https://www.ansible.com/tower for an overview. Parameters Parameter Choices/Defaults Comments children list / elements=string List of groups that should be nested inside in this group. aliases: groups controller_config_file path Path to the controller config file. If provided, the other locations for config files will not be considered. aliases: tower_config_file controller_host string URL to your Automation Platform Controller instance. If value not set, will try environment variable CONTROLLER_HOST and then config files If value not specified by any means, the value of (385)779-3763 will be used aliases: tower_host controller_oauthtoken raw added in 3.7.0 of awx.awx The 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 token module. If value not set, will try environment variable CONTROLLER_OAUTH_TOKEN and then config files aliases: tower_oauthtoken controller_password string Password for your controller instance. If value not set, will try environment variable CONTROLLER_PASSWORD and then config files aliases: tower_password controller_username string Username for your controller instance. If value not set, will try environment variable CONTROLLER_USERNAME and then config files aliases: tower_username description string The description to use for the group. hosts list / elements=string List of hosts that should be put in this group. inventory string / required Inventory the group should be made a member of. name string / required The name to use for the group. new_name string A new name for this group (for renaming) preserve_existing_children boolean Choices: no ← yes Provide option (False by default) to preserves existing children in an existing group. aliases: preserve_existing_groups preserve_existing_hosts boolean Choices: no ← yes Provide option (False by default) to preserves existing hosts in an existing group. state string Choices: present ← absent Desired state of the resource. validate_certs boolean Choices: no yes Whether to allow insecure connections to 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 CONTROLLER_VERIFY_SSL and then config files aliases: tower_verify_ssl variables dictionary Variables to use for the group. Notes Note If no config_file is provided we will attempt to use the tower-cli library defaults to find your host information. config_file should be in the following format host=hostname username=username password=password Examples - name: Add group group: name: localhost description: "Local Host Group" inventory: "Local Inventory" state: present controller_config_file: "~/tower_cli.cfg" - name: Add group group: name: Cities description: "Local Host Group" inventory: Default Inventory hosts: - fda children: - NewYork preserve_existing_hosts: True preserve_existing_children: True Authors Wayne Witzel III (@wwitzel3) © 2012–2018 Michael DeHaan
class Net8b7c:f320:99b9:690f:4595:cd17:293a:c069HTTPUpgradeRequired Parent: Net8b7c:f320:99b9:690f:4595:cd17:293a:c069HTTPClientError 425 Unordered Collection - existed only in draft Constants HAS_BODY Ruby Core © 1993–2017 Yukihiro MatsumotoLicensed under the Ruby License.Ruby Standard Library
community.general.ini_file – Tweak settings in INI files 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.ini_file. Synopsis Parameters Notes Examples Synopsis Manage (add, remove, change) individual settings in an INI-style file without having to manage the file as a whole with, say, ansible.builtin.template or ansible.builtin.assemble. Adds missing sections if they don’t exist. Before Ansible 2.0, comments are discarded when the source file is read, and therefore will not show up in the destination file. Since Ansible 2.3, this module adds missing ending newlines to files to keep in line with the POSIX standard, even when no other modifications need to be applied. Parameters Parameter Choices/Defaults Comments allow_no_value boolean Choices: no ← yes Allow option without value and without '=' symbol. attributes string added in 2.3 of ansible.builtin The attributes the resulting file or directory should have. To get supported flags look at the man page for chattr on the target system. This string should contain the attributes in the same order as the one displayed by lsattr. The = operator is assumed as default, otherwise + or - operators need to be included in the string. aliases: attr backup boolean Choices: no ← yes Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. create boolean Choices: no yes ← If set to no, the module will fail if the file does not already exist. By default it will create the file if it is missing. group string Name of the group that should own the file/directory, as would be fed to chown. mode raw The permissions the resulting file or directory should have. For those used to /usr/bin/chmod remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like 0644 or 01777) or quote it (like '644' or '1777') so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, u+rwx or u=rw,g=r,o=r). no_extra_spaces boolean Choices: no ← yes Do not insert spaces before and after '=' symbol. option string If set (required for changing a value), this is the name of the option. May be omitted if adding/removing a whole section. owner string Name of the user that should own the file/directory, as would be fed to chown. path path / required Path to the INI-style file; this file is created if required. Before Ansible 2.3 this option was only usable as dest. aliases: dest section string / required Section name in INI file. This is added if state=present automatically when a single value is being set. If left empty or set to null, the option will be placed before the first section. Using null is also required if the config format does not support sections. selevel string The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the range. When set to _default, it will use the level portion of the policy if available. serole string The role part of the SELinux file context. When set to _default, it will use the role portion of the policy if available. setype string The type part of the SELinux file context. When set to _default, it will use the type portion of the policy if available. seuser string The user part of the SELinux file context. By default it uses the system policy, where applicable. When set to _default, it will use the user portion of the policy if available. state string Choices: absent present ← If set to absent the option or section will be removed if present instead of created. unsafe_writes boolean added in 2.2 of ansible.builtin Choices: no ← yes Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. value string The string value to be associated with an option. May be omitted when removing an option. Notes Note While it is possible to add an option without specifying a value, this makes no sense. As of Ansible 2.3, the dest option has been changed to path as default, but dest still works as well. Examples # Before Ansible 2.3, option 'dest' was used instead of 'path' - name: Ensure "fav=lemonade is in section "[drinks]" in specified file community.general.ini_file: path: /etc/conf section: drinks option: fav value: lemonade mode: '0600' backup: yes - name: Ensure "temperature=cold is in section "[drinks]" in specified file community.general.ini_file: path: /etc/anotherconf section: drinks option: temperature value: cold backup: yes Authors Jan-Piet Mens (@jpmens) Ales Nosek (@noseka1) © 2012–2018 Michael DeHaan
ngine_io.cloudstack.cs_vpn_gateway – Manages site-to-site VPN gateways on Apache CloudStack based clouds. Note This plugin is part of the ngine_io.cloudstack collection (version 1.1.0). To install it use: ansible-galaxy collection install ngine_io.cloudstack. To use it in a playbook, specify: ngine_io.cloudstack.cs_vpn_gateway. New in version 0.1.0: of ngine_io.cloudstack Synopsis Requirements Parameters Notes Examples Return Values Synopsis Creates and removes VPN site-to-site gateways. Requirements The below requirements are needed on the host that executes this module. python >= 2.6 cs >= 0.9.0 Parameters Parameter Choices/Defaults Comments account string Account the VPN gateway is related to. api_http_method string Choices: get post HTTP method used to query the API endpoint. If not given, the CLOUDSTACK_METHOD env variable is considered. As the last option, the value is taken from the ini config file, also see the notes. Fallback value is get if not specified. api_key string API key of the CloudStack API. If not given, the CLOUDSTACK_KEY env variable is considered. As the last option, the value is taken from the ini config file, also see the notes. api_region string Default:"cloudstack" Name of the ini section in the cloustack.ini file. If not given, the CLOUDSTACK_REGION env variable is considered. api_secret string Secret key of the CloudStack API. If not set, the CLOUDSTACK_SECRET env variable is considered. As the last option, the value is taken from the ini config file, also see the notes. api_timeout integer HTTP timeout in seconds. If not given, the CLOUDSTACK_TIMEOUT env variable is considered. As the last option, the value is taken from the ini config file, also see the notes. Fallback value is 10 seconds if not specified. api_url string URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the CLOUDSTACK_ENDPOINT env variable is considered. As the last option, the value is taken from the ini config file, also see the notes. api_verify_ssl_cert string CA authority cert file. If not given, the CLOUDSTACK_VERIFY env variable is considered. As the last option, the value is taken from the ini config file, also see the notes. Fallback value is null if not specified. domain string Domain the VPN gateway is related to. poll_async boolean Choices: no yes ← Poll async jobs until job has finished. project string Name of the project the VPN gateway is related to. state string Choices: present ← absent State of the VPN gateway. vpc string / required Name of the VPC. zone string Name of the zone the VPC is related to. If not set, default zone is used. Notes Note Ansible uses the cs library’s configuration method if credentials are not provided by the arguments api_url, api_key, api_secret. Configuration is read from several locations, in the following order. The CLOUDSTACK_ENDPOINT, CLOUDSTACK_KEY, CLOUDSTACK_SECRET and CLOUDSTACK_METHOD. CLOUDSTACK_TIMEOUT environment variables. A CLOUDSTACK_CONFIG environment variable pointing to an .ini file. A cloudstack.ini file in the current working directory. A .cloudstack.ini file in the users home directory. Optionally multiple credentials and endpoints can be specified using ini sections in cloudstack.ini. Use the argument api_region to select the section name, default section is cloudstack. See https://github.com/exoscale/cs for more information. A detailed guide about cloudstack modules can be found in the CloudStack Cloud Guide. This module supports check mode. Examples - name: Ensure a vpn gateway is present ngine_io.cloudstack.cs_vpn_gateway: vpc: my VPC - name: Ensure a vpn gateway is absent ngine_io.cloudstack.cs_vpn_gateway: vpc: my VPC state: absent Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description account string success Account the VPN site-to-site gateway is related to. Sample: example account domain string success Domain the VPN site-to-site gateway is related to. Sample: example domain id string success UUID of the VPN site-to-site gateway. Sample: 04589590-ac63-4ffc-93f5-b698b8ac38b6 project string success Name of project the VPN site-to-site gateway is related to. Sample: Production public_ip string success IP address of the VPN site-to-site gateway. Sample: 326-297-5015 vpc string success Name of the VPC. Sample: My VPC Authors René Moser (@resmo) © 2012–2018 Michael DeHaan
dart:html getAll method List<String> getAll( String name ) Implementation List<String> getAll(String name) native;
Class ImageView java.lang.Object javax.swing.text.View javax.swing.text.html.ImageView All Implemented Interfaces: SwingConstants public class ImageView extends View View of an Image, intended to support the HTML <IMG> tag. Supports scaling via the HEIGHT and WIDTH attributes of the tag. If the image is unable to be loaded any text specified via the ALT attribute will be rendered. While this class has been part of swing for a while now, it is public as of 1.4. Since: 1.4 See Also: IconView Field Summary Fields declared in class javax.swing.text.View BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS Fields declared in interface javax.swing.SwingConstants BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST Constructor Summary Constructor Description ImageView(Element elem) Creates a new view that represents an IMG element. Method Summary Modifier and Type Method Description void changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Invoked when the Elements attributes have changed. float getAlignment(int axis) Determines the desired alignment for this view along an axis. String getAltText() Returns the text to display if the image cannot be loaded. AttributeSet getAttributes() Fetches the attributes to use when rendering. Image getImage() Returns the image to render. URL getImageURL() Return a URL for the image source, or null if it could not be determined. Icon getLoadingImageIcon() Returns the icon to use while in the process of loading the image. boolean getLoadsSynchronously() Returns true if the image should be loaded when first asked for. Icon getNoImageIcon() Returns the icon to use if the image could not be found. float getPreferredSpan(int axis) Determines the preferred span for this view along an axis. protected StyleSheet getStyleSheet() Convenient method to get the StyleSheet. String getToolTipText(float x, float y, Shape allocation) For images the tooltip text comes from text specified with the ALT attribute. Shape modelToView(int pos, Shape a, Position.Bias b) Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. void paint(Graphics g, Shape a) Paints the View. void setLoadsSynchronously(boolean newValue) Sets how the image is loaded. void setParent(View parent) Establishes the parent view for this view. protected void setPropertiesFromAttributes() Update any cached values that come from attributes. void setSize(float width, float height) Sets the size of the view. int viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model. Methods declared in class javax.swing.text.View append, breakView, createFragment, forwardUpdate, forwardUpdateToView, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, updateChildren, updateLayout, viewToModel Methods declared in class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructor Details ImageView public ImageView(Element elem) Creates a new view that represents an IMG element. Parameters: elem - the element to create a view for Method Details getAltText public String getAltText() Returns the text to display if the image cannot be loaded. This is obtained from the Elements attribute set with the attribute name HTML.Attribute.ALT. Returns: the test to display if the image cannot be loaded. getImageURL public URL getImageURL() Return a URL for the image source, or null if it could not be determined. Returns: the URL for the image source, or null if it could not be determined. getNoImageIcon public Icon getNoImageIcon() Returns the icon to use if the image could not be found. Returns: the icon to use if the image could not be found. getLoadingImageIcon public Icon getLoadingImageIcon() Returns the icon to use while in the process of loading the image. Returns: the icon to use while in the process of loading the image. getImage public Image getImage() Returns the image to render. Returns: the image to render. setLoadsSynchronously public void setLoadsSynchronously(boolean newValue) Sets how the image is loaded. If newValue is true, the image will be loaded when first asked for, otherwise it will be loaded asynchronously. The default is to not load synchronously, that is to load the image asynchronously. Parameters: newValue - if true the image will be loaded when first asked for, otherwise it will be asynchronously. getLoadsSynchronously public boolean getLoadsSynchronously() Returns true if the image should be loaded when first asked for. Returns: true if the image should be loaded when first asked for. getStyleSheet protected StyleSheet getStyleSheet() Convenient method to get the StyleSheet. Returns: the StyleSheet getAttributes public AttributeSet getAttributes() Fetches the attributes to use when rendering. This is implemented to multiplex the attributes specified in the model with a StyleSheet. Overrides: getAttributes in class View Returns: the attributes to use when rendering getToolTipText public String getToolTipText(float x, float y, Shape allocation) For images the tooltip text comes from text specified with the ALT attribute. This is overriden to return getAltText. Overrides: getToolTipText in class View Parameters: x - the x coordinate y - the y coordinate allocation - current allocation of the View. Returns: the tooltip text at the specified location See Also: JTextComponent.getToolTipText(java.awt.event.MouseEvent) setPropertiesFromAttributes protected void setPropertiesFromAttributes() Update any cached values that come from attributes. setParent public void setParent(View parent) Establishes the parent view for this view. Seize this moment to cache the AWT Container I'm in. Overrides: setParent in class View Parameters: parent - the new parent, or null if the view is being removed from a parent changedUpdate public void changedUpdate(DocumentEvent e, Shape a, ViewFactory f) Invoked when the Elements attributes have changed. Recreates the image. Overrides: changedUpdate in class View Parameters: e - the change information from the associated document a - the current allocation of the view f - the factory to use to rebuild if the view has children See Also: View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) paint public void paint(Graphics g, Shape a) Paints the View. Specified by: paint in class View Parameters: g - the rendering surface to use a - the allocated region to render into See Also: View.paint(java.awt.Graphics, java.awt.Shape) getPreferredSpan public float getPreferredSpan(int axis) Determines the preferred span for this view along an axis. Specified by: getPreferredSpan in class View Parameters: axis - may be either X_AXIS or Y_AXIS Returns: the span the view would like to be rendered into; typically the view is told to render into the span that is returned, although there is no guarantee; the parent may choose to resize or break the view getAlignment public float getAlignment(int axis) Determines the desired alignment for this view along an axis. This is implemented to give the alignment to the bottom of the icon along the y axis, and the default along the x axis. Overrides: getAlignment in class View Parameters: axis - may be either X_AXIS or Y_AXIS Returns: the desired alignment; this should be a value between 0.0 and 1.0 where 0 indicates alignment at the origin and 1.0 indicates alignment to the full span away from the origin; an alignment of 0.5 would be the center of the view modelToView public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. Specified by: modelToView in class View Parameters: pos - the position to convert a - the allocated region to render into b - the bias toward the previous character or the next character represented by the offset, in case the position is a boundary of two views; b will have one of these values: Position.Bias.Forward Position.Bias.Backward Returns: the bounding box of the given position Throws: BadLocationException - if the given position does not represent a valid location in the associated document See Also: View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias) viewToModel public int viewToModel(float x, float y, Shape a, Position.Bias[] bias) Provides a mapping from the view coordinate space to the logical coordinate space of the model. Specified by: viewToModel in class View Parameters: x - the X coordinate y - the Y coordinate a - the allocated region to render into bias - the returned bias Returns: the location within the model that best represents the given point of view See Also: View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[]) setSize public void setSize(float width, float height) Sets the size of the view. This should cause layout of the view if it has any layout duties. Overrides: setSize in class View Parameters: width - the width >= 0 height - the height >= 0
PolygonShape A PolygonShape is a convex polygon with up to 8 vertices. Constructors love.physics.newPolygonShape Creates a new PolygonShape. love.physics.newRectangleShape Shorthand for creating rectangular PolygonShapes. Functions Object:release Immediately destroys the object's Lua reference. 11.0 Object:type Gets the type of the object as a string. Object:typeOf Checks whether an object is of a certain type. PolygonShape:getPoints Get the local coordinates of the polygon's vertices. PolygonShape:validate Validates whether the PolygonShape is convex. 0.9.0 Shape:computeAABB Returns the points of the bounding box for the transformed shape. 0.8.0 Shape:computeMass Computes the mass properties for the shape. 0.8.0 Shape:destroy Explicitly destroys the Shape. 0.8.0 Shape:getBody Get the body the shape is attached to. 0.7.0 0.8.0 Shape:getBoundingBox Gets the bounding box of the shape. 0.8.0 Shape:getCategory Gets the categories this shape is a member of. 0.8.0 Shape:getCategoryBits Gets the categories as a 16-bit integer. 0.8.0 Shape:getChildCount Returns the number of children the shape has. 0.8.0 Shape:getData Get the data set with setData. 0.8.0 Shape:getDensity Gets the density of the Shape. 0.8.0 Shape:getFilterData Gets the filter data of the Shape. 0.8.0 Shape:getFriction Gets the friction of this shape. 0.8.0 Shape:getMask Gets which categories this shape should NOT collide with. 0.8.0 Shape:getRadius Gets the radius of the shape. Shape:getRestitution Gets the restitution of this shape. 0.8.0 Shape:getType Gets a string representing the Shape. Shape:isSensor Checks whether a Shape is a sensor or not. 0.8.0 Shape:rayCast Casts a ray against the shape. 0.8.0 Shape:setCategory Sets the categories this shape is a member of. 0.8.0 Shape:setData Set data to be passed to the collision callback. 0.8.0 Shape:setDensity Sets the density of a Shape. 0.8.0 Shape:setFilterData Sets the filter data for a Shape. 0.8.0 Shape:setFriction Sets the friction of the shape. 0.8.0 Shape:setMask Sets which categories this shape should NOT collide with. 0.8.0 Shape:setRestitution Sets the restitution of the shape. 0.8.0 Shape:setSensor Sets whether this shape should act as a sensor. 0.8.0 Shape:testPoint Checks whether a point lies inside the shape. Shape:testSegment Checks whether a line segment intersects a shape. 0.8.0 Supertypes Shape Object See Also love.physics
function locale_translation_flush_projects locale_translation_flush_projects() Clear the project data table. File core/modules/locale/locale.compare.inc, line 20 The API for comparing project translation status with available translation. Code function locale_translation_flush_projects() { \Drupal8b7c:f320:99b9:690f:4595:cd17:293a:c069service('locale.project')->deleteAll(); }
dart:async current property T current The current value of the stream. When a moveNext call completes with true, the current field holds the most recent event of the stream, and it stays like that until the next call to moveNext. This value must only be read after a call to moveNext has completed with true, and only until the moveNext is called again. If the StreamIterator has not yet been moved to the first element (moveNext has not been called and completed yet), or if the StreamIterator has been moved past the last element (moveNext has returned false), then current is unspecified. A StreamIterator may either throw or return an iterator-specific default value in that case. Implementation T get current;
class Crystal8b7c:f320:99b9:690f:4595:cd17:293a:c069Macros8b7c:f320:99b9:690f:4595:cd17:293a:c069Var Crystal8b7c:f320:99b9:690f:4595:cd17:293a:c069Macros8b7c:f320:99b9:690f:4595:cd17:293a:c069Var Crystal8b7c:f320:99b9:690f:4595:cd17:293a:c069Macros8b7c:f320:99b9:690f:4595:cd17:293a:c069STNode Overview A local variable or block argument. Defined in: compiler/crystal/macros.cr Instance Method Summary #id : MacroId Returns this var's name as a MacroId. 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 id : MacroIdSource Returns this var's name as a MacroId.
OptimizeCommand class OptimizeCommand extends Command (View source) Traits CallsCommands HasParameters InteractsWithIO Macroable Properties protected InputInterface $input The input interface implementation. from InteractsWithIO protected OutputStyle $output The output interface implementation. from InteractsWithIO protected int $verbosity The default verbosity of output commands. from InteractsWithIO protected array $verbosityMap The mapping between human readable verbosity levels and Symfony's OutputInterface. from InteractsWithIO static protected array $macros The registered string macros. from Macroable protected Application $laravel The Laravel application instance. from Command protected string $signature The name and signature of the console command. from Command protected string $name The console command name. protected string $description The console command description. protected string|null $help The console command help text. from Command protected bool $hidden Indicates whether the command should be shown in the Artisan command list. from Command Methods Command resolveCommand(Command|string $command) Resolve the console command instance for the given command. from CallsCommands int call(Command|string $command, array $arguments = []) Call another console command. from CallsCommands int callSilent(Command|string $command, array $arguments = []) Call another console command silently. from CallsCommands int runCommand(Command|string $command, array $arguments, OutputInterface $output) Run the given the console command. from CallsCommands ArrayInput createInputFromArguments(array $arguments) Create an input instance from the given arguments. from CallsCommands array context() Get all of the context passed to the command. from CallsCommands void specifyParameters() Specify the arguments and options on the command. from HasParameters array getArguments() Get the console command arguments. from HasParameters array getOptions() Get the console command options. from HasParameters bool hasArgument(string|int $name) Determine if the given argument is present. from InteractsWithIO string|array|null argument(string|null $key = null) Get the value of a command argument. from InteractsWithIO array arguments() Get all of the arguments passed to the command. from InteractsWithIO bool hasOption(string $name) Determine if the given option is present. from InteractsWithIO string|array|bool|null option(string|null $key = null) Get the value of a command option. from InteractsWithIO array options() Get all of the options passed to the command. from InteractsWithIO bool confirm(string $question, bool $default = false) Confirm a question with the user. from InteractsWithIO mixed ask(string $question, string|null $default = null) Prompt the user for input. from InteractsWithIO mixed anticipate(string $question, array|callable $choices, string|null $default = null) Prompt the user for input with auto completion. from InteractsWithIO mixed askWithCompletion(string $question, array|callable $choices, string|null $default = null) Prompt the user for input with auto completion. from InteractsWithIO mixed secret(string $question, bool $fallback = true) Prompt the user for input but hide the answer from the console. from InteractsWithIO string choice(string $question, array $choices, string|null $default = null, mixed|null $attempts = null, bool|null $multiple = null) Give the user a single choice from an array of answers. from InteractsWithIO void table(array $headers, Arrayable|array $rows, string $tableStyle = 'default', array $columnStyles = []) Format input to textual table. from InteractsWithIO void info(string $string, int|string|null $verbosity = null) Write a string as information output. from InteractsWithIO void line(string $string, string|null $style = null, int|string|null $verbosity = null) Write a string as standard output. from InteractsWithIO void comment(string $string, int|string|null $verbosity = null) Write a string as comment output. from InteractsWithIO void question(string $string, int|string|null $verbosity = null) Write a string as question output. from InteractsWithIO void error(string $string, int|string|null $verbosity = null) Write a string as error output. from InteractsWithIO void warn(string $string, int|string|null $verbosity = null) Write a string as warning output. from InteractsWithIO void alert(string $string) Write a string in an alert box. from InteractsWithIO void setInput(InputInterface $input) Set the input interface implementation. from InteractsWithIO void setOutput(OutputStyle $output) Set the output interface implementation. from InteractsWithIO void setVerbosity(string|int $level) Set the verbosity level. from InteractsWithIO int parseVerbosity(string|int|null $level = null) Get the verbosity level in terms of Symfony's OutputInterface level. from InteractsWithIO OutputStyle getOutput() Get the output implementation. from InteractsWithIO static void macro(string $name, object|callable $macro) Register a custom macro. from Macroable static void mixin(object $mixin, bool $replace = true) Mix another object into the class. from Macroable static bool hasMacro(string $name) Checks if macro is registered. from Macroable static mixed __callStatic(string $method, array $parameters) Dynamically handle calls to the class. from Macroable mixed __call(string $method, array $parameters) Dynamically handle calls to the class. from Macroable void __construct() Create a new console command instance. from Command void configureUsingFluentDefinition() Configure the console command using a fluent definition. from Command int run(InputInterface $input, OutputInterface $output) Run the console command. from Command mixed execute(InputInterface $input, OutputInterface $output) Execute the console command. from Command isHidden() {@inheritdoc} from Command setHidden($hidden) {@inheritdoc} from Command Application getLaravel() Get the Laravel application instance. from Command void setLaravel(Container $laravel) Set the Laravel application instance. from Command void handle() Execute the console command. Details abstract protected Command resolveCommand(Command|string $command) Resolve the console command instance for the given command. Parameters Command|string $command Return Value Command int call(Command|string $command, array $arguments = []) Call another console command. Parameters Command|string $command array $arguments Return Value int int callSilent(Command|string $command, array $arguments = []) Call another console command silently. Parameters Command|string $command array $arguments Return Value int protected int runCommand(Command|string $command, array $arguments, OutputInterface $output) Run the given the console command. Parameters Command|string $command array $arguments OutputInterface $output Return Value int protected ArrayInput createInputFromArguments(array $arguments) Create an input instance from the given arguments. Parameters array $arguments Return Value ArrayInput protected array context() Get all of the context passed to the command. Return Value array protected void specifyParameters() Specify the arguments and options on the command. Return Value void protected array getArguments() Get the console command arguments. Return Value array protected array getOptions() Get the console command options. Return Value array bool hasArgument(string|int $name) Determine if the given argument is present. Parameters string|int $name Return Value bool string|array|null argument(string|null $key = null) Get the value of a command argument. Parameters string|null $key Return Value string|array|null array arguments() Get all of the arguments passed to the command. Return Value array bool hasOption(string $name) Determine if the given option is present. Parameters string $name Return Value bool string|array|bool|null option(string|null $key = null) Get the value of a command option. Parameters string|null $key Return Value string|array|bool|null array options() Get all of the options passed to the command. Return Value array bool confirm(string $question, bool $default = false) Confirm a question with the user. Parameters string $question bool $default Return Value bool mixed ask(string $question, string|null $default = null) Prompt the user for input. Parameters string $question string|null $default Return Value mixed mixed anticipate(string $question, array|callable $choices, string|null $default = null) Prompt the user for input with auto completion. Parameters string $question array|callable $choices string|null $default Return Value mixed mixed askWithCompletion(string $question, array|callable $choices, string|null $default = null) Prompt the user for input with auto completion. Parameters string $question array|callable $choices string|null $default Return Value mixed mixed secret(string $question, bool $fallback = true) Prompt the user for input but hide the answer from the console. Parameters string $question bool $fallback Return Value mixed string choice(string $question, array $choices, string|null $default = null, mixed|null $attempts = null, bool|null $multiple = null) Give the user a single choice from an array of answers. Parameters string $question array $choices string|null $default mixed|null $attempts bool|null $multiple Return Value string void table(array $headers, Arrayable|array $rows, string $tableStyle = 'default', array $columnStyles = []) Format input to textual table. Parameters array $headers Arrayable|array $rows string $tableStyle array $columnStyles Return Value void void info(string $string, int|string|null $verbosity = null) Write a string as information output. Parameters string $string int|string|null $verbosity Return Value void void line(string $string, string|null $style = null, int|string|null $verbosity = null) Write a string as standard output. Parameters string $string string|null $style int|string|null $verbosity Return Value void void comment(string $string, int|string|null $verbosity = null) Write a string as comment output. Parameters string $string int|string|null $verbosity Return Value void void question(string $string, int|string|null $verbosity = null) Write a string as question output. Parameters string $string int|string|null $verbosity Return Value void void error(string $string, int|string|null $verbosity = null) Write a string as error output. Parameters string $string int|string|null $verbosity Return Value void void warn(string $string, int|string|null $verbosity = null) Write a string as warning output. Parameters string $string int|string|null $verbosity Return Value void void alert(string $string) Write a string in an alert box. Parameters string $string Return Value void void setInput(InputInterface $input) Set the input interface implementation. Parameters InputInterface $input Return Value void void setOutput(OutputStyle $output) Set the output interface implementation. Parameters OutputStyle $output Return Value void protected void setVerbosity(string|int $level) Set the verbosity level. Parameters string|int $level Return Value void protected int parseVerbosity(string|int|null $level = null) Get the verbosity level in terms of Symfony's OutputInterface level. Parameters string|int|null $level Return Value int OutputStyle getOutput() Get the output implementation. Return Value OutputStyle static void macro(string $name, object|callable $macro) Register a custom macro. Parameters string $name object|callable $macro Return Value void static void mixin(object $mixin, bool $replace = true) Mix another object into the class. Parameters object $mixin bool $replace Return Value void Exceptions ReflectionException static bool hasMacro(string $name) Checks if macro is registered. Parameters string $name Return Value bool static mixed __callStatic(string $method, array $parameters) Dynamically handle calls to the class. Parameters string $method array $parameters Return Value mixed Exceptions BadMethodCallException mixed __call(string $method, array $parameters) Dynamically handle calls to the class. Parameters string $method array $parameters Return Value mixed Exceptions BadMethodCallException void __construct() Create a new console command instance. Return Value void protected void configureUsingFluentDefinition() Configure the console command using a fluent definition. Return Value void int run(InputInterface $input, OutputInterface $output) Run the console command. Parameters InputInterface $input OutputInterface $output Return Value int protected mixed execute(InputInterface $input, OutputInterface $output) Execute the console command. Parameters InputInterface $input OutputInterface $output Return Value mixed isHidden() {@inheritdoc} setHidden($hidden) {@inheritdoc} Parameters $hidden Application getLaravel() Get the Laravel application instance. Return Value Application void setLaravel(Container $laravel) Set the Laravel application instance. Parameters Container $laravel Return Value void void handle() Execute the console command. Return Value void
module ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069ontext Action View Context Action View contexts are supplied to Action Controller to render a template. The default Action View context is ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069se. In order to work with ActionController, a Context must just include this module. The initialization of the variables used by the context (@output_buffer, @view_flow, and @virtual_path) is responsibility of the object that includes this module (although you can call #_prepare_context defined below). Attributes output_buffer[RW] view_flow[RW] Public Instance Methods _layout_for(name = nil) Show source # File actionview/lib/action_view/context.rb, line 31 def _layout_for(name = nil) name ||= :layout view_flow.get(name).html_safe end Encapsulates the interaction with the view flow so it returns the correct buffer on yield. This is usually overwritten by helpers to add more behavior. :api: plugin _prepare_context() Show source # File actionview/lib/action_view/context.rb, line 21 def _prepare_context @view_flow = OutputFlow.new @output_buffer = nil @virtual_path = nil end Prepares the context by setting the appropriate instance variables. :api: plugin
tf.keras.datasets.cifar100.load_data View source on GitHub Loads the CIFAR100 dataset. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.datasets.cifar100.load_data tf.keras.datasets.cifar100.load_data( label_mode='fine' ) This is a dataset of 50,000 32x32 color training images and 10,000 test images, labeled over 100 fine-grained classes that are grouped into 20 coarse-grained classes. See more info at the CIFAR homepage. Args label_mode one of "fine", "coarse". If it is "fine" the category labels are the fine-grained labels, if it is "coarse" the output labels are the coarse-grained superclasses. Returns Tuple of NumPy arrays: (x_train, y_train), (x_test, y_test). x_train: uint8 NumPy array of grayscale image data with shapes (50000, 32, 32, 3), containing the training data. Pixel values range from 0 to 255. y_train: uint8 NumPy array of labels (integers in range 0-99) with shape (50000, 1) for the training data. x_test: uint8 NumPy array of grayscale image data with shapes (10000, 32, 32, 3), containing the test data. Pixel values range from 0 to 255. y_test: uint8 NumPy array of labels (integers in range 0-99) with shape (10000, 1) for the test data. Example: (x_train, y_train), (x_test, y_test) = keras.datasets.cifar100.load_data() assert x_train.shape == (50000, 32, 32, 3) assert x_test.shape == (10000, 32, 32, 3) assert y_train.shape == (50000, 1) assert y_test.shape == (10000, 1)
st8b7c:f320:99b9:690f:4595:cd17:293a:c069thr8b7c:f320:99b9:690f:4595:cd17:293a:c069i8b7c:f320:99b9:690f:4595:cd17:293a:c069id id() noexcept; (since C++11) Default-constructs a new thread identifier. The identifier does not represent a thread. Parameters (none).
public function ContentEntityNullStorag8b7c:f320:99b9:690f:4595:cd17:293a:c069save public ContentEntityNullStorag8b7c:f320:99b9:690f:4595:cd17:293a:c069save(EntityInterface $entity) Saves the entity permanently. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity to save. Return value SAVED_NEW or SAVED_UPDATED is returned depending on the operation performed. Throws \Drupal\Core\Entity\EntityStorageException In case of failures, an exception is thrown. Overrides EntityStorageBas8b7c:f320:99b9:690f:4595:cd17:293a:c069save File core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php, line 69 Class ContentEntityNullStorage Defines a null entity storage. Namespace Drupal\Core\Entity Code public function save(EntityInterface $entity) { }
consteval specifier (since C++20) consteval - specifies that a function is an immediate function, that is, every call to the function must produce a compile-time constant Explanation The consteval specifier declares a function or function template to be an immediate function, that is, every potentially evaluated call (i.e. call out of an unevaluated context) to the function must (directly or indirectly) produce a compile time constant expression. An immediate function is a constexpr function, and must satisfy the requirements applicable to constexpr functions or constexpr constructors, as the case may be. Same as constexpr, a consteval specifier implies inline. However, it may not be applied to destructors, allocation functions, or deallocation functions. At most one of the constexpr, consteval, and constinit specifiers is allowed to appear within the same sequence of declaration specifiers. If any declaration of a function or function template contains a consteval specifier, then all declarations of that function or function template must contain that specifier. A potentially evaluated invocation of an immediate function whose innermost non-block scope is not a function parameter scope of an immediate function or the true-branch of a consteval if statement (since C++23) must produce a constant expression; such an invocation is known as an immediate invocation. consteval int sqr(int n) { return n*n; } constexpr int r = sqr(100); // OK int x = 100; int r2 = sqr(x); // Error: Call does not produce a constant consteval int sqrsqr(int n) { return sqr(sqr(n)); // Not a constant expression at this point, but OK } constexpr int dblsqr(int n) { return 2*sqr(n); // Error: Enclosing function is not consteval // and sqr(n) is not a constant } An identifier expression that denotes an immediate function may only appear within a subexpression of an immediate invocation or within an immediate function context (i.e. a context mentioned above, in which a call to an immediate function needs not to be a constant expression). A pointer or reference to an immediate function can be taken but cannot escape constant expression evaluation: consteval int f() { return 42; } consteval auto g() { return &f; } consteval int h(int (*p)() = g()) { return p(); } constexpr int r = h(); // OK constexpr auto e = g(); // ill-formed: a pointer to an immediate function is // not a permitted result of a constant expression Keywords consteval. Example #include <iostream> // This function might be evaluated at compile-time, if the input // is [email protected]. Otherwise, it is [email protected]. constexpr unsigned factorial(unsigned n) { return n < 2 ? 1 : n * factorial(n - 1); } // With consteval we have a guarantee that the function will be [email protected]. consteval unsigned combination(unsigned m, unsigned n) { return factorial(n) / factorial(m) / factorial(n - m); } static_assert(factorial(6) == 720); static_assert(combination(4,8) == 70); int main(int argc, const char*[]) { constexpr unsigned x{factorial(4)}; st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << x << '\n'; [[maybe_unused]] unsigned y = factorial(argc); // OK // unsigned z = combination(argc, 7); // error: 'argc' is not a constant expression } Output: 24 See also constexpr specifier(C++11) specifies that the value of a variable or function can be computed at compile time constinit specifier(C++20) asserts that a variable has static initialization, i.e. zero initialization and constant initialization constant expression defines an expression that can be evaluated at compile time
3 Running the stack 3.1 Starting A user may have a number of "virtual" connections to other users. An MG is connected to at most one MGC, while an MGC may be connected to any number of MG's. For each connection the user selects a transport service, an encoding scheme and a user callback module. An MGC must initiate its transport service in order to listen to MG's trying to connect. How the actual transport is initiated is outside the scope of this application. However a send handle (typically a socket id or host and port) must be provided from the transport service in order to enable us to send the message to the correct destination. We do however not assume anything about this, from our point of view, opaque handle. Hopefully it is rather small since it will passed around the system between processes rather frequently. A user may either be statically configured in a .config file according to the application concept of Erlang/OTP or dynamically started with the configuration settings as arguments to megaco:start_user/2. These configuration settings may be updated later on with megaco:update_conn_info/2. The function megaco:connect/4 is used to tell the Megaco application about which control process it should supervise, which MID the remote user has, which callback module it should use to send messages etc. When this "virtual" connection is established the user may use megaco:call/3 and megaco:cast/3 in order to send messages to the other side. Then it is up to the MG to send its first Service Change Request message after applying some clever algorithm in order to fight the problem with startup avalanche (as discussed in the RFC). The originating user will wait for a reply or a timeout (defined by the request_timer). When it receives the reply this will optionally be acknowledged (regulated by auto_ack), and forwarded to the user. If an interim pending reply is received, the long_request_timer will be used instead of the usual request_timer, in order to enable avoidance of spurious re-sends of the request. On the destination side the transport service waits for messages. Each message is forwarded to the Megaco application via the megaco:receive_message/4 callback function. The transport service may or may not provide means for blocking and unblocking the reception of the incoming messages. If a message is received before the "virtual" connection has been established, the connection will be setup automatically. An MGC may be real open minded and dynamically decide which encoding and transport service to use depending on how the transport layer contact is performed. For IP transports two ports are standardized, one for textual encoding and one for binary encoding. If for example an UDP packet was received on the text port it would be possible to decide encoding and transport on the fly. After decoding a message various user callback functions are invoked in order to allow the user to act properly. See the megaco_user module for more info about the callback arguments. When the user has processed a transaction request in its callback function, the Megaco application assembles a transaction reply, encodes it using the selected encoding module and sends the message back by invoking the callback function: SendMod:send_message(SendHandle, ErlangBinary) Re-send of messages, handling pending transactions, acknowledgements etc. is handled automatically by the Megaco application but the user is free to override the default behaviour by the various configuration possibilities. See megaco:update_user_info/2 and megaco:update_conn_info/2 about the possibilities. When connections gets broken (that is explicitly by megaco:disconnect/2 or when its controlling process dies) a user callback function is invoked in order to allow the user to re-establish the connection. The internal state of kept messages, re-send timers etc. is not affected by this. A few re-sends will of course fail while the connection is down, but the automatic re-send algorithm does not bother about this and eventually when the connection is up and running the messages will be delivered if the timeouts are set to be long enough. The user has the option of explicitly invoking megaco:cancel/2 to cancel all messages for a connection. 3.2 MGC startup call flow In order to prepare the MGC for the reception of the initial message, hopefully a Service Change Request, the following needs to be done: Start the Megaco application. Start the MGC user. This may either be done explicitly with megaco:start_user/2 or implicitly by providing the -megaco users configuration parameter. Initiate the transport service and provide it with a receive handle obtained from megaco:user_info/2. When the initial message arrives the transport service forwards it to the protocol engine which automatically sets up the connection and invokes UserMod:handle_connect/2 before it invokes UserMod:handle_trans_request/3 with the Service Change Request like this: Figure 3.1: MGC Startup Call Flow 3.3 MG startup call flow In order to prepare the MG for the sending of the initial message, hopefully a Service Change Request, the following needs to be done: Start the Megaco application. Start the MG user. This may either be done explicitly with megaco:start_user/2 or implicitly by providing the -megaco users configuration parameter. Initiate the transport service and provide it with a receive handle obtained from megaco:user_info/2. Setup a connection to the MGC with megaco:connect/4 and provide it with a receive handle obtained from megaco:user_info/2. If the MG has been provisioned with the MID of the MGC it can be given as the RemoteMid parameter to megaco:connect/4 and the call flow will look like this: Figure 3.2: MG Startup Call Flow If the MG cannot be provisioned with the MID of the MGC, the MG can use the atom 'preliminary_mid' as the RemoteMid parameter to megaco:connect/4 and the call flow will look like this: Figure 3.3: MG Startup Call Flow (no MID) 3.4 Configuring the Megaco stack There are three kinds of configuration: User info - Information related to megaco users. Read/Write. A User is an entity identified by a MID, e.g. a MGC or a MG. This information can be retrieved using megaco:user_info. Connection info - Information regarding connections. Read/Write. This information can be retrieved using megaco:conn_info. System info - System wide information. Read only. This information can be retrieved using megaco:system_info. 3.5 Initial configuration The initial configuration of the Megaco should be defined in the Erlang system configuration file. The following configured parameters are defined for the Megaco application: users = [{Mid, [user_config()]}]. Each user is represented by a tuple with the Mid of the user and a list of config parameters (each parameter is in turn a tuple: {Item, Value}). scanner = flex | {Module, Function, Arguments, Modules} flex will result in the start of the flex scanner with default options. The MFA alternative makes it possible for Megaco to start and supervise a scanner written by the user (see supervisor:start_child for an explanation of the parameters). See also Configuration of text encoding module(s) for more info. 3.6 Changing the configuration The configuration can be changed during runtime. This is done with the functions megaco:update_user_info and megaco:update_conn_info 3.7 The transaction sender The transaction sender is a process (one per connection), which handle all transaction sending, if so configured (see megaco:user_info and megaco:conn_info). The purpose of the transaction sender is to accumulate transactions for a more efficient message sending. The transactions that are accumulated are transaction request and transaction ack. For transaction ack's the benefit is quite large, since the transactions are small and it is possible to have ranges (which means that transaction acks for transactions 1, 2, 3 and 4 can be sent as a range 1-4 in one transaction ack, instead of four separate transactions). There are a number of configuration parameter's that control the operation of the transaction sender. In principle, a message with everything stored (ack's and request's) is sent from the process when: When trans_timer expires. When trans_ack_maxcount number of ack's has been received. When trans_req_maxcount number of requests's has been received. When the size of all received requests exceeds trans_req_maxsize. When a reply transaction is sent. When a pending transaction is sent. When something is to be sent, everything is packed into one message, unless the trigger was a reply transaction and the added size of the reply and all the requests is greater then trans_req_maxsize, in which case the stored transactions are sent first in a separate message and the reply in another message. When the transaction sender receives a request which is already "in storage" (indicated by the transaction id) it is assumed to be a resend and everything stored is sent. This could happen if the values of the trans_timer and the request_timer is not properly chosen. 3.8 Segmentation of transaction replies In version 3 of the megaco standard, the concept of segmentation package was introduced. Simply, this package defines a procedure to segment megaco messages (transaction replies) when using a transport that does not automatically do this (e.g. UDP). Although it would be both pointless and counterproductive to use segmentation on a transport that already does this (e.g. TCP), the megaco application does not check this. Instead, it is up to the user to configure this properly. Receiving segmented messages: This is handled automatically by the megaco application. There is however one thing that need to be configured by the user, the segment_recv_timer option. Note that the segments are delivered to the user differently depending on which function is used to issue the original request. When issuing the request using the megaco:cast function, the segments are delivered to the user via the handle_trans_reply callback function one at a time, as they arrive. But this obviously doe not work for the megaco:call function. In this case, the segments are accumulated and then delivered all at once as the function returns. Sending segmented messages: This is also handled automatically by the megaco application. First of all, segmentation is only attempted if so configured, see the segment_send option. Secondly, megaco relies on the ability of the used codec to encode action replies, which is the smallest component the megaco application handles when segmenting. Thirdly, the reply will be segmented only if the sum of the size of the action replies (plus an arbitrary message header size) are greater then the specified max message size (see the max_pdu_size option). Finally, if segmentation is decided, then each action reply will make up its own (segment) message. Copyright © 2000-2022 Ericsson AB. All Rights Reserved.
Data.Array.Unboxed Copyright (c) The University of Glasgow 2001 License BSD-style (see the file libraries/base/LICENSE) Maintainer [email protected] Stability experimental Portability non-portable (uses Data.Array.IArray) Safe Haskell Trustworthy Language Haskell2010 Contents Arrays with unboxed elements The overloaded immutable array interface Description Unboxed immutable arrays. Arrays with unboxed elements data UArray i e Source Arrays with unboxed elements. Instances of IArray are provided for UArray with certain element types (Int, Float, Char, etc.; see the UArray class for a full list). A UArray will generally be more efficient (in terms of both time and space) than the equivalent Array with the same element type. However, UArray is strict in its elements - so don't use UArray if you require the non-strictness that Array provides. Because the IArray interface provides operations overloaded on the type of the array, it should be possible to just change the array type being used by a program from say Array to UArray to get the benefits of unboxed arrays (don't forget to import Data.Array.Unboxed instead of Data.Array). Instances IArray UArray Bool IArray UArray Char IArray UArray Double IArray UArray Float IArray UArray Int IArray UArray Int8 IArray UArray Int16 IArray UArray Int32 IArray UArray Int64 IArray UArray Word IArray UArray Word8 IArray UArray Word16 IArray UArray Word32 IArray UArray Word64 IArray UArray (StablePtr a) IArray UArray (Ptr a) IArray UArray (FunPtr a) (Ix ix, Eq e, IArray UArray e) => Eq (UArray ix e) (Ix ix, Ord e, IArray UArray e) => Ord (UArray ix e) (Ix ix, Show ix, Show e, IArray UArray e) => Show (UArray ix e) The overloaded immutable array interface module Data.Array.IArray
No namespace Function summary __ Returns a translated string if one is found; Otherwise, the submitted message. __d Allows you to override the current domain for a single message lookup. __dn Allows you to override the current domain for a single plural message lookup. Returns correct plural form of message identified by $singular and $plural for count $count from domain $domain. __dx Allows you to override the current domain for a single message lookup. The context is a unique identifier for the translations string that makes it unique within the same domain. __dxn Returns correct plural form of message identified by $singular and $plural for count $count. Allows you to override the current domain for a single message lookup. The context is a unique identifier for the translations string that makes it unique within the same domain. __n Returns correct plural form of message identified by $singular and $plural for count $count. Some languages have more than one form for plural messages dependent on the count. __x Returns a translated string if one is found; Otherwise, the submitted message. The context is a unique identifier for the translations string that makes it unique within the same domain. __xn Returns correct plural form of message identified by $singular and $plural for count $count. Some languages have more than one form for plural messages dependent on the count. The context is a unique identifier for the translations string that makes it unique within the same domain. breakpoint Command to return the eval-able code to startup PsySH in interactive debugger Works the same way as eval(\Psy\sh()); psy/psysh must be loaded in your project collection Returns a new Cake\Collection\Collection object wrapping the passed argument. dd Prints out debug information about given variable and dies. debug Prints out debug information about given variable and returns the variable that was passed. deprecationWarning Helper method for outputting deprecation warnings env Gets an environment variable from available sources, and provides emulation for unsupported or inconsistent environment variables (i.e. DOCUMENT_ROOT on IIS, or SCRIPT_NAME in CGI mode). Also exposes some additional custom environment information. getTypeName Returns the objects class or var type of it's not an object h Convenience method for htmlspecialchars. loadPHPUnitAliases Loads PHPUnit aliases namespaceSplit Split the namespace from the classname. pj json pretty print convenience function. pluginSplit Splits a dot syntax plugin name into its plugin and class name. If $name does not have a dot, then index 0 will be null. pr print_r() convenience function. stackTrace Outputs a stack trace based on the supplied options. triggerWarning Triggers an E_USER_WARNING.
numpy.expand_dims numpy.expand_dims(a, axis) [source] Expand the shape of an array. Insert a new axis that will appear at the axis position in the expanded array shape. Note Previous to NumPy 1.13.0, neither axis < -a.ndim - 1 nor axis > a.ndim raised errors or put the new axis where documented. Those axis values are now deprecated and will raise an AxisError in the future. Parameters: a : array_like Input array. axis : int Position in the expanded axes where the new axis is placed. Returns: res : ndarray View of a with the number of dimensions increased by one. See also squeeze The inverse operation, removing singleton dimensions reshape Insert, remove, and combine dimensions, and resize existing ones doc.indexing, atleast_1d, atleast_2d, atleast_3d Examples >>> x = np.array([1,2]) >>> x.shape (2,) The following is equivalent to x[np.newaxis,:] or x[np.newaxis]: >>> y = np.expand_dims(x, axis=0) >>> y array([[1, 2]]) >>> y.shape (1, 2) >>> y = np.expand_dims(x, axis=1) # Equivalent to x[:,np.newaxis] >>> y array([[1], [2]]) >>> y.shape (2, 1) Note that some examples may use None instead of np.newaxis. These are the same objects: >>> np.newaxis is None True
ModuleWithComponentFactories class deprecated final Combination of NgModuleFactory and ComponentFactories. Deprecated: Ivy JIT mode doesn't require accessing this symbol. See JIT API changes due to ViewEngine deprecation for additional context. class ModuleWithComponentFactories<T> { constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]) ngModuleFactory: NgModuleFactory<T> componentFactories: ComponentFactory<any>[] } Constructor constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]) Parameters ngModuleFactory NgModuleFactory<T> componentFactories ComponentFactory<any>[] Properties Property Description ngModuleFactory: NgModuleFactory<T> Declared in Constructor componentFactories: ComponentFactory<any>[] Declared in Constructor
matplotlib.axis.XTick.get_tickdir XTick.get_tickdir()
QOpcUaLocalizedText Class The OPC UA LocalizedText type. More... Header: #include <QOpcUaLocalizedText> qmake: QT += opcua List of all members, including inherited members Properties locale : QString text : QString Public Functions QOpcUaLocalizedText(const QString &locale, const QString &text) QOpcUaLocalizedText(const QOpcUaLocalizedText &rhs) QOpcUaLocalizedText & operator=(const QOpcUaLocalizedText &rhs) QString locale() const void setLocale(const QString &locale) void setText(const QString &text) QString text() const QVariant operator QVariant() const bool operator==(const QOpcUaLocalizedText &rhs) const Detailed Description This is the Qt OPC UA representation for the OPC UA LocalizedText type defined in OPC-UA part 3, 8.5. A LocalizedText value contains a text string with associated locale information in a second string (e. g. "en" or "en-US"). The format of the locale information string is <language>[-<country/region>]. Language is usually given as ISO 639 two letter code, country/region as ISO 3166 two letter code. Custom codes are also allowed (see OPC-UA part 3, 8.4). It can be used to provide multiple text strings in different languages for a value using an array of LocalizedText elements. Property Documentation locale : QString Locale of the contained text. This has to be in a modified ISO standard notation, for example en-US. See OPC UA specification part 3, 8.4 for details. Access functions: QString locale() const void setLocale(const QString &locale) text : QString Textual content. Access functions: QString text() const void setText(const QString &text) Member Function Documentation QOpcUaLocalizedText8b7c:f320:99b9:690f:4595:cd17:293a:c069QOpcUaLocalizedText(const QString &locale, const QString &text) Constructs a localized text with the locale locale and the text text. QOpcUaLocalizedText8b7c:f320:99b9:690f:4595:cd17:293a:c069QOpcUaLocalizedText(const QOpcUaLocalizedText &rhs) Constructs a localized text from rhs. QOpcUaLocalizedText &QOpcUaLocalizedText8b7c:f320:99b9:690f:4595:cd17:293a:c069operator=(const QOpcUaLocalizedText &rhs) Sets the values from rhs in this localized text. QString QOpcUaLocalizedText8b7c:f320:99b9:690f:4595:cd17:293a:c069locale() const Returns the locale. Note: Getter function for property locale. See also setLocale(). void QOpcUaLocalizedText8b7c:f320:99b9:690f:4595:cd17:293a:c069setLocale(const QString &locale) Sets the locale to locale. Note: Setter function for property locale. See also locale(). void QOpcUaLocalizedText8b7c:f320:99b9:690f:4595:cd17:293a:c069setText(const QString &text) Sets the text to text. Note: Setter function for property text. See also text(). QString QOpcUaLocalizedText8b7c:f320:99b9:690f:4595:cd17:293a:c069text() const Returns the text. Note: Getter function for property text. See also setText(). QVariant QOpcUaLocalizedText8b7c:f320:99b9:690f:4595:cd17:293a:c069operator QVariant() const Converts this localized text to QVariant. bool QOpcUaLocalizedText8b7c:f320:99b9:690f:4595:cd17:293a:c069operator==(const QOpcUaLocalizedText &rhs) const Returns true if this localized text has the same value as rhs.
tf.extract_volume_patches Extract patches from input and put them in the "depth" output dimension. 3D extension of extract_image_patches. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.extract_volume_patches tf.extract_volume_patches( input, ksizes, strides, padding, name=None ) Args input A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. 5-D Tensor with shape [batch, in_planes, in_rows, in_cols, depth]. ksizes A list of ints that has length >= 5. The size of the sliding window for each dimension of input. strides A list of ints that has length >= 5. 1-D of length 5. How far the centers of two consecutive patches are in input. Must be: [1, stride_planes, stride_rows, stride_cols, 1]. padding A string from: "SAME", "VALID". The type of padding algorithm to use. The size-related attributes are specified as follows: ksizes = [1, ksize_planes, ksize_rows, ksize_cols, 1] strides = [1, stride_planes, strides_rows, strides_cols, 1] name A name for the operation (optional). Returns A Tensor. Has the same type as input.
Class ArrayContext Provides a basic array based context provider for FormHelper. This adapter is useful in testing or when you have forms backed by simple array data structures. Important keys: data Holds the current values supplied for the fields. defaults The default values for fields. These values will be used when there is no data set. Data should be nested following the dot separated paths you access your fields with. required A nested array of fields, relationships and boolean flags to indicate a field is required. The value can also be a string to be used as the required error message schema An array of data that emulate the column structures that Cake\Database\Schema\Schema uses. This array allows you to control the inferred type for fields and allows auto generation of attributes like maxlength, step and other HTML attributes. If you want primary key/id detection to work. Make sure you have provided a _constraints array that contains primary. See below for an example. errors An array of validation errors. Errors should be nested following the dot separated paths you access your fields with. Example $article = [ 'data' => [ 'id' => '1', 'title' => 'First post!', ], 'schema' => [ 'id' => ['type' => 'integer'], 'title' => ['type' => 'string', 'length' => 255], '_constraints' => [ 'primary' => ['type' => 'primary', 'columns' => ['id']] ] ], 'defaults' => [ 'title' => 'Default title', ], 'required' => [ 'id' => true, // will use default required message 'title' => 'Please enter a title', 'body' => false, ], ]; Namespace: Cake\View\Form Constants string[] VALID_ATTRIBUTES ['length', 'precision', 'comment', 'null', 'default'] Property Summary $_context protected array Context data for this object. Method Summary __construct() public Constructor. attributes() public Get an associative array of other attributes for a field name. error() public Get the errors for a given field fieldNames() public Get the field names of the top level object in this context. getMaxLength() public Get field length from validation getPrimaryKey() public Get the fields used in the context as a primary key. getRequiredMessage() public Gets the default "required" error message for a field hasError() public Check whether or not a field has an error attached to it isCreate() public Returns whether or not this form is for a create operation. isPrimaryKey() public Returns true if the passed field name is part of the primary key for this context isRequired() public Check if a given field is 'required'. primaryKey() public deprecated Get the fields used in the context as a primary key. stripNesting() protected Strips out any numeric nesting type() public Get the abstract field type for a given field name. val() public Get the current value for a given field. Method Detail __construct() public __construct(array $context) Constructor. Parameters array $context Context info. attributes() public attributes(string $field): array Get an associative array of other attributes for a field name. Parameters string $field A dot separated path to get additional data on. Returns array error() public error(string $field): array Get the errors for a given field Parameters string $field A dot separated path to check errors on. Returns array fieldNames() public fieldNames(): string[] Get the field names of the top level object in this context. Returns string[] getMaxLength() public getMaxLength(string $field): int|null Get field length from validation In this context class, this is simply defined by the 'length' array. Parameters string $field A dot separated path to check required-ness for. Returns int|null getPrimaryKey() public getPrimaryKey(): string[] Get the fields used in the context as a primary key. Returns string[] getRequiredMessage() public getRequiredMessage(string $field): string|null Gets the default "required" error message for a field Parameters string $field Returns string|null hasError() public hasError(string $field): bool Check whether or not a field has an error attached to it Parameters string $field A dot separated path to check errors on. Returns bool isCreate() public isCreate(): bool Returns whether or not this form is for a create operation. For this method to return true, both the primary key constraint must be defined in the 'schema' data, and the 'defaults' data must contain a value for all fields in the key. Returns bool isPrimaryKey() public isPrimaryKey(string $field): bool Returns true if the passed field name is part of the primary key for this context Parameters string $field Returns bool isRequired() public isRequired(string $field): bool|null Check if a given field is 'required'. In this context class, this is simply defined by the 'required' array. Parameters string $field A dot separated path to check required-ness for. Returns bool|null primaryKey() public primaryKey(): string[] Get the fields used in the context as a primary key. Returns string[] stripNesting() protected stripNesting(string $field): string Strips out any numeric nesting For example users.0.age will output as users.age Parameters string $field A dot separated path Returns string type() public type(string $field): string|null Get the abstract field type for a given field name. Parameters string $field A dot separated path to get a schema type for. Returns string|null See Also \Cake\Database\TypeFactory val() public val(string $field, array $options = []): mixed Get the current value for a given field. This method will coalesce the current data and the 'defaults' array. Parameters string $field A dot separated path to the field a value is needed for. array $options optional Options: Returns mixed Property Detail $_context protected Context data for this object. Type array
HTMLSelectElement.labels The HTMLSelectElement.labels read-only property returns a NodeList of the <label> elements associated with the <select> element. Value A NodeList containing the <label> elements associated with the <select> element. Examples HTML <label id="label1" for="test">Label 1</label> <select id="test"> <option value="1">Option 1</option> <option value="2">Option 2</option> </select> <label id="label2" for="test">Label 2</label> JavaScript window.addEventListener("DOMContentLoaded", function() { const select = document.getElementById("test"); for(var i = 0; i < select.labels.length; i++) { console.log(select.labels[i].textContent); // "Label 1" and "Label 2" } }); Specifications Specification HTML Standard # dom-lfe-labels-dev 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 labels 6 18 56 No ≤12.1 5.1 3 18 56 ≤12.1 5 1.0 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 3, 2022, by MDN contributors
Creating and publishing an organization scoped package Skip to content npm Docs npmjs.comStatusSupport About npm Getting started Packages and modules Integrations Organizations Creating and managing organizations Paying for your organization Managing organization members Managing teams Managing organization packages About organization scopes and packagesConfiguring your npm client with your organization settingsCreating and publishing an organization scoped package Policies Threats and Mitigations npm CLI Table of contents Creating an organization scoped package Publishing a private organization scoped package Publishing a public organization scoped package As an organization member, you can create and publish public and private packages within the organization's scope. Creating an organization scoped package On the command line, make a directory with the name of the package you would like to create. mkdir /path/to/package/directory Navigate to the newly-created package directory. To create an organization scoped package, on the command line, run: npm init --scope=<your_org_name> To verify the package is using your organization scope, in a text editor, open the package's package.json file and check that the name is @your_org_name/<pkg_name>, replacing your_org_name with the name of your organization. Publishing a private organization scoped package By default, npm publish will publish a scoped package as private. By default, any scoped package is published as private. However, if you have an organization that does not have the Private Packages feature, npm publish will fail unless you pass the access flag. On the command line, navigate to the package directory. Run npm publish. Private packages will say private below the package name on the npm website. Publishing a public organization scoped package To publish an organization scoped package as public, use npm publish --access public. On the command line, navigate to the package directory. Run npm publish --access public. Public packages will say public below the package name on the npm website. Edit this page on GitHub
function _search_find_match_with_simplify _search_find_match_with_simplify($key, $text, $boundary, $langcode = NULL) Finds an appropriate keyword in text. Parameters string $key: The keyword to find. string $text: The text to search for the keyword. string $boundary: Regular expression for the boundary character class (characters that indicate spaces between words). string|null $langcode: Language code for the language of $text, if known. Return value string|null A segment of $text that is between word boundary characters that either matches $key directly, or matches $key when both this text segment and $key are processed by search_simplify(). If a matching text segment is not located, NULL is returned. File core/modules/search/search.module, line 812 Enables site-wide keyword searching. Code function _search_find_match_with_simplify($key, $text, $boundary, $langcode = NULL) { $preceded_by_boundary = '(?<=' . $boundary . ')'; $followed_by_boundary = '(?=' . $boundary . ')'; // See if $key appears as-is. When testing, make sure $text starts/ends with // a space, because we require $key to be surrounded by word boundary // characters. $temp = trim($key); if ($temp == '') { return NULL; } if (preg_match('/' . $preceded_by_boundary . preg_quote($temp, '/') . $followed_by_boundary . '/iu', ' ' . $text . ' ')) { return $temp; } // See if there is a match after lower-casing and removing diacritics in // both, which should preserve the string length. $new_text = Unico8b7c:f320:99b9:690f:4595:cd17:293a:c069strtolower($text); $new_text = \Drupal8b7c:f320:99b9:690f:4595:cd17:293a:c069service('transliteration')->removeDiacritics($new_text); $new_key = Unico8b7c:f320:99b9:690f:4595:cd17:293a:c069strtolower($temp); $new_key = \Drupal8b7c:f320:99b9:690f:4595:cd17:293a:c069service('transliteration')->removeDiacritics($new_key); if (preg_match('/' . $preceded_by_boundary . preg_quote($new_key, '/') . $followed_by_boundary . '/u', ' ' . $new_text . ' ')) { $position = Unico8b7c:f320:99b9:690f:4595:cd17:293a:c069strpos($new_text, $new_key); return Unico8b7c:f320:99b9:690f:4595:cd17:293a:c069substr($text, $position, Unico8b7c:f320:99b9:690f:4595:cd17:293a:c069strlen($new_key)); } // Run both text and key through search_simplify. $simplified_key = trim(search_simplify($key, $langcode)); $simplified_text = trim(search_simplify($text, $langcode)); if ($simplified_key == '' || $simplified_text == '' || strpos($simplified_text, $simplified_key) === FALSE) { // The simplified keyword and text do not match at all, or are empty. return NULL; } // Split $text into words, keeping track of where the word boundaries are. $words = preg_split('/' . $boundary . '+/u', $text, NULL, PREG_SPLIT_OFFSET_CAPTURE); // Add an entry pointing to the end of the string, for the loop below. $words[] = array('', strlen($text)); // Using a binary search, find the earliest possible ending position in // $text where it will still match the keyword after applying // search_simplify(). $start_index = 0; $start_pos = $words[$start_index][1]; $min_end_index = 1; $max_end_index = count($words) - 1; while ($max_end_index > $min_end_index) { // Check the index half way between min and max. See if we ended there, // if we would still have a match. $proposed_end_index = floor(($max_end_index + $min_end_index) / 2); $proposed_end_pos = $words[$proposed_end_index][1]; // Since the split was done with preg_split(), the positions are byte counts // not character counts, so use substr() not Unico8b7c:f320:99b9:690f:4595:cd17:293a:c069substr() here. $trial_text = trim(search_simplify(substr($text, $start_pos, $proposed_end_pos - $start_pos), $langcode)); if (strpos($trial_text, $simplified_key) !== FALSE) { // The proposed endpoint is fine, text still matches. $max_end_index = $proposed_end_index; } else { // The proposed endpoint index is too early, so the earliest possible // OK ending point would be the next index. $min_end_index = $proposed_end_index + 1; } } // Now do the same for the starting position: using a binary search, find the // latest possible starting position in $text where it will still match the // keyword after applying search_simplify(). $end_index = $min_end_index; $end_pos = $words[$end_index][1]; $min_start_index = 0; $max_start_index = $end_index - 1; while ($max_start_index > $min_start_index) { // Check the index half way between min and max. See if we started there, // if we would still have a match. $proposed_start_index = ceil(($max_start_index + $min_start_index) / 2); $proposed_start_pos = $words[$proposed_start_index][1]; // Since the split was done with preg_split(), the positions are byte counts // not character counts, so use substr() not Unico8b7c:f320:99b9:690f:4595:cd17:293a:c069substr() here. $trial_text = trim(search_simplify(substr($text, $proposed_start_pos, $end_pos - $proposed_start_pos), $langcode)); if (strpos($trial_text, $simplified_key) !== FALSE) { // The proposed start point is fine, text still matches. $min_start_index = $proposed_start_index; } else { // The proposed start point index is too late, so the latest possible // OK starting point would be the previous index. $max_start_index = $proposed_start_index - 1; } } $start_index = $max_start_index; // Return the matching text. We need to use substr() here and not the // Unico8b7c:f320:99b9:690f:4595:cd17:293a:c069substr() function, because the indices in $words came from // preg_split(), so they are Unicode-safe byte positions, not character // positions. return trim(substr($text, $words[$start_index][1], $words[$end_index][1] - $words[$start_index][1])); }
Symfony\Component\Security\Core Namespaces Symfony\Component\Security\Core\AuthenticationSymfony\Component\Security\Core\AuthorizationSymfony\Component\Security\Core\EncoderSymfony\Component\Security\Core\EventSymfony\Component\Security\Core\ExceptionSymfony\Component\Security\Core\RoleSymfony\Component\Security\Core\UserSymfony\Component\Security\Core\Validator Classes AuthenticationEvents Security Helper class for commonly-needed security tasks.
Document.open() The Document.open() method opens a document for writing. This does come with some side effects. For example: All event listeners currently registered on the document, nodes inside the document, or the document's window are removed. All existing nodes are removed from the document. Syntax open() Parameters None. Return value A Document object instance. Examples The following simple code opens the document and replaces its content with a number of different HTML fragments, before closing it again. document.open(); document.write("<p>Hello world!</p>"); document.write("<p>I am a fish</p>"); document.write("<p>The number is 42</p>"); document.close(); Notes An automatic document.open() call happens when document.write() is called after the page has loaded. Gecko-specific notes Starting with Gecko 1.9, this method is subject to the same same-origin policy as other properties, and does not work if doing so would change the document's origin. Starting with Gecko 1.9.2, document.open() uses the principal of the document whose URI it uses, instead of fetching the principal off the stack. As a result, you can no longer call document.write() into an untrusted document from chrome, even using wrappedJSObject. See Security check basics for more about principals. Three-argument document.open() There is a lesser-known and little-used three-argument version of document.open() , which is an alias of Window.open() (see its page for full details). This call, for example opens github.com in a new window, with its opener set to null: document.open('https://www.github.com','', 'noopener=true') Two-argument document.open() Browsers used to support a two-argument document.open(), with the following signature: document.open(type, replace) Where type specified the MIME type of the data you are writing (e.g. text/html) and replace if set (i.e. a string of "replace") specified that the history entry for the new document would replace the current history entry of the document being written to. This form is now obsolete; it won't throw an error, but instead just forwards to document.open() (i.e. is the equivalent of just running it with no arguments). The history-replacement behavior now always happens. Specifications Specification HTML Standard # dom-document-open-dev 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 open 64 1-64 Only supported for HTMLDocument, not all Document objects. 12 1 4 51 ≤12.1-51 Only supported for HTMLDocument, not all Document objects. 11 1-11 Only supported for HTMLDocument, not all Document objects. 64 1-64 Only supported for HTMLDocument, not all Document objects. 64 18-64 Only supported for HTMLDocument, not all Document objects. 4 47 ≤12.1-47 Only supported for HTMLDocument, not all Document objects. 11 1-11 Only supported for HTMLDocument, not all Document objects. 9.0 1.0-9.0 Only supported for HTMLDocument, not all Document objects. See also Document Window.open() 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 19, 2022, by MDN contributors
apply_filters_deprecated( 'block_categories', array[] $block_categories, WP_Post $post ) This hook has been deprecated. Use the ‘block_categories_all’ filter instead. Filters the default array of categories for block types. Parameters $block_categories array[] Array of categories for block types. $post WP_Post Post being loaded. Source File: wp-includes/block-editor.php. View all references $block_categories = apply_filters_deprecated( 'block_categories', array( $block_categories, $post ), '5.8.0', 'block_categories_all' ); Related Used By Used By Description get_block_categories() wp-includes/block-editor.php Returns all the categories for block types that will be shown in the block editor. Changelog Version Description 5.8.0 Use the 'block_categories_all' filter instead. 5.0.0 Introduced.
Document Navigation The navigation commands are for linking the pages of a document in a meaningful sequence. Below is a sequence of QDoc comments that shows a typical use of the navigation commands. Example /*! \page basicqt.html \contentspage {Basic Qt} {Contents} \nextpage Getting Started \indexpage Index \startpage Basic Qt \title Basic Qt The Qt toolkit is a C++ class library and a set of tools for building multiplatform GUI programs using a "write once, compile anywhere approach". Table of contents: \list \li \l {Getting Started} \li \l {Creating Dialogs} \li \l {Creating Main Windows} \endlist */ /*! \page gettingstarted.html \previouspage Basic Qt \contentspage {Basic Qt} {Contents} \nextpage Creating Dialogs \indexpage Index \startpage Basic Qt \title Getting Started This chapter shows how to combine basic C++ with the functionality provided by Qt to create a few small graphical interface (GUI) applications. */ / *! \page creatingdialogs.html \previouspage Getting Started \contentspage {Basic Qt} {Contents} \indexpage Index \startpage Basic Qt \title Creating Dialogs This chapter will teach you how to create dialog boxes using Qt. */ /*! \page index.html \indexpage Index \startpage Basic Qt \title Index \list \li \l {Basic Qt} \li \l {Creating Dialogs} \li \l {Getting Started} \endlist */ QDoc renders the "Getting Started" page in creatingdialogs.html: [Previous: Basic Qt] [Contents] [Next: Creating Dialogs] Getting Started This chapter shows how to combine basic C++ with the functionality provided by Qt to create a few small graphical interface (GUI) applications. [Previous: Basic Qt] [Contents] [Next: Creating Dialogs] The \indexpage and \startpage commands create links to the page's index page and start page. These links can be used by browsers and search engines. The index page is typically an alphabetical list of the document's titles and topics, while the start page is the page considered by the author to be the starting point of a multipage document. The links are included in the generated HTML source code, but have no visual effect on the documentation: <head> ... <link rel="index" href="index.html" /> <link rel="start" href="basicqt.html" /> ... </head> Commands \previouspage The \previouspage command links the current page to the previous page in a sequence.a The command has two arguments, each enclosed by curly braces: the first is the link target (the title of the previous page), the second is the link text. If the page's title is equivalent to the link text, the second argument can be omitted. The command must stand alone on its own line. \nextpage The \nextpage command links the current page to the next page in a sequence. The command follows the same syntax and argument convention as the \previouspage command. \startpage The \startpage command specifies the first page of a sequence of pages. The command must stand alone on its own line, and its unique argument is the title of the first document. QDoc will generate a link to the start page and include it in the generated HTML file, but this has no visual effect on the documentation. The generated link type tells browsers and search engines which document is considered by the author to be the starting point of the collection. \contentspage The \contentspage command links the current page to a table of contents page. The command follows the same syntax and argument convention as the \previouspage command. \indexpage The \indexpage command specifies an index page for the current document. The command must stand alone on its own line, and its unique argument is the title of the index document. QDoc will generate a link to the index page and include it in the generated HTML file, but this has no visual effect on the documentation. The generated link type tells browsers and search engines which document is considered by the author to be the index page of the collection.
dart:html MOVED_PERMANENTLY constant int const MOVED_PERMANENTLY @Deprecated("Use movedPermanently instead") Implementation @Deprecated("Use movedPermanently instead") static const int MOVED_PERMANENTLY = movedPermanently;
Enum Class Component.BaselineResizeBehavior java.lang.Object java.lang.Enum<Component.BaselineResizeBehavior> java.awt.Component.BaselineResizeBehavior All Implemented Interfaces: Serializable, Comparable<Component.BaselineResizeBehavior>, Constable Enclosing class: Component public static enum Component.BaselineResizeBehavior extends Enum<Component.BaselineResizeBehavior> Enumeration of the common ways the baseline of a component can change as the size changes. The baseline resize behavior is primarily for layout managers that need to know how the position of the baseline changes as the component size changes. In general the baseline resize behavior will be valid for sizes greater than or equal to the minimum size (the actual minimum size; not a developer specified minimum size). For sizes smaller than the minimum size the baseline may change in a way other than the baseline resize behavior indicates. Similarly, as the size approaches Integer.MAX_VALUE and/or Short.MAX_VALUE the baseline may change in a way other than the baseline resize behavior indicates. Since: 1.6 See Also: Component.getBaselineResizeBehavior() Component.getBaseline(int,int) Nested Class Summary Nested classes/interfaces declared in class java.lang.Enum Enum.EnumDesc<E extends Enum<E>> Enum Constant Summary Enum Constant Description CENTER_OFFSET Indicates the baseline remains a fixed distance from the center of the component. CONSTANT_ASCENT Indicates the baseline remains fixed relative to the y-origin. CONSTANT_DESCENT Indicates the baseline remains fixed relative to the height and does not change as the width is varied. OTHER Indicates the baseline resize behavior can not be expressed using any of the other constants. Method Summary Modifier and Type Method Description static Component.BaselineResizeBehavior valueOf(String name) Returns the enum constant of this class with the specified name. static Component.BaselineResizeBehavior[] values() Returns an array containing the constants of this enum class, in the order they are declared. Methods declared in class java.lang.Enum clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf Methods declared in class java.lang.Object getClass, notify, notifyAll, wait, wait, wait Enum Constant Details CONSTANT_ASCENT public static final Component.BaselineResizeBehavior CONSTANT_ASCENT Indicates the baseline remains fixed relative to the y-origin. That is, getBaseline returns the same value regardless of the height or width. For example, a JLabel containing non-empty text with a vertical alignment of TOP should have a baseline type of CONSTANT_ASCENT. CONSTANT_DESCENT public static final Component.BaselineResizeBehavior CONSTANT_DESCENT Indicates the baseline remains fixed relative to the height and does not change as the width is varied. That is, for any height H the difference between H and getBaseline(w, H) is the same. For example, a JLabel containing non-empty text with a vertical alignment of BOTTOM should have a baseline type of CONSTANT_DESCENT. CENTER_OFFSET public static final Component.BaselineResizeBehavior CENTER_OFFSET Indicates the baseline remains a fixed distance from the center of the component. That is, for any height H the difference between getBaseline(w, H) and H / 2 is the same (plus or minus one depending upon rounding error). Because of possible rounding errors it is recommended you ask for the baseline with two consecutive heights and use the return value to determine if you need to pad calculations by 1. The following shows how to calculate the baseline for any height: Dimension preferredSize = component.getPreferredSize(); int baseline = getBaseline(preferredSize.width, preferredSize.height); int nextBaseline = getBaseline(preferredSize.width, preferredSize.height + 1); // Amount to add to height when calculating where baseline // lands for a particular height: int padding = 0; // Where the baseline is relative to the mid point int baselineOffset = baseline - height / 2; if (preferredSize.height % 2 == 0 && baseline != nextBaseline) { padding = 1; } else if (preferredSize.height % 2 == 1 && baseline == nextBaseline) { baselineOffset--; padding = 1; } // The following calculates where the baseline lands for // the height z: int calculatedBaseline = (z + padding) / 2 + baselineOffset; OTHER public static final Component.BaselineResizeBehavior OTHER Indicates the baseline resize behavior can not be expressed using any of the other constants. This may also indicate the baseline varies with the width of the component. This is also returned by components that do not have a baseline. Method Details values public static Component.BaselineResizeBehavior[] values() Returns an array containing the constants of this enum class, in the order they are declared. Returns: an array containing the constants of this enum class, in the order they are declared valueOf public static Component.BaselineResizeBehavior valueOf(String name) Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.) Parameters: name - the name of the enum constant to be returned. Returns: the enum constant with the specified name Throws: IllegalArgumentException - if this enum class has no constant with the specified name NullPointerException - if the argument is null
CanvasImageSource CanvasImageSource provides a mechanism for other interfaces to be used as image sources for some methods of the CanvasDrawImage and CanvasFillStrokeStyles interfaces. It's just an internal helper type to simplify the specification. It's not an interface and there are no objects implementing it. The interfaces that it allows to be used as image sources are the following: HTMLImageElement SVGImageElement HTMLVideoElement HTMLCanvasElement ImageBitmap OffscreenCanvas Specifications Specification Status Comment HTML Living StandardThe definition of 'CanvasImageSource' in that specification. Living Standard Initial definition. 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
constant UPDATE_MAX_FETCH_TIME Maximum number of seconds to try fetching available update data at a time. File modules/update/update.module, line 74 Handles updates of Drupal core and contributed projects. Code define('UPDATE_MAX_FETCH_TIME', 30)
logDet.pdMat Extract Log-Determinant from a pdMat Object Description This method function extracts the logarithm of the determinant of a square-root factor of the positive-definite matrix represented by object. Usage ## S3 method for class 'pdMat' logDet(object, ...) Arguments object an object inheriting from class "pdMat", representing a positive definite matrix. ... some methods for this generic require additional arguments. None are used in this method. Value the log-determinant of a square-root factor of the positive-definite matrix represented by object. Author(s) José Pinheiro and Douglas Bates [email protected] See Also pdMat, logDet Examples pd1 <- pdSymm(diag(1:3)) logDet(pd1) Copyright (
CTEST_UPDATE_VERSION_ONLY Specify the CTest UpdateVersionOnly setting in a ctest(1) dashboard client script.
protected property FormatterBas8b7c:f320:99b9:690f:4595:cd17:293a:c069$settings The formatter settings. Type: array Overrides PluginSettingsBas8b7c:f320:99b9:690f:4595:cd17:293a:c069$settings File core/lib/Drupal/Core/Field/FormatterBase.php, line 28 Class FormatterBase Base class for 'Field formatter' plugin implementations. Namespace Drupal\Core\Field Code protected $settings;
dart:typed_data WZWW constant int WZWW = 0xFB
wcspbrk Defined in header <wchar.h> wchar_t* wcspbrk( const wchar_t* dest, const wchar_t* str ); (since C95) Finds the first character in wide string pointed to by dest, that is also in wide string pointed to by str. Parameters dest - pointer to the null-terminated wide string to be analyzed src - pointer to the null-terminated wide string that contains the characters to search for Return value Pointer to the first character in dest, that is also in str, or a null pointer if no such character exists. Notes The name stands for "wide character string pointer break", because it returns a pointer to the first of the separator ("break") characters. Example #include <stdio.h> #include <wchar.h> int main(void) { const wchar_t* str = L"Hello world, friend of mine!"; const wchar_t* sep = L" ,!"; unsigned int cnt = 0; do { str = wcspbrk(str, sep); // find separator if (str) str += wcsspn(str, sep); // skip separator ++cnt; // increment word count } while (str && *str); wprintf(L"There are %u words.\n", cnt); } Output: There are 5 words. References C11 standard (ISO/IEC 9899:2011): 30.255.87.135.3 The wcspbrk function (p: 436) C99 standard (ISO/IEC 9899:1999): 30.255.87.135.3 The wcspbrk function (p: 382) See also wcscspn (C95) returns the length of the maximum initial segment that consists of only the wide chars not found in another wide string (function) wcschr (C95) finds the first occurrence of a wide character in a wide string (function) strpbrk finds the first location of any character in one string, in another string (function) C++ documentation for wcspbrk
dart:html language property String language Source @DomName('AudioTrack.language') @DocsEditable() @Experimental() // untriaged String get language => _blink.BlinkAudioTrack.instance.language_Getter_(this);
module Net8b7c:f320:99b9:690f:4595:cd17:293a:c069IMAP8b7c:f320:99b9:690f:4595:cd17:293a:c069NumValidator Common validators of number and nz_number types Public Class Methods ensure_number(num) Show source # File lib/net/imap.rb, line 1636 def ensure_number(num) return if valid_number?(num) msg = "number must be unsigned 32-bit integer: #{num}" raise DataFormatError, msg end Ensure argument is 'number' or raise DataFormatError ensure_nz_number(num) Show source # File lib/net/imap.rb, line 1644 def ensure_nz_number(num) return if valid_nz_number?(num) msg = "nz_number must be non-zero unsigned 32-bit integer: #{num}" raise DataFormatError, msg end Ensure argument is 'nz_number' or raise DataFormatError valid_number?(num) Show source # File lib/net/imap.rb, line 1618 def valid_number?(num) # [RFC 3501] # number = 1*DIGIT # ; Unsigned 32-bit integer # ; (0 <= n < 4,294,967,296) num >= 0 && num < 4294967296 end Check is passed argument valid 'number' in RFC 3501 terminology valid_nz_number?(num) Show source # File lib/net/imap.rb, line 1627 def valid_nz_number?(num) # [RFC 3501] # nz-number = digit-nz *DIGIT # ; Non-zero unsigned 32-bit integer # ; (0 < n < 4,294,967,296) num != 0 && valid_number?(num) end Check is passed argument valid 'nz_number' in RFC 3501 terminology Ruby Core © 1993–2017 Yukihiro MatsumotoLicensed under the Ruby License.Ruby Standard Library
MorphTo class MorphTo extends BelongsTo (View source) Traits InteractsWithDictionary ComparesRelatedModels InteractsWithDictionary SupportsDefaultModels ForwardsCalls Macroable Properties static protected array $macros The registered string macros. from Macroable protected Builder $query The Eloquent query builder instance. from Relation protected Model $parent The parent model instance. from Relation protected Model $related The related model instance. from Relation static protected bool $constraints Indicates if the relation is adding constraints. from Relation static array $morphMap An array to map class names to their morph names in the database. from Relation static protected bool $requireMorphMap Prevents morph relationships without a morph map. from Relation static protected int $selfJoinCount The count of self joins. from Relation protected Closure|array|bool $withDefault Indicates if a default model instance should be used. from SupportsDefaultModels protected Model $child The child model instance of the relation. from BelongsTo protected string $foreignKey The foreign key of the parent model. from BelongsTo protected string $ownerKey The associated key on the parent model. from BelongsTo protected string $relationName The name of the relationship. from BelongsTo protected string $morphType The type of the polymorphic relation. protected Collection $models The models whose relations are being eager loaded. protected array $dictionary All of the models keyed by ID. protected array $macroBuffer A buffer of dynamic calls to query macros. protected array $morphableEagerLoads A map of relations to load for each individual morph type. protected array $morphableEagerLoadCounts A map of relationship counts to load for each individual morph type. protected array $morphableConstraints A map of constraints to apply for each individual morph type. Methods mixed forwardCallTo(mixed $object, string $method, array $parameters) Forward a method call to the given object. from ForwardsCalls mixed forwardDecoratedCallTo(mixed $object, string $method, array $parameters) Forward a method call to the given object, returning $this if the forwarded call returned itself. from ForwardsCalls static void throwBadMethodCallException(string $method) Throw a bad method call exception for the given method. from ForwardsCalls static void macro(string $name, object|callable $macro) Register a custom macro. from Macroable static void mixin(object $mixin, bool $replace = true) Mix another object into the class. from Macroable static bool hasMacro(string $name) Checks if macro is registered. from Macroable static void flushMacros() Flush the existing macros. from Macroable static mixed __callStatic(string $method, array $parameters) Dynamically handle calls to the class. from Macroable mixed __call(string $method, array $parameters) Handle dynamic method calls to the relationship. void __construct(Builder $query, Model $parent, string $foreignKey, string $ownerKey, string $type, string $relation) Create a new morph to relationship instance. static mixed noConstraints(Closure $callback) Run a callback with constraints disabled on the relation. from Relation void addConstraints() Set the base constraints on the relation query. from BelongsTo void addEagerConstraints(array $models) Set the constraints for an eager load of the relation. array initRelation(array $models, string $relation) Initialize the relation on a set of models. from BelongsTo array match(array $models, Collection $results, string $relation) Match the eagerly loaded results to their parents. mixed getResults() Get the results of the relationship. from BelongsTo Collection getEager() Get the results of the relationship. Model sole(array|string $columns = ['*']) Execute the query and get the first result if it's the sole matching record. from Relation Collection get(array $columns = ['*']) Execute the query as a "select" statement. from Relation void touch() Touch all of the related models for the relationship. int rawUpdate(array $attributes = []) Run a raw update against the base query. from Relation Builder getRelationExistenceCountQuery(Builder $query, Builder $parentQuery) Add the constraints for a relationship count query. from Relation Builder getRelationExistenceQuery(Builder $query, Builder $parentQuery, array|mixed $columns = ['*']) Add the constraints for a relationship query. from BelongsTo string getRelationCountHash(bool $incrementJoinCount = true) Get a relationship join table hash. from Relation array getKeys(array $models, string|null $key = null) Get all of the primary keys for an array of models. from Relation Builder getRelationQuery() Get the query builder that will contain the relationship constraints. from Relation Builder getQuery() Get the underlying query for the relation. from Relation Builder getBaseQuery() Get the base query builder driving the Eloquent builder. from Relation Builder toBase() Get a base query builder instance. from Relation Model getParent() Get the parent model of the relation. from Relation string getQualifiedParentKeyName() Get the fully qualified parent key name. from Relation Model getRelated() Get the related model of the relation. from Relation string createdAt() Get the name of the "created at" column. from Relation string updatedAt() Get the name of the "updated at" column. from Relation string relatedUpdatedAt() Get the name of the related model's "updated at" column. from Relation string whereInMethod(Model $model, string $key) Get the name of the "where in" method for eager loading. from Relation static void requireMorphMap(bool $requireMorphMap = true) Prevent polymorphic relationships from being used without model mappings. from Relation static bool requiresMorphMap() Determine if polymorphic relationships require explicit model mapping. from Relation static array enforceMorphMap(array $map, bool $merge = true) Define the morph map for polymorphic relations and require all morphed models to be explicitly mapped. from Relation static array morphMap(array $map = null, bool $merge = true) Set or get the morph map for polymorphic relations. from Relation static array|null buildMorphMapFromModels(array $models = null) Builds a table-keyed array from model class names. from Relation static string|null getMorphedModel(string $alias) Get the model associated with a custom polymorphic type. from Relation void __clone() Force a clone of the underlying query builder when cloning. from Relation bool is(Model|null $model) Determine if the model is the related instance of the relationship. from ComparesRelatedModels bool isNot(Model|null $model) Determine if the model is not the related instance of the relationship. from ComparesRelatedModels mixed getParentKey() Get the value of the parent model's key. from ComparesRelatedModels mixed getRelatedKeyFrom(Model $model) Get the value of the model's related key. from ComparesRelatedModels bool compareKeys(mixed $parentKey, mixed $relatedKey) Compare the parent key with the related key. from ComparesRelatedModels mixed getDictionaryKey(mixed $attribute) Get a dictionary key attribute - casting it to a string if necessary. from InteractsWithDictionary Model newRelatedInstanceFor(Model $parent) Make a new related instance for the given model. $this withDefault(Closure|array|bool $callback = true) Return a new model instance in case the relationship does not exist. from SupportsDefaultModels Model|null getDefaultFor(Model $parent) Get the default value for this relation. from SupportsDefaultModels array getEagerModelKeys(array $models) Gather the keys from an array of related models. from BelongsTo Model associate(Model|int|string|null $model) Associate the model instance to the given parent. Model dissociate() Dissociate previously associated model from the given parent. Model disassociate() Alias of "dissociate" method. from BelongsTo Builder getRelationExistenceQueryForSelfRelation(Builder $query, Builder $parentQuery, array|mixed $columns = ['*']) Add the constraints for a relationship query on the same table. from BelongsTo bool relationHasIncrementingId() Determine if the related model has an auto-incrementing ID. from BelongsTo Model getChild() Get the child of the relationship. from BelongsTo string getForeignKeyName() Get the foreign key of the relationship. from BelongsTo string getQualifiedForeignKeyName() Get the fully qualified foreign key of the relationship. from BelongsTo string getOwnerKeyName() Get the associated key of the relationship. from BelongsTo string getQualifiedOwnerKeyName() Get the fully qualified associated key of the relationship. from BelongsTo string getRelationName() Get the name of the relationship. from BelongsTo void buildDictionary(Collection $models) Build a dictionary with the models. Collection getResultsByType(string $type) Get all of the relation results for a type. array gatherKeysByType(string $type, string $keyType) Gather all of the foreign keys for a given type. Model createModelByType(string $type) Create a new model instance by type. void matchToMorphParents(string $type, Collection $results) Match the results for a given type to their parents. string getMorphType() Get the foreign key "type" name. array getDictionary() Get the dictionary used by the relationship. MorphTo morphWith(array $with) Specify which relations to load for a given morph type. MorphTo morphWithCount(array $withCount) Specify which relationship counts to load for a given morph type. MorphTo constrain(array $callbacks) Specify constraints on the query for a given morph type. Builder replayMacros(Builder $query) Replay stored macro calls on the actual related instance. Details protected mixed forwardCallTo(mixed $object, string $method, array $parameters) Forward a method call to the given object. Parameters mixed $object string $method array $parameters Return Value mixed Exceptions BadMethodCallException protected mixed forwardDecoratedCallTo(mixed $object, string $method, array $parameters) Forward a method call to the given object, returning $this if the forwarded call returned itself. Parameters mixed $object string $method array $parameters Return Value mixed Exceptions BadMethodCallException static protected void throwBadMethodCallException(string $method) Throw a bad method call exception for the given method. Parameters string $method Return Value void Exceptions BadMethodCallException static void macro(string $name, object|callable $macro) Register a custom macro. Parameters string $name object|callable $macro Return Value void static void mixin(object $mixin, bool $replace = true) Mix another object into the class. Parameters object $mixin bool $replace Return Value void Exceptions ReflectionException static bool hasMacro(string $name) Checks if macro is registered. Parameters string $name Return Value bool static void flushMacros() Flush the existing macros. Return Value void static mixed __callStatic(string $method, array $parameters) Dynamically handle calls to the class. Parameters string $method array $parameters Return Value mixed Exceptions BadMethodCallException mixed __call(string $method, array $parameters) Handle dynamic method calls to the relationship. Parameters string $method array $parameters Return Value mixed void __construct(Builder $query, Model $parent, string $foreignKey, string $ownerKey, string $type, string $relation) Create a new morph to relationship instance. Parameters Builder $query Model $parent string $foreignKey string $ownerKey string $type string $relation Return Value void static mixed noConstraints(Closure $callback) Run a callback with constraints disabled on the relation. Parameters Closure $callback Return Value mixed void addConstraints() Set the base constraints on the relation query. Return Value void void addEagerConstraints(array $models) Set the constraints for an eager load of the relation. Parameters array $models Return Value void array initRelation(array $models, string $relation) Initialize the relation on a set of models. Parameters array $models string $relation Return Value array array match(array $models, Collection $results, string $relation) Match the eagerly loaded results to their parents. Parameters array $models Collection $results string $relation Return Value array mixed getResults() Get the results of the relationship. Return Value mixed Collection getEager() Get the results of the relationship. Called via eager load method of Eloquent query builder. Return Value Collection Model sole(array|string $columns = ['*']) Execute the query and get the first result if it's the sole matching record. Parameters array|string $columns Return Value Model Exceptions Model> MultipleRecordsFoundException Collection get(array $columns = ['*']) Execute the query as a "select" statement. Parameters array $columns Return Value Collection void touch() Touch all of the related models for the relationship. Return Value void int rawUpdate(array $attributes = []) Run a raw update against the base query. Parameters array $attributes Return Value int Builder getRelationExistenceCountQuery(Builder $query, Builder $parentQuery) Add the constraints for a relationship count query. Parameters Builder $query Builder $parentQuery Return Value Builder Builder getRelationExistenceQuery(Builder $query, Builder $parentQuery, array|mixed $columns = ['*']) Add the constraints for a relationship query. Parameters Builder $query Builder $parentQuery array|mixed $columns Return Value Builder string getRelationCountHash(bool $incrementJoinCount = true) Get a relationship join table hash. Parameters bool $incrementJoinCount Return Value string protected array getKeys(array $models, string|null $key = null) Get all of the primary keys for an array of models. Parameters array $models string|null $key Return Value array protected Builder getRelationQuery() Get the query builder that will contain the relationship constraints. Return Value Builder Builder getQuery() Get the underlying query for the relation. Return Value Builder Builder getBaseQuery() Get the base query builder driving the Eloquent builder. Return Value Builder Builder toBase() Get a base query builder instance. Return Value Builder Model getParent() Get the parent model of the relation. Return Value Model string getQualifiedParentKeyName() Get the fully qualified parent key name. Return Value string Model getRelated() Get the related model of the relation. Return Value Model string createdAt() Get the name of the "created at" column. Return Value string string updatedAt() Get the name of the "updated at" column. Return Value string string relatedUpdatedAt() Get the name of the related model's "updated at" column. Return Value string protected string whereInMethod(Model $model, string $key) Get the name of the "where in" method for eager loading. Parameters Model $model string $key Return Value string static void requireMorphMap(bool $requireMorphMap = true) Prevent polymorphic relationships from being used without model mappings. Parameters bool $requireMorphMap Return Value void static bool requiresMorphMap() Determine if polymorphic relationships require explicit model mapping. Return Value bool static array enforceMorphMap(array $map, bool $merge = true) Define the morph map for polymorphic relations and require all morphed models to be explicitly mapped. Parameters array $map bool $merge Return Value array static array morphMap(array $map = null, bool $merge = true) Set or get the morph map for polymorphic relations. Parameters array $map bool $merge Return Value array static protected array|null buildMorphMapFromModels(array $models = null) Builds a table-keyed array from model class names. Parameters array $models Return Value array|null static string|null getMorphedModel(string $alias) Get the model associated with a custom polymorphic type. Parameters string $alias Return Value string|null void __clone() Force a clone of the underlying query builder when cloning. Return Value void bool is(Model|null $model) Determine if the model is the related instance of the relationship. Parameters Model|null $model Return Value bool bool isNot(Model|null $model) Determine if the model is not the related instance of the relationship. Parameters Model|null $model Return Value bool abstract mixed getParentKey() Get the value of the parent model's key. Return Value mixed abstract protected mixed getRelatedKeyFrom(Model $model) Get the value of the model's related key. Parameters Model $model Return Value mixed protected bool compareKeys(mixed $parentKey, mixed $relatedKey) Compare the parent key with the related key. Parameters mixed $parentKey mixed $relatedKey Return Value bool protected mixed getDictionaryKey(mixed $attribute) Get a dictionary key attribute - casting it to a string if necessary. Parameters mixed $attribute Return Value mixed Exceptions InvalidArgumentException protected Model newRelatedInstanceFor(Model $parent) Make a new related instance for the given model. Parameters Model $parent Return Value Model $this withDefault(Closure|array|bool $callback = true) Return a new model instance in case the relationship does not exist. Parameters Closure|array|bool $callback Return Value $this protected Model|null getDefaultFor(Model $parent) Get the default value for this relation. Parameters Model $parent Return Value Model|null protected array getEagerModelKeys(array $models) Gather the keys from an array of related models. Parameters array $models Return Value array Model associate(Model|int|string|null $model) Associate the model instance to the given parent. Parameters Model|int|string|null $model Return Value Model Model dissociate() Dissociate previously associated model from the given parent. Return Value Model Model disassociate() Alias of "dissociate" method. Return Value Model Builder getRelationExistenceQueryForSelfRelation(Builder $query, Builder $parentQuery, array|mixed $columns = ['*']) Add the constraints for a relationship query on the same table. Parameters Builder $query Builder $parentQuery array|mixed $columns Return Value Builder protected bool relationHasIncrementingId() Determine if the related model has an auto-incrementing ID. Return Value bool Model getChild() Get the child of the relationship. Return Value Model string getForeignKeyName() Get the foreign key of the relationship. Return Value string string getQualifiedForeignKeyName() Get the fully qualified foreign key of the relationship. Return Value string string getOwnerKeyName() Get the associated key of the relationship. Return Value string string getQualifiedOwnerKeyName() Get the fully qualified associated key of the relationship. Return Value string string getRelationName() Get the name of the relationship. Return Value string protected void buildDictionary(Collection $models) Build a dictionary with the models. Parameters Collection $models Return Value void protected Collection getResultsByType(string $type) Get all of the relation results for a type. Parameters string $type Return Value Collection protected array gatherKeysByType(string $type, string $keyType) Gather all of the foreign keys for a given type. Parameters string $type string $keyType Return Value array Model createModelByType(string $type) Create a new model instance by type. Parameters string $type Return Value Model protected void matchToMorphParents(string $type, Collection $results) Match the results for a given type to their parents. Parameters string $type Collection $results Return Value void string getMorphType() Get the foreign key "type" name. Return Value string array getDictionary() Get the dictionary used by the relationship. Return Value array MorphTo morphWith(array $with) Specify which relations to load for a given morph type. Parameters array $with Return Value MorphTo MorphTo morphWithCount(array $withCount) Specify which relationship counts to load for a given morph type. Parameters array $withCount Return Value MorphTo MorphTo constrain(array $callbacks) Specify constraints on the query for a given morph type. Parameters array $callbacks Return Value MorphTo protected Builder replayMacros(Builder $query) Replay stored macro calls on the actual related instance. Parameters Builder $query Return Value Builder
HttpStatusCode enum Http status codes. As per https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml enum HttpStatusCode { Continue: 100 SwitchingProtocols: 101 Processing: 102 EarlyHints: 103 Ok: 200 Created: 201 Accepted: 202 NonAuthoritativeInformation: 203 NoContent: 204 ResetContent: 205 PartialContent: 206 MultiStatus: 207 AlreadyReported: 208 ImUsed: 226 MultipleChoices: 300 MovedPermanently: 301 Found: 302 SeeOther: 303 NotModified: 304 UseProxy: 305 Unused: 306 TemporaryRedirect: 307 PermanentRedirect: 308 BadRequest: 400 Unauthorized: 401 PaymentRequired: 402 Forbidden: 403 NotFound: 404 MethodNotAllowed: 405 NotAcceptable: 406 ProxyAuthenticationRequired: 407 RequestTimeout: 408 Conflict: 409 Gone: 410 LengthRequired: 411 PreconditionFailed: 412 PayloadTooLarge: 413 UriTooLong: 414 UnsupportedMediaType: 415 RangeNotSatisfiable: 416 ExpectationFailed: 417 ImATeapot: 418 MisdirectedRequest: 421 UnprocessableEntity: 422 Locked: 423 FailedDependency: 424 TooEarly: 425 UpgradeRequired: 426 PreconditionRequired: 428 TooManyRequests: 429 RequestHeaderFieldsTooLarge: 431 UnavailableForLegalReasons: 451 InternalServerError: 500 NotImplemented: 501 BadGateway: 502 ServiceUnavailable: 503 GatewayTimeout: 504 HttpVersionNotSupported: 505 VariantAlsoNegotiates: 506 InsufficientStorage: 507 LoopDetected: 508 NotExtended: 510 NetworkAuthenticationRequired: 511 } Members Member Description Continue: 100 SwitchingProtocols: 101 Processing: 102 EarlyHints: 103 Ok: 200 Created: 201 Accepted: 202 NonAuthoritativeInformation: 203 NoContent: 204 ResetContent: 205 PartialContent: 206 MultiStatus: 207 AlreadyReported: 208 ImUsed: 226 MultipleChoices: 300 MovedPermanently: 301 Found: 302 SeeOther: 303 NotModified: 304 UseProxy: 305 Unused: 306 TemporaryRedirect: 307 PermanentRedirect: 308 BadRequest: 400 Unauthorized: 401 PaymentRequired: 402 Forbidden: 403 NotFound: 404 MethodNotAllowed: 405 NotAcceptable: 406 ProxyAuthenticationRequired: 407 RequestTimeout: 408 Conflict: 409 Gone: 410 LengthRequired: 411 PreconditionFailed: 412 PayloadTooLarge: 413 UriTooLong: 414 UnsupportedMediaType: 415 RangeNotSatisfiable: 416 ExpectationFailed: 417 ImATeapot: 418 MisdirectedRequest: 421 UnprocessableEntity: 422 Locked: 423 FailedDependency: 424 TooEarly: 425 UpgradeRequired: 426 PreconditionRequired: 428 TooManyRequests: 429 RequestHeaderFieldsTooLarge: 431 UnavailableForLegalReasons: 451 InternalServerError: 500 NotImplemented: 501 BadGateway: 502 ServiceUnavailable: 503 GatewayTimeout: 504 HttpVersionNotSupported: 505 VariantAlsoNegotiates: 506 InsufficientStorage: 507 LoopDetected: 508 NotExtended: 510 NetworkAuthenticationRequired: 511
How SQLite Works 1. Background 1.1. SQLite Is Different From Most Other SQL Databases 2. SQL Is A Programming Language 2.1. Programming Language Processing Steps 2.2. Compiling SQLite Programs 3. Further Reading 1. Background SQLite is a software library that translates high-level disk I/O requests generated by an application into low-level I/O operations that can be carried out by the operating system. The application constructs high-level I/O requests using the SQL language. SQLite translates each high-level SQL statement into a sequence of many low-level I/O requests (open a file, read a few bytes from a file, write a few bytes into a file, etc.) that do the work requested by the SQL. An application program could do all its disk I/O by direct calls to operating system I/O routines or by using a key/value storage engine like Berkeley DB or RocksDB (to name but two). But there are advantages to using a higher-level interface based on the SQL language. SQL is a very high-level language. A few lines of SQL can replace hundreds or thousands of lines of procedural code. SQL thus reduces the amount of work needed to develop and maintain the application, and thereby helps to reduce the number of bugs in the application. SQL and SQLite are transactional. The use of a transactional storage system makes it much easier to reason about the behavior of the application, and to write applications that are robust, even in the face of software bugs, hardware faults, or power losses. SQLite is often faster than direct low-level I/O. This is counterintuitive. One would expect that a high-level interface such as SQLite would impose a run-time penalty. And, theoretically, that is correct. But in practice, SQL-based systems such as SQLite do so many behind-the-scenes optimizations that an application developer would never have time to create and maintain, that the SQL-based systems end up providing a net performance gain. 1.1. SQLite Is Different From Most Other SQL Databases There are many SQL-based database management systems available, besides SQLite. Common options include MySQL, PostgreSQL, and SQL-Server. All these systems use the SQL langauge to communicate with the application, just like SQLite. But these other systems different from SQLite in important respects. SQLite is a serverless software library, whereas the other systems are client-server based. With MySQL, PostgreSQL, SQL-Server, and others, the application sends a message containing some SQL over to a separate server thread or process. That separate thread or process performs the requested I/O, then send the results back to the application. But there is no separate thread or process with SQLite. SQLite runs in the same address space as the application, using the same program counter and heap storage. SQLite does no interprocess communication (IPC). When an application sends an SQL statement into SQLite (by invoking a the appropriate SQLite library subroutine), SQLite interprets the SQL in the same thread as the caller. When an SQLite API routine returns, it does not leave behind any background tasks that run separately from the application. An SQLite database is a single ordinary file on disk (with a well-defined file format). With other systems, a "database" is usually a large number of separate files hidden away in obscure directories of the filesystem, or even spread across multiple machines. But with SQLite, a complete database is just an ordinary disk file. 2. SQL Is A Programming Language The best way to understand how SQL database engines work is to think of SQL as a programming language, not as a "query language". Each SQL statement is a separate program. Applications construct SQL program source files and send them to the database engine. The database engine compiles the SQL source code into executable form, runs that executable, then sends the result back to the application. While SQL is a programming language, it is different from other programming languages like C, Javascript, Python, or Go in that SQL is a declarative language where the others are imperative languages. This is an important difference that has implications for the design of the compiler used to translate program source text into an executable format. However, those details should not detract from the fact that SQL is really just another programming language. 2.1. Programming Language Processing Steps All programming languages are processed in two steps: Translate the program source text into an executable format. Run the executable generated in the previous step in order to carry out the desired action. All programming languages uses those two basic steps. The main difference is in the executable format. "Compiled" languages like C++ and Rust translate the source text into machine code that can be directly executed by the underlying hardware. There exist SQL database systems that do the same with SQL - they translate each SQL statement directly into machine code. But that approach is uncommon and is not the approach taken by SQLite. Other languages like Java, Perl, Python, and TCL typically translate the program source text into bytecode. This bytecode is then run through an interpreter that reads the bytecode and carries out the desired operations. SQLite uses this bytecode approach. If you preceed any SQL statement with the "EXPLAIN" keyword in SQLite, it will show you the bytecode that is generated rather than run the bytecode. Another approach is to translate the program source text into a tree of objects in memory. This tree is the "executable". An interpret runs the executable by walking the tree. This is the technique used by MySQL, PostgreSQL, and SQL-Server. Of course, not every language fits neatly into one of the above categories. This applies to both SQL database engines and more familiar imperative programming languages. Javascript is famous for using a hybrid execution model, where the code is initially compiled into a tree of objects, but might be further translating (using just-in-time compilation) down into more efficient bytecode or machine code, as a means of boosting performance. The executable format really ends up being just an implementation detail. The key point is that all languages have a compiler step which translates programs into an executable format and a run step that executes the compiled program. 2.2. Compiling SQLite Programs When an SQL program is submitted to SQLite, the first step is to split the source text into "tokens". A token might be: A language keyword like "SELECT" or "UPDATE". An identifier for a table or column or variable. Punctuation characters like "," or "==" or ";". Literal values: numeric or string constants. Whitespace or comments. Whitespace and comment tokens are discarded. All other tokens are fed into an LALR(1) Parser that analyzes the structure of the input program and generates an Abstract Syntax Tree (AST) for the input program. The parser forwards the AST on to the code generator. The code generator is the heart of SQLite, and is where most of the magic happens. The code generator resolves symbolic names in the AST - matching the names of columns and tables in the input SQL into actual columns and tables of the database. The code generator also does various transformations on the AST to "optimize" it. Finally the code generator chooses appropriate algorithms to implement the operations requested by the AST and constructs bytecode to carry out those operations. The bytecode generated by the code generator is called a "prepared statement". Translating SQL source text into a prepared statement is analogous to converting a C++ program into machine code by invoking gcc or clang. Human-readable source text (SQL or C++) goes in, and a machine readable executable (bytecode or machine code) comes out. 3. Further Reading The Atomic Commit document describes how SQLite implements transactions. The bytecode engine document has more information on the bytecode format used by SQLite, and how to view and interpret an SQLite prepared statement. The SQLite query planner and Next Generation Query Planner documents have further details on the algorithms SQLite uses to implement SQL statements and how it goes above choosing an appropriate algorithm for each individual SQL statement. This page last modified on 2022-06-16 15:42:19 UTC SQLite is in the Public Domain. https://sqlite.org/howitworks.html
MediaTrackConstraintSet package js.html Available on js Fields optionalwidth:Null<EitherType<Int, ConstrainLongRange>> optionalviewportWidth:Null<EitherType<Int, ConstrainLongRange>> optionalviewportOffsetY:Null<EitherType<Int, ConstrainLongRange>> optionalviewportOffsetX:Null<EitherType<Int, ConstrainLongRange>> optionalviewportHeight:Null<EitherType<Int, ConstrainLongRange>> optionalscrollWithPage:Null<Bool> optionalnoiseSuppression:Null<EitherType<Bool, ConstrainBooleanParameters>> optionalmediaSource:Null<String> optionalheight:Null<EitherType<Int, ConstrainLongRange>> optionalframeRate:Null<EitherType<Float, ConstrainDoubleRange>> optionalfacingMode:Null<EitherType<String, EitherType<Array<String>, ConstrainDOMStringParameters>>> optionalechoCancellation:Null<EitherType<Bool, ConstrainBooleanParameters>> optionaldeviceId:Null<EitherType<String, EitherType<Array<String>, ConstrainDOMStringParameters>>> optionalchannelCount:Null<EitherType<Int, ConstrainLongRange>> optionalbrowserWindow:Null<Int> optionalautoGainControl:Null<EitherType<Bool, ConstrainBooleanParameters>>
Cypress.config get and set configuration options in your tests. New to Cypress? Read about configuration first. Scope Configuration set using Cypress.config is only in scope for the current spec file. Cypress runs each spec file in isolation: the browser is exited between specs. Configuration changed in one spec won't be visible in other specs. Note Not all configuration values can be changed during runtime. See Notes below for details. Syntax Cypress.config() Cypress.config(name) Cypress.config(name, value) Cypress.config(object) Arguments name (String) The name of the configuration to get or set. value (String) The value of the configuration to set. object (Object) Set multiple configuration options with an object literal. Examples No Arguments Get all configuration options from configuration file (cypress.json by default) { "defaultCommandTimeout": 10000 } Cypress.config() // => {defaultCommandTimeout: 10000, pageLoadTimeout: 30000, ...} Name Return a single configuration option from configuration file (cypress.json by default) { "pageLoadTimeout": 60000 } Cypress.config('pageLoadTimeout') // => 60000 Name and Value Change the values of configuration options from configuration file (cypress.json by default) from within your tests Scope Remember, any changes that you make to configuration using this API will be in effect for the remainder of the tests in the same spec file. { "viewportWidth": 1280, "viewportHeight": 720 } Cypress.config('viewportWidth', 800) Cypress.config('viewportWidth') // => 800 Object Override multiple options from configuration file (cypress.json by default) by passing an object literal { "defaultCommandTimeout": 4000, "pageLoadTimeout": 30000 } Cypress.config({ defaultCommandTimeout: 10000, viewportHeight: 900, }) Cypress.config() // => {defaultCommandTimeout: 10000, viewportHeight: 900, ...} Notes Not all config values can be changed at all times Some configuration values are readonly and cannot be changed during running a test. Anything that is not listed in the test configuration options cannot be [email protected]. Be sure to review the list of test configuration options. Test Configuration vs Cypress.config() To apply specific Cypress configuration values to a suite or test, you can pass a test configuration object to the test or suite function. While Cypress.config() changes configuration values through the entire spec file, using test configuration will only change configuration values during the suite or test where they are set. The values will then reset to the previous default values after the suite or test is complete. See the full guide on test configuration. Cypress.config() executes Synchronously It's important to note that Cypress.config() executes synchronously and will not wait for the Cypress commands above it to execute. If you need to update your configuration mid-test, be sure to chain the asynchronously Cypress command. it('using cy.then', () => { cy.visit('/my-test_page') cy.click('#download-html').then(() => { Cypress.config('baseUrl', 'null') }) cy.visit('/downloads/contents.html') }) Why is it Cypress.config and not cy.config? As a rule of thumb anything you call from Cypress affects global state. Anything you call from cy affects local state. Since the configuration added or changed by Cypress.config is only in scope for the current spec file, you'd think that it should be cy.config and not Cypress.config…and you'd be right. The fact that Cypress.config affects local state is an artifact of the API evolving over time: Cypress.config used to affect global state—configuration added in one test spec file was available in other specs—but the Cypress team wisely made each spec run in isolation in 3.0.0 and by that time Cypress.config was public API. History Version Changes 0.12.6 Cypress.config added See also configuration The Environment Variable guide Test Configuration
[Java] Enum PackageScopeTarget groovy.transform.PackageScopeTarget Intended target when @PackageScope is placed at the class level. Authors: Paul King Since: 1.8.0 Enum Constants Summary Enum constants classes Enum constant Description CLASS CONSTRUCTORS FIELDS METHODS 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 class Object wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll Enum Constant Detail PackageScopeTarget CLASS PackageScopeTarget CONSTRUCTORS PackageScopeTarget FIELDS PackageScopeTarget METHODS
State Environments The term state environment, or just environment, was used within the Terraform 0.9 releases to refer to the idea of having multiple distinct, named states associated with a single configuration directory. After this concept was implemented, we recieved feedback that this terminology caused confusion due to other uses of the word "environment", both within Terraform itself and within organizations using Terraform. As of 0.10, the preferred term is "workspace". For more information on workspaces, see the main Workspaces page.
statsmodels.nonparametric.kde.KDEUnivariate.cdf KDEUnivariate.cdf() [source] Returns the cumulative distribution function evaluated at the support. Notes Will not work if fit has not been called. © 2009–2012 Statsmodels Developers© 2006–2008 Scipy Developers
tf.compat.v1.nn.erosion2d Computes the grayscale erosion of 4-D value and 3-D kernel tensors. tf.compat.v1.nn.erosion2d( value, kernel, strides, rates, padding, name=None ) The value tensor has shape [batch, in_height, in_width, depth] and the kernel tensor has shape [kernel_height, kernel_width, depth], i.e., each input channel is processed independently of the others with its own structuring function. The output tensor has shape [batch, out_height, out_width, depth]. The spatial dimensions of the output tensor depend on the padding algorithm. We currently only support the default "NHWC" data_format. In detail, the grayscale morphological 2-D erosion is given by: output[b, y, x, c] = min_{dy, dx} value[b, strides[1] * y - rates[1] * dy, strides[2] * x - rates[2] * dx, c] - kernel[dy, dx, c] Duality: The erosion of value by the kernel is equal to the negation of the dilation of -value by the reflected kernel. Args value A Tensor. 4-D with shape [batch, in_height, in_width, depth]. kernel A Tensor. Must have the same type as value. 3-D with shape [kernel_height, kernel_width, depth]. strides A list of ints that has length >= 4. 1-D of length 4. The stride of the sliding window for each dimension of the input tensor. Must be: [1, stride_height, stride_width, 1]. rates A list of ints that has length >= 4. 1-D of length 4. The input stride for atrous morphological dilation. Must be: [1, rate_height, rate_width, 1]. padding A string from: "SAME", "VALID". The type of padding algorithm to use. name A name for the operation (optional). If not specified "erosion2d" is used. Returns A Tensor. Has the same type as value. 4-D with shape [batch, out_height, out_width, depth]. Raises ValueError If the value depth does not match kernel' shape, or if padding is other than 'VALID' or 'SAME'.
grid.force Force a grob into its components Description Some grobs only generate their content to draw at drawing time; this function replaces such grobs with their at-drawing-time content. Usage grid.force(x, ...) ## Default S3 method: grid.force(x, redraw = FALSE, ...) ## S3 method for class 'gPath' grid.force(x, strict = FALSE, grep = FALSE, global = FALSE, redraw = FALSE, ...) ## S3 method for class 'grob' grid.force(x, draw = FALSE, ...) forceGrob(x) grid.revert(x, ...) ## S3 method for class 'gPath' grid.revert(x, strict = FALSE, grep = FALSE, global = FALSE, redraw = FALSE, ...) ## S3 method for class 'grob' grid.revert(x, draw = FALSE, ...) Arguments x For the default method, x should not be specified. Otherwise, x should be a grob or a gPath. If x is character, it is assumed to be a gPath. strict A boolean indicating whether the path must be matched exactly. grep Whether the path should be treated as a regular expression. global A boolean indicating whether the function should affect just the first match of the path, or whether all matches should be affected. draw logical value indicating whether a grob should be drawn after it is forced. redraw logical value indicating whether to redraw the grid scene after the forcing operation. ... Further arguments for use by methods. Details Some grobs wait until drawing time to generate what content will actually be drawn (an axis, as produced by grid.xaxis(), with an at or NULL is a good example because it has to see what viewport it is going to be drawn in before it can decide what tick marks to draw). The content of such grobs (e.g., the tick marks) are not usually visible to grid.ls() or accessible to grid.edit(). The grid.force() function replaces a grob with its at-drawing-time contents. For example, an axis will be replaced by a vanilla gTree with lines and text representing the axis tick marks that were actually drawn. This makes the tick marks visible to grid.ls() and accessible to grid.edit(). The forceGrob() function is the internal work horse for grid.force(), so will not normally be called directly by the user. It is exported so that methods can be written for custom grob classes if necessary. The grid.revert() function reverses the effect of grid.force(), replacing forced content with the original grob. Warning Forcing an explicit grob produces a result as if the grob were drawn in the current drawing context. It may not make sense to draw the result in a different drawing context. Note These functions only have an effect for grobs that generate their content at drawing time using makeContext() and makeContent() methods (not for grobs that generate their content at drawing time using preDrawDetails() and drawDetails() methods). Author(s) Paul Murrell Examples grid.newpage() pushViewport(viewport(width=.5, height=.5)) # Draw xaxis grid.xaxis(name="xax") grid.ls() # Force xaxis grid.force() grid.ls() # Revert xaxis grid.revert() grid.ls() # Draw and force yaxis grid.force(yaxisGrob(), draw=TRUE) grid.ls() # Revert yaxis grid.revert() grid.ls() # Force JUST xaxis grid.force("xax") grid.ls() # Force ALL grid.force() grid.ls() # Revert JUST xaxis grid.revert("xax") grid.ls() Copyright (
Class VMStartException java.lang.Object java.lang.Throwable java.lang.Exception com.sun.jdi.connect.VMStartException All Implemented Interfaces: Serializable public class VMStartException extends Exception A target VM was successfully launched, but terminated with an error before a connection could be established. This exception provides the Process object for the launched target to help in diagnosing the problem. Since: 1.3 See Also: Serialized Form Constructor Summary Constructor Description VMStartException(Process process) VMStartException(String message, Process process) Method Summary Modifier and Type Method Description Process process() Methods declared in class java.lang.Throwable addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString Methods declared in class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait Constructor Details VMStartException public VMStartException(Process process) VMStartException public VMStartException(String message, Process process) Method Details process public Process process()
dart:html Matrix factory constructor Matrix(num a_OR_m11, num b_OR_m12, num c_OR_m13, num d_OR_m14, num e_OR_m21, num f_OR_m22, [ num m23, num m24, num m31, num m32, num m33, num m34, num m41, num m42, num m43, num m44 ]) Source @DomName('Matrix.Matrix') @DocsEditable() factory Matrix(num a_OR_m11, num b_OR_m12, num c_OR_m13, num d_OR_m14, num e_OR_m21, num f_OR_m22, [num m23, num m24, num m31, num m32, num m33, num m34, num m41, num m42, num m43, num m44]) { if ((f_OR_m22 is num) && (e_OR_m21 is num) && (d_OR_m14 is num) && (c_OR_m13 is num) && (b_OR_m12 is num) && (a_OR_m11 is num) && m23 == null && m24 == null && m31 == null && m32 == null && m33 == null && m34 == null && m41 == null && m42 == null && m43 == null && m44 == null) { return _blink.BlinkMatrix.instance.constructorCallback_6_( a_OR_m11, b_OR_m12, c_OR_m13, d_OR_m14, e_OR_m21, f_OR_m22); } if ((m44 is num) && (m43 is num) && (m42 is num) && (m41 is num) && (m34 is num) && (m33 is num) && (m32 is num) && (m31 is num) && (m24 is num) && (m23 is num) && (f_OR_m22 is num) && (e_OR_m21 is num) && (d_OR_m14 is num) && (c_OR_m13 is num) && (b_OR_m12 is num) && (a_OR_m11 is num)) { return _blink.BlinkMatrix.instance.constructorCallback_16_( a_OR_m11, b_OR_m12, c_OR_m13, d_OR_m14, e_OR_m21, f_OR_m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44); } throw new ArgumentError("Incorrect number or type of arguments"); }
Using enums Accessing enum members Using as a type annotation Casting to representation type Methods .cast .isValid .members .getName Exhaustively checking enums with a switch Exhaustive checking with unknown members Mapping enums to other values Enums in a union Exporting enums Importing enums Generic enums When to not use enums Flow Enums are not a syntax for union types. They are their own type, and each member of a Flow Enum has the same type. Large union types can cause performance issues, as Flow has to consider each member as a separate type. With Flow Enums, no matter how large your enum is, Flow will always exhibit good performance as it only has one type to keep track of. We use the following enum in the examples below: enum Status { Active, Paused, Off, } Accessing enum members Access members with the dot syntax: const status = Status.Active; You can’t use computed access: const x = "Active"; Status[x]; // Error: computed access on enums is not allowed Using as a type annotation The enum declaration defines both a value (from which you can access the enum members and methods) and a type of the same name, which is the type of the enum members. function calculateStatus(): Status { ... } const status: Status = calculateStatus(); Casting to representation type Enums do not implicitly coerce to their representation type or vice-versa. If you want to convert from the enum type to the representation type, you can use an explicit cast (x: string): const s: string = Status.Active; // Error: 'Status' is not compatible with 'string' const statusString: string = (Status.Active: string); To convert from a nullable enum type to nullable string, you can do: const maybeStatus: ?Status = ....; const maybeStatusString: ?string = maybeStatus && (maybeStatus: string); If you want to convert from the representation type (e.g. string) to an enum type (if valid), check out the cast method. Methods Enum declarations also define some helpful methods. Below, TEnum is the type of the enum (e.g. Status), and TRepresentationType is the type of the representation type for that enum (e.g. string). .cast Type: cast(input: ?TRepresentationType): TEnum | void The cast method allows you to safely convert a primitive value, like a string, to the enum type (if it is a valid value of the enum), and undefined otherwise. const data: string = getData(); const maybeStatus: Status | void = Status.cast(data); if (maybeStatus != null) { const status: Status = maybeStatus; // do stuff with status } Set a default value in one line with the ?? operator: const status: Status = Status.cast(data) ?? Status.Off; The type of the argument of cast depends on the type of enum. If it is a string enum, the type of the argument will be string. If it is a number enum, the type of the argument will be number, and so on. If you wish to cast a mixed value, first use a typeof refinement: const data: mixed = ...; if (typeof data === 'string') { const maybeStatus: Status | void = Status.cast(data); } cast uses this (representing the object of enum members), so if you want to pass the function itself as a value, you should use an arrow function. For example: const strings: Array<string> = ...; // WRONG: const statuses: Array<?Status> = strings.map(Status.cast); const statuses: Array<?Status> = strings.map((input) => Status.cast(input)); // Correct Runtime cost: For mirrored string enums (e.g enum E {A, B}), as the member names are the same as the values, the runtime cost is constant - equivalent to calling .hasOwnProperty. For other enums, a Map is created on the first call, and subsequent calls simply call .has on the cached map. Thus the cost is amoritzed constant. .isValid Type: isValid(input: ?TRepresentationType): boolean The isValid method is like cast, but simply returns a boolean: true if the input supplied is a valid enum value, and false if it is not. const data: string = getData(); const isStatus: boolean = Status.isValid(data); isValid uses this (representing the object of enum members), so if you want to pass the function itself as a value, you should use an arrow function. For example: const strings: Array<string> = ...; // WRONG: const statusStrings = strings.filter(Status.isValid); const statusStrings = strings.filter((input) => Status.isValid(input)); // Correct Runtime cost: The same as described under .cast above. .members Type: members(): Iterator<TEnum> The members method returns an iterator (that is iterable) of all the enum members. const buttons = []; function getButtonForStatus(status: Status) { ... } for (const status of Status.members()) { buttons.push(getButtonForStatus(status)); } The iteration order is guaranteed to be the same as the order of the members in the declaration. The enum is not enumerable or iterable itself (e.g. a for-in/for-of loop over the enum will not iterate over its members), you have to use the .members() method for that purpose. You can convert the iterable into an Array using: Array.from(Status.members()). You can make use of Array.from’s second argument to map over the values at the same time you construct the array: e.g. const buttonArray = Array.from(Status.members(), status => getButtonForStatus(status));. .getName Type: getName(value: TEnum): string The getName method maps enum values to the string name of that value’s enum member. When using number/boolean/symbol enums, this can be useful for debugging and for generating internal CRUD UIs. For example: enum Status { Active = 1, Paused = 2, Off = 3, } const status: Status = ...; console.log(Status.getName(status)); // Will print a string, either "Active", "Paused", or "Off" depending on the value. Runtime cost: The same as described under .cast above. A single cached reverse map from enum value to enum name is used for .cast, .isValid, and .getName. The first call of any of those methods will create this cached map. Exhaustively checking enums with a switch When checking an enum value in a switch statement, we enforce that you check against all possible enum members, and don’t include redundant cases. This helps ensure you consider all possibilities when writing code that uses enums. It especially helps with refactoring when adding or removing members, by pointing out the different places you need to update. const status: Status = ...; switch (status) { // Good, all members checked case Status.Active: break; case Status.Paused: break; case Status.Off: break; } You can use default to match all members not checked so far: switch (status) { case Status.Active: break; default: // When `Status.Paused` or `Status.Off` break; } You can check multiple enum members in one switch case: switch (status) { case Status.Active: case Status.Paused: break; case Status.Off: break; } You must match against all of the members of the enum (or supply a default case): // Error: you haven't checked 'Status.Off' in the switch switch (status) { case Status.Active: break; case Status.Paused: break; } You can’t repeat cases (as this would be dead code!): switch (status) { case Status.Active: break; case Status.Paused: break; case Status.Off: break; case Status.Paused: // Error: you already checked for 'Status.Paused' break; } A default case is redundant if you’ve already matched all cases: switch (status) { case Status.Active: break; case Status.Paused: break; case Status.Off: break; default: // Error: you've already checked all cases, the 'default' is redundant break; } // The following is OK because the `default` covers the `Status.Off` case: switch (status) { case Status.Active: break; case Status.Paused: break; default: break; } Except if you are switching over an enum with unknown members. If you nest exhaustively checked switches inside exhaustively checked switches, and are returning from each branch, you must add a break; after the nested switch: switch (status) { case Status.Active: return 1; case Status.Paused: return 2; case Status.Off: switch (otherStatus) { case Status.Active: return 1; case Status.Paused: return 2; case Status.Off: return 3; } break; } Remember, you can add blocks to your switch cases. They are useful if you want to use local variables: switch (status) { case Status.Active: { const x = f(); ... break; } case Status.Paused: { const x = g(); ... break; } case Status.Off: { const y = ...; ... break; } } If you didn’t add blocks in this example, the two declarations of const x would conflict and result in an error. Enums are not checked exhaustively in if statements or other contexts other than switch statements. Exhaustive checking with unknown members If your enum has unknown members (specified with the ...), e.g. enum Status { Active, Paused, Off, ... } Then a default is always required when switching over the enum. The default checks for “unknown” members you haven’t explicitly listed. switch (status) { case Status.Active: break; case Status.Paused: break; case Status.Off: break; default: // Checks for members not explicitly listed } You can use the require-explicit-enum-switch-cases Flow Lint to require that all known members are explicitly listed as cases. For example: // flowlint-next-line require-explicit-enum-switch-cases:error switch (status) { case Status.Active: break; case Status.Paused: break; default: break; } Will trigger an error (without the lint there would be no error): Incomplete exhaustive check: the member `Off` of enum `Status` has not been considered in check of `status`. The default case does not check for the missing members as the `require-explicit-enum-switch-cases` lint has been enabled. You can fix if by doing: // flowlint-next-line require-explicit-enum-switch-cases:error switch (status) { case Status.Active: break; case Status.Paused: break; case Status.Off: // Added the missing `Status.Off` case break; default: break; } The require-explicit-enum-switch-cases lint is not one to enable globally, but rather on a per-switch basis when you want the behavior. With normal enums, for each switch statement on it, you can either provide a default or not, and thus decide if you want to require each case explicitly listed or not. Similarly for Flow Enums with unknown members, you can also enable this lint on a per-switch basis. The lint works for switches of regular Flow Enum types as well. It in effect bans the usage of default in that switch statement, by requiring the explicit listing of all enum members as cases. Mapping enums to other values There are a variety of reasons you may want to map an enum value to another value, e.g. a label, icon, element, and so on. With previous patterns, it was common to use object literals for this purpose, however with Flow Enums we prefer functions which contain a switch, which we can exhaustively check. Instead of: const STATUS_ICON: {[Status]: string} = { [Status.Active]: 'green-checkmark', [Status.Paused]: 'grey-pause', [Status.Off]: 'red-x', }; const icon = STATUS_ICON[status]; Which doesn’t actually guarantee that we are mapping each Status to some value, use: function getStatusIcon(status: Status): string { switch (status) { case Status.Active: return 'green-checkmark'; case Status.Paused: return 'grey-pause'; case Status.Off: return 'red-x'; } } const icon = getStatusIcon(status); In the future if you add or remove an enum member, Flow will tell you to update the switch as well so it’s always accurate. If you actually want a dictionary which is not exhaustive, you can use a Map: const counts = new Map<Status, number>([ [Status.Active, 2], [Status.Off, 5], ]); const activeCount: Status | void = counts.get(Status.Active); Flow Enums cannot be used as keys in object literals, as explained later on this page. Enums in a union If your enum value is in a union (e.g. ?Status), first refine to only the enum type: const status: ?Status = ...; if (status != null) { (status: Status); // 'status' is refined to 'Status' at this point switch (status) { case Status.Active: break; case Status.Paused: break; case Status.Off: break; } } If you want to refine to the enum value, you can use typeof with the representation type, for example: const val: Status | number = ...; // 'Status' is a string enum if (typeof val === 'string') { (val: Status); // 'val' is refined to 'Status' at this point switch (val) { case Status.Active: break; case Status.Paused: break; case Status.Off: break; } } Exporting enums An enum is a type and a value (like a class is). To export both the type and the value, export it like a you would a value: export enum Status {} Or, as the default export (note: you must always specify an enum name, export default enum {} is not allowed): export default enum Status {} Using CommonJS: enum Status {} module.exports = Status; To export only its type, but not the value, you can do: enum Status_ {} export type Status = Status_; Since export type introduces a new binding with that name, the enum and the exported type must have different names. Other functions within the file will still have access to the enum implementation. Importing enums If you have exported an enum like this: // status.js export default enum Status { Active, Paused, Off, } You can import it as both a value and a type like this: import Status from 'status'; const x: Status /* used as type */ = Status.Active /* used as value */; If you only need to use the type, you can import it as a type: import type Status from 'status'; function printStatus(status: Status) { ... } Using CommonJS: const Status = require('status'); Generic enums There is currently no way to specify a generic enum type, but there have been enough requests that it is something we will look into in the future. For some use cases of generic enums, you can currently ask users to supply functions which call the enum methods instead (rather than passing in the enum itself), for example: function castToEnumArray<TRepresentationType, TEnum>( f: TRepresentationType => TEnum, xs: Array<TRepresentationType>, ): Array<TEnum | void> { return xs.map(f); } castToEnumArray((input) => Status.cast(input), ["Active", "Paused", "Invalid"]); When to not use enums Enums are designed to cover many use cases and exhibit certain benefits. The design makes a variety of trade-offs to make this happen, and in certain situations, these trade-offs might not be right for you. In these cases, you can continue to use existing patterns to satisfy your use cases. Distinct object keys You can’t use enum members as distinct object keys. The following pattern works because the types of LegacyStatus.Active and LegacyStatus.Off are different. One has the type 'Active' and one has the type 'Off'. const LegacyStatus = Object.freeze({ Active: 'Active', Paused: 'Paused', Off: 'Off', }); const o = { [LegacyStatus.Active]: "hi", [LegacyStatus.Off]: 1, }; const x: string = o[LegacyStatus.Active]; // OK const y: number = o[LegacyStatus.Off]; // OK const z: boolean = o[LegacyStatus.Active]; // Error - as expected We can’t use the same pattern with enums. All enum members have the same type, the enum type, so Flow can’t track the relationship between keys and values. If you wish to map from an enum value to another value, you should use a function with an exhaustively-checked switch instead. Disjoint object unions A defining feature of enums is that unlike unions, each enum member does not form its own separate type. Every member has the same type, the enum type. This allows enum usage to be analyzed by Flow in a consistently fast way, however it means that in certain situations which require separate types, we can’t use enums. Consider the following union, following the disjoint object union pattern: type Action = | {type: 'Upload', data: string} | {type: 'Delete', id: number}; Each object type in the union has a single common field (type) which is used to distinguish which object type we are dealing with. We can’t use enum types for this field, because for this mechanism to work, the type of that field must be different in each member of the union, but enum members all have the same type. In the future, we might add the ability for enums to encapsulate additional data besides a key and a primitive value - this would allow us to replace disjoint object unions. Guaranteed inlining Flow Enums are designed to allow for inlining (e.g. member values must be literals, enums are frozen), however the inlining itself needs to be part of the build system (whatever you use) rather than Flow itself. While enum member access (e.g. Status.Active) can be inlined (other than symbol enums which cannot be inlined due to the nature of symbols), usage of its methods (e.g. Status.cast(x)) cannot be inlined.
Class ParagraphView java.lang.Object javax.swing.text.View javax.swing.text.CompositeView javax.swing.text.BoxView javax.swing.text.FlowView javax.swing.text.ParagraphView All Implemented Interfaces: SwingConstants, TabExpander Direct Known Subclasses: ParagraphView public class ParagraphView extends FlowView implements TabExpander View of a simple line-wrapping paragraph that supports multiple fonts, colors, components, icons, etc. It is basically a vertical box with a margin around it. The contents of the box are a bunch of rows which are special horizontal boxes. This view creates a collection of views that represent the child elements of the paragraph element. Each of these views are placed into a row directly if they will fit, otherwise the breakView method is called to try and carve the view into pieces that fit. See Also: View Nested Class Summary Nested classes/interfaces declared in class javax.swing.text.FlowView FlowView.FlowStrategy Field Summary Modifier and Type Field Description protected int firstLineIndent Indentation for the first line, from the left inset. Fields declared in class javax.swing.text.FlowView layoutPool, layoutSpan, strategy Fields declared in class javax.swing.text.View BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS Fields declared in interface javax.swing.SwingConstants BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST Constructor Summary Constructor Description ParagraphView(Element elem) Constructs a ParagraphView for the given element. Method Summary Modifier and Type Method Description View breakView(int axis, float len, Shape a) Breaks this view on the given axis at the given length. protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate the needs for the paragraph along the minor axis. void changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for. protected View createRow() Create a View that should be used to hold a a row's worth of children in a flow. protected int findOffsetToCharactersInString(char[] string, int start) Finds the next character in the document with a character in string, starting at offset start. protected boolean flipEastAndWestAtEnds(int position, Position.Bias bias) Determines in which direction the next view lays. float getAlignment(int axis) Determines the desired alignment for this view along an axis. int getBreakWeight(int axis, float len) Gets the break weight for a given location. protected int getClosestPositionTo(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet, int rowIndex, int x) Returns the closest model position to x. int getFlowSpan(int index) Fetches the constraining span to flow against for the given child index. int getFlowStart(int index) Fetches the location along the flow axis that the flow span will start at. protected View getLayoutView(int index) Returns the view at a given index. protected int getLayoutViewCount() Returns the number of views that this view is responsible for. protected int getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) Returns the next visual position for the cursor, in either the east or west direction. protected float getPartialSize(int startOffset, int endOffset) Returns the size used by the views between startOffset and endOffset. protected float getTabBase() Returns where the tabs are calculated from. protected TabSet getTabSet() Gets the Tabset to be used in calculating tabs. float nextTabStop(float x, int tabOffset) Returns the next tab stop position given a reference position. void paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface. protected void setFirstLineIndent(float fi) Sets the indent on the first line. protected void setJustification(int j) Sets the type of justification. protected void setLineSpacing(float ls) Sets the line spacing. protected void setPropertiesFromAttributes() Set the cached properties from the attributes. Methods declared in class javax.swing.text.FlowView getFlowAxis, getViewIndexAtPosition, insertUpdate, layout, loadChildren, removeUpdate Methods declared in class javax.swing.text.BoxView baselineLayout, baselineRequirements, calculateMajorAxisRequirements, childAllocation, forwardUpdate, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel Methods declared in class javax.swing.text.CompositeView getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets, setParent Methods declared in class javax.swing.text.View append, breakView, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, isVisible, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel Methods declared in class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Field Details firstLineIndent protected int firstLineIndent Indentation for the first line, from the left inset. Constructor Details ParagraphView public ParagraphView(Element elem) Constructs a ParagraphView for the given element. Parameters: elem - the element that this view is responsible for Method Details setJustification protected void setJustification(int j) Sets the type of justification. Parameters: j - one of the following values: StyleConstants.ALIGN_LEFT StyleConstants.ALIGN_CENTER StyleConstants.ALIGN_RIGHT setLineSpacing protected void setLineSpacing(float ls) Sets the line spacing. Parameters: ls - the value is a factor of the line hight setFirstLineIndent protected void setFirstLineIndent(float fi) Sets the indent on the first line. Parameters: fi - the value in points setPropertiesFromAttributes protected void setPropertiesFromAttributes() Set the cached properties from the attributes. getLayoutViewCount protected int getLayoutViewCount() Returns the number of views that this view is responsible for. The child views of the paragraph are rows which have been used to arrange pieces of the Views that represent the child elements. This is the number of views that have been tiled in two dimensions, and should be equivalent to the number of child elements to the element this view is responsible for. Returns: the number of views that this ParagraphView is responsible for getLayoutView protected View getLayoutView(int index) Returns the view at a given index. The child views of the paragraph are rows which have been used to arrange pieces of the Views that represent the child elements. This methods returns the view responsible for the child element index (prior to breaking). These are the Views that were produced from a factory (to represent the child elements) and used for layout. Parameters: index - the index of the desired view Returns: the view at index getNextNorthSouthVisualPositionFrom protected int getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) throws BadLocationException Returns the next visual position for the cursor, in either the east or west direction. Overridden from CompositeView. Overrides: getNextNorthSouthVisualPositionFrom in class CompositeView Parameters: pos - position into the model b - either Position.Bias.Forward or Position.Bias.Backward a - the allocated region to render into direction - either SwingConstants.NORTH or SwingConstants.SOUTH biasRet - an array containing the bias that were checked in this method Returns: the location in the model that represents the next location visual position Throws: BadLocationException - for a bad location within a document model See Also: CompositeView.getNextVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[]) getClosestPositionTo protected int getClosestPositionTo(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet, int rowIndex, int x) throws BadLocationException Returns the closest model position to x. rowIndex gives the index of the view that corresponds that should be looked in. Parameters: pos - position into the model b - the bias a - the allocated region to render into direction - one of the following values: SwingConstants.NORTH SwingConstants.SOUTH biasRet - an array containing the bias that were checked in this method rowIndex - the index of the view x - the x coordinate of interest Returns: the closest model position to x Throws: BadLocationException - if a bad location is encountered flipEastAndWestAtEnds protected boolean flipEastAndWestAtEnds(int position, Position.Bias bias) Determines in which direction the next view lays. Consider the View at index n. Typically the Views are layed out from left to right, so that the View to the EAST will be at index n + 1, and the View to the WEST will be at index n - 1. In certain situations, such as with bidirectional text, it is possible that the View to EAST is not at index n + 1, but rather at index n - 1, or that the View to the WEST is not at index n - 1, but index n + 1. In this case this method would return true, indicating the Views are layed out in descending order. This will return true if the text is layed out right to left at position, otherwise false. Overrides: flipEastAndWestAtEnds in class BoxView Parameters: position - position into the model bias - either Position.Bias.Forward or Position.Bias.Backward Returns: true if the text is layed out right to left at position, otherwise false. getFlowSpan public int getFlowSpan(int index) Fetches the constraining span to flow against for the given child index. Overrides: getFlowSpan in class FlowView Parameters: index - the index of the view being queried Returns: the constraining span for the given view at index Since: 1.3 See Also: FlowView.getFlowStart(int) getFlowStart public int getFlowStart(int index) Fetches the location along the flow axis that the flow span will start at. Overrides: getFlowStart in class FlowView Parameters: index - the index of the view being queried Returns: the location for the given view at index Since: 1.3 See Also: FlowView.getFlowSpan(int) createRow protected View createRow() Create a View that should be used to hold a a row's worth of children in a flow. Specified by: createRow in class FlowView Returns: the new View Since: 1.3 nextTabStop public float nextTabStop(float x, int tabOffset) Returns the next tab stop position given a reference position. This view implements the tab coordinate system, and calls getTabbedSpan on the logical children in the process of layout to determine the desired span of the children. The logical children can delegate their tab expansion upward to the paragraph which knows how to expand tabs. LabelView is an example of a view that delegates its tab expansion needs upward to the paragraph. This is implemented to try and locate a TabSet in the paragraph element's attribute set. If one can be found, its settings will be used, otherwise a default expansion will be provided. The base location for tab expansion is the left inset from the paragraphs most recent allocation (which is what the layout of the children is based upon). Specified by: nextTabStop in interface TabExpander Parameters: x - the X reference position tabOffset - the position within the text stream that the tab occurred at >= 0 Returns: the trailing end of the tab expansion >= 0 See Also: TabSet TabStop LabelView getTabSet protected TabSet getTabSet() Gets the Tabset to be used in calculating tabs. Returns: the TabSet getPartialSize protected float getPartialSize(int startOffset, int endOffset) Returns the size used by the views between startOffset and endOffset. This uses getPartialView to calculate the size if the child view implements the TabableView interface. If a size is needed and a View does not implement the TabableView interface, the preferredSpan will be used. Parameters: startOffset - the starting document offset >= 0 endOffset - the ending document offset >= startOffset Returns: the size >= 0 findOffsetToCharactersInString protected int findOffsetToCharactersInString(char[] string, int start) Finds the next character in the document with a character in string, starting at offset start. If there are no characters found, -1 will be returned. Parameters: string - the string of characters start - where to start in the model >= 0 Returns: the document offset, or -1 if no characters found getTabBase protected float getTabBase() Returns where the tabs are calculated from. Returns: where tabs are calculated from paint public void paint(Graphics g, Shape a) Renders using the given rendering surface and area on that surface. This is implemented to delegate to the superclass after stashing the base coordinate for tab calculations. Overrides: paint in class BoxView Parameters: g - the rendering surface to use a - the allocated region to render into See Also: View.paint(java.awt.Graphics, java.awt.Shape) getAlignment public float getAlignment(int axis) Determines the desired alignment for this view along an axis. This is implemented to give the alignment to the center of the first row along the y axis, and the default along the x axis. Overrides: getAlignment in class BoxView Parameters: axis - may be either View.X_AXIS or View.Y_AXIS Returns: the desired alignment. This should be a value between 0.0 and 1.0 inclusive, where 0 indicates alignment at the origin and 1.0 indicates alignment to the full span away from the origin. An alignment of 0.5 would be the center of the view. breakView public View breakView(int axis, float len, Shape a) Breaks this view on the given axis at the given length. ParagraphView instances are breakable along the Y_AXIS only, and only if len is after the first line. Parameters: axis - may be either View.X_AXIS or View.Y_AXIS len - specifies where a potential break is desired along the given axis >= 0 a - the current allocation of the view Returns: the fragment of the view that represents the given span, if the view can be broken; if the view doesn't support breaking behavior, the view itself is returned See Also: View.breakView(int, int, float, float) getBreakWeight public int getBreakWeight(int axis, float len) Gets the break weight for a given location. ParagraphView instances are breakable along the Y_AXIS only, and only if len is after the first row. If the length is less than one row, a value of BadBreakWeight is returned. Parameters: axis - may be either View.X_AXIS or View.Y_AXIS len - specifies where a potential break is desired >= 0 Returns: a value indicating the attractiveness of breaking here; either GoodBreakWeight or BadBreakWeight See Also: View.getBreakWeight(int, float, float) calculateMinorAxisRequirements protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) Calculate the needs for the paragraph along the minor axis. This uses size requirements of the superclass, modified to take into account the non-breakable areas at the adjacent views edges. The minimal size requirements for such views should be no less than the sum of all adjacent fragments. If the axis parameter is neither View.X_AXIS nor View.Y_AXIS, IllegalArgumentException is thrown. If the r parameter is null, a new SizeRequirements object is created, otherwise the supplied SizeRequirements object is returned. Overrides: calculateMinorAxisRequirements in class FlowView Parameters: axis - the minor axis r - the input SizeRequirements object Returns: the new or adjusted SizeRequirements object Throws: IllegalArgumentException - if the axis parameter is invalid See Also: SizeRequirements changedUpdate public void changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Gives notification from the document that attributes were changed in a location that this view is responsible for. Overrides: changedUpdate in class FlowView Parameters: changes - the change information from the associated document a - the current allocation of the view f - the factory to use to rebuild if the view has children See Also: View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
include_directories Add include directories to the build. include_directories([AFTER|BEFORE] [SYSTEM] dir1 [dir2 ...]) Add the given directories to those the compiler uses to search for include files. Relative paths are interpreted as relative to the current source directory. The include directories are added to the INCLUDE_DIRECTORIES directory property for the current CMakeLists file. They are also added to the INCLUDE_DIRECTORIES target property for each target in the current CMakeLists file. The target property values are the ones used by the generators. By default the directories specified are appended onto the current list of directories. This default behavior can be changed by setting CMAKE_INCLUDE_DIRECTORIES_BEFORE to ON. By using AFTER or BEFORE explicitly, you can select between appending and prepending, independent of the default. If the SYSTEM option is given, the compiler will be told the directories are meant as system include directories on some platforms. Signalling this setting might achieve effects such as the compiler skipping warnings, or these fixed-install system files not being considered in dependency calculations - see compiler docs. Arguments to include_directories may use “generator expressions” with the syntax “$<…>”. See the cmake-generator-expressions(7) manual for available expressions. See the cmake-buildsystem(7) manual for more on defining buildsystem properties. Note Prefer the target_include_directories() command to add include directories to individual targets and optionally propagate/export them to dependents.
Interface DirectoryStream<T> Type Parameters: T - The type of element returned by the iterator All Superinterfaces: AutoCloseable, Closeable, Iterable<T> All Known Subinterfaces: SecureDirectoryStream<T> public interface DirectoryStream<T> extends Closeable, Iterable<T> An object to iterate over the entries in a directory. A directory stream allows for the convenient use of the for-each construct to iterate over a directory. While DirectoryStream extends Iterable, it is not a general-purpose Iterable as it supports only a single Iterator; invoking the iterator method to obtain a second or subsequent iterator throws IllegalStateException. An important property of the directory stream's Iterator is that its hasNext method is guaranteed to read-ahead by at least one element. If hasNext method returns true, and is followed by a call to the next method, it is guaranteed that the next method will not throw an exception due to an I/O error, or because the stream has been closed. The Iterator does not support the remove operation. A DirectoryStream is opened upon creation and is closed by invoking the close method. Closing a directory stream releases any resources associated with the stream. Failure to close the stream may result in a resource leak. The try-with-resources statement provides a useful construct to ensure that the stream is closed: Path dir = ... try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir)) { for (Path entry: stream) { ... } } Once a directory stream is closed, then further access to the directory, using the Iterator, behaves as if the end of stream has been reached. Due to read-ahead, the Iterator may return one or more elements after the directory stream has been closed. Once these buffered elements have been read, then subsequent calls to the hasNext method returns false, and subsequent calls to the next method will throw NoSuchElementException. A directory stream is not required to be asynchronously closeable. If a thread is blocked on the directory stream's iterator reading from the directory, and another thread invokes the close method, then the second thread may block until the read operation is complete. If an I/O error is encountered when accessing the directory then it causes the Iterator's hasNext or next methods to throw DirectoryIteratorException with the IOException as the cause. As stated above, the hasNext method is guaranteed to read-ahead by at least one element. This means that if hasNext method returns true, and is followed by a call to the next method, then it is guaranteed that the next method will not fail with a DirectoryIteratorException. The elements returned by the iterator are in no specific order. Some file systems maintain special links to the directory itself and the directory's parent directory. Entries representing these links are not returned by the iterator. The iterator is weakly consistent. It is thread safe but does not freeze the directory while iterating, so it may (or may not) reflect updates to the directory that occur after the DirectoryStream is created. Usage Examples: Suppose we want a list of the source files in a directory. This example uses both the for-each and try-with-resources constructs. List<Path> listSourceFiles(Path dir) throws IOException { List<Path> result = new ArrayList<>(); try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, "*.{c,h,cpp,hpp,java}")) { for (Path entry: stream) { result.add(entry); } } catch (DirectoryIteratorException ex) { // I/O error encountered during the iteration, the cause is an IOException throw ex.getCause(); } return result; } Since: 1.7 See Also: Files.newDirectoryStream(Path) Nested Class Summary Modifier and Type Interface Description static interface  DirectoryStream.Filter<T> An interface that is implemented by objects that decide if a directory entry should be accepted or filtered. Method Summary Modifier and Type Method Description Iterator<T> iterator() Returns the iterator associated with this DirectoryStream. Methods declared in interface java.io.Closeable close Methods declared in interface java.lang.Iterable forEach, spliterator Method Details iterator Iterator<T> iterator() Returns the iterator associated with this DirectoryStream. Specified by: iterator in interface Iterable<T> Returns: the iterator associated with this DirectoryStream Throws: IllegalStateException - if this directory stream is closed or the iterator has already been returned
51.91. pg_timezone_abbrevs The view pg_timezone_abbrevs provides a list of time zone abbreviations that are currently recognized by the datetime input routines. The contents of this view change when the timezone_abbreviations run-time parameter is modified. Table 51.92. pg_timezone_abbrevs Columns Column Type Description abbrev text Time zone abbreviation utc_offset interval Offset from UTC (positive means east of Greenwich) is_dst bool True if this is a daylight-savings abbreviation While most timezone abbreviations represent fixed offsets from UTC, there are some that have historically varied in value (see Section B.4 for more information). In such cases this view presents their current meaning. Prev Up Next 51.90. pg_tables Home 51.92. pg_timezone_names
min-block-size The min-block-size CSS property defines the minimum horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the min-width or the min-height property, depending on the value of writing-mode. If the writing mode is vertically oriented, the value of min-block-size relates to the minimum width of the element; otherwise, it relates to the minimum height of the element. A related property is min-inline-size, which defines the other dimension of the element. Try it Syntax /* <length> values */ min-block-size: 100px; min-block-size: 5em; /* <percentage> values */ min-block-size: 10%; /* Keyword values */ min-block-size: max-content; min-block-size: min-content; min-block-size: fit-content(20em); /* Global values */ min-block-size: inherit; min-block-size: initial; min-block-size: revert; min-block-size: revert-layer; min-block-size: unset; Values The min-block-size property takes the same values as the min-width and min-height properties.Formal definition Initial value 0 Applies to same as width and height Inherited no Percentages block-size of containing block Computed value same as min-width and min-height Animation type a length, percentage or calc(); Formal syntax min-block-size = <'min-width'> Examples Setting minimum block size for vertical text HTML <p class="exampleText">Example text</p> CSS .exampleText { writing-mode: vertical-rl; background-color: yellow; min-block-size: 200px; } Result Specifications Specification CSS Logical Properties and Values Level 1 # propdef-min-block-size 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 min-block-size 57 79 41 No 44 12.1 57 57 41 43 12.2 7.0 fit-content 57 79 No No 44 12.1 57 57 No 43 12.2 7.0 fit-content_function No No 91 No No No No No No No No No max-content 57 79 66 41 No 44 12.1 57 57 66 41 43 12.2 7.0 min-content 57 79 66 41 No 44 12.1 57 57 66 41 43 12.2 7.0 See also The mapped physical properties: min-width and min-height writing-mode 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 5, 2022, by MDN contributors
rotateLeft kotlin-stdlib / kotlin / rotateLeft Platform and version requirements: JVM (1.6), JS (1.6), Native (1.6) fun Int.rotateLeft(bitCount: Int): Int Rotates the binary representation of this Int number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side. Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: number.rotateLeft(-n) == number.rotateRight(n) Rotating by a multiple of Int.SIZE_BITS (32) returns the same number, or more generally number.rotateLeft(n) == number.rotateLeft(n % 32) Platform and version requirements: JVM (1.6), JS (1.6), Native (1.6) fun Long.rotateLeft(bitCount: Int): Long Rotates the binary representation of this Long number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side. Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: number.rotateLeft(-n) == number.rotateRight(n) Rotating by a multiple of Long.SIZE_BITS (64) returns the same number, or more generally number.rotateLeft(n) == number.rotateLeft(n % 64) Platform and version requirements: JVM (1.6), JS (1.6), Native (1.6) fun Byte.rotateLeft(bitCount: Int): Byte Rotates the binary representation of this Byte number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side. Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: number.rotateLeft(-n) == number.rotateRight(n) Rotating by a multiple of Byte.SIZE_BITS (8) returns the same number, or more generally number.rotateLeft(n) == number.rotateLeft(n % 8) Platform and version requirements: JVM (1.6), JS (1.6), Native (1.6) fun Short.rotateLeft(bitCount: Int): Short Rotates the binary representation of this Short number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side. Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: number.rotateLeft(-n) == number.rotateRight(n) Rotating by a multiple of Short.SIZE_BITS (16) returns the same number, or more generally number.rotateLeft(n) == number.rotateLeft(n % 16) Platform and version requirements: JVM (1.6), JS (1.6), Native (1.6) fun UInt.rotateLeft(bitCount: Int): UInt Rotates the binary representation of this UInt number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side. Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: number.rotateLeft(-n) == number.rotateRight(n) Rotating by a multiple of UInt.SIZE_BITS (32) returns the same number, or more generally number.rotateLeft(n) == number.rotateLeft(n % 32) Platform and version requirements: JVM (1.6), JS (1.6), Native (1.6) fun ULong.rotateLeft(bitCount: Int): ULong Rotates the binary representation of this ULong number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side. Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: number.rotateLeft(-n) == number.rotateRight(n) Rotating by a multiple of ULong.SIZE_BITS (64) returns the same number, or more generally number.rotateLeft(n) == number.rotateLeft(n % 64) Platform and version requirements: JVM (1.6), JS (1.6), Native (1.6) fun UByte.rotateLeft(bitCount: Int): UByte Rotates the binary representation of this UByte number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side. Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: number.rotateLeft(-n) == number.rotateRight(n) Rotating by a multiple of UByte.SIZE_BITS (8) returns the same number, or more generally number.rotateLeft(n) == number.rotateLeft(n % 8) Platform and version requirements: JVM (1.6), JS (1.6), Native (1.6) fun UShort.rotateLeft(bitCount: Int): UShort Rotates the binary representation of this UShort number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side. Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: number.rotateLeft(-n) == number.rotateRight(n) Rotating by a multiple of UShort.SIZE_BITS (16) returns the same number, or more generally number.rotateLeft(n) == number.rotateLeft(n % 16)