text
stringlengths
0
13M
RTCDTMFSender.toneBuffer The RTCDTMFSender interface's toneBuffer property returns a string containing a list of the DTMF tones currently queued for sending to the remote peer over the RTCPeerConnection. To place tones into the buffer, call insertDTMF(). Tones are removed from the string as they're played, so only upcoming tones are listed. Value A DOMString listing the tones to be played. If the string is empty, there are no tones pending. Exceptions InvalidCharacterError DOMException Thrown if a character is not a DTMF tone character (0-9, A-D, # or ,). Tone buffer format The tone buffer is a string which can contain any combination of the characters that are permitted by the DTMF standard. DTMF tone characters The digits 0-9 These characters represent the digit keys on a telephone keypad. The letters A-D These characters represent the "A" through "D" keys which are part of the DTMF standard but not included on most telephones. These are not interpreted as digits. Lower-case "a"-"d" automatically gets converted to upper-case. The pound/hash sign ("#") and the asterisk ("*") These correspond to the similarly-labeled keys which are typically on the bottom row of the telephone keypad. The comma (",") This character instructs the dialing process to pause for two seconds before sending the next character in the buffer. Note: All other characters are unrecognized and will cause insertDTMF() to throw an InvalidCharacterError DOMException. Using tone buffer strings For example, if you're writing code to control a voicemail system by sending DTMF codes, you might use a string such as "*,1,5555". In this example, we would send "*" to request access to the VM system, then, after a pause, send a "1" to start playback of voicemail messages, then after a pause, dial "5555" as a PIN number to open the messages. Setting the tone buffer to an empty string ("") cancels any pending DTMF codes. Example tbd Specifications Specification WebRTC 1.0: Real-Time Communication Between Browsers # dom-RTCDTMFSender-tonebuffer 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 toneBuffer 27 79 52 No 15 13.1 4.4 27 52 14 13.4 1.5 See also WebRTC API Using DTMF with WebRTC RTCDTMFSender.insertDTMF() RTCPeerConnection RTCDTMFSender 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: Mar 26, 2022, by MDN contributors
AudioEffectFilter Inherits: AudioEffect < Resource < Reference < Object Inherited By: AudioEffectBandLimitFilter, AudioEffectBandPassFilter, AudioEffectHighPassFilter, AudioEffectHighShelfFilter, AudioEffectLowPassFilter, AudioEffectLowShelfFilter, AudioEffectNotchFilter Adds a filter to the audio bus. Description Allows frequencies other than the cutoff_hz to pass. Tutorials Audio buses Properties float cutoff_hz 2000.0 FilterDB db 0 float gain 1.0 float resonance 0.5 Enumerations enum FilterDB: FILTER_6DB = 0 FILTER_12DB = 1 FILTER_18DB = 2 FILTER_24DB = 3 Property Descriptions float cutoff_hz Default 2000.0 Setter set_cutoff(value) Getter get_cutoff() Threshold frequency for the filter, in Hz. FilterDB db Default 0 Setter set_db(value) Getter get_db() float gain Default 1.0 Setter set_gain(value) Getter get_gain() Gain amount of the frequencies after the filter. float resonance Default 0.5 Setter set_resonance(value) Getter get_resonance() Amount of boost in the frequency range near the cutoff frequency.
Symfony\Component\HttpFoundation\Session\Storage\Handler Classes MemcacheSessionHandler MemcacheSessionHandler. MemcachedSessionHandler MemcachedSessionHandler. MongoDbSessionHandler MongoDB session handler NativeFileSessionHandler NativeFileSessionHandler. NativeSessionHandler NullSessionHandler NullSessionHandler. PdoSessionHandler PdoSessionHandler.
View Template Rendering Unlike Backbone.View, Marionette views provide a customizable solution for rendering a template with data and placing the results in the DOM. import _ from 'underscore'; import { View } from 'backbone.marionette'; const MyView = View.extend({ tagName: 'h1', template: _.template('Contents') }); const myView = new MyView(); myView.render(); In the above example the contents of the template attribute will be rendered inside a <h1> tag [email protected]. Live example Documentation Index What is a template Setting a View Template Using a View Without a Template Rendering the Template Using a Custom Renderer Rendering to HTML Rendering to DOM Serializing Data Serializing a Model Serializing a Collection Serializing with a CollectionView Adding Context Data What is Context Data? What is a template? A template is a function that given data returns either an HTML string or DOM. The default renderer in Marionette expects the template to return an HTML string. Marionette's dependency Underscore comes with an HTML string template compiler. import _ from 'underscore'; import { View } from 'backbone.marionette'; const MyView = View.extend({ template: _.template('<h1>Hello, world</h1>') }); This doesn't have to be an underscore template, you can pass your own rendering function: import Handlebars from 'handlebars'; import { View } from 'backbone.marionette'; const MyView = View.extend({ template: Handlebars.compile('<h1>Hello, {{ name }}') }); Live example Setting a View Template Marionette views use the getTemplate method to determine which template to use for rendering into its el. By default getTemplate is predefined on the view as simply: getTemplate() { return this.template } In most cases by using the default getTemplate you can simply set the template on the view to define the view's template, but in some circumstances you may want to set the template conditionally. import { View } from 'backbone.marionette'; const MyView = View.extend({ template: _.template('Hello World!'), getTemplate() { if (this.model.has('user')) { return _.template('Hello User!'); } return this.template; } }); Live example Using a View Without a Template By default CollectionView has no defined template and will only attempt to render the template if one is defined. For View there may be some situations where you do not intend to use a template. Perhaps you only need the view's el or you are using prerendered content. In this case setting template to false will prevent the template render. In the case of View it will also prevent the render events. import { View } from 'backbone.marionette'; const MyIconButtonView = View.extend({ template: false, tagName: 'button', className: '.icon-button', triggers: { 'click': 'click' }, onRender() { console.log('You will never see me!'); } }); Rendering the Template Each view class has a renderer which by default passes the view data to the template function and returns the html string it generates. The current default renderer is essentially the following: import { View, CollectionView } from 'backbone.marionette'; function renderer(template, data) { return template(data); } View.setRenderer(renderer); CollectionView.setRenderer(renderer); Previous to Marionette v4 the default renderer was the TemplateCache. This renderer has been extracted to a separate library: https://github.com/marionettejs/marionette.templatecache and can be used with v4. Using a Custom Renderer You can set the renderer for a view class by using the class method setRenderer. The renderer accepts two arguments. The first is the template passed to the view, and the second argument is the data to be rendered into the template. Here's an example that allows for the template of a view to be an underscore template string. import _ from 'underscore'; import { View } from 'backbone.marionette'; View.setRenderer(function(template, data) { return _.template(template)(data); }); const myView = new View({ template: 'Hello <%- name %>!', model: new Backbone.Model({ name: 'World' }) }); myView.render(); // myView.el is <div>Hello World!</div> The renderer can also be customized separately on any extended View. const MyHBSView = View.extend(); // Similar example as above but for handlebars MyHBSView.setRenderer(function(template, data) { return Handlebars.compile(template)(data); }); const myHBSView = new MyHBSView({ template: 'Hello {{ name }}!', model: new Backbone.Model({ name: 'World' }) }); myHBSView.render(); // myView.el is <div>Hello World!</div> Note These examples while functional may not be ideal. If possible it is recommend to precompile your templates which can be done for a number of templating using various plugins for bundling tools such as Browserify or Webpack. Rendering to HTML The default Marionette renders return the HTML as a string. This string is passed to the view's attachElContents method which in turn uses the DOM API's setContents. to set the contents of the view's el with DOM from the string. Customizing attachElContents You can modify the way any particular view attaches a compiled template to the el by overriding attachElContents. This method receives only the results of the view's renderer and is only called if the renderer returned a value. For instance, perhaps for one particular view you need to bypass the DOM API and set the html directly: attachElContent(html) { this.el.innerHTML = html; } Rendering to DOM Marionette also supports templates that render to DOM instead of html strings by using a custom render. In the following example the template method passed to the renderer will return a DOM element, and then if the view is already rendered utilize morphdom to patch the DOM or otherwise it will set the view's el to the result of the template. (Note in this case the view's el created at instantiation would be overridden). import morphdom from 'morphdom'; import { View } from 'backbone.marionette'; const VDomView = View.extend(); VDomView.setRenderer(function(template, data) { const el = template(data); if (this.isRendered()) { // Patch the view's el contents in the DOM morphdom(this.el, el, { childrenOnly: true }); return; } this.setElement(el.cloneNode(true)); }); In this case because the renderer is modifying the el directly, there is no need to return the result of the template rendering for the view to handle in attachElContents. It is certainly an option to return the compiled DOM and modify attachElContents to handle a DOM object instead of a string literal, but in many cases it may be overcomplicated to do so. There are a variety of possibilities for rendering with Marionette. If you are looking into alternatives from the default this may be a useful resource: https://github.com/blikblum/marionette.renderers#renderers Serializing Data Marionette will automatically serialize the data from its model or collection for the template to [email protected]. You can override this logic and provide serialization of other data with the serializeData method. The method is called with no arguments, but has the context of the view and should return a javascript object for the template to consume. If serializeData does not return data the template may still receive added context or an empty object for rendering. import _ from 'underscore'; import { View } from 'backbone.marionette'; const MyView = View.extend({ template: _.template(` <div><% user.name %></div> <ul> <% _.each(groups, function(group) { %> <li><%- group.name %></li> <% }) %> </ul> `), serializeData() { // For this view I need both the // model and collection serialized return { user: this.serializeModel(), groups: this.serializeCollection(), }; } }); Note You should not use this method to add arbitrary extra data to your template. Instead use templateContext to add context data to your template. Serializing a Model If the view has a model it will pass that model's attributes to the template. import _ from 'underscore'; import Backbone from 'backbone'; import { View } from 'backbone.marionette'; const MyModel = Backbone.Model.extend({ defaults: { name: 'world' } }); const MyView = View.extend({ template: _.template('<h1>Hello, <%- name %></h1>') }); const myView = new MyView({ model: new MyModel() }); Live example How the model is serialized can also be customized per view. import _ from 'underscore'; import { View } from 'backbone.marionette'; const MyView = View.extend({ serializeModel() { const data = _.clone(this.model.attributes); // serialize nested model data data.sub_model = data.sub_model.attributes; return data; } }); Serializing a Collection If the view does not have a model but has a collection the collection's models will be serialized to an array provided as an items attribute to the template. import _ from 'underscore'; import Backbone from 'backbone'; import { View } from 'backbone.marionette'; const MyView = View.extend({ template: _.template(` <ul> <% _.each(items, function(item) { %> <li><%- item.name %></li> <% }) %> </ul> `) }); const collection = new Backbone.Collection([ {name: 'Steve'}, {name: 'Helen'} ]); const myView = new MyView({ collection }); Live example How the collection is serialized can also be customized per view. import _ from 'underscore'; import { View } from 'backbone.marionette'; const MyView = View.extend({ serializeCollection() { return _.map(this.collection.models, model => { const data = _.clone(model.attributes); // serialize nested model data data.sub_model = data.sub_model.attributes; return data; }); } }); Serializing with a CollectionView if you are using a template with a CollectionView that is not also given a model, your CollectionView will serialize the collection for the template. This could be costly and unnecessary. If your CollectionView has a template it is advised to either use an empty model or override the serializeData method. Adding Context Data Marionette views provide a templateContext attribute that is used to add extra information to your templates. This can be either an object, or a function returning an object. The keys on the returned object will be mixed into the model or collection keys and made available to the template. import _ from 'underscore'; import { View } from 'backbone.marionette'; const MyView = View.extend({ template: _.template('<h1>Hello, <%- name %></h1>'), templateContext: { name: 'World' } }); Additionally context data overwrites the serialized data import _ from 'underscore'; import { View } from 'backbone.marionette'; const MyView = View.extend({ template: _.template('<h1>Hello, <%- name %></h1>'), templateContext() { return { name: this.model.get('name').toUpperCase() }; } }); You can also define a template context value as a method. How this method is called is determined by your templating solution. For instance with handlebars a method is called with the context of the data passed to the template. import Handlebars from 'handlebars'; import Backbone from 'backbone'; import { View } from 'backbone.marionette'; const MyView = View.extend({ template: Handlebars.compile(` <h1{{#if isDr}} class="dr"{{/if}}>Hello {{ fullName }}</h1>, `), templateContext: { isDr() { return (this.degree) === 'phd'; }, fullName() { // Because of Handlebars `this` here is the data object // passed to the template which is the result of the // templateContext mixed with the serialized data of the view return this.isDr() ? `Dr. { this.name }` : this.name; } } }); const myView = new MyView({ model: new Backbone.Model({ degree: 'masters', name: 'Joe' }); }); Note the data object passed to the template is not deeply cloned and in some cases is not [email protected]. Take caution when modifying the data passed to the template, that you are not also modifying your model's data indirectly. What is Context Data? While serializing data deals more with getting the data belonging to the view into the template, template context mixes in other needed data, or in some cases, might do extra computations that go beyond simply "serializing" the view's model or collection import _ from 'underscore' import { CollectionView } from 'backbone.marionette'; import GroupView from './group-view'; const MyCollectionView = CollectionView.extend({ tagName: 'div', childViewContainer: 'ul', childView: GroupView, template: _.template(` <h1>Hello <% name %> of <% orgName %></h1> <div>You have <% stats.public %> group(s).</div> <div>You have <% stats.private %> group(s).</div> <h3>Groups:</h3> <ul></ul> `), templateContext() { const user = this.model; const organization = user.getOrganization(); const groups = this.collection; return { orgName: organization.get('name'), name: user.getFullName(), stats: groups.countBy('type') }; } })
vared - interactively edit the value of an environment variable Synopsis vared VARIABLE_NAME Description vared is used to interactively edit the value of an environment variable. Array variables as a whole can not be edited using vared, but individual list elements can. The -h or --help option displays help about using this command. Example vared PATH[3] edits the third element of the PATH list
floated_admin_avatar( string $name ): string Adds avatars to relevant places in admin. Parameters $name string Required User name. Return string Avatar with the user name. Source File: wp-admin/includes/comment.php. View all references function floated_admin_avatar( $name ) { $avatar = get_avatar( get_comment(), 32, 'mystery' ); return "$avatar $name"; } Related Uses Uses Description get_avatar() wp-includes/pluggable.php Retrieves the avatar <img> tag for a user, email address, MD5 hash, comment, or post. get_comment() wp-includes/comment.php Retrieves comment data given a comment ID or comment object. Changelog Version Description 2.5.0 Introduced.
protected property ExecutionContext8b7c:f320:99b9:690f:4595:cd17:293a:c069$validatedObjects Stores which objects have been validated in which group. Type: array File core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php, line 99 Class ExecutionContext Defines an execution context class. Namespace Drupal\Core\TypedData\Validation Code protected $validatedObjects = array();
numpy.matrix.prod method matrix.prod(self, axis=None, dtype=None, out=None) [source] Return the product of the array elements over the given axis. Refer to prod for full documentation. See also prod, ndarray.prod Notes Same as ndarray.prod, except, where that returns an ndarray, this returns a matrix object instead. Examples >>> x = np.matrix(np.arange(12).reshape((3,4))); x matrix([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]]) >>> x.prod() 0 >>> x.prod(0) matrix([[ 0, 45, 120, 231]]) >>> x.prod(1) matrix([[ 0], [ 840], [7920]])
va_copy Defined in header <stdarg.h> void va_copy( va_list dest, va_list src ); (since C99) The va_copy macro copies src to dest. va_end should be called on dest before the function returns or any subsequent re-initialization of dest (via calls to va_start or va_copy). Parameters dest - an instance of the va_list type to initialize src - the source va_list that will be used to initialize dest Expanded value (none). Example #include <stdio.h> #include <stdarg.h> #include <math.h> double sample_stddev(int count, ...) { /* Compute the mean with args1. */ double sum = 0; va_list args1; va_start(args1, count); va_list args2; va_copy(args2, args1); /* copy va_list object */ for (int i = 0; i < count; ++i) { double num = va_arg(args1, double); sum += num; } va_end(args1); double mean = sum / count; /* Compute standard deviation with args2 and mean. */ double sum_sq_diff = 0; for (int i = 0; i < count; ++i) { double num = va_arg(args2, double); sum_sq_diff += (num-mean) * (num-mean); } va_end(args2); return sqrt(sum_sq_diff / count); } int main(void) { printf("%f\n", sample_stddev(4, 25.0, 27.3, 26.9, 25.7)); } Possible output: 0.920258 References C11 standard (ISO/IEC 9899:2011): 906.366.7147 The va_copy macro (p: 270) C99 standard (ISO/IEC 9899:1999): 906.366.7147 The va_copy macro (p: 250) See also va_arg accesses the next variadic function argument (function macro) va_end ends traversal of the variadic function arguments (function macro) va_list holds the information needed by va_start, va_arg, va_end, and va_copy (typedef) va_start enables access to variadic function arguments (function macro) C++ documentation for va_copy
QCompassReading Class The QCompassReading class represents one reading from a compass. More... Header: #include <QCompassReading> qmake: QT += sensors Since: Qt 5.1 Inherits: QSensorReading This class was introduced in Qt 5.1. List of all members, including inherited members Properties azimuth : const qreal calibrationLevel : const qreal Public Functions qreal azimuth() const qreal calibrationLevel() const void setAzimuth(qreal azimuth) void setCalibrationLevel(qreal calibrationLevel) Detailed Description QCompassReading Units The compass returns the azimuth of the device as degrees from magnetic north in a clockwise direction based on the top of the device, as defined by QScreen8b7c:f320:99b9:690f:4595:cd17:293a:c069nativeOrientation. There is also a value to indicate the calibration status of the device. If the device is not calibrated the azimuth may not be accurate. Digital compasses are susceptible to magnetic interference and may need calibration after being placed near anything that emits a magnetic force. Accuracy of the compass can be affected by any ferrous materials that are nearby. The calibration status of the device is measured as a number from 0 to 1. A value of 1 is the highest level that the device can support and 0 is the worst. Property Documentation azimuth : const qreal This property holds the azimuth of the device. Measured in degrees from magnetic north in a clockwise direction based on the top of the device, as defined by QScreen8b7c:f320:99b9:690f:4595:cd17:293a:c069nativeOrientation. Access functions: qreal azimuth() const See also QCompassReading Units. calibrationLevel : const qreal This property holds the calibration level of the reading. Measured as a value from 0 to 1 with higher values being better. Access functions: qreal calibrationLevel() const See also QCompassReading Units. Member Function Documentation void QCompassReading8b7c:f320:99b9:690f:4595:cd17:293a:c069setAzimuth(qreal azimuth) Sets the azimuth of the device. See also azimuth() and QCompassReading Units. void QCompassReading8b7c:f320:99b9:690f:4595:cd17:293a:c069setCalibrationLevel(qreal calibrationLevel) Sets the calibration level of the reading to calibrationLevel. See also calibrationLevel().
cloudstack_private_gateway Creates a private gateway for the given VPC. NOTE: private gateway can only be created using a ROOT account! Example Usage resource "cloudstack_private_gateway" "default" { gateway = "863-722-4110" ip_address = "863-722-4110" netmask = "863-722-4110" vlan = "200" vpc_id = "76f6e8dc-07e3-4971-b2a2-8831b0cc4cb4" } Argument Reference The following arguments are supported: gateway - (Required) the gateway of the Private gateway. Changing this forces a new resource to be created. ip_address - (Required) the IP address of the Private gateway. Changing this forces a new resource to be created. netmask - (Required) The netmask of the Private gateway. Changing this forces a new resource to be created. vlan - (Required) The VLAN number (1-4095) the network will use. physical_network_id - (Optional) The ID of the physical network this private gateway belongs to. network_offering - (Optional) The name or ID of the network offering to use for the private gateways network connection. acl_id - (Required) The ACL ID that should be attached to the network. vpc_id - (Required) The VPC ID in which to create this Private gateway. Changing this forces a new resource to be created. Attributes Reference The following attributes are exported: id - The ID of the private gateway.
Status These commands are for indicating that a documented element has some special status. The element could be marked as about to be made obsolete, or that it is provided for compatibility with an earlier version, or is simply not to be included in the public interface. The \since command is for specifying the version number in which a function or class first appeared. The \qmlabstract command is for marking a QML type as an abstract base class. \abstract and \qmlabstract \abstract is a synonym for the \qmlabstract command. Add this command to the \qmltype comment for a QML type when that type is meant to be used only as an abstract base type. When a QML type is abstract, it means that the QML type that can't be instantiated. Instead, the properties in its public API are included in the public properties list on the reference page for each QML type that inherits the abstract QML type. The properties are documented as if they are properties of the inheriting QML type. Normally, when a QML type is marked with \qmlabstract, it is also marked with \internal so that its reference page is not generated. It the abstract QML type is not marked internal, it will have a reference page in the documentation. \compat The \compat command is for indicating that a class or function is part of the support library provided to keep old source code working. The command must stand on its own line. Usually an equivalent function or class is provided as an alternative. If the command is used in the documentation of a class, the command expands to a warning that the referenced class is part of the support library. The warning is located at the top of the documentation page. \beginqdoc \class MyQt3SupportClass \compat \endqdoc QDoc renders this at the top of the MyQt3SupportClass class reference page. This class is part of the Qt 3 support library. It is provided to keep old source code working. We strongly advise against using it in new code. See the Porting Guide for more information. If the command is used when documenting a function, QDoc will create and link to a separate page documenting Qt 3 support members when generating the reference documentation for the associated class. \beginqdoc \fn MyClass8b7c:f320:99b9:690f:4595:cd17:293a:c069MyQt3SupportMemberFunction \compat Use MyNewFunction() instead. \endqdoc QDoc renders this in myclass-qt3.html as: Qt 3 Support Members for MyClass The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code. ... void MyQt3SupportMemberFunction() ... Member Function Documentation void MyQt3SupportMemberFunction () Use MyNewFunction() instead. ... \default The \default command is for marking a QML property as the default property. The word default is displayed in the documentation of the property. / *! \qmlproperty list<Change> Stat8b7c:f320:99b9:690f:4595:cd17:293a:c069changes This property holds the changes to apply for this state. \default By default these changes are applied against the default state. If the state extends another state, then the changes are applied against the state being extended. * / See how QDoc renders this property on the reference page for the State type. \obsolete The \obsolete command is for indicating that a function is being deprecated, and it should no longer be used in new code. There is no guarantee for how long it will remain in the library. The command must stand on its own line. When generating the reference documentation for a class, QDoc will create and link to a separate page documenting its obsolete functions. Usually an equivalent function is provided as an alternative. / *! \fn MyClass8b7c:f320:99b9:690f:4595:cd17:293a:c069MyObsoleteFunction \obsolete Use MyNewFunction() instead. * / QDoc renders this in myclass-obsolete.html as: Obsolete Members for MyClass The following class members are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code. ... void MyObsoleteFunction() (obsolete) ... Member Function Documentation void MyObsoleteFunction () Use MyNewFunction() instead. ... \internal The \internal command indicates that the referenced function is not part of the public interface. The command must stand on its own line. QDoc ignores the documentation as well as the documented item, when generating the associated class reference documentation. / *! \internal Tries to find the decimal separator. If it can't find it and the thousand delimiter is != '.' it will try to find a '.'; * / int QDoubleSpinBoxPrivat8b7c:f320:99b9:690f:4595:cd17:293a:c069findDelimiter (const QString &str, int index) const { int dotindex = str.indexOf(delimiter, index); if (dotindex == -1 && thousand != dot && delimiter != dot) dotindex = str.indexOf(dot, index); return dotindex; } This function will not be included in the documentation. \preliminary The \preliminary command is for indicating that a referenced function is still under development. The command must stand on its own line. The \preliminary command expands to a notification in the function documentation, and marks the function as preliminary when it appears in lists. / *! \preliminary Returns information about the joining type attributes of the character (needed for certain languages such as Arabic or Syriac). * / QChar8b7c:f320:99b9:690f:4595:cd17:293a:c069JoiningType QChar8b7c:f320:99b9:690f:4595:cd17:293a:c069joiningType() const { return QChar8b7c:f320:99b9:690f:4595:cd17:293a:c069joiningType(ucs); } QDoc renders this as: JoiningType QChar8b7c:f320:99b9:690f:4595:cd17:293a:c069joiningType() const This function is under development and subject to change. Returns information about the joining type attributes of the character (needed for certain languages such as Arabic or Syriac). And the function's entry in QChar's list of public functions will be rendered as: ... JoiningType joiningType() const (preliminary) ... \since The \since command tells in which minor release the associated functionality was added. / *! \since 4.1 Returns an icon for \a standardIcon. ... \sa standardPixmap() * / QIcon QStyl8b7c:f320:99b9:690f:4595:cd17:293a:c069standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const { } QDoc renders this as: QIcon QStyl8b7c:f320:99b9:690f:4595:cd17:293a:c069standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const This function was introduced in Qt version 4.1 Returns an icon for standardIcon. ... See also standardPixmap(). QDoc generates the "Qt" reference from the project configuration variable. For that reason this reference will change according to the current documentation project. See also project.
isEmpty function stable operator Emits false if the input Observable emits any values, or emits true if the input Observable completes without emitting any values. isEmpty<T>(): OperatorFunction<T, boolean> Parameters There are no parameters. Returns OperatorFunction<T, boolean>: A function that returns an Observable that emits boolean value indicating whether the source Observable was empty or not. Description Tells whether any values are emitted by an Observable. isEmpty transforms an Observable that emits values into an Observable that emits a single boolean value representing whether or not any values were emitted by the source Observable. As soon as the source Observable emits a value, isEmpty will emit a false and complete. If the source Observable completes having not emitted anything, isEmpty will emit a true and complete. A similar effect could be achieved with count, but isEmpty can emit a false value sooner. Examples Emit false for a non-empty Observable import { Subject, isEmpty } from 'rxjs'; const source = new Subject<string>(); const result = source.pipe(isEmpty()); source.subscribe(x => console.log(x)); result.subscribe(x => console.log(x)); source.next('a'); source.next('b'); source.next('c'); source.complete(); // Outputs // 'a' // false // 'b' // 'c' Emit true for an empty Observable import { EMPTY, isEmpty } from 'rxjs'; const result = EMPTY.pipe(isEmpty()); result.subscribe(x => console.log(x)); // Outputs // true See Also count EMPTY
recordplot Record and Replay Plots Description Functions to save the current plot in an R variable, and to replay it. Usage recordPlot(load=NULL, attach=NULL) replayPlot(x, reloadPkgs=FALSE) Arguments load If not NULL, a character vector of package names, which are saved as part of the recorded plot. attach If not NULL, a character vector of package names, which are saved as part of the recorded plot. x A saved plot. reloadPkgs A logical indicating whether to reload and/or reattach any packages that were saved as part of the recorded plot. Details These functions record and replay the displaylist of the current graphics device. The returned object is of class "recordedplot", and replayPlot acts as a print method for that class. The returned object is stored as a pairlist, but the usual methods for examining R objects such as deparse and str are liable to mislead. Value recordPlot returns an object of class "recordedplot". replayPlot has no return value. Warning The format of recorded plots may change between R versions, so recorded plots should not be used as a permanent storage format for R plots. As of R 3.3.0, it is possible (again) to replay a plot from another R session using, for example, saveRDS and readRDS. It is even possible to replay a plot from another R version, however, this will produce warnings, may produce errors, or something worse. Note Replay of a recorded plot may not produce the correct result (or may just fail) if the display list contains a call to recordGraphics which in turn contains an expression that calls code from a non-base package other than graphics or grid. The most well-known example of this is a plot drawn with the package ggplot2. One solution is to load the relevant package(s) before replaying the recorded plot. The load and attach arguments to recordPlot can be used to automate this - any packages named in load will be reloaded, via loadNamespace, and any packages named in attach will be reattached, via library, as long as reloadPkgs is TRUE in the call to replayPlot. This is only relevant when attempting to replay in one R session a plot that was recorded in a different R session. See Also The displaylist can be turned on and off using dev.control. Initially recording is on for screen devices, and off for print devices. Copyright (
d3-shape Visualizations typically consist of discrete graphical marks, such as symbols, arcs, lines and areas. While the rectangles of a bar chart may be easy enough to generate directly using SVG or Canvas, other shapes are complex, such as rounded annular sectors and centripetal Catmull–Rom splines. This module provides a variety of shape generators for your convenience. As with other aspects of D3, these shapes are driven by data: each shape generator exposes accessors that control how the input data are mapped to a visual representation. For example, you might define a line generator for a time series by scaling fields of your data to fit the chart: const line = d3.line() .x(d => x(d.date)) .y(d => y(d.value)); This line generator can then be used to compute the d attribute of an SVG path element: path.datum(data).attr("d", line); Or you can use it to render to a Canvas 2D context: line.context(context)(data); For more, read Introducing d3-shape. Installing If you use NPM, npm install d3-shape. Otherwise, download the latest release. You can also load directly from d3js.org, either as a standalone library or as part of D3. AMD, CommonJS, and vanilla environments are supported. In vanilla, a d3 global is exported: <script src="https://d3js.org/d3-path.v2.min.js"></script> <script src="https://d3js.org/d3-shape.v2.min.js"></script> <script> const line = d3.line(); </script> API Reference Arcs Pies Lines Areas Curves Custom Curves Links Symbols Custom Symbol Types Stacks Note: all the methods that accept arrays also accept iterables and convert them to arrays internally. Arcs The arc generator produces a circular or annular sector, as in a pie or donut chart. If the difference between the start and end angles (the angular span) is greater than τ, the arc generator will produce a complete circle or annulus. If it is less than τ, arcs may have rounded corners and angular padding. Arcs are always centered at ⟨0,0⟩; use a transform (see: SVG, Canvas) to move the arc to a different position. See also the pie generator, which computes the necessary angles to represent an array of data as a pie or donut chart; these angles can then be passed to an arc generator. d3.arc() · Source Constructs a new arc generator with the default settings. arc(arguments…) · Source Generates an arc for the given arguments. The arguments are arbitrary; they are simply propagated to the arc generator’s accessor functions along with the this object. For example, with the default settings, an object with radii and angles is expected: const arc = d3.arc(); arc({ innerRadius: 0, outerRadius: 100, startAngle: 0, endAngle: Math.PI / 2 }); // "M0,-100A100,100,0,0,1,100,0L0,0Z" If the radii and angles are instead defined as constants, you can generate an arc without any arguments: const arc = d3.arc() .innerRadius(0) .outerRadius(100) .startAngle(0) .endAngle(Math.PI / 2); arc(); // "M0,-100A100,100,0,0,1,100,0L0,0Z" If the arc generator has a context, then the arc is rendered to this context as a sequence of path method calls and this function returns void. Otherwise, a path data string is returned. arc.centroid(arguments…) · Source Computes the midpoint [x, y] of the center line of the arc that would be generated by the given arguments. The arguments are arbitrary; they are simply propagated to the arc generator’s accessor functions along with the this object. To be consistent with the generated arc, the accessors must be deterministic, i.e., return the same value given the same arguments. The midpoint is defined as (startAngle + endAngle) / 2 and (innerRadius + outerRadius) / 2. For example: Note that this is not the geometric center of the arc, which may be outside the arc; this method is merely a convenience for positioning labels. arc.innerRadius([radius]) · Source If radius is specified, sets the inner radius to the specified function or number and returns this arc generator. If radius is not specified, returns the current inner radius accessor, which defaults to: function innerRadius(d) { return d.innerRadius; } Specifying the inner radius as a function is useful for constructing a stacked polar bar chart, often in conjunction with a sqrt scale. More commonly, a constant inner radius is used for a donut or pie chart. If the outer radius is smaller than the inner radius, the inner and outer radii are swapped. A negative value is treated as zero. arc.outerRadius([radius]) · Source If radius is specified, sets the outer radius to the specified function or number and returns this arc generator. If radius is not specified, returns the current outer radius accessor, which defaults to: function outerRadius(d) { return d.outerRadius; } Specifying the outer radius as a function is useful for constructing a coxcomb or polar bar chart, often in conjunction with a sqrt scale. More commonly, a constant outer radius is used for a pie or donut chart. If the outer radius is smaller than the inner radius, the inner and outer radii are swapped. A negative value is treated as zero. arc.cornerRadius([radius]) · Source If radius is specified, sets the corner radius to the specified function or number and returns this arc generator. If radius is not specified, returns the current corner radius accessor, which defaults to: function cornerRadius() { return 0; } If the corner radius is greater than zero, the corners of the arc are rounded using circles of the given radius. For a circular sector, the two outer corners are rounded; for an annular sector, all four corners are rounded. The corner circles are shown in this diagram: The corner radius may not be larger than (outerRadius - innerRadius) / 2. In addition, for arcs whose angular span is less than π, the corner radius may be reduced as two adjacent rounded corners intersect. This is occurs more often with the inner corners. See the arc corners animation for illustration. arc.startAngle([angle]) · Source If angle is specified, sets the start angle to the specified function or number and returns this arc generator. If angle is not specified, returns the current start angle accessor, which defaults to: function startAngle(d) { return d.startAngle; } The angle is specified in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. If |endAngle - startAngle| ≥ τ, a complete circle or annulus is generated rather than a sector. arc.endAngle([angle]) · Source If angle is specified, sets the end angle to the specified function or number and returns this arc generator. If angle is not specified, returns the current end angle accessor, which defaults to: function endAngle(d) { return d.endAngle; } The angle is specified in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. If |endAngle - startAngle| ≥ τ, a complete circle or annulus is generated rather than a sector. arc.padAngle([angle]) · Source If angle is specified, sets the pad angle to the specified function or number and returns this arc generator. If angle is not specified, returns the current pad angle accessor, which defaults to: function padAngle() { return d && d.padAngle; } The pad angle is converted to a fixed linear distance separating adjacent arcs, defined as padRadius * padAngle. This distance is subtracted equally from the start and end of the arc. If the arc forms a complete circle or annulus, as when |endAngle - startAngle| ≥ τ, the pad angle is ignored. If the inner radius or angular span is small relative to the pad angle, it may not be possible to maintain parallel edges between adjacent arcs. In this case, the inner edge of the arc may collapse to a point, similar to a circular sector. For this reason, padding is typically only applied to annular sectors (i.e., when innerRadius is positive), as shown in this diagram: The recommended minimum inner radius when using padding is outerRadius * padAngle / sin(θ), where θ is the angular span of the smallest arc before padding. For example, if the outer radius is 200 pixels and the pad angle is 0.02 radians, a reasonable θ is 0.04 radians, and a reasonable inner radius is 100 pixels. See the arc padding animation for illustration. Often, the pad angle is not set directly on the arc generator, but is instead computed by the pie generator so as to ensure that the area of padded arcs is proportional to their value; see pie.padAngle. See the pie padding animation for illustration. If you apply a constant pad angle to the arc generator directly, it tends to subtract disproportionately from smaller arcs, introducing distortion. arc.padRadius([radius]) · Source If radius is specified, sets the pad radius to the specified function or number and returns this arc generator. If radius is not specified, returns the current pad radius accessor, which defaults to null, indicating that the pad radius should be automatically computed as sqrt(innerRadius * innerRadius + outerRadius * outerRadius). The pad radius determines the fixed linear distance separating adjacent arcs, defined as padRadius * padAngle. arc.context([context]) · Source If context is specified, sets the context and returns this arc generator. If context is not specified, returns the current context, which defaults to null. If the context is not null, then the generated arc is rendered to this context as a sequence of path method calls. Otherwise, a path data string representing the generated arc is returned. Pies The pie generator does not produce a shape directly, but instead computes the necessary angles to represent a tabular dataset as a pie or donut chart; these angles can then be passed to an arc generator. d3.pie() · Source Constructs a new pie generator with the default settings. pie(data[, arguments…]) · Source Generates a pie for the given array of data, returning an array of objects representing each datum’s arc angles. Any additional arguments are arbitrary; they are simply propagated to the pie generator’s accessor functions along with the this object. The length of the returned array is the same as data, and each element i in the returned array corresponds to the element i in the input data. Each object in the returned array has the following properties: data - the input datum; the corresponding element in the input data array. value - the numeric value of the arc. index - the zero-based sorted index of the arc. startAngle - the start angle of the arc. endAngle - the end angle of the arc. padAngle - the pad angle of the arc. This representation is designed to work with the arc generator’s default startAngle, endAngle and padAngle accessors. The angular units are arbitrary, but if you plan to use the pie generator in conjunction with an arc generator, you should specify angles in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. Given a small dataset of numbers, here is how to compute the arc angles to render this data as a pie chart: const data = [1, 1, 2, 3, 5, 8, 13, 21]; const arcs = d3.pie()(data); The first pair of parens, pie(), constructs a default pie generator. The second, pie()(data), invokes this generator on the dataset, returning an array of objects: [ {"data": 1, "value": 1, "index": 6, "startAngle": 6.050474740247008, "endAngle": 6.166830023713296, "padAngle": 0}, {"data": 1, "value": 1, "index": 7, "startAngle": 6.166830023713296, "endAngle": 6.283185307179584, "padAngle": 0}, {"data": 2, "value": 2, "index": 5, "startAngle": 5.817764173314431, "endAngle": 6.050474740247008, "padAngle": 0}, {"data": 3, "value": 3, "index": 4, "startAngle": 5.468698322915565, "endAngle": 5.817764173314431, "padAngle": 0}, {"data": 5, "value": 5, "index": 3, "startAngle": 4.886921905584122, "endAngle": 5.468698322915565, "padAngle": 0}, {"data": 8, "value": 8, "index": 2, "startAngle": 3.956079637853813, "endAngle": 4.886921905584122, "padAngle": 0}, {"data": 13, "value": 13, "index": 1, "startAngle": 2.443460952792061, "endAngle": 3.956079637853813, "padAngle": 0}, {"data": 21, "value": 21, "index": 0, "startAngle": 0.000000000000000, "endAngle": 2.443460952792061, "padAngle": 0} ] Note that the returned array is in the same order as the data, even though this pie chart is sorted by descending value, starting with the arc for the last datum (value 21) at 12 o’clock. pie.value([value]) · Source If value is specified, sets the value accessor to the specified function or number and returns this pie generator. If value is not specified, returns the current value accessor, which defaults to: function value(d) { return d; } When a pie is generated, the value accessor will be invoked for each element in the input data array, being passed the element d, the index i, and the array data as three arguments. The default value accessor assumes that the input data are numbers, or that they are coercible to numbers using valueOf. If your data are not simply numbers, then you should specify an accessor that returns the corresponding numeric value for a given datum. For example: const data = [ {"number": 4, "name": "Locke"}, {"number": 8, "name": "Reyes"}, {"number": 15, "name": "Ford"}, {"number": 16, "name": "Jarrah"}, {"number": 23, "name": "Shephard"}, {"number": 42, "name": "Kwon"} ]; const arcs = d3.pie() .value(d => d.number) (data); This is similar to mapping your data to values before invoking the pie generator: const arcs = d3.pie()(data.map(d => d.number)); The benefit of an accessor is that the input data remains associated with the returned objects, thereby making it easier to access other fields of the data, for example to set the color or to add text labels. pie.sort([compare]) · Source If compare is specified, sets the data comparator to the specified function and returns this pie generator. If compare is not specified, returns the current data comparator, which defaults to null. If both the data comparator and the value comparator are null, then arcs are positioned in the original input order. Otherwise, the data is sorted according to the data comparator, and the resulting order is used. Setting the data comparator implicitly sets the value comparator to null. The compare function takes two arguments a and b, each elements from the input data array. If the arc for a should be before the arc for b, then the comparator must return a number less than zero; if the arc for a should be after the arc for b, then the comparator must return a number greater than zero; returning zero means that the relative order of a and b is unspecified. For example, to sort arcs by their associated name: pie.sort((a, b) => a.name.localeCompare(b.name)); Sorting does not affect the order of the generated arc array which is always in the same order as the input data array; it merely affects the computed angles of each arc. The first arc starts at the start angle and the last arc ends at the end angle. pie.sortValues([compare]) · Source If compare is specified, sets the value comparator to the specified function and returns this pie generator. If compare is not specified, returns the current value comparator, which defaults to descending value. The default value comparator is implemented as: function compare(a, b) { return b - a; } If both the data comparator and the value comparator are null, then arcs are positioned in the original input order. Otherwise, the data is sorted according to the data comparator, and the resulting order is used. Setting the value comparator implicitly sets the data comparator to null. The value comparator is similar to the data comparator, except the two arguments a and b are values derived from the input data array using the value accessor, not the data elements. If the arc for a should be before the arc for b, then the comparator must return a number less than zero; if the arc for a should be after the arc for b, then the comparator must return a number greater than zero; returning zero means that the relative order of a and b is unspecified. For example, to sort arcs by ascending value: pie.sortValues((a, b) => a - b); Sorting does not affect the order of the generated arc array which is always in the same order as the input data array; it merely affects the computed angles of each arc. The first arc starts at the start angle and the last arc ends at the end angle. pie.startAngle([angle]) · Source If angle is specified, sets the overall start angle of the pie to the specified function or number and returns this pie generator. If angle is not specified, returns the current start angle accessor, which defaults to: function startAngle() { return 0; } The start angle here means the overall start angle of the pie, i.e., the start angle of the first arc. The start angle accessor is invoked once, being passed the same arguments and this context as the pie generator. The units of angle are arbitrary, but if you plan to use the pie generator in conjunction with an arc generator, you should specify an angle in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. pie.endAngle([angle]) · Source If angle is specified, sets the overall end angle of the pie to the specified function or number and returns this pie generator. If angle is not specified, returns the current end angle accessor, which defaults to: function endAngle() { return 2 * Math.PI; } The end angle here means the overall end angle of the pie, i.e., the end angle of the last arc. The end angle accessor is invoked once, being passed the same arguments and this context as the pie generator. The units of angle are arbitrary, but if you plan to use the pie generator in conjunction with an arc generator, you should specify an angle in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. The value of the end angle is constrained to startAngle ± τ, such that |endAngle - startAngle| ≤ τ. pie.padAngle([angle]) · Source If angle is specified, sets the pad angle to the specified function or number and returns this pie generator. If angle is not specified, returns the current pad angle accessor, which defaults to: function padAngle() { return 0; } The pad angle here means the angular separation between each adjacent arc. The total amount of padding reserved is the specified angle times the number of elements in the input data array, and at most |endAngle - startAngle|; the remaining space is then divided proportionally by value such that the relative area of each arc is preserved. See the pie padding animation for illustration. The pad angle accessor is invoked once, being passed the same arguments and this context as the pie generator. The units of angle are arbitrary, but if you plan to use the pie generator in conjunction with an arc generator, you should specify an angle in radians. Lines The line generator produces a spline or polyline, as in a line chart. Lines also appear in many other visualization types, such as the links in hierarchical edge bundling. d3.line([x][, y]) · Source, Examples Constructs a new line generator with the default settings. If x or y are specified, sets the corresponding accessors to the specified function or number and returns this line generator. line(data) · Source, Examples Generates a line for the given array of data. Depending on this line generator’s associated curve, the given input data may need to be sorted by x-value before being passed to the line generator. If the line generator has a context, then the line is rendered to this context as a sequence of path method calls and this function returns void. Otherwise, a path data string is returned. line.x([x]) · Source, Examples If x is specified, sets the x accessor to the specified function or number and returns this line generator. If x is not specified, returns the current x accessor, which defaults to: function x(d) { return d[0]; } When a line is generated, the x accessor will be invoked for each defined element in the input data array, being passed the element d, the index i, and the array data as three arguments. The default x accessor assumes that the input data are two-element arrays of numbers. If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. For example, if x is a time scale and y is a linear scale: const data = [ {date: new Date(2007, 3, 24), value: 93.24}, {date: new Date(2007, 3, 25), value: 95.35}, {date: new Date(2007, 3, 26), value: 98.84}, {date: new Date(2007, 3, 27), value: 99.92}, {date: new Date(2007, 3, 30), value: 99.80}, {date: new Date(2007, 4, 1), value: 99.47}, … ]; const line = d3.line() .x(d => x(d.date)) .y(d => y(d.value)); line.y([y]) · Source, Examples If y is specified, sets the y accessor to the specified function or number and returns this line generator. If y is not specified, returns the current y accessor, which defaults to: function y(d) { return d[1]; } When a line is generated, the y accessor will be invoked for each defined element in the input data array, being passed the element d, the index i, and the array data as three arguments. The default y accessor assumes that the input data are two-element arrays of numbers. See line.x for more information. line.defined([defined]) · Source, Examples If defined is specified, sets the defined accessor to the specified function or boolean and returns this line generator. If defined is not specified, returns the current defined accessor, which defaults to: function defined() { return true; } The default accessor thus assumes that the input data is always defined. When a line is generated, the defined accessor will be invoked for each element in the input data array, being passed the element d, the index i, and the array data as three arguments. If the given element is defined (i.e., if the defined accessor returns a truthy value for this element), the x and y accessors will subsequently be evaluated and the point will be added to the current line segment. Otherwise, the element will be skipped, the current line segment will be ended, and a new line segment will be generated for the next defined point. As a result, the generated line may have several discrete segments. For example: Note that if a line segment consists of only a single point, it may appear invisible unless rendered with rounded or square line caps. In addition, some curves such as curveCardinalOpen only render a visible segment if it contains multiple points. line.curve([curve]) · Source, Examples If curve is specified, sets the curve factory and returns this line generator. If curve is not specified, returns the current curve factory, which defaults to curveLinear. line.context([context]) · Source, Examples If context is specified, sets the context and returns this line generator. If context is not specified, returns the current context, which defaults to null. If the context is not null, then the generated line is rendered to this context as a sequence of path method calls. Otherwise, a path data string representing the generated line is returned. d3.lineRadial() · Source, Examples Constructs a new radial line generator with the default settings. A radial line generator is equivalent to the standard Cartesian line generator, except the x and y accessors are replaced with angle and radius accessors. Radial lines are always positioned relative to ⟨0,0⟩; use a transform (see: SVG, Canvas) to change the origin. lineRadial(data) · Source, Examples Equivalent to line. lineRadial.angle([angle]) · Source, Examples Equivalent to line.x, except the accessor returns the angle in radians, with 0 at -y (12 o’clock). lineRadial.radius([radius]) · Source, Examples Equivalent to line.y, except the accessor returns the radius: the distance from the origin ⟨0,0⟩. lineRadial.defined([defined]) Equivalent to line.defined. lineRadial.curve([curve]) · Source, Examples Equivalent to line.curve. Note that curveMonotoneX or curveMonotoneY are not recommended for radial lines because they assume that the data is monotonic in x or y, which is typically untrue of radial lines. lineRadial.context([context]) Equivalent to line.context. Areas The area generator produces an area, as in an area chart. An area is defined by two bounding lines, either splines or polylines. Typically, the two lines share the same x-values (x0 = x1), differing only in y-value (y0 and y1); most commonly, y0 is defined as a constant representing zero. The first line (the topline) is defined by x1 and y1 and is rendered first; the second line (the baseline) is defined by x0 and y0 and is rendered second, with the points in reverse order. With a curveLinear curve, this produces a clockwise polygon. d3.area([x][, y0][, y1]) · Source Constructs a new area generator with the default settings. If x, y0 or y1 are specified, sets the corresponding accessors to the specified function or number and returns this area generator. area(data) · Source Generates an area for the given array of data. Depending on this area generator’s associated curve, the given input data may need to be sorted by x-value before being passed to the area generator. If the area generator has a context, then the area is rendered to this context as a sequence of path method calls and this function returns void. Otherwise, a path data string is returned. area.x([x]) · Source If x is specified, sets x0 to x and x1 to null and returns this area generator. If x is not specified, returns the current x0 accessor. area.x0([x]) · Source If x is specified, sets the x0 accessor to the specified function or number and returns this area generator. If x is not specified, returns the current x0 accessor, which defaults to: function x(d) { return d[0]; } When an area is generated, the x0 accessor will be invoked for each defined element in the input data array, being passed the element d, the index i, and the array data as three arguments. The default x0 accessor assumes that the input data are two-element arrays of numbers. If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. For example, if x is a time scale and y is a linear scale: const data = [ {date: new Date(2007, 3, 24), value: 93.24}, {date: new Date(2007, 3, 25), value: 95.35}, {date: new Date(2007, 3, 26), value: 98.84}, {date: new Date(2007, 3, 27), value: 99.92}, {date: new Date(2007, 3, 30), value: 99.80}, {date: new Date(2007, 4, 1), value: 99.47}, … ]; const area = d3.area() .x(d => x(d.date)) .y1(d => y(d.value)) .y0(y(0)); area.x1([x]) · Source If x is specified, sets the x1 accessor to the specified function or number and returns this area generator. If x is not specified, returns the current x1 accessor, which defaults to null, indicating that the previously-computed x0 value should be reused for the x1 value. When an area is generated, the x1 accessor will be invoked for each defined element in the input data array, being passed the element d, the index i, and the array data as three arguments. See area.x0 for more information. area.y([y]) · Source If y is specified, sets y0 to y and y1 to null and returns this area generator. If y is not specified, returns the current y0 accessor. area.y0([y]) · Source If y is specified, sets the y0 accessor to the specified function or number and returns this area generator. If y is not specified, returns the current y0 accessor, which defaults to: function y() { return 0; } When an area is generated, the y0 accessor will be invoked for each defined element in the input data array, being passed the element d, the index i, and the array data as three arguments. See area.x0 for more information. area.y1([y]) · Source If y is specified, sets the y1 accessor to the specified function or number and returns this area generator. If y is not specified, returns the current y1 accessor, which defaults to: function y(d) { return d[1]; } A null accessor is also allowed, indicating that the previously-computed y0 value should be reused for the y1 value. When an area is generated, the y1 accessor will be invoked for each defined element in the input data array, being passed the element d, the index i, and the array data as three arguments. See area.x0 for more information. area.defined([defined]) · Source If defined is specified, sets the defined accessor to the specified function or boolean and returns this area generator. If defined is not specified, returns the current defined accessor, which defaults to: function defined() { return true; } The default accessor thus assumes that the input data is always defined. When an area is generated, the defined accessor will be invoked for each element in the input data array, being passed the element d, the index i, and the array data as three arguments. If the given element is defined (i.e., if the defined accessor returns a truthy value for this element), the x0, x1, y0 and y1 accessors will subsequently be evaluated and the point will be added to the current area segment. Otherwise, the element will be skipped, the current area segment will be ended, and a new area segment will be generated for the next defined point. As a result, the generated area may have several discrete segments. For example: Note that if an area segment consists of only a single point, it may appear invisible unless rendered with rounded or square line caps. In addition, some curves such as curveCardinalOpen only render a visible segment if it contains multiple points. area.curve([curve]) · Source If curve is specified, sets the curve factory and returns this area generator. If curve is not specified, returns the current curve factory, which defaults to curveLinear. area.context([context]) · Source If context is specified, sets the context and returns this area generator. If context is not specified, returns the current context, which defaults to null. If the context is not null, then the generated area is rendered to this context as a sequence of path method calls. Otherwise, a path data string representing the generated area is returned. area.lineX0() · Source area.lineY0() · Source Returns a new line generator that has this area generator’s current defined accessor, curve and context. The line’s x-accessor is this area’s x0-accessor, and the line’s y-accessor is this area’s y0-accessor. area.lineX1() · Source Returns a new line generator that has this area generator’s current defined accessor, curve and context. The line’s x-accessor is this area’s x1-accessor, and the line’s y-accessor is this area’s y0-accessor. area.lineY1() · Source Returns a new line generator that has this area generator’s current defined accessor, curve and context. The line’s x-accessor is this area’s x0-accessor, and the line’s y-accessor is this area’s y1-accessor. d3.areaRadial() · Source Constructs a new radial area generator with the default settings. A radial area generator is equivalent to the standard Cartesian area generator, except the x and y accessors are replaced with angle and radius accessors. Radial areas are always positioned relative to ⟨0,0⟩; use a transform (see: SVG, Canvas) to change the origin. areaRadial(data) Equivalent to area. areaRadial.angle([angle]) · Source Equivalent to area.x, except the accessor returns the angle in radians, with 0 at -y (12 o’clock). areaRadial.startAngle([angle]) · Source Equivalent to area.x0, except the accessor returns the angle in radians, with 0 at -y (12 o’clock). Note: typically angle is used instead of setting separate start and end angles. areaRadial.endAngle([angle]) · Source Equivalent to area.x1, except the accessor returns the angle in radians, with 0 at -y (12 o’clock). Note: typically angle is used instead of setting separate start and end angles. areaRadial.radius([radius]) · Source Equivalent to area.y, except the accessor returns the radius: the distance from the origin ⟨0,0⟩. areaRadial.innerRadius([radius]) · Source Equivalent to area.y0, except the accessor returns the radius: the distance from the origin ⟨0,0⟩. areaRadial.outerRadius([radius]) · Source Equivalent to area.y1, except the accessor returns the radius: the distance from the origin ⟨0,0⟩. areaRadial.defined([defined]) Equivalent to area.defined. areaRadial.curve([curve]) · Source Equivalent to area.curve. Note that curveMonotoneX or curveMonotoneY are not recommended for radial areas because they assume that the data is monotonic in x or y, which is typically untrue of radial areas. areaRadial.context([context]) Equivalent to line.context. areaRadial.lineStartAngle() · Source areaRadial.lineInnerRadius() · Source Returns a new radial line generator that has this radial area generator’s current defined accessor, curve and context. The line’s angle accessor is this area’s start angle accessor, and the line’s radius accessor is this area’s inner radius accessor. areaRadial.lineEndAngle() · Source Returns a new radial line generator that has this radial area generator’s current defined accessor, curve and context. The line’s angle accessor is this area’s end angle accessor, and the line’s radius accessor is this area’s inner radius accessor. areaRadial.lineOuterRadius() · Source Returns a new radial line generator that has this radial area generator’s current defined accessor, curve and context. The line’s angle accessor is this area’s start angle accessor, and the line’s radius accessor is this area’s outer radius accessor. Curves While lines are defined as a sequence of two-dimensional [x, y] points, and areas are similarly defined by a topline and a baseline, there remains the task of transforming this discrete representation into a continuous shape: i.e., how to interpolate between the points. A variety of curves are provided for this purpose. Curves are typically not constructed or used directly, instead being passed to line.curve and area.curve. For example: const line = d3.line(d => d.date, d => d.value) .curve(d3.curveCatmullRom.alpha(0.5)); d3.curveBasis(context) · Source Produces a cubic basis spline using the specified control points. The first and last points are triplicated such that the spline starts at the first point and ends at the last point, and is tangent to the line between the first and second points, and to the line between the penultimate and last points. d3.curveBasisClosed(context) · Source Produces a closed cubic basis spline using the specified control points. When a line segment ends, the first three control points are repeated, producing a closed loop with C2 continuity. d3.curveBasisOpen(context) · Source Produces a cubic basis spline using the specified control points. Unlike basis, the first and last points are not repeated, and thus the curve typically does not intersect these points. d3.curveBumpX(context) · Source Produces a Bézier curve between each pair of points, with horizontal tangents at each point. d3.curveBumpY(context) · Source Produces a Bézier curve between each pair of points, with vertical tangents at each point. d3.curveBundle(context) · Source Produces a straightened cubic basis spline using the specified control points, with the spline straightened according to the curve’s beta, which defaults to 0.85. This curve is typically used in hierarchical edge bundling to disambiguate connections, as proposed by Danny Holten in Hierarchical Edge Bundles: Visualization of Adjacency Relations in Hierarchical Data. This curve does not implement curve.areaStart and curve.areaEnd; it is intended to work with d3.line, not d3.area. bundle.beta(beta) · Source Returns a bundle curve with the specified beta in the range [0, 1], representing the bundle strength. If beta equals zero, a straight line between the first and last point is produced; if beta equals one, a standard basis spline is produced. For example: const line = d3.line().curve(d3.curveBundle.beta(0.5)); d3.curveCardinal(context) · Source Produces a cubic cardinal spline using the specified control points, with one-sided differences used for the first and last piece. The default tension is 0. d3.curveCardinalClosed(context) · Source Produces a closed cubic cardinal spline using the specified control points. When a line segment ends, the first three control points are repeated, producing a closed loop. The default tension is 0. d3.curveCardinalOpen(context) · Source Produces a cubic cardinal spline using the specified control points. Unlike curveCardinal, one-sided differences are not used for the first and last piece, and thus the curve starts at the second point and ends at the penultimate point. The default tension is 0. cardinal.tension(tension) · Source Returns a cardinal curve with the specified tension in the range [0, 1]. The tension determines the length of the tangents: a tension of one yields all zero tangents, equivalent to curveLinear; a tension of zero produces a uniform Catmull–Rom spline. For example: const line = d3.line().curve(d3.curveCardinal.tension(0.5)); d3.curveCatmullRom(context) · Source Produces a cubic Catmull–Rom spline using the specified control points and the parameter alpha, which defaults to 0.5, as proposed by Yuksel et al. in On the Parameterization of Catmull–Rom Curves, with one-sided differences used for the first and last piece. d3.curveCatmullRomClosed(context) · Source Produces a closed cubic Catmull–Rom spline using the specified control points and the parameter alpha, which defaults to 0.5, as proposed by Yuksel et al. When a line segment ends, the first three control points are repeated, producing a closed loop. d3.curveCatmullRomOpen(context) · Source Produces a cubic Catmull–Rom spline using the specified control points and the parameter alpha, which defaults to 0.5, as proposed by Yuksel et al. Unlike curveCatmullRom, one-sided differences are not used for the first and last piece, and thus the curve starts at the second point and ends at the penultimate point. catmullRom.alpha(alpha) · Source Returns a cubic Catmull–Rom curve with the specified alpha in the range [0, 1]. If alpha is zero, produces a uniform spline, equivalent to curveCardinal with a tension of zero; if alpha is one, produces a chordal spline; if alpha is 0.5, produces a centripetal spline. Centripetal splines are recommended to avoid self-intersections and overshoot. For example: const line = d3.line().curve(d3.curveCatmullRom.alpha(0.5)); d3.curveLinear(context) · Source Produces a polyline through the specified points. d3.curveLinearClosed(context) · Source Produces a closed polyline through the specified points by repeating the first point when the line segment ends. d3.curveMonotoneX(context) · Source Produces a cubic spline that preserves monotonicity in y, assuming monotonicity in x, as proposed by Steffen in A simple method for monotonic interpolation in one dimension: “a smooth curve with continuous first-order derivatives that passes through any given set of data points without spurious oscillations. Local extrema can occur only at grid points where they are given by the data, but not in between two adjacent grid points.” d3.curveMonotoneY(context) · Source Produces a cubic spline that preserves monotonicity in x, assuming monotonicity in y, as proposed by Steffen in A simple method for monotonic interpolation in one dimension: “a smooth curve with continuous first-order derivatives that passes through any given set of data points without spurious oscillations. Local extrema can occur only at grid points where they are given by the data, but not in between two adjacent grid points.” d3.curveNatural(context) · Source Produces a natural cubic spline with the second derivative of the spline set to zero at the endpoints. d3.curveStep(context) · Source Produces a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes at the midpoint of each pair of adjacent x-values. d3.curveStepAfter(context) · Source Produces a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value. d3.curveStepBefore(context) · Source Produces a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value. Custom Curves Curves are typically not used directly, instead being passed to line.curve and area.curve. However, you can define your own curve implementation should none of the built-in curves satisfy your needs using the following interface. You can also use this low-level interface with a built-in curve type as an alternative to the line and area generators. curve.areaStart() · Source Indicates the start of a new area segment. Each area segment consists of exactly two line segments: the topline, followed by the baseline, with the baseline points in reverse order. curve.areaEnd() · Source Indicates the end of the current area segment. curve.lineStart() · Source Indicates the start of a new line segment. Zero or more points will follow. curve.lineEnd() · Source Indicates the end of the current line segment. curve.point(x, y) · Source Indicates a new point in the current line segment with the given x- and y-values. Links The link shape generates a smooth cubic Bézier curve from a source point to a target point. The tangents of the curve at the start and end are either vertical, horizontal or radial. d3.linkVertical() · Source Returns a new link generator with vertical tangents. For example, to visualize links in a tree diagram rooted on the top edge of the display, you might say: const link = d3.linkVertical() .x(d => d.x) .y(d => d.y); d3.linkHorizontal() · Source Returns a new link generator with horizontal tangents. For example, to visualize links in a tree diagram rooted on the left edge of the display, you might say: const link = d3.linkHorizontal() .x(d => d.y) .y(d => d.x); link(arguments…) · Source Generates a link for the given arguments. The arguments are arbitrary; they are simply propagated to the link generator’s accessor functions along with the this object. For example, with the default settings, an object expected: link({ source: [100, 100], target: [300, 300] }); link.source([source]) · Source If source is specified, sets the source accessor to the specified function and returns this link generator. If source is not specified, returns the current source accessor, which defaults to: function source(d) { return d.source; } link.target([target]) · Source If target is specified, sets the target accessor to the specified function and returns this link generator. If target is not specified, returns the current target accessor, which defaults to: function target(d) { return d.target; } link.x([x]) · Source If x is specified, sets the x-accessor to the specified function or number and returns this link generator. If x is not specified, returns the current x-accessor, which defaults to: function x(d) { return d[0]; } link.y([y]) · Source If y is specified, sets the y-accessor to the specified function or number and returns this link generator. If y is not specified, returns the current y-accessor, which defaults to: function y(d) { return d[1]; } link.context([context]) · Source If context is specified, sets the context and returns this link generator. If context is not specified, returns the current context, which defaults to null. If the context is not null, then the generated link is rendered to this context as a sequence of path method calls. Otherwise, a path data string representing the generated link is returned. See also d3-path. d3.linkRadial() · Source Returns a new link generator with radial tangents. For example, to visualize links in a tree diagram rooted in the center of the display, you might say: const link = d3.linkRadial() .angle(d => d.x) .radius(d => d.y); linkRadial.angle([angle]) · Source Equivalent to link.x, except the accessor returns the angle in radians, with 0 at -y (12 o’clock). linkRadial.radius([radius]) · Source Equivalent to link.y, except the accessor returns the radius: the distance from the origin ⟨0,0⟩. Symbols Symbols provide a categorical shape encoding as is commonly used in scatterplots. Symbols are always centered at ⟨0,0⟩; use a transform (see: SVG, Canvas) to move the symbol to a different position. d3.symbol([type][, size]) · Source, Examples Constructs a new symbol generator of the specified type and size. If not specified, type defaults to a circle, and size defaults to 64. symbol(arguments…) · Source, Examples Generates a symbol for the given arguments. The arguments are arbitrary; they are simply propagated to the symbol generator’s accessor functions along with the this object. For example, with the default settings, no arguments are needed to produce a circle with area 64 square pixels. If the symbol generator has a context, then the symbol is rendered to this context as a sequence of path method calls and this function returns void. Otherwise, a path data string is returned. symbol.type([type]) · Source, Examples If type is specified, sets the symbol type to the specified function or symbol type and returns this symbol generator. If type is a function, the symbol generator’s arguments and this are passed through. (See selection.attr if you are using d3-selection.) If type is not specified, returns the current symbol type accessor, which defaults to: function type() { return circle; } See symbols for the set of built-in symbol types. To implement a custom symbol type, pass an object that implements symbolType.draw. symbol.size([size]) · Source, Examples If size is specified, sets the size to the specified function or number and returns this symbol generator. If size is a function, the symbol generator’s arguments and this are passed through. (See selection.attr if you are using d3-selection.) If size is not specified, returns the current size accessor, which defaults to: function size() { return 64; } Specifying the size as a function is useful for constructing a scatterplot with a size encoding. If you wish to scale the symbol to fit a given bounding box, rather than by area, try SVG’s getBBox. symbol.context([context]) · Source If context is specified, sets the context and returns this symbol generator. If context is not specified, returns the current context, which defaults to null. If the context is not null, then the generated symbol is rendered to this context as a sequence of path method calls. Otherwise, a path data string representing the generated symbol is returned. d3.symbols · Source, Examples An array containing the set of all built-in symbol types: circle, cross, diamond, square, star, triangle, and wye. Useful for constructing the range of an ordinal scale should you wish to use a shape encoding for categorical data. d3.symbolCircle · Source, Examples The circle symbol type. d3.symbolCross · Source, Examples The Greek cross symbol type, with arms of equal length. d3.symbolDiamond · Source, Examples The rhombus symbol type. d3.symbolSquare · Source, Examples The square symbol type. d3.symbolStar · Source, Examples The pentagonal star (pentagram) symbol type. d3.symbolTriangle · Source, Examples The up-pointing triangle symbol type. d3.symbolWye · Source, Examples The Y-shape symbol type. d3.pointRadial(angle, radius) · Source, Examples Returns the point [x, y] for the given angle in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise, and the given radius. Custom Symbol Types Symbol types are typically not used directly, instead being passed to symbol.type. However, you can define your own symbol type implementation should none of the built-in types satisfy your needs using the following interface. You can also use this low-level interface with a built-in symbol type as an alternative to the symbol generator. symbolType.draw(context, size) Renders this symbol type to the specified context with the specified size in square pixels. The context implements the CanvasPathMethods interface. (Note that this is a subset of the CanvasRenderingContext2D interface!) Stacks Some shape types can be stacked, placing one shape adjacent to another. For example, a bar chart of monthly sales might be broken down into a multi-series bar chart by product category, stacking bars vertically. This is equivalent to subdividing a bar chart by an ordinal dimension (such as product category) and applying a color encoding. Stacked charts can show overall value and per-category value simultaneously; however, it is typically harder to compare across categories, as only the bottom layer of the stack is aligned. So, chose the stack order carefully, and consider a streamgraph. (See also grouped charts.) Like the pie generator, the stack generator does not produce a shape directly. Instead it computes positions which you can then pass to an area generator or use directly, say to position bars. d3.stack() · Source Constructs a new stack generator with the default settings. stack(data[, arguments…]) · Source Generates a stack for the given array of data, returning an array representing each series. Any additional arguments are arbitrary; they are simply propagated to accessors along with the this object. The series are determined by the keys accessor; each series i in the returned array corresponds to the ith key. Each series is an array of points, where each point j corresponds to the jth element in the input data. Lastly, each point is represented as an array [y0, y1] where y0 is the lower value (baseline) and y1 is the upper value (topline); the difference between y0 and y1 corresponds to the computed value for this point. The key for each series is available as series.key, and the index as series.index. The input data element for each point is available as point.data. For example, consider the following table representing monthly sales of fruits: Month Apples Bananas Cherries Dates 1/2015 3840 1920 960 400 2/2015 1600 1440 960 400 3/2015 640 960 640 400 4/2015 320 480 640 400 This might be represented in JavaScript as an array of objects: const data = [ {month: new Date(2015, 0, 1), apples: 3840, bananas: 1920, cherries: 960, dates: 400}, {month: new Date(2015, 1, 1), apples: 1600, bananas: 1440, cherries: 960, dates: 400}, {month: new Date(2015, 2, 1), apples: 640, bananas: 960, cherries: 640, dates: 400}, {month: new Date(2015, 3, 1), apples: 320, bananas: 480, cherries: 640, dates: 400} ]; To produce a stack for this data: const stack = d3.stack() .keys(["apples", "bananas", "cherries", "dates"]) .order(d3.stackOrderNone) .offset(d3.stackOffsetNone); const series = stack(data); The resulting array has one element per series. Each series has one point per month, and each point has a lower and upper value defining the baseline and topline: [ [[ 0, 3840], [ 0, 1600], [ 0, 640], [ 0, 320]], // apples [[3840, 5760], [1600, 3040], [ 640, 1600], [ 320, 800]], // bananas [[5760, 6720], [3040, 4000], [1600, 2240], [ 800, 1440]], // cherries [[6720, 7120], [4000, 4400], [2240, 2640], [1440, 1840]], // dates ] Each series in then typically passed to an area generator to render an area chart, or used to construct rectangles for a bar chart. stack.keys([keys]) · Source If keys is specified, sets the keys accessor to the specified function or array and returns this stack generator. If keys is not specified, returns the current keys accessor, which defaults to
QRenderPass Class (Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderPass) Inherits: Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode List of all members, including inherited members Properties shaderProgram : Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QShaderProgram * 2 properties inherited from Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode 1 property inherited from QObject Public Functions QRenderPass(Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode *parent = Q_NULLPTR) ~QRenderPass() void addAnnotation(QAnnotation *criterion) void addBinding(QParameterMapping *binding) void addParameter(QParameter *p) void addRenderState(QRenderState *state) QList<QAnnotation *> annotations() const ParameterList attributes() const QList<QParameterMapping *> bindings() const QString glslNameForParameter(QString paramName) const QList<QParameter *> parameters() const void removeAnnotation(QAnnotation *criterion) void removeBinding(QParameterMapping *binding) void removeParameter(QParameter *p) void removeRenderState(QRenderState *state) QList<QRenderState *> renderStates() const QShaderProgram * shaderProgram() const ParameterList uniforms() const 6 public functions inherited from Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode 31 public functions inherited from QObject Public Slots void setShaderProgram(QShaderProgram *shaderProgram) 2 public slots inherited from Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode 1 public slot inherited from QObject Signals void shaderProgramChanged(QShaderProgram *shaderProgram) 2 signals inherited from Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode 2 signals inherited from QObject Protected Functions QRenderPass(QRenderPassPrivate &dd, Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode *parent = Q_NULLPTR) void copy(const Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode *ref) 3 protected functions inherited from Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode 9 protected functions inherited from QObject Additional Inherited Members 11 static public members inherited from QObject 1 static protected member inherited from Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode Property Documentation shaderProgram : Qt3DRender8b7c:f320:99b9:690f:4595:cd17:293a:c069QShaderProgram * Access functions: QShaderProgram * shaderProgram() const void setShaderProgram(QShaderProgram *shaderProgram) Notifier signal: void shaderProgramChanged(QShaderProgram *shaderProgram) Member Function Documentation QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderPass(Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode *parent = Q_NULLPTR) Default constructs an instance of QRenderPass. [protected] QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069QRenderPass(QRenderPassPrivate &dd, Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode *parent = Q_NULLPTR) Copy constructor. QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069~QRenderPass() Destroys the instance of QRenderPass. void QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069nnotation(QAnnotation *criterion) void QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069inding(QParameterMapping *binding) void QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069Parameter(QParameter *p) void QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069RenderState(QRenderState *state) QList<QAnnotation *> QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069nnotations() const ParameterList QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069ttributes() const QList<QParameterMapping *> QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069indings() const [protected] void QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069opy(const Qt3DCor8b7c:f320:99b9:690f:4595:cd17:293a:c069QNode *ref) QString QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069glslNameForParameter(QString paramName) const QList<QParameter *> QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069parameters() const void QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069removeAnnotation(QAnnotation *criterion) void QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069removeBinding(QParameterMapping *binding) void QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069removeParameter(QParameter *p) void QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069removeRenderState(QRenderState *state) QList<QRenderState *> QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069renderStates() const ParameterList QRenderPass8b7c:f320:99b9:690f:4595:cd17:293a:c069uniforms() const
Class JDIPermission java.lang.Object java.security.Permission java.security.BasicPermission com.sun.jdi.JDIPermission All Implemented Interfaces: Serializable, Guard public final class JDIPermission extends BasicPermission The JDIPermission class represents access rights to the VirtualMachineManager. This is the permission which the SecurityManager will check when code that is running with a SecurityManager requests access to the VirtualMachineManager, as defined in the Java Debug Interface (JDI) for the Java platform. A JDIPermission object contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't. The following table provides a summary description of what the permission allows, and discusses the risks of granting code the permission. Table shows permission target name, what the permission allows, and associated risks Permission Target Name What the Permission Allows Risks of Allowing this Permission virtualMachineManager Ability to inspect and modify the JDI objects in the VirtualMachineManager This allows an attacker to control the VirtualMachineManager and cause the system to misbehave. Programmers do not normally create JDIPermission objects directly. Instead they are created by the security policy code based on reading the security policy file. Since: 1.5 See Also: Bootstrap BasicPermission Permission Permissions PermissionCollection SecurityManager Serialized Form Constructor Summary Constructor Description JDIPermission(String name) The JDIPermission class represents access rights to the VirtualMachineManager JDIPermission(String name, String actions) Constructs a new JDIPermission object. Method Summary Methods declared in class java.security.BasicPermission equals, getActions, hashCode, implies, newPermissionCollection Methods declared in class java.security.Permission checkGuard, getName, toString Methods declared in class java.lang.Object clone, finalize, getClass, notify, notifyAll, wait, wait, wait Constructor Details JDIPermission public JDIPermission(String name) The JDIPermission class represents access rights to the VirtualMachineManager Parameters: name - Permission name. Must be "virtualMachineManager". Throws: IllegalArgumentException - if the name argument is invalid. JDIPermission public JDIPermission(String name, String actions) throws IllegalArgumentException Constructs a new JDIPermission object. Parameters: name - Permission name. Must be "virtualMachineManager". actions - Must be either null or the empty string. Throws: IllegalArgumentException - if arguments are invalid.
$locationShim class Location service that provides a drop-in replacement for the $location service provided in AngularJS. class $locationShim { constructor($injector: any, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy) onChange(fn: (url: string, state: unknown, oldUrl: string, oldState: unknown) => void, err: (e: Error) => void = (e: Error) => { }) $$parse(url: string) $$parseLinkUrl(url: string, relHref?: string): boolean absUrl(): string url(url?: string): string | this protocol(): string host(): string port(): number | null path(path?: string | number): string | this search(search?: string | number | { [key: string]: unknown; }, paramValue?: string | number | boolean | string[]): {...} hash(hash?: string | number): string | this replace(): this state(state?: unknown): unknown | this } See also Using the Angular Unified Location Service Constructor constructor($injector: any, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy) Parameters $injector any location Location platformLocation PlatformLocation urlCodec UrlCodec locationStrategy LocationStrategy Methods onChange() Registers listeners for URL changes. This API is used to catch updates performed by the AngularJS framework. These changes are a subset of the $locationChangeStart and $locationChangeSuccess events which fire when AngularJS updates its internally-referenced version of the browser URL. onChange(fn: (url: string, state: unknown, oldUrl: string, oldState: unknown) => void, err: (e: Error) => void = (e: Error) => { }) Parameters fn (url: string, state: unknown, oldUrl: string, oldState: unknown) => void The callback function that is triggered for the listener when the URL changes. err (e: Error) => void The callback function that is triggered when an error occurs. Optional. Default is (e: Error) => { }. It's possible for $locationChange events to happen, but for the browser URL (window.location) to remain unchanged. This onChange callback will fire only when AngularJS actually updates the browser URL (window.location). $$parse() Parses the provided URL, and sets the current URL to the parsed result. $$parse(url: string) Parameters url string The URL string. $$parseLinkUrl() Parses the provided URL and its relative URL. $$parseLinkUrl(url: string, relHref?: string): boolean Parameters url string The full URL string. relHref string A URL string relative to the full URL string. Optional. Default is undefined. Returns boolean absUrl() Retrieves the full URL representation with all segments encoded according to rules specified in RFC 3986. absUrl(): string Parameters There are no parameters. Returns string // given URL http://example.com/#/some/path?foo=bar&baz=xoxo let absUrl = $location.absUrl(); // => "http://example.com/#/some/path?foo=bar&baz=xoxo" url() Retrieves the current URL, or sets a new URL. When setting a URL, changes the path, search, and hash, and returns a reference to its own instance. url(): string Parameters There are no parameters. Returns string url(url: string): this Parameters url string Returns this // given URL http://example.com/#/some/path?foo=bar&baz=xoxo let url = $location.url(); // => "/some/path?foo=bar&baz=xoxo" protocol() Retrieves the protocol of the current URL. protocol(): string Parameters There are no parameters. Returns string // given URL http://example.com/#/some/path?foo=bar&baz=xoxo let protocol = $location.protocol(); // => "http" host() Retrieves the protocol of the current URL. host(): string Parameters There are no parameters. Returns string In contrast to the non-AngularJS version location.host which returns hostname:port, this returns the hostname portion only. // given URL http://example.com/#/some/path?foo=bar&baz=xoxo let host = $location.host(); // => "example.com" // given URL http://user:[email protected]:8080/#/some/path?foo=bar&baz=xoxo host = $location.host(); // => "example.com" host = location.host; // => "example.com:8080" port() Retrieves the port of the current URL. port(): number | null Parameters There are no parameters. Returns number | null // given URL http://example.com/#/some/path?foo=bar&baz=xoxo let port = $location.port(); // => 80 path() Retrieves the path of the current URL, or changes the path and returns a reference to its own instance. path(): string Parameters There are no parameters. Returns string path(path: string | number): this Parameters path string | number Returns this Paths should always begin with forward slash (/). This method adds the forward slash if it is missing. // given URL http://example.com/#/some/path?foo=bar&baz=xoxo let path = $location.path(); // => "/some/path" search() 3 overloads... Show All Hide All Overload #1 Retrieves a map of the search parameters of the current URL, or changes a search part and returns a reference to its own instance. search(): { [key: string]: unknown; } Parameters There are no parameters. Returns `{ }: The parsedsearchobject of the current URL, or the changedsearch` object. Overload #2 search(search: string | number | { [key: string]: unknown; }): this Parameters search string | number | { [key: string]: unknown; } Returns this Overload #3 search(search: string | number | { [key: string]: unknown; }, paramValue: string | number | boolean | string[]): this Parameters search string | number | { [key: string]: unknown; } paramValue string | number | boolean | string[] Returns this // given URL http://example.com/#/some/path?foo=bar&baz=xoxo let searchObject = $location.search(); // => {foo: 'bar', baz: 'xoxo'} // set foo to 'yipee' $location.search('foo', 'yipee'); // $location.search() => {foo: 'yipee', baz: 'xoxo'} hash() Retrieves the current hash fragment, or changes the hash fragment and returns a reference to its own instance. hash(): string Parameters There are no parameters. Returns string hash(hash: string | number): this Parameters hash string | number Returns this // given URL http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue let hash = $location.hash(); // => "hashValue" replace() Changes to $location during the current $digest will replace the current history record, instead of adding a new one. replace(): this Parameters There are no parameters. Returns this state() Retrieves the history state object when called without any parameter. state(): unknown Parameters There are no parameters. Returns unknown state(state: unknown): this Parameters state unknown Returns this Change the history state object when called with one parameter and return $location. The state object is later passed to pushState or replaceState. This method is supported only in HTML5 mode and only in browsers supporting the HTML5 History API methods such as pushState and replaceState. If you need to support older browsers (like IE9 or Android < 4.0), don't use this method.
check_point.mgmt.cp_mgmt_uninstall_software_package – Uninstalls the software package from target machines. Note This plugin is part of the check_point.mgmt collection (version 2.1.1). 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 check_point.mgmt. To use it in a playbook, specify: check_point.mgmt.cp_mgmt_uninstall_software_package. New in version 2.9: of check_point.mgmt Synopsis Parameters Examples Return Values Synopsis Uninstalls the software package from target machines. All operations are performed over Web Services API. Parameters Parameter Choices/Defaults Comments cluster_installation_settings dictionary Installation settings for cluster. cluster_delay integer The delay between end of installation on one cluster members and start of installation on the next cluster member. cluster_strategy string The cluster installation strategy. concurrency_limit integer The number of targets, on which the same package is installed at the same time. name string The name of the software package. 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. wait_for_task_timeout integer Default:30 How many minutes to wait until throwing a timeout error. Examples - name: uninstall-software-package cp_mgmt_uninstall_software_package: name: Check_Point_R80_40_JHF_MCD_DEMO_019_MAIN_Bundle_T1_VISIBLE_FULL.tgz targets.1: corporate-gateway Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description cp_mgmt_uninstall_software_package dictionary always. The checkpoint uninstall-software-package output. Authors Or Soffer (@chkp-orso) © 2012–2018 Michael DeHaan
class ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069PartialRenderer Parent: ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069stractRenderer Included modules: ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069ollectionCaching Action View Partials There's also a convenience method for rendering sub templates within the current controller that depends on a single object (we call this kind of sub templates for partials). It relies on the fact that partials should follow the naming convention of being prefixed with an underscore – as to separate them from regular templates that could be rendered on their own. In a template for Advertiser#account: <%= render partial: "account" %> This would render “advertiser/_account.html.erb”. In another template for Advertiser#buy, we could have: <%= render partial: "account", locals: { account: @buyer } %> <% @advertisements.each do |ad| %> <%= render partial: "ad", locals: { ad: ad } %> <% end %> This would first render “advertiser/_account.html.erb” with @buyer passed in as the local variable account, then render “advertiser/_ad.html.erb” and pass the local variable ad to the template for display. The :as and :object options By default ActionView8b7c:f320:99b9:690f:4595:cd17:293a:c069PartialRenderer doesn't have any local variables. The :object option can be used to pass an object to the partial. For instance: <%= render partial: "account", object: @buyer %> would provide the @buyer object to the partial, available under the local variable account and is equivalent to: <%= render partial: "account", locals: { account: @buyer } %> With the :as option we can specify a different name for said local variable. For example, if we wanted it to be user instead of account we'd do: <%= render partial: "account", object: @buyer, as: 'user' %> This is equivalent to <%= render partial: "account", locals: { user: @buyer } %> Rendering a collection of partials The example of partial use describes a familiar pattern where a template needs to iterate over an array and render a sub template for each of the elements. This pattern has been implemented as a single method that accepts an array and renders a partial by the same name as the elements contained within. So the three-lined example in “Using partials” can be rewritten with a single line: <%= render partial: "ad", collection: @advertisements %> This will render “advertiser/_ad.html.erb” and pass the local variable ad to the template for display. An iteration object will automatically be made available to the template with a name of the form partial_name_iteration. The iteration object has knowledge about which index the current object has in the collection and the total size of the collection. The iteration object also has two convenience methods, first? and last?. In the case of the example above, the template would be fed ad_iteration. For backwards compatibility the partial_name_counter is still present and is mapped to the iteration's index method. The :as option may be used when rendering partials. You can specify a partial to be rendered between elements via the :spacer_template option. The following example will render advertiser/_ad_divider.html.erb between each ad partial: <%= render partial: "ad", collection: @advertisements, spacer_template: "ad_divider" %> If the given :collection is nil or empty, render will return nil. This will allow you to specify a text which will be displayed instead by using this form: <%= render(partial: "ad", collection: @advertisements) || "There's no ad to be displayed" %> NOTE: Due to backwards compatibility concerns, the collection can't be one of hashes. Normally you'd also just keep domain objects, like Active Records, in there. Rendering shared partials Two controllers can share a set of partials and render them like this: <%= render partial: "advertisement/ad", locals: { ad: @advertisement } %> This will render the partial “advertisement/_ad.html.erb” regardless of which controller this is being called from. Rendering objects that respond to `to_partial_path` Instead of explicitly naming the location of a partial, you can also let PartialRenderer do the work and pick the proper path by checking `to_partial_path` method. # @account.to_partial_path returns 'accounts/account', so it can be used to replace: # <%= render partial: "accounts/account", locals: { account: @account} %> <%= render partial: @account %> # @posts is an array of Post instances, so every post record returns 'posts/post' on `to_partial_path`, # that's why we can replace: # <%= render partial: "posts/post", collection: @posts %> <%= render partial: @posts %> Rendering the default case If you're not going to be using any of the options like collections or layouts, you can also use the short-hand defaults of render to render partials. Examples: # Instead of <%= render partial: "account" %> <%= render "account" %> # Instead of <%= render partial: "account", locals: { account: @buyer } %> <%= render "account", account: @buyer %> # @account.to_partial_path returns 'accounts/account', so it can be used to replace: # <%= render partial: "accounts/account", locals: { account: @account} %> <%= render @account %> # @posts is an array of Post instances, so every post record returns 'posts/post' on `to_partial_path`, # that's why we can replace: # <%= render partial: "posts/post", collection: @posts %> <%= render @posts %> Rendering partials with layouts Partials can have their own layouts applied to them. These layouts are different than the ones that are specified globally for the entire action, but they work in a similar fashion. Imagine a list with two types of users: <%# app/views/users/index.html.erb %> Here's the administrator: <%= render partial: "user", layout: "administrator", locals: { user: administrator } %> Here's the editor: <%= render partial: "user", layout: "editor", locals: { user: editor } %> <%# app/views/users/_user.html.erb %> Name: <%= user.name %> <%# app/views/users/_administrator.html.erb %> <div id="administrator"> Budget: $<%= user.budget %> <%= yield %> </div> <%# app/views/users/_editor.html.erb %> <div id="editor"> Deadline: <%= user.deadline %> <%= yield %> </div> …this will return: Here's the administrator: <div id="administrator"> Budget: $<%= user.budget %> Name: <%= user.name %> </div> Here's the editor: <div id="editor"> Deadline: <%= user.deadline %> Name: <%= user.name %> </div> If a collection is given, the layout will be rendered once for each item in the collection. For example, these two snippets have the same output: <%# app/views/users/_user.html.erb %> Name: <%= user.name %> <%# app/views/users/index.html.erb %> <%# This does not use layouts %> <ul> <% users.each do |user| -%> <li> <%= render partial: "user", locals: { user: user } %> </li> <% end -%> </ul> <%# app/views/users/_li_layout.html.erb %> <li> <%= yield %> </li> <%# app/views/users/index.html.erb %> <ul> <%= render partial: "user", layout: "li_layout", collection: users %> </ul> Given two users whose names are Alice and Bob, these snippets return: <ul> <li> Name: Alice </li> <li> Name: Bob </li> </ul> The current object being rendered, as well as the object_counter, will be available as local variables inside the layout template under the same names as available in the partial. You can also apply a layout to a block within any template: <%# app/views/users/_chief.html.erb %> <%= render(layout: "administrator", locals: { user: chief }) do %> Title: <%= chief.title %> <% end %> …this will return: <div id="administrator"> Budget: $<%= user.budget %> Title: <%= chief.name %> </div> As you can see, the :locals hash is shared between both the partial and its layout. If you pass arguments to “yield” then this will be passed to the block. One way to use this is to pass an array to layout and treat it as an enumerable. <%# app/views/users/_user.html.erb %> <div class="user"> Budget: $<%= user.budget %> <%= yield user %> </div> <%# app/views/users/index.html.erb %> <%= render layout: @users do |user| %> Title: <%= user.title %> <% end %> This will render the layout for each user and yield to the block, passing the user, each time. You can also yield multiple times in one layout and use block arguments to differentiate the sections. <%# app/views/users/_user.html.erb %> <div class="user"> <%= yield user, :header %> Budget: $<%= user.budget %> <%= yield user, :footer %> </div> <%# app/views/users/index.html.erb %> <%= render layout: @users do |user, section| %> <%- case section when :header -%> Title: <%= user.title %> <%- when :footer -%> Deadline: <%= user.deadline %> <%- end -%> <% end %> Constants IDENTIFIER_ERROR_MESSAGE OPTION_AS_ERROR_MESSAGE PREFIXED_PARTIAL_NAMES Public Class Methods new(*) Show source # File actionview/lib/action_view/renderer/partial_renderer.rb, line 290 def initialize(*) super @context_prefix = @lookup_context.prefixes.first end Calls superclass method Public Instance Methods render(context, options, block) Show source # File actionview/lib/action_view/renderer/partial_renderer.rb, line 295 def render(context, options, block) setup(context, options, block) @template = find_partial @lookup_context.rendered_format ||= begin if @template && @template.formats.present? @template.formats.first else formats.first end end if @collection render_collection else render_partial end end
AuthenticatorAttestationResponse.getTransports() Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers. getTransports() is a method of the AuthenticatorAttestationResponse interface that returns an Array containing strings describing the different transports which may be used by the authenticator. Such transports may be USB, NFC, BLE or internal (applicable when the authenticator is not removable from the device). Note: An AuthenticatorAttestationResponse instance is available on PublicKeyCredential.response after calling navigator.credentials.create(). Note: This method may only be used in top-level contexts and will not be available in an <iframe> for example. Syntax getTransports() Parameters None. Return value An Array containing the different transports supported by the authenticator or nothing if this information is not available. The elements of this array are supposed to be in lexicographical order. Their values may be : "usb": the authenticator can be contacted via a removable USB link "nfc": the authenticator may be used over NFC (Near Field Communication) "ble": the authenticator may be used over BLE (Bluetooth Low Energy) "internal": the authenticator is specifically bound to the client device (cannot be removed). Examples var publicKey = { challenge: /* from the server */, rp: { name: "Example CORP", id : "login.example.com" }, user: { id: new Uint8Array(16), name: "[email protected]", displayName: "John Doe" }, pubKeyCredParams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publicKey }) .then(function (newCredentialInfo) { var transports = newCredentialInfo.response.getTransports(); console.table(transports); // may be something like ["internal", "nfc", "usb"] }).catch(function (err) { console.error(err); }); Specifications Specification Web Authentication: An API for accessing Public Key Credentials - Level 3 # dom-authenticatorattestationresponse-gettransports 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 getTransports 74 79 No No 62 No No 74 No 53 No No 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 16, 2022, by MDN contributors
split split /PATTERN/,EXPR,LIMIT split /PATTERN/,EXPR split /PATTERN/ split Splits the string EXPR into a list of strings and returns the list in list context, or the size of the list in scalar context. If only PATTERN is given, EXPR defaults to $_ . Anything in EXPR that matches PATTERN is taken to be a separator that separates the EXPR into substrings (called "fields") that do not include the separator. Note that a separator may be longer than one character or even have no characters at all (the empty string, which is a zero-width match). The PATTERN need not be constant; an expression may be used to specify a pattern that [email protected]. If PATTERN matches the empty string, the EXPR is split at the match position (between characters). As an example, the following: print join(':', split('b', 'abc')), "\n"; uses the 'b' in 'abc' as a separator to produce the output 'a:c'. However, this: print join(':', split('', 'abc')), "\n"; uses empty string matches as separators to produce the output 'a:b:c'; thus, the empty string may be used to split EXPR into a list of its component characters. As a special case for split, the empty pattern given in match operator syntax (// ) specifically matches the empty string, which is contrary to its usual interpretation as the last successful match. If PATTERN is /^/ , then it is treated as if it used the multiline modifier (/^/m ), since it isn't much use otherwise. As another special case, split emulates the default behavior of the command line tool awk when the PATTERN is either omitted or a literal string composed of a single space character (such as ' ' or "\x20" , but not e.g. / / ). In this case, any leading whitespace in EXPR is removed before splitting occurs, and the PATTERN is instead treated as if it were /\s+/ ; in particular, this means that any contiguous whitespace (not just a single space character) is used as a separator. However, this special treatment can be avoided by specifying the pattern / / instead of the string " " , thereby allowing only a single space character to be a separator. In earlier Perls this special case was restricted to the use of a plain " " as the pattern argument to split, in Perl 5.18.0 and later this special case is triggered by any expression which evaluates as the simple string " " . If omitted, PATTERN defaults to a single space, " " , triggering the previously described awk emulation. If LIMIT is specified and positive, it represents the maximum number of fields into which the EXPR may be split; in other words, LIMIT is one greater than the maximum number of times EXPR may be split. Thus, the LIMIT value 1 means that EXPR may be split a maximum of zero times, producing a maximum of one field (namely, the entire value of EXPR). For instance: print join(':', split(//, 'abc', 1)), "\n"; produces the output 'abc', and this: print join(':', split(//, 'abc', 2)), "\n"; produces the output 'a:bc', and each of these: print join(':', split(//, 'abc', 3)), "\n"; print join(':', split(//, 'abc', 4)), "\n"; produces the output 'a:b:c'. If LIMIT is negative, it is treated as if it were instead arbitrarily large; as many fields as possible are produced. If LIMIT is omitted (or, equivalently, zero), then it is usually treated as if it were instead negative but with the exception that trailing empty fields are stripped (empty leading fields are always preserved); if all fields are empty, then all fields are considered to be trailing (and are thus stripped in this case). Thus, the following: print join(':', split(',', 'a,b,c,,,')), "\n"; produces the output 'a:b:c', but the following: print join(':', split(',', 'a,b,c,,,', -1)), "\n"; produces the output '8b7c:f320:99b9:690f:4595:cd17:293a:c069:'. In time-critical applications, it is worthwhile to avoid splitting into more fields than necessary. Thus, when assigning to a list, if LIMIT is omitted (or zero), then LIMIT is treated as though it were one larger than the number of variables in the list; for the following, LIMIT is implicitly 3: ($login, $passwd) = split(/:/); Note that splitting an EXPR that evaluates to the empty string always produces zero fields, regardless of the LIMIT specified. An empty leading field is produced when there is a positive-width match at the beginning of EXPR. For instance: print join(':', split(/ /, ' abc')), "\n"; produces the output ':abc'. However, a zero-width match at the beginning of EXPR never produces an empty field, so that: print join(':', split(//, ' abc')); produces the output ' :a:b:c' (rather than ': :a:b:c'). An empty trailing field, on the other hand, is produced when there is a match at the end of EXPR, regardless of the length of the match (of course, unless a non-zero LIMIT is given explicitly, such fields are removed, as in the last example). Thus: print join(':', split(//, ' abc', -1)), "\n"; produces the output ' :a:b:c:'. If the PATTERN contains capturing groups, then for each separator, an additional field is produced for each substring captured by a group (in the order in which the groups are specified, as per backreferences); if any group does not match, then it captures the undef value instead of a substring. Also, note that any such additional field is produced whenever there is a separator (that is, whenever a split occurs), and such an additional field does not count towards the LIMIT. Consider the following expressions evaluated in list context (each returned list is provided in the associated comment): split(/-|,/, "1-10,20", 3) # ('1', '10', '20') split(/(-|,)/, "1-10,20", 3) # ('1', '-', '10', ',', '20') split(/-|(,)/, "1-10,20", 3) # ('1', undef, '10', ',', '20') split(/(-)|,/, "1-10,20", 3) # ('1', '-', '10', undef, '20') split(/(-)|(,)/, "1-10,20", 3) # ('1', '-', undef, '10', undef, ',', '20')
docker rename Rename a container Usage $ docker rename CONTAINER NEW_NAME Description The docker rename command renames a container. For example uses of this command, refer to the examples section below. Examples $ docker rename my_container my_new_container
exp, expf, expl Defined in header <math.h> float expf( float arg ); (1) (since C99) double exp( double arg ); (2) long double expl( long double arg ); (3) (since C99) Defined in header <tgmath.h> #define exp( arg ) (4) (since C99) 1-3) Computes the e (Euler's number, 2.7182818) raised to the given power arg. 4) Type-generic macro: If arg has type long double, expl is called. Otherwise, if arg has integer type or the type double, exp is called. Otherwise, expf is called. If arg is complex or imaginary, then the macro invokes the corresponding complex function (cexpf, cexp, cexpl). Parameters arg - floating point value Return value If no errors occur, the base-e exponential of arg (earg) is returned. If a range error due to overflow occurs, +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL is returned. If a range error occurs due to underflow, the correct result (after rounding) is returned. Error handling Errors are reported as specified in math_errhandling. If the implementation supports IEEE floating-point arithmetic (IEC 60559), If the argument is ±0, 1 is returned If the argument is -∞, +0 is returned If the argument is +∞, +∞ is returned If the argument is NaN, NaN is returned Notes For IEEE-compatible type double, overflow is guaranteed if 709.8 < arg, and underflow is guaranteed if arg < -708.4. Example #include <stdio.h> #include <math.h> #include <float.h> #include <errno.h> #include <fenv.h> // #pragma STDC FENV_ACCESS ON int main(void) { printf("exp(1) = %f\n", exp(1)); printf("FV of $100, continuously compounded at 3%% for 1 year = %f\n", 100*exp(0.03)); // special values printf("exp(-0) = %f\n", exp(-0.0)); printf("exp(-Inf) = %f\n", exp(-INFINITY)); //error handling errno = 0; feclearexcept(FE_ALL_EXCEPT); printf("exp(710) = %f\n", exp(710)); if(errno == ERANGE) perror(" errno == ERANGE"); if(fetestexcept(FE_OVERFLOW)) puts(" FE_OVERFLOW raised"); } Possible output: exp(1) = 2.718282 FV of $100, continuously compounded at 3% for 1 year = 103.045453 exp(-0) = 1.000000 exp(-Inf) = 0.000000 exp(710) = inf errno == ERANGE: Numerical result out of range FE_OVERFLOW raised References C17 standard (ISO/IEC 9899:2018): +1-425-655-5201 The exp functions (p: 175) 7.25 Type-generic math <tgmath.h> (p: 272-273) F.10.3.1 The exp functions (p: 379) C11 standard (ISO/IEC 9899:2011): +1-425-655-5201 The exp functions (p: 242) 7.25 Type-generic math <tgmath.h> (p: 373-375) F.10.3.1 The exp functions (p: 520) C99 standard (ISO/IEC 9899:1999): +1-425-655-5201 The exp functions (p: 223) 7.22 Type-generic math <tgmath.h> (p: 335-337) F.9.3.1 The exp functions (p: 458) C89/C90 standard (ISO/IEC 9899:1990): +1-425-655-5201 The exp function See also exp2exp2fexp2l (C99)(C99)(C99) computes 2 raised to the given power (\({\small 2^x}\)2x) (function) expm1expm1fexpm1l (C99)(C99)(C99) computes e raised to the given power, minus one (\({\small e^x-1}\)ex-1) (function) loglogflogl (C99)(C99) computes natural (base-e) logarithm (\({\small \ln{x} }\)ln(x)) (function) cexpcexpfcexpl (C99)(C99)(C99) computes the complex base-e exponential (function) C++ documentation for exp
ReflectionReferen8b7c:f320:99b9:690f:4595:cd17:293a:c069fromArrayElement (PHP 7 >= 7.4.0, PHP 8) ReflectionReferen8b7c:f320:99b9:690f:4595:cd17:293a:c069fromArrayElement — Create a ReflectionReference from an array element Description public static ReflectionReferen8b7c:f320:99b9:690f:4595:cd17:293a:c069fromArrayElement(array $array, int|string $key): ?ReflectionReference Creates a ReflectionReference from an array element. Parameters array The array which contains the potential reference. key The key; either an int or a string. Return Values Returns a ReflectionReference instance if $array[$key] is a reference, or null otherwise. Errors/Exceptions If array is not an array, or key is not an int or string, a TypeError is thrown. If $array[$key] does not exist, a ReflectionException is thrown.
webRequest.StreamFilter A StreamFilter is an object you use to monitor and modify HTTP responses. To create a StreamFilter, call webRequest.filterResponseData(), passing the ID of the web request you want to filter. You can think of the stream filter as sitting between the networking stack and the browser's rendering engine. The filter is passed HTTP response data as it's received from the network. It can examine and modify the data before passing it along to the rendering engine, where it is parsed and rendered. The filter has full control over the response body, and the default behavior without any listeners or write calls is to have a stream without content that never closes. The filter generates four different events: onstart when the filter is about to start receiving response data. ondata when some response data has been received by the filter and is available to be examined or modified. onstop when the filter has finished receiving response data. onerror if an error has occurred in initializing and operating the filter. You can listen to each event by assigning a listener function to its attribute: filter.onstart = (event) => { console.log("started"); } Note that the request is blocked during the execution of any event listeners. The filter provides a write() function. At any time from the onstart event onwards you can use this function to write data to the output stream. If you assign listeners to any of the filter's events, all the response data passed to the rendering engine is supplied through calls you make to write(). So, if you add a listener and don't call write() the rendered page is blank. Once you have finished interacting with the response, call either of the following: disconnect(): This disconnects the filter from the request, so the rest of the response is processed normally. close(): This closes the request, so no additional response data will be processed. The filter also provides functions to suspend() and resume() the request. Methods webRequest.StreamFilter.close() Closes the request. webRequest.StreamFilter.disconnect() Disconnects the filter from the request. webRequest.StreamFilter.resume() Resumes processing of the request. webRequest.StreamFilter.suspend() Suspends processing of the request. webRequest.StreamFilter.write() Writes some data to the output stream. Properties webRequest.StreamFilter.ondata Event handler which is called when incoming data is available. webRequest.StreamFilter.onerror Event handler which is called when an error has occurred. webRequest.StreamFilter.onstart Event handler which is called when the stream is about to start receiving data. webRequest.StreamFilter.onstop Event handler which is called when the stream has no more data to deliver and has closed. webRequest.StreamFilter.error When webRequest.StreamFilter.onerror is called, this will describe the error. webRequest.StreamFilter.status Describes the current status of the stream. 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 StreamFilter No No 57 ? No No ? ? 57 ? No ? close No No 57 ? No No ? ? 57 ? No ? disconnect No No 57 ? No No ? ? 57 ? No ? error No No 57 ? No No ? ? 57 ? No ? ondata No No 57 ? No No ? ? 57 ? No ? onerror No No 57 ? No No ? ? 57 ? No ? onstart No No 57 ? No No ? ? 57 ? No ? onstop No No 57 ? No No ? ? 57 ? No ? resume No No 57 ? No No ? ? 57 ? No ? status No No 57 ? No No ? ? 57 ? No ? suspend No No 57 ? No No ? ? 57 ? No ? write No No 57 ? No No ? ? 57 ? No ? Examples This code listens for onstart, ondata, and onstop. It logs those events, and the response data as an ArrayBuffer itself: function listener(details) { let filter = browser.webRequest.filterResponseData(details.requestId); filter.onstart = (event) => { console.log("started"); } filter.ondata = (event) => { console.log(event.data); filter.write(event.data); } filter.onstop = (event) => { console.log("finished"); filter.disconnect(); } //return {}; // not needed } browser.webRequest.onBeforeRequest.addListener( listener, {urls: ["https://example.org/"], types: ["main_frame"]}, ["blocking"] );
statsmodels.duration.hazard_regression.PHRegResults.schoenfeld_residuals PHRegResults.schoenfeld_residuals() [source] A matrix containing the Schoenfeld residuals. Notes Schoenfeld residuals for censored observations are set to zero. © 2009–2012 Statsmodels Developers© 2006–2008 Scipy Developers
Installing PostGIS PostGIS adds geographic object support to PostgreSQL, turning it into a spatial database. GEOS, PROJ.4 and GDAL should be installed prior to building PostGIS. You might also need additional libraries, see PostGIS requirements. Note The psycopg2 module is required for use as the database adapter when using GeoDjango with PostGIS. On Debian/Ubuntu, you are advised to install the following packages: postgresql-x.x, postgresql-x.x-postgis, postgresql-server-dev-x.x, python-psycopg2 (x.x matching the PostgreSQL version you want to install). Please also consult platform-specific instructions if you are on Mac OS X or Windows. Building from source First download the source archive, and extract: $ wget http://download.osgeo.org/postgis/source/postgis-2.1.5.tar.gz $ tar xzf postgis-2.1.5.tar.gz $ cd postgis-2.1.5 Next, configure, make and install PostGIS: $ ./configure Finally, make and install: $ make $ sudo make install $ cd .. Note GeoDjango does not automatically create a spatial database. Please consult the section on Creating a spatial database with PostGIS 2.0 and PostgreSQL 9.1+ or Creating a spatial database template for earlier versions for more information. Post-installation Creating a spatial database with PostGIS 2.0 and PostgreSQL 9.1+ PostGIS 2 includes an extension for Postgres 9.1+ that can be used to enable spatial functionality: $ createdb <db name> $ psql <db name> > CREATE EXTENSION postgis; GeoDjango does not currently leverage any PostGIS topology functionality. If you plan to use those features at some point, you can also install the postgis_topology extension by issuing CREATE EXTENSION postgis_topology;. The CREATE EXTENSION postgis command is now automatically run during the migrate process. You can still create it manually if you wish. Creating a spatial database template for earlier versions If you have an earlier version of PostGIS or PostgreSQL, the CREATE EXTENSION isn’t available and you need to create the spatial database using the following instructions. Creating a spatial database with PostGIS is different than normal because additional SQL must be loaded to enable spatial functionality. Because of the steps in this process, it’s better to create a database template that can be reused later. First, you need to be able to execute the commands as a privileged database user. For example, you can use the following to become the postgres user: $ sudo su - postgres Note The location and name of the PostGIS SQL files (e.g., from POSTGIS_SQL_PATH below) depends on the version of PostGIS. Version 1.5 uses <sharedir>/contrib/postgis-1.5/postgis.sql. To complicate matters, Debian/Ubuntu distributions have their own separate directory naming system that might change with time. In this case, use the create_template_postgis-debian.sh script. The example below assumes PostGIS 1.5, thus you may need to modify POSTGIS_SQL_PATH and the name of the SQL file for the specific version of PostGIS you are using. Once you’re a database super user, then you may execute the following commands to create a PostGIS spatial database template: $ POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib/postgis-2.0 # Creating the template spatial database. $ createdb -E UTF8 template_postgis $ createlang -d template_postgis plpgsql # Adding PLPGSQL language support. # Allows non-superusers the ability to create from this template $ psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';" # Loading the PostGIS SQL routines $ psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql $ psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql # Enabling users to alter spatial tables. $ psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" $ psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;" $ psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;" These commands may be placed in a shell script for later use; for convenience the following scripts are available: PostGIS version Bash shell script 1.5 create_template_postgis-1.5.sh Debian/Ubuntu create_template_postgis-debian.sh Afterwards, you may create a spatial database by simply specifying template_postgis as the template to use (via the -T option): $ createdb -T template_postgis <db name> Note While the createdb command does not require database super-user privileges, it must be executed by a database user that has permissions to create databases. You can create such a user with the following command: $ createuser --createdb <user> PostgreSQL’s createdb fails When the PostgreSQL cluster uses a non-UTF8 encoding, the create_template_postgis-*.sh script will fail when executing createdb: createdb: database creation failed: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) The current workaround is to re-create the cluster using UTF8 (back up any databases before dropping the cluster). Managing the database To administer the database, you can either use the pgAdmin III program (Start ‣ PostgreSQL 9.x ‣ pgAdmin III) or the SQL Shell (Start ‣ PostgreSQL 9.x ‣ SQL Shell). For example, to create a geodjango spatial database and user, the following may be executed from the SQL Shell as the postgres user: postgres# CREATE USER geodjango PASSWORD 'my_passwd'; postgres# CREATE DATABASE geodjango OWNER geodjango TEMPLATE template_postgis ENCODING 'utf8';
IO.StreamError exception Summary Functions exception(msg) Callback implementation for Exception.exception/1 message(exception) Callback implementation for Exception.message/1 Functions exception(msg) exception(String.t()) 8b7c:f320:99b9:690f:4595:cd17:293a:c069 Exception.t() exception(Keyword.t()) 8b7c:f320:99b9:690f:4595:cd17:293a:c069 Exception.t() Callback implementation for Exception.exception/1. message(exception) message(Exception.t()) 8b7c:f320:99b9:690f:4595:cd17:293a:c069 String.t() Callback implementation for Exception.message/1.
dbm — Simple “database” interface Note The dbm module has been renamed to dbm.ndbm in Python 3. The 2to3 tool will automatically adapt imports when converting your sources to Python 3. The dbm module provides an interface to the Unix “(n)dbm” library. Dbm objects behave like mappings (dictionaries), except that keys and values are always strings. Printing a dbm object doesn’t print the keys and values, and the items() and values() methods are not supported. This module can be used with the “classic” ndbm interface, the BSD DB compatibility interface, or the GNU GDBM compatibility interface. On Unix, the configure script will attempt to locate the appropriate header file to simplify building this module. The module defines the following: exception dbm.error Raised on dbm-specific errors, such as I/O errors. KeyError is raised for general mapping errors like specifying an incorrect key. dbm.library Name of the ndbm implementation library used. dbm.open(filename[, flag[, mode]]) Open a dbm database and return a dbm object. The filename argument is the name of the database file (without the .dir or .pag extensions; note that the BSD DB implementation of the interface will append the extension .db and only create one file). The optional flag argument must be one of these values: Value Meaning 'r' Open existing database for reading only (default) 'w' Open existing database for reading and writing 'c' Open database for reading and writing, creating it if it doesn’t exist 'n' Always create a new, empty database, open for reading and writing The optional mode argument is the Unix mode of the file, used only when the database has to be created. It defaults to octal 0666 (and will be modified by the prevailing umask). In addition to the dictionary-like methods, dbm objects provide the following method: dbm.close() Close the dbm database. See also Module anydbm Generic interface to dbm-style databases. Module gdbm Similar interface to the GNU GDBM library. Module whichdb Utility module used to determine the type of an existing database.
WebAssembly.Table.prototype.grow() The grow() prototype method of the WebAssembly.Table object increases the size of the Table instance by a specified number of elements. Syntax grow(number) Parameters number The number of elements you want to grow the table by. Return value The previous length of the table.Exceptions If the grow() operation fails for whatever reason, a RangeError is thrown. Examples Using grow The following example creates a new WebAssembly Table instance with an initial size of 2 and a maximum size of 10: const table = new WebAssembly.Table({ element: "anyfunc", initial: 2, maximum: 10 }); Grow the table by 1 using WebAssembly.grow(): console.log(table.length); // 2 table.grow(1); console.log(table.length); // 3 Specifications Specification WebAssembly JavaScript Interface: Exception Handling # dom-table-grow Browser compatibility Desktop Mobile Server Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet Deno Node.js grow 57 16 52 No 44 11 57 57 52 43 11 7.0 1.0 8.0.0 See also WebAssembly overview page WebAssembly concepts Using the WebAssembly JavaScript API 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: May 24, 2022, by MDN contributors
Module Event module Event: sig .. end First-class synchronous communication. This module implements synchronous inter-thread communications over channels. As in John Reppy's Concurrent ML system, the communication events are first-class values: they can be built and combined independently before being offered for communication. type 'a channel The type of communication channels carrying values of type 'a. val new_channel : unit -> 'a channel Return a new channel. type +'a event The type of communication events returning a result of type 'a. val send : 'a channel -> 'a -> unit event send ch v returns the event consisting in sending the value v over the channel ch. The result value of this event is (). val receive : 'a channel -> 'a event receive ch returns the event consisting in receiving a value from the channel ch. The result value of this event is the value received. val always : 'a -> 'a event always v returns an event that is always ready for synchronization. The result value of this event is v. val choose : 'a event list -> 'a event choose evl returns the event that is the alternative of all the events in the list evl. val wrap : 'a event -> ('a -> 'b) -> 'b event wrap ev fn returns the event that performs the same communications as ev, then applies the post-processing function fn on the return value. val wrap_abort : 'a event -> (unit -> unit) -> 'a event wrap_abort ev fn returns the event that performs the same communications as ev, but if it is not selected the function fn is called after the synchronization. val guard : (unit -> 'a event) -> 'a event guard fn returns the event that, when synchronized, computes fn() and behaves as the resulting event. This enables computing events with side-effects at the time of the synchronization operation. val sync : 'a event -> 'a 'Synchronize' on an event: offer all the communication possibilities specified in the event to the outside world, and block until one of the communications succeed. The result value of that communication is returned. val select : 'a event list -> 'a 'Synchronize' on an alternative of events. select evl is shorthand for sync(choose evl). val poll : 'a event -> 'a option Non-blocking version of Event.sync: offer all the communication possibilities specified in the event to the outside world, and if one can take place immediately, perform it and return Some r where r is the result value of that communication. Otherwise, return None without blocking.
dart:html composedPath method List<EventTarget> composedPath() Implementation List<EventTarget> composedPath() native;
WidgetDataBase Class (qdesigner_internal8b7c:f320:99b9:690f:4595:cd17:293a:c069WidgetDataBase) Inherits: QObject List of all members, including inherited members
StorageArea.clear() Removes all items from the storage area. This is an asynchronous function that returns a Promise. Syntax let clearing = browser.storage.<storageType>.clear() <storageType> will be one of the writable storage types — storage.sync or storage.local. Parameters None.Return value A Promise that will be fulfilled with no arguments if the operation succeeded. If the operation failed, the promise will be rejected with an error message.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 clear Yes 14 45 ? 33 14 ? ? 48 ? 15 ? Examples function onCleared() { console.log("OK"); } function onError(e) { console.log(e); } let clearStorage = browser.storage.local.clear(); clearStorage.then(onCleared, onError); Note: This API is based on Chromium's chrome.storage API. This documentation is derived from storage.json in the Chromium code. Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.
posix_getpwnam (PHP 4, PHP 5, PHP 7, PHP 8) posix_getpwnam — Return info about a user by username Description posix_getpwnam(string $username): array|false Returns an array of information about the given user. Parameters username An alphanumeric username. Return Values On success an array with the following elements is returned, else false is returned: The user information array Element Description name The name element contains the username of the user. This is a short, usually less than 16 character "handle" of the user, not the real, full name. This should be the same as the username parameter used when calling the function, and hence redundant. passwd The passwd element contains the user's password in an encrypted format. Often, for example on a system employing "shadow" passwords, an asterisk is returned instead. uid User ID of the user in numeric form. gid The group ID of the user. Use the function posix_getgrgid() to resolve the group name and a list of its members. gecos GECOS is an obsolete term that refers to the finger information field on a Honeywell batch processing system. The field, however, lives on, and its contents have been formalized by POSIX. The field contains a comma separated list containing the user's full name, office phone, office number, and home phone number. On most systems, only the user's full name is available. dir This element contains the absolute path to the home directory of the user. shell The shell element contains the absolute path to the executable of the user's default shell. Examples Example #1 Example use of posix_getpwnam() <?php $userinfo = posix_getpwnam("tom"); print_r($userinfo); ?> The above example will output something similar to: Array ( [name] => tom [passwd] => x [uid] => 10000 [gid] => 42 [gecos] => "tom,,," [dir] => "/home/tom" [shell] => "/bin/bash" ) See Also posix_getpwuid() - Return info about a user by user id POSIX man page GETPWNAM(3)
PropagationFlags package cs.system.security.accesscontrol Available on cs Values None NoPropagateInherit InheritOnly
Using Git with MariaDB Tricks and tips on how to use Git, the source control system MariaDB uses. Title Description MariaDB Source Code How to get the source code for MariaDB from GitHub. Using Git Working with the git repository for the source code of MariaDB on GitHub. Configuring Git to Send Commit Notices Configuring git to send emails when committing changes. 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.
netbox.netbox.netbox_vrf – Create, update or delete vrfs within Netbox Note This plugin is part of the netbox.netbox collection (version 3.3.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 netbox.netbox. To use it in a playbook, specify: netbox.netbox.netbox_vrf. New in version 0.1.0: of netbox.netbox Synopsis Requirements Parameters Notes Examples Return Values Synopsis Creates, updates or removes vrfs from Netbox Requirements The below requirements are needed on the host that executes this module. pynetbox Parameters Parameter Choices/Defaults Comments cert raw Certificate path data dictionary / required Defines the vrf configuration custom_fields dictionary must exist in Netbox description string The description of the vrf enforce_unique boolean Choices: no yes Prevent duplicate prefixes/IP addresses within this VRF export_targets list / elements=string added in 2.0.0 of netbox.netbox Export targets tied to VRF import_targets list / elements=string added in 2.0.0 of netbox.netbox Import targets tied to VRF name string / required The name of the vrf rd string The RD of the VRF. Must be quoted to pass as a string. tags list / elements=raw Any tags that the vrf may need to be associated with tenant raw The tenant that the vrf will be assigned to netbox_token string / required The token created within Netbox to authorize API access netbox_url string / required URL of the Netbox instance resolvable by Ansible control host query_params list / elements=string This can be used to override the specified values in ALLOWED_QUERY_PARAMS that is defined in plugins/module_utils/netbox_utils.py and provides control to users on what may make an object unique in their environment. state string Choices: absent present ← Use present or absent for adding or removing. validate_certs raw Default:"yes" If no, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. Notes Note Tags should be defined as a YAML list This should be ran with connection local and hosts localhost Examples - name: "Test Netbox modules" connection: local hosts: localhost gather_facts: False tasks: - name: Create vrf within Netbox with only required information netbox_vrf: netbox_url: http://netbox.local netbox_token: thisIsMyToken data: name: Test VRF state: present - name: Delete vrf within netbox netbox_vrf: netbox_url: http://netbox.local netbox_token: thisIsMyToken data: name: Test VRF state: absent - name: Create vrf with all information netbox_vrf: netbox_url: http://netbox.local netbox_token: thisIsMyToken data: name: Test VRF rd: "65000:1" tenant: Test Tenant enforce_unique: true import_targets: - "65000:65001" export_targets: - "65000:65001" description: VRF description tags: - Schnozzberry state: present Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description msg string always Message indicating failure or info about what has been achieved vrf dictionary success (when state=present) Serialized object as created or already existent within Netbox Authors Mikhail Yohman (@FragmentedPacket) © 2012–2018 Michael DeHaan
public static function Rang8b7c:f320:99b9:690f:4595:cd17:293a:c069preRenderRange public static Rang8b7c:f320:99b9:690f:4595:cd17:293a:c069preRenderRange($element) Prepares a #type 'range' render element for input.html.twig. Parameters array $element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #min, #max, #attributes, #step. Return value array The $element with prepared variables ready for input.html.twig. File core/lib/Drupal/Core/Render/Element/Range.php, line 59 Class Range Provides a slider for input of a number within a specific range. Namespace Drupal\Core\Render\Element Code public static function preRenderRange($element) { $element['#attributes']['type'] = 'range'; Element8b7c:f320:99b9:690f:4595:cd17:293a:c069setAttributes($element, array('id', 'name', 'value', 'step', 'min', 'max')); stati8b7c:f320:99b9:690f:4595:cd17:293a:c069setAttributes($element, array('form-range')); return $element; }
class ContainerNotInitializedException Exception thrown when a method is called that requires a container, but the container is not initialized yet. Hierarchy class \Drupal\Core\DependencyInjection\ContainerNotInitializedException extends \RuntimeException See also \Drupal File core/lib/Drupal/Core/DependencyInjection/ContainerNotInitializedException.php, line 11 Namespace Drupal\Core\DependencyInjection Members
tf.ensure_shape View source on GitHub Updates the shape of a tensor and checks at runtime that the shape holds. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.ensure_shape tf.ensure_shape( x, shape, name=None ) With eager execution this is a shape assertion, that returns the input: x = tf.constant([1,2,3]) print(x.shape) (3,) x = tf.ensure_shape(x, [3]) x = tf.ensure_shape(x, [5]) Traceback (most recent call last): tf.errors.InvalidArgumentError: Shape of tensor dummy_input [3] is not compatible with expected shape [5]. [Op:EnsureShape] Inside a tf.function or v1.Graph context it checks both the buildtime and runtime shapes. This is stricter than tf.Tensor.set_shape which only checks the buildtime shape. Note: This differs from tf.Tensor.set_shape in that it sets the static shape of the resulting tensor and enforces it at runtime, raising an error if the tensor's runtime shape is incompatible with the specified shape. tf.Tensor.set_shape sets the static shape of the tensor without enforcing it at runtime, which may result in inconsistencies between the statically-known shape of tensors and the runtime value of tensors. For example, of loading images of a known size: @tf.function def decode_image(png): image = tf.image.decode_png(png, channels=3) # the `print` executes during tracing. print("Initial shape: ", image.shape) image = tf.ensure_shape(image,[28, 28, 3]) print("Final shape: ", image.shape) return image When tracing a function, no ops are being executed, shapes may be unknown. See the Concrete Functions Guide for details. concrete_decode = decode_image.get_concrete_function( tf.TensorSpec([], dtype=tf.string)) Initial shape: (None, None, 3) Final shape: (28, 28, 3) image = tf.random.uniform(maxval=255, shape=[28, 28, 3], dtype=tf.int32) image = tf.cast(image,tf.uint8) png = tf.image.encode_png(image) image2 = concrete_decode(png) print(image2.shape) (28, 28, 3) image = tf.concat([image,image], axis=0) print(image.shape) (56, 28, 3) png = tf.image.encode_png(image) image2 = concrete_decode(png) Traceback (most recent call last): tf.errors.InvalidArgumentError: Shape of tensor DecodePng [56,28,3] is not compatible with expected shape [28,28,3]. Caution: if you don't use the result of tf.ensure_shape the check may not run. @tf.function def bad_decode_image(png): image = tf.image.decode_png(png, channels=3) # the `print` executes during tracing. print("Initial shape: ", image.shape) # BAD: forgot to use the returned tensor. tf.ensure_shape(image,[28, 28, 3]) print("Final shape: ", image.shape) return image image = bad_decode_image(png) Initial shape: (None, None, 3) Final shape: (None, None, 3) print(image.shape) (56, 28, 3) Args x A Tensor. shape A TensorShape representing the shape of this tensor, a TensorShapeProto, a list, a tuple, or None. name A name for this operation (optional). Defaults to "EnsureShape". Returns A Tensor. Has the same type and contents as x. At runtime, raises a tf.errors.InvalidArgumentError if shape is incompatible with the shape of x.
HTMLInputElement.stepUp() The HTMLInputElement.stepUp() method increments the value of a numeric type of <input> element by the value of the step attribute, or the default step value if the step attribute is not explicitly set. The method, when invoked, increments the value by (step * n), where n defaults to 1 if not specified, and step defaults to the default value for step if not specified. Input type Default step value Example step declaration date 1 (day) 7 day (one week) increments:<input type="date" min="2019-12-25" step="7"> month 1 (month) 12 month (one year) increments:<input type="month" min="2019-12" step="12"> week 1 (week) Two week increments:<input type="week" min="2019-W23" step="2"> time 60 (seconds) 900 second (15 minute) increments:<input type="time" min="09:00" step="900"> datetime-local 1 (day) Same day of the week:<input type="datetime-local" min="019-12-25T19:30" step="7"> number 1 0.1 increments<input type="number" min="0" step="0.1" max="10"> range 1 Increments by 2:<input type="range" min="0" step="2" max="10"> The method, when invoked, changes the form control's value by the value given in the step attribute, multiplied by the parameter, within the constraints set on the form control. The default value for the parameter, if no value is passed, is 1. The method will not cause the value to exceed the set max value, or defy the constraints set by the step attribute. If the value before invoking the stepUp() method is invalid—for example, if it doesn't match the constraints set by the step attribute—invoking the stepUp() method will return a value that does match the form controls constraints. If the form control is non time, date, or numeric in nature, and therefore does not support the step attribute (see the list of supported input types in the table above), or if the step value is set to any, an InvalidStateError exception is thrown. Syntax element.stepUp( [ stepIncrement ] ); Parameters stepIncrement The optional stepIncrement parameter is a numeric value. If no parameter is passed, stepIncrement defaults to 1. Example Click the button in this example to increment the number input type: HTML <p> <label>Enter a number between 0 and 400 that is divisible by 5: <input type="number" step="5" id="theNumber" min="0" max="400"> </label> </p> <p> <label>Enter how many values of step you would like to increment by or leave it blank: <input type="number" step="1" id="incrementor" min="0" max="25"> </label> </p> <input type="button" value="Increment" id="theButton"> JavaScript /* make the button call the function */ let button = document.getElementById('theButton') button.addEventListener('click', function() { steponup() }) function steponup() { let input = document.getElementById('theNumber') let val = document.getElementById('incrementor').value if (val) { /* increment with a parameter */ input.stepUp(val) } else { /* or without a parameter. Try it with 0 */ input.stepUp() } } CSS input:invalid { border: red solid 3px; } Result Note if you don't pass a parameter to the stepUp method, it defaults to 1. Any other value is a multiplier of the step attribute value, which in this case is 5. If you pass 4 as the stepIncrement, the input will stepUp by 4 * 5, or 20. If the parameter is 0, the number will not be incremented. The stepUp will not allow the input to out of range, in this case stopping when it reaches 400, and rounding down any floats that are passed as a parameter. Try setting the step increment to 1.2. What happens when you invoke the method? Try setting the value to 4, which is not valid. What happens when you invoke the method? Specifications Specification HTML Standard # dom-input-stepup-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 stepUp 5 12 16 Does not have a specific UI. There are still differences with the latest spec; see bug 835773. 10 ≤12.1 5 ≤37 18 16 Does not have a specific UI. There are still differences with the latest spec; see bug 835773. ≤12.1 4 1.0 See also <input> HTMLInputElement HTMLInputElement.stepDown step, min and max attributes 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
Character Properties A character property is a named attribute of a character that specifies how the character behaves and how it should be handled during text processing and display. Thus, character properties are an important part of specifying the character’s semantics. On the whole, Emacs follows the Unicode Standard in its implementation of character properties. In particular, Emacs supports the Unicode Character Property Model, and the Emacs character property database is derived from the Unicode Character Database (UCD). See the Character Properties chapter of the Unicode Standard, for a detailed description of Unicode character properties and their meaning. This section assumes you are already familiar with that chapter of the Unicode Standard, and want to apply that knowledge to Emacs Lisp programs. In Emacs, each property has a name, which is a symbol, and a set of possible values, whose types depend on the property; if a character does not have a certain property, the value is nil. As a general rule, the names of character properties in Emacs are produced from the corresponding Unicode properties by downcasing them and replacing each ‘_’ character with a dash ‘-’. For example, Canonical_Combining_Class becomes canonical-combining-class. However, sometimes we shorten the names to make their use easier. Some codepoints are left unassigned by the UCD—they don’t correspond to any character. The Unicode Standard defines default values of properties for such codepoints; they are mentioned below for each property. Here is the full list of value types for all the character properties that Emacs knows about: name Corresponds to the Name Unicode property. The value is a string consisting of upper-case Latin letters A to Z, digits, spaces, and hyphen ‘-’ characters. For unassigned codepoints, the value is nil. general-category Corresponds to the General_Category Unicode property. The value is a symbol whose name is a 2-letter abbreviation of the character’s classification. For unassigned codepoints, the value is Cn. canonical-combining-class Corresponds to the Canonical_Combining_Class Unicode property. The value is an integer. For unassigned codepoints, the value is zero. bidi-class Corresponds to the Unicode Bidi_Class property. The value is a symbol whose name is the Unicode directional type of the character. Emacs uses this property when it reorders bidirectional text for display (see Bidirectional Display). For unassigned codepoints, the value depends on the code blocks to which the codepoint belongs: most unassigned codepoints get the value of L (strong L), but some get values of AL (Arabic letter) or R (strong R). decomposition Corresponds to the Unicode properties Decomposition_Type and Decomposition_Value. The value is a list, whose first element may be a symbol representing a compatibility formatting tag, such as small21; the other elements are characters that give the compatibility decomposition sequence of this character. For characters that don’t have decomposition sequences, and for unassigned codepoints, the value is a list with a single member, the character itself. decimal-digit-value Corresponds to the Unicode Numeric_Value property for characters whose Numeric_Type is ‘Decimal’. The value is an integer, or nil if the character has no decimal digit value. For unassigned codepoints, the value is nil, which means NaN, or “not a number”. digit-value Corresponds to the Unicode Numeric_Value property for characters whose Numeric_Type is ‘Digit’. The value is an integer. Examples of such characters include compatibility subscript and superscript digits, for which the value is the corresponding number. For characters that don’t have any numeric value, and for unassigned codepoints, the value is nil, which means NaN. numeric-value Corresponds to the Unicode Numeric_Value property for characters whose Numeric_Type is ‘Numeric’. The value of this property is a number. Examples of characters that have this property include fractions, subscripts, superscripts, Roman numerals, currency numerators, and encircled numbers. For example, the value of this property for the character U+2155 VULGAR FRACTION ONE FIFTH is 0.2. For characters that don’t have any numeric value, and for unassigned codepoints, the value is nil, which means NaN. mirrored Corresponds to the Unicode Bidi_Mirrored property. The value of this property is a symbol, either Y or N. For unassigned codepoints, the value is N. mirroring Corresponds to the Unicode Bidi_Mirroring_Glyph property. The value of this property is a character whose glyph represents the mirror image of the character’s glyph, or nil if there’s no defined mirroring glyph. All the characters whose mirrored property is N have nil as their mirroring property; however, some characters whose mirrored property is Y also have nil for mirroring, because no appropriate characters exist with mirrored glyphs. Emacs uses this property to display mirror images of characters when appropriate (see Bidirectional Display). For unassigned codepoints, the value is nil. paired-bracket Corresponds to the Unicode Bidi_Paired_Bracket property. The value of this property is the codepoint of a character’s paired bracket, or nil if the character is not a bracket character. This establishes a mapping between characters that are treated as bracket pairs by the Unicode Bidirectional Algorithm; Emacs uses this property when it decides how to reorder for display parentheses, braces, and other similar characters (see Bidirectional Display). bracket-type Corresponds to the Unicode Bidi_Paired_Bracket_Type property. For characters whose paired-bracket property is non-nil, the value of this property is a symbol, either o (for opening bracket characters) or c (for closing bracket characters). For characters whose paired-bracket property is nil, the value is the symbol n (None). Like paired-bracket, this property is used for bidirectional display. old-name Corresponds to the Unicode Unicode_1_Name property. The value is a string. For unassigned codepoints, and characters that have no value for this property, the value is nil. iso-10646-comment Corresponds to the Unicode ISO_Comment property. The value is either a string or nil. For unassigned codepoints, the value is nil. uppercase Corresponds to the Unicode Simple_Uppercase_Mapping property. The value of this property is a single character. For unassigned codepoints, the value is nil, which means the character itself. lowercase Corresponds to the Unicode Simple_Lowercase_Mapping property. The value of this property is a single character. For unassigned codepoints, the value is nil, which means the character itself. titlecase Corresponds to the Unicode Simple_Titlecase_Mapping property. Title case is a special form of a character used when the first character of a word needs to be capitalized. The value of this property is a single character. For unassigned codepoints, the value is nil, which means the character itself. special-uppercase Corresponds to Unicode language- and context-independent special upper-casing rules. The value of this property is a string (which may be empty). For example mapping for U+00DF LATIN SMALL LETTER SHARP S is "SS". For characters with no special mapping, the value is nil which means uppercase property needs to be consulted instead. special-lowercase Corresponds to Unicode language- and context-independent special lower-casing rules. The value of this property is a string (which may be empty). For example mapping for U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE the value is "i\u0307" (i.e. 2-character string consisting of LATIN SMALL LETTER I followed by U+0307 COMBINING DOT ABOVE). For characters with no special mapping, the value is nil which means lowercase property needs to be consulted instead. special-titlecase Corresponds to Unicode unconditional special title-casing rules. The value of this property is a string (which may be empty). For example mapping for U+FB01 LATIN SMALL LIGATURE FI the value is "Fi". For characters with no special mapping, the value is nil which means titlecase property needs to be consulted instead. Function: get-char-code-property char propname This function returns the value of char’s propname property. (get-char-code-property ?\s 'general-category) ⇒ Zs (get-char-code-property ?1 'general-category) ⇒ Nd ;; U+2084 (get-char-code-property ?\N{SUBSCRIPT FOUR} 'digit-value) ⇒ 4 ;; U+2155 (get-char-code-property ?\N{VULGAR FRACTION ONE FIFTH} 'numeric-value) ⇒ 0.2 ;; U+2163 (get-char-code-property ?\N{ROMAN NUMERAL FOUR} 'numeric-value) ⇒ 4 (get-char-code-property ?\( 'paired-bracket) ⇒ 41 ; closing parenthesis (get-char-code-property ?\) 'bracket-type) ⇒ c Function: char-code-property-description prop value This function returns the description string of property prop’s value, or nil if value has no description. (char-code-property-description 'general-category 'Zs) ⇒ "Separator, Space" (char-code-property-description 'general-category 'Nd) ⇒ "Number, Decimal Digit" (char-code-property-description 'numeric-value '1/5) ⇒ nil Function: put-char-code-property char propname value This function stores value as the value of the property propname for the character char. Variable: unicode-category-table The value of this variable is a char-table (see Char-Tables) that specifies, for each character, its Unicode General_Category property as a symbol. Variable: char-script-table The value of this variable is a char-table that specifies, for each character, a symbol whose name is the script to which the character belongs, according to the Unicode Standard classification of the Unicode code space into script-specific blocks. This char-table has a single extra slot whose value is the list of all script symbols. Note that Emacs’ classification of characters into scripts is not a 1-for-1 reflection of the Unicode standard, e.g. there is no ‘symbol’ script in Unicode. Variable: char-width-table The value of this variable is a char-table that specifies the width of each character in columns that it will occupy on the screen. Variable: printable-chars The value of this variable is a char-table that specifies, for each character, whether it is printable or not. That is, if evaluating (aref printable-chars char) results in t, the character is printable, and if it results in nil, it is not. Copyright
Translator class Translator extends Translator implements WarmableInterface Translator. Properties protected MessageCatalogueInterface[] $catalogues from Translator protected $container protected $loaderIds protected $options Methods __construct(ContainerInterface $container, MessageFormatterInterface $formatter, string $defaultLocale, array $loaderIds = array(), array $options = array()) Constructor. setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) from Translator addLoader(string $format, LoaderInterface $loader) Adds a Loader. from Translator addResource(string $format, mixed $resource, string $locale, string $domain = null) Adds a Resource. setLocale(string $locale) Sets the current locale. from Translator string getLocale() Returns the current locale. from Translator setFallbackLocales(array $locales) Sets the fallback locales. from Translator array getFallbackLocales() Gets the fallback locales. from Translator string trans(string $id, array $parameters = array(), string|null $domain = null, string|null $locale = null) Translates the given message. from Translator string transChoice(string $id, int $number, array $parameters = array(), string|null $domain = null, string|null $locale = null) Translates the given choice message by choosing a translation according to a number. from Translator MessageCatalogueInterface getCatalogue(string|null $locale = null) Gets the catalogue by locale. from Translator array getLoaders() Gets the loaders. from Translator loadCatalogue(string $locale) from Translator initializeCatalogue(string $locale) computeFallbackLocales($locale) from Translator assertValidLocale(string $locale) Asserts that the locale is valid, throws an Exception if not. from Translator warmUp(string $cacheDir) Warms up the cache. initialize() Details __construct(ContainerInterface $container, MessageFormatterInterface $formatter, string $defaultLocale, array $loaderIds = array(), array $options = array()) Constructor. Available options: cache_dir: The cache directory (or null to disable caching) debug: Whether to enable debugging or not (false by default) resource_files: List of translation resources available grouped by locale. Parameters ContainerInterface $container A ContainerInterface instance MessageFormatterInterface $formatter string $defaultLocale array $loaderIds An array of loader Ids array $options An array of options Exceptions InvalidArgumentException setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) Parameters ConfigCacheFactoryInterface $configCacheFactory addLoader(string $format, LoaderInterface $loader) Adds a Loader. Parameters string $format The name of the loader (see addResource()) LoaderInterface $loader A LoaderInterface instance addResource(string $format, mixed $resource, string $locale, string $domain = null) Adds a Resource. Parameters string $format The name of the loader (see addLoader()) mixed $resource The resource name string $locale The locale string $domain The domain Exceptions InvalidArgumentException If the locale contains invalid characters setLocale(string $locale) Sets the current locale. Parameters string $locale The locale Exceptions InvalidArgumentException If the locale contains invalid characters string getLocale() Returns the current locale. Return Value string The locale setFallbackLocales(array $locales) Sets the fallback locales. Parameters array $locales The fallback locales Exceptions InvalidArgumentException If a locale contains invalid characters array getFallbackLocales() Gets the fallback locales. Return Value array $locales The fallback locales string trans(string $id, array $parameters = array(), string|null $domain = null, string|null $locale = null) Translates the given message. Parameters string $id The message id (may also be an object that can be cast to string) array $parameters An array of parameters for the message string|null $domain The domain for the message or null to use the default string|null $locale The locale or null to use the default Return Value string The translated string Exceptions InvalidArgumentException If the locale contains invalid characters string transChoice(string $id, int $number, array $parameters = array(), string|null $domain = null, string|null $locale = null) Translates the given choice message by choosing a translation according to a number. Parameters string $id The message id (may also be an object that can be cast to string) int $number The number to use to find the indice of the message array $parameters An array of parameters for the message string|null $domain The domain for the message or null to use the default string|null $locale The locale or null to use the default Return Value string The translated string Exceptions InvalidArgumentException If the locale contains invalid characters MessageCatalogueInterface getCatalogue(string|null $locale = null) Gets the catalogue by locale. Parameters string|null $locale The locale or null to use the default Return Value MessageCatalogueInterface Exceptions InvalidArgumentException If the locale contains invalid characters protected array getLoaders() Gets the loaders. Return Value array LoaderInterface[] protected loadCatalogue(string $locale) Parameters string $locale protected initializeCatalogue(string $locale) Parameters string $locale protected computeFallbackLocales($locale) Parameters $locale protected assertValidLocale(string $locale) Asserts that the locale is valid, throws an Exception if not. Parameters string $locale Locale to tests Exceptions InvalidArgumentException If the locale contains invalid characters warmUp(string $cacheDir) Warms up the cache. Parameters string $cacheDir The cache directory protected initialize()
numpy.indices numpy.indices(dimensions, dtype=<class 'int'>, sparse=False) [source] Return an array representing the indices of a grid. Compute an array where the subarrays contain index values 0, 1, … varying only along the corresponding axis. Parameters: dimensions : sequence of ints The shape of the grid. dtype : dtype, optional Data type of the result. sparse : boolean, optional Return a sparse representation of the grid instead of a dense representation. Default is False. New in version 1.17. Returns: grid : one ndarray or tuple of ndarrays If sparse is False: Returns one array of grid indices, grid.shape = (len(dimensions),) + tuple(dimensions). If sparse is True: Returns a tuple of arrays, with grid[i].shape = (1, ..., 1, dimensions[i], 1, ..., 1) with dimensions[i] in the ith place See also mgrid, ogrid, meshgrid Notes The output shape in the dense case is obtained by prepending the number of dimensions in front of the tuple of dimensions, i.e. if dimensions is a tuple (r0, ..., rN-1) of length N, the output shape is (N, r0, ..., rN-1). The subarrays grid[k] contains the N-D array of indices along the k-th axis. Explicitly: grid[k, i0, i1, ..., iN-1] = ik Examples >>> grid = np.indices((2, 3)) >>> grid.shape (2, 2, 3) >>> grid[0] # row indices array([[0, 0, 0], [1, 1, 1]]) >>> grid[1] # column indices array([[0, 1, 2], [0, 1, 2]]) The indices can be used as an index into an array. >>> x = np.arange(20).reshape(5, 4) >>> row, col = np.indices((2, 3)) >>> x[row, col] array([[0, 1, 2], [4, 5, 6]]) Note that it would be more straightforward in the above example to extract the required elements directly with x[:2, :3]. If sparse is set to true, the grid will be returned in a sparse representation. >>> i, j = np.indices((2, 3), sparse=True) >>> i.shape (2, 1) >>> j.shape (1, 3) >>> i # row indices array([[0], [1]]) >>> j # column indices array([[0, 1, 2]])
tf.keras.backend.manual_variable_initialization View source on GitHub Sets the manual variable initialization flag. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.backend.manual_variable_initialization tf.keras.backend.manual_variable_initialization( value ) This boolean flag determines whether variables should be initialized as they are instantiated (default), or if the user should handle the initialization (e.g. via tf.compat.v1.initialize_all_variables()). Arguments value Python boolean.
numpy.poly1d.coeffs attribute poly1d.coeffs A copy of the polynomial coefficients
MandrillTransport class MandrillTransport implements Swift_Transport (View source) Properties protected string $key The Mandrill API key. Methods void __construct(string $key) Create a new Mandrill transport instance. isStarted() {@inheritdoc} start() {@inheritdoc} stop() {@inheritdoc} send(Swift_Mime_Message $message, $failedRecipients = null) {@inheritdoc} registerPlugin(Swift_Events_EventListener $plugin) {@inheritdoc} Client getHttpClient() Get a new HTTP client instance. string getKey() Get the API key being used by the transport. void setKey(string $key) Set the API key being used by the transport. Details void __construct(string $key) Create a new Mandrill transport instance. Parameters string $key Return Value void isStarted() {@inheritdoc} start() {@inheritdoc} stop() {@inheritdoc} send(Swift_Mime_Message $message, $failedRecipients = null) {@inheritdoc} Parameters Swift_Mime_Message $message $failedRecipients registerPlugin(Swift_Events_EventListener $plugin) {@inheritdoc} Parameters Swift_Events_EventListener $plugin protected Client getHttpClient() Get a new HTTP client instance. Return Value Client string getKey() Get the API key being used by the transport. Return Value string void setKey(string $key) Set the API key being used by the transport. Parameters string $key Return Value void
ifelse Conditional Element Selection Description ifelse returns a value with the same shape as test which is filled with elements selected from either yes or no depending on whether the element of test is TRUE or FALSE. Usage ifelse(test, yes, no) Arguments test an object which can be coerced to logical mode. yes return values for true elements of test. no return values for false elements of test. Details If yes or no are too short, their elements are recycled. yes will be evaluated if and only if any element of test is true, and analogously for no. Missing values in test give missing values in the result. Value A vector of the same length and attributes (including dimensions and "class") as test and data values from the values of yes or no. The mode of the answer will be coerced from logical to accommodate first any values taken from yes and then any values taken from no. Warning The mode of the result may depend on the value of test (see the examples), and the class attribute (see oldClass) of the result is taken from test and may be inappropriate for the values selected from yes and no. Sometimes it is better to use a construction such as (tmp <- yes; tmp[!test] <- no[!test]; tmp) , possibly extended to handle missing values in test. Further note that if(test) yes else no is much more efficient and often much preferable to ifelse(test, yes, no) whenever test is a simple true/false result, i.e., when length(test) == 1. The srcref attribute of functions is handled specially: if test is a simple true result and yes evaluates to a function with srcref attribute, ifelse returns yes including its attribute (the same applies to a false test and no argument). This functionality is only for backwards compatibility, the form if(test) yes else no should be used whenever yes and no are functions. References Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole. See Also if. Examples x <- c(6:-4) sqrt(x) #- gives warning sqrt(ifelse(x >= 0, x, NA)) # no warning ## Note: the following also gives the warning ! ifelse(x >= 0, sqrt(x), NA) ## ifelse() strips attributes ## This is important when working with Dates and factors x <- seq(as.Date("2000-02-29"), as.Date("2004-10-04"), by = "1 month") ## has many "yyyy-mm-29", but a few "yyyy-03-01" in the non-leap years y <- ifelse(as.POSIXlt(x)$mday == 29, x, NA) head(y) # not what you expected ... ==> need restore the class attribute: class(y) <- class(x) y ## This is a (not atypical) case where it is better *not* to use ifelse(), ## but rather the more efficient and still clear: y2 <- x y2[as.POSIXlt(x)$mday != 29] <- NA ## which gives the same as ifelse()+class() hack: stopifnot(identical(y2, y)) ## example of different return modes (and 'test' alone determining length): yes <- 1:3 no <- pi^(1:4) utils8b7c:f320:99b9:690f:4595:cd17:293a:c069str( ifelse(NA, yes, no) ) # logical, length 1 utils8b7c:f320:99b9:690f:4595:cd17:293a:c069str( ifelse(TRUE, yes, no) ) # integer, length 1 utils8b7c:f320:99b9:690f:4595:cd17:293a:c069str( ifelse(FALSE, yes, no) ) # double, length 1 Copyright (
Class: Phaser.TilemapParser Constructor new TilemapParser() Phaser.TilemapParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into a Tilemap. Source code: tilemap/TilemapParser.js (Line 13) Public Properties [static] INSERT_NULL : boolean When scanning the Tiled map data the TilemapParser can either insert a null value (true) ora Phaser.Tile instance with an index of -1 (false, the default). Depending on your game typedepends how this should be configured. If you've a large sparsely populated map and the tiledata doesn't need to change then setting this value to true will help with memory consumption.However if your map is small, or you need to update the tiles (perhaps the map dynamically changesduring the game) then leave the default value set. Source code: tilemap/TilemapParser.js (Line 26) Public Methods <static> getEmptyData() → {object} Returns an empty map data object. Returns object - Generated map data. Source code: tilemap/TilemapParser.js (Line 135) <static> parse(game, key, tileWidth, tileHeight, width, height) → {object} Parse tilemap data from the cache and creates data for a Tilemap object. Parameters Name Type Argument Default Description game Phaser.Game Game reference to the currently running game. key string The key of the tilemap in the Cache. tileWidth number <optional> 32 The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. tileHeight number <optional> 32 The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. width number <optional> 10 The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. height number <optional> 10 The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. Returns object - The parsed map object. Source code: tilemap/TilemapParser.js (Line 28) <static> parseCSV(key, data, tileWidth, tileHeight) → {object} Parses a CSV file into valid map data. Parameters Name Type Argument Default Description key string The name you want to give the map data. data string The CSV file data. tileWidth number <optional> 32 The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. tileHeight number <optional> 32 The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. Returns object - Generated map data. Source code: tilemap/TilemapParser.js (Line 77) <static> parseJSON(json) → {object} Parses a Tiled JSON file into valid map data. Parameters Name Type Description json object The JSON map data. Returns object - Generated and parsed map data. Source code: tilemap/TilemapParser.js (Line 180)
line-height-step Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production. The line-height-step CSS property sets the step unit for line box heights. When the property is set, line box heights are rounded up to the closest multiple of the unit. /* Point values */ line-height-step: 18pt; /* Global values */ line-height-step: inherit; line-height-step: initial; line-height-step: revert; line-height-step: revert-layer; line-height-step: unset; Syntax The line-height-step property is specified as any one of the following: a <length>. Values <length> The specified <length> is used in the calculation of the line box height step. Formal definition Initial value 0 Applies to block containers Inherited yes Computed value absolute <length> Animation type discrete Formal syntax line-height-step = <length [0,∞]> Examples Setting step unit for line box height In the following example, the height of line box in each paragraph is rounded up to the step unit. The line box in <h1> does not fit into one step unit and thus occupies two, but it is still centered within the two step unit. :root { font-size: 12pt; --my-grid: 18pt; line-height-step: var(--my-grid); } h1 { font-size: 20pt; margin-top: calc(2 * var(--my-grid)); } The result of these rules is shown below in the following screenshot: Specifications Specification CSS Rhythmic Sizing # line-height-step 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 line-height-step 60 79 No No 47 No No 60 No No No No See also font font-size line-height 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 28, 2022, by MDN contributors
lapply Apply a Function over a List or Vector Description lapply returns a list of the same length as X, each element of which is the result of applying FUN to the corresponding element of X. sapply is a user-friendly version and wrapper of lapply by default returning a vector, matrix or, if simplify = "array", an array if appropriate, by applying simplify2array(). sapply(x, f, simplify = FALSE, USE.NAMES = FALSE) is the same as lapply(x, f). vapply is similar to sapply, but has a pre-specified type of return value, so it can be safer (and sometimes faster) to use. replicate is a wrapper for the common use of sapply for repeated evaluation of an expression (which will usually involve random number generation). simplify2array() is the utility called from sapply() when simplify is not false and is similarly called from mapply(). Usage lapply(X, FUN, ...) sapply(X, FUN, ..., simplify = TRUE, USE.NAMES = TRUE) vapply(X, FUN, FUN.VALUE, ..., USE.NAMES = TRUE) replicate(n, expr, simplify = "array") simplify2array(x, higher = TRUE) Arguments X a vector (atomic or list) or an expression object. Other objects (including classed objects) will be coerced by bas8b7c:f320:99b9:690f:4595:cd17:293a:c069as.list. FUN the function to be applied to each element of X: see ‘Details’. In the case of functions like +, %*%, the function name must be backquoted or quoted. ... optional arguments to FUN. simplify logical or character string; should the result be simplified to a vector, matrix or higher dimensional array if possible? For sapply it must be named and not abbreviated. The default value, TRUE, returns a vector or matrix if appropriate, whereas if simplify = "array" the result may be an array of “rank” (=length(dim(.))) one higher than the result of FUN(X[[i]]). USE.NAMES logical; if TRUE and if X is character, use X as names for the result unless it had names already. Since this argument follows ... its name cannot be abbreviated. FUN.VALUE a (generalized) vector; a template for the return value from FUN. See ‘Details’. n integer: the number of replications. expr the expression (a language object, usually a call) to evaluate repeatedly. x a list, typically returned from lapply(). higher logical; if true, simplify2array() will produce a (“higher rank”) array when appropriate, whereas higher = FALSE would return a matrix (or vector) only. These two cases correspond to sapply(*, simplify = "array") or simplify = TRUE, respectively. Details FUN is found by a call to match.fun and typically is specified as a function or a symbol (e.g., a backquoted name) or a character string specifying a function to be searched for from the environment of the call to lapply. Function FUN must be able to accept as input any of the elements of X. If the latter is an atomic vector, FUN will always be passed a length-one vector of the same type as X. Arguments in ... cannot have the same name as any of the other arguments, and care may be needed to avoid partial matching to FUN. In general-purpose code it is good practice to name the first two arguments X and FUN if ... is passed through: this both avoids partial matching to FUN and ensures that a sensible error message is given if arguments named X or FUN are passed through .... Simplification in sapply is only attempted if X has length greater than zero and if the return values from all elements of X are all of the same (positive) length. If the common length is one the result is a vector, and if greater than one is a matrix with a column corresponding to each element of X. Simplification is always done in vapply. This function checks that all values of FUN are compatible with the FUN.VALUE, in that they must have the same length and type. (Types may be promoted to a higher type within the ordering logical < integer < double < complex, but not demoted.) Users of S4 classes should pass a list to lapply and vapply: the internal coercion is done by the as.list in the base namespace and not one defined by a user (e.g., by setting S4 methods on the base function). Value For lapply, sapply(simplify = FALSE) and replicate(simplify = FALSE), a list. For sapply(simplify = TRUE) and replicate(simplify = TRUE): if X has length zero or n = 0, an empty list. Otherwise an atomic vector or matrix or list of the same length as X (of length n for replicate). If simplification occurs, the output type is determined from the highest type of the return values in the hierarchy NULL < raw < logical < integer < double < complex < character < list < expression, after coercion of pairlists to lists. vapply returns a vector or array of type matching the FUN.VALUE. If length(FUN.VALUE) == 1 a vector of the same length as X is returned, otherwise an array. If FUN.VALUE is not an array, the result is a matrix with length(FUN.VALUE) rows and length(X) columns, otherwise an array a with dim(a) == c(dim(FUN.VALUE), length(X)). The (Dim)names of the array value are taken from the FUN.VALUE if it is named, otherwise from the result of the first function call. Column names of the matrix or more generally the names of the last dimension of the array value or names of the vector value are set from X as in sapply. Note sapply(*, simplify = FALSE, USE.NAMES = FALSE) is equivalent to lapply(*). For historical reasons, the calls created by lapply are unevaluated, and code has been written (e.g., bquote) that relies on this. This means that the recorded call is always of the form FUN(X[[i]], ...), with i replaced by the current (integer or double) index. This is not normally a problem, but it can be if FUN uses sys.call or match.call or if it is a primitive function that makes use of the call. This means that it is often safer to call primitive functions with a wrapper, so that e.g. lapply(ll, function(x) is.numeric(x)) is required to ensure that method dispatch for is.numeric occurs correctly. If expr is a function call, be aware of assumptions about where it is evaluated, and in particular what ... might refer to. You can pass additional named arguments to a function call as additional named arguments to replicate: see ‘Examples’. References Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole. See Also apply, tapply, mapply for applying a function to multiple arguments, and rapply for a recursive version of lapply(), eapply for applying a function to each entry in an environment. Examples require(stats); require(graphics) x <- list(a = 1:10, beta = exp(-3:3), logic = c(TRUE,FALSE,FALSE,TRUE)) # compute the list mean for each list element lapply(x, mean) # median and quartiles for each list element lapply(x, quantile, probs = 1:3/4) sapply(x, quantile) i39 <- sapply(3:9, seq) # list of vectors sapply(i39, fivenum) vapply(i39, fivenum, c(Min. = 0, "1st Qu." = 0, Median = 0, "3rd Qu." = 0, Max. = 0)) ## sapply(*, "array") -- artificial example (v <- structure(10*(5:8), names = LETTERS[1:4])) f2 <- function(x, y) outer(rep(x, length.out = 3), y) (a2 <- sapply(v, f2, y = 2*(1:5), simplify = "array")) a.2 <- vapply(v, f2, outer(1:3, 1:5), y = 2*(1:5)) stopifnot(dim(a2) == c(3,5,4), all.equal(a2, a.2), identical(dimnames(a2), list(NULL,NULL,LETTERS[1:4]))) hist(replicate(100, mean(rexp(10)))) ## use of replicate() with parameters: foo <- function(x = 1, y = 2) c(x, y) # does not work: bar <- function(n, ...) replicate(n, foo(...)) bar <- function(n, x) replicate(n, foo(x = x)) bar(5, x = 3) Copyright (
style-loader Inject CSS into the DOM. Getting Started To begin, you'll need to install style-loader: npm install --save-dev style-loader It's recommended to combine style-loader with the css-loader Then add the loader to your webpack config. For example: style.css body { background: green; } component.js import './style.css'; webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: ['style-loader', 'css-loader'], }, ], }, }; Options Name Type Default Description injectType {String} {String} styleTag Allows to setup how styles will be injected into the DOM attributes {Object} {Object} {} Adds custom attributes to tag insert {String\|Function} {String\|Function} head Inserts tag at the given position into the DOM base {Number} {Number} true Sets module ID base (DLLPlugin) injectType Type: String Default: styleTag Allows to setup how styles will be injected into the DOM. Possible values: styleTag singletonStyleTag lazyStyleTag lazySingletonStyleTag linkTag styleTag Automatically injects styles into the DOM using multiple <style></style>. It is default behaviour. component.js import './styles.css'; Example with c Locals (CSS Modules): component-with-css-modules.js import styles from './styles.css'; const divElement = document.createElement('div'); divElement.className = styles['my-class']; All locals (class names) stored in imported object. webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ // The `injectType` option can be avoided because it is default behaviour { loader: 'style-loader', options: { injectType: 'styleTag' } }, 'css-loader', ], }, ], }, }; The loader inject styles like: <style> .foo { color: red; } </style> <style> .bar { color: blue; } </style> singletonStyleTag Automatically injects styles into the DOM using one <style></style>. ⚠ Source maps do not work. component.js import './styles.css'; component-with-css-modules.js import styles from './styles.css'; const divElement = document.createElement('div'); divElement.className = styles['my-class']; All locals (class names) stored in imported object. webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: 'style-loader', options: { injectType: 'singletonStyleTag' }, }, 'css-loader', ], }, ], }, }; The loader inject styles like: <style> .foo { color: red; } .bar { color: blue; } </style> lazyStyleTag Injects styles into the DOM using multiple <style></style> on demand. We recommend following .lazy.css naming convention for lazy styles and the .css for basic style-loader usage (similar to other file types, i.e. .lazy.less and .less). When you lazyStyleTag value the style-loader injects the styles lazily making them useable on-demand via style.use() / style.unuse(). ⚠️ Behavior is undefined when unuse is called more often than use. Don't do that. component.js import styles from './styles.lazy.css'; styles.use(); // For removing styles you can use // styles.unuse(); component-with-css-modules.js import styles from './styles.lazy.css'; styles.use(); const divElement = document.createElement('div'); divElement.className = styles.locals['my-class']; All locals (class names) stored in locals property of imported object. webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, exclude: /\.lazy\.css$/i, use: ['style-loader', 'css-loader'], }, { test: /\.lazy\.css$/i, use: [ { loader: 'style-loader', options: { injectType: 'lazyStyleTag' } }, 'css-loader', ], }, ], }, }; The loader inject styles like: <style> .foo { color: red; } </style> <style> .bar { color: blue; } </style> lazySingletonStyleTag Injects styles into the DOM using one <style></style> on demand. We recommend following .lazy.css naming convention for lazy styles and the .css for basic style-loader usage (similar to other file types, i.e. .lazy.less and .less). When you lazySingletonStyleTag value the style-loader injects the styles lazily making them useable on-demand via style.use() / style.unuse(). ⚠️ Source maps do not work. ⚠️ Behavior is undefined when unuse is called more often than use. Don't do that. component.js import styles from './styles.css'; styles.use(); // For removing styles you can use // styles.unuse(); component-with-css-modules.js import styles from './styles.lazy.css'; styles.use(); const divElement = document.createElement('div'); divElement.className = styles.locals['my-class']; All locals (class names) stored in locals property of imported object. webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, exclude: /\.lazy\.css$/i, use: ['style-loader', 'css-loader'], }, { test: /\.lazy\.css$/i, use: [ { loader: 'style-loader', options: { injectType: 'lazyStyleTag' } }, 'css-loader', ], }, ], }, }; The loader generate this: <style> .foo { color: red; } .bar { color: blue; } </style> linkTag Injects styles into the DOM using multiple <link rel="stylesheet" href="path/to/file.css"> . ℹ️ The loader will dynamically insert the <link href="path/to/file.css" rel="stylesheet"> tag at runtime via JavaScript. You should use MiniCssExtractPlugin if you want to include a static <link href="path/to/file.css" rel="stylesheet">. import './styles.css'; import './other-styles.css'; webpack.config.js module.exports = { module: { rules: [ { test: /\.link\.css$/i, use: [ { loader: 'style-loader', options: { injectType: 'linkTag' } }, { loader: 'file-loader' }, ], }, ], }, }; The loader generate this: <link rel="stylesheet" href="path/to/style.css" /> <link rel="stylesheet" href="path/to/other-styles.css" /> attributes Type: Object Default: {} If defined, the style-loader will attach given attributes with their values on <style> / <link> element. component.js import style from './file.css'; webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: 'style-loader', options: { attributes: { id: 'id' } } }, { loader: 'css-loader' }, ], }, ], }, }; <style id="id"></style> insert Type: String|Function Default: head By default, the style-loader appends <style>/<link> elements to the end of the style target, which is the <head> tag of the page unless specified by insert. This will cause CSS created by the loader to take priority over CSS already present in the target. You can use other values if the standard behavior is not suitable for you, but we do not recommend doing this. If you target an iframe make sure you have sufficient access rights, the styles will be injected into the content document head. String Allows to setup custom query selector where styles inject into the DOM. webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: 'style-loader', options: { insert: 'body', }, }, 'css-loader', ], }, ], }, }; A new <style>/<link> elements will be inserted into at bottom of body tag. Function Allows to override default behavior and insert styles at any position. ⚠ Do not forget that this code will be used in the browser and not all browsers support latest ECMA features like let, const, arrow function expression and etc, we recommend use only ECMA 5 features, but it is depends what browsers you want to support ⚠ Do not forget that some doom methods may not be available in older browsers, we recommended use only DOM core level 2 properties, but it is depends what browsers you want to support webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: 'style-loader', options: { insert: function insertAtTop(element) { var parent = document.querySelector('head'); // eslint-disable-next-line no-underscore-dangle var lastInsertedElement = window._lastElementInsertedByStyleLoader; if (!lastInsertedElement) { parent.insertBefore(element, parent.firstChild); } else if (lastInsertedElement.nextSibling) { parent.insertBefore(element, lastInsertedElement.nextSibling); } else { parent.appendChild(element); } // eslint-disable-next-line no-underscore-dangle window._lastElementInsertedByStyleLoader = element; }, }, }, 'css-loader', ], }, ], }, }; Insert styles at top of head tag. base This setting is primarily used as a workaround for css clashes when using one or more DllPlugin's. base allows you to prevent either the app's css (or DllPlugin2's css) from overwriting DllPlugin1's css by specifying a css module id base which is greater than the range used by DllPlugin1 e.g.: webpack.dll1.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: ['style-loader', 'css-loader'], }, ], }, }; webpack.dll2.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: 'style-loader', options: { base: 1000 } }, 'css-loader', ], }, ], }, }; webpack.app.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: 'style-loader', options: { base: 2000 } }, 'css-loader', ], }, ], }, }; Examples Source maps The loader automatically inject source maps when previous loader emit them. Therefore, to generate source maps, set the sourceMap option to true for the previous loader. webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ 'style-loader', { loader: 'css-loader', options: { sourceMap: true } }, ], }, ], }, }; Nonce There are two ways to work with nonce: using the attributes option using the __webpack_nonce__ variable ⚠ the attributes option takes precedence over the __webpack_nonce__ variable attributes component.js import './style.css'; webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: 'style-loader', options: { attributes: { nonce: '12345678', }, }, }, 'css-loader', ], }, ], }, }; The loader generate: <style nonce="12345678"> .foo { color: red; } </style> __webpack_nonce__ create-nonce.js __webpack_nonce__ = '12345678'; component.js import './create-nonce.js'; import './style.css'; Alternative example for require: component.js __webpack_nonce__ = '12345678'; require('./style.css'); webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: ['style-loader', 'css-loader'], }, ], }, }; The loader generate: <style nonce="12345678"> .foo { color: red; } </style> Insert styles at top Inserts styles at top of head tag. webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: 'style-loader', options: { insert: function insertAtTop(element) { var parent = document.querySelector('head'); var lastInsertedElement = window._lastElementInsertedByStyleLoader; if (!lastInsertedElement) { parent.insertBefore(element, parent.firstChild); } else if (lastInsertedElement.nextSibling) { parent.insertBefore(element, lastInsertedElement.nextSibling); } else { parent.appendChild(element); } window._lastElementInsertedByStyleLoader = element; }, }, }, 'css-loader', ], }, ], }, }; Insert styles before target element Inserts styles before #id element. webpack.config.js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: 'style-loader', options: { insert: function insertBeforeAt(element) { const parent = document.querySelector('head'); const target = document.querySelector('#id'); const lastInsertedElement = window._lastElementInsertedByStyleLoader; if (!lastInsertedElement) { parent.insertBefore(element, target); } else if (lastInsertedElement.nextSibling) { parent.insertBefore(element, lastInsertedElement.nextSibling); } else { parent.appendChild(element); } window._lastElementInsertedByStyleLoader = element; }, }, }, 'css-loader', ], }, ], }, }; Contributing Please take a moment to read our contributing guidelines if you haven't yet done so. CONTRIBUTING License MIT
KhatriRao Khatri-Rao Matrix Product Description Computes Khatri-Rao products for any kind of matrices. The Khatri-Rao product is a column-wise Kronecker product. Originally introduced by Khatri and Rao (1968), it has many different applications, see Liu and Trenkler (2008) for a survey. Notably, it is used in higher-dimensional tensor decompositions, see Bader and Kolda (2008). Usage KhatriRao(X, Y = X, FUN = "*", make.dimnames = FALSE) Arguments X,Y matrices of with the same number of columns. FUN the (name of the) function to be used for the column-wise Kronecker products, see kronecker, defaulting to the usual multiplication. make.dimnames logical indicating if the result should inherit dimnames from X and Y in a simple way. Value a "CsparseMatrix", say R, the Khatri-Rao product of X (n x k) and Y (m x k), is of dimension (n*m) x k, where the j-th column, R[,j] is the kronecker product kronecker(X[,j], Y[,j]). Note The current implementation is efficient for large sparse matrices. Author(s) Original by Michael Cysouw, Univ. Marburg; minor tweaks, bug fixes etc, by Martin Maechler. References Khatri, C. G., and Rao, C. Radhakrishna (1968) Solutions to Some Functional Equations and Their Applications to Characterization of Probability Distributions. Sankhya: Indian J. Statistics, Series A 30, 167–180. Liu, Shuangzhe, and Gõtz Trenkler (2008) Hadamard, Khatri-Rao, Kronecker and Other Matrix Products. International J. Information and Systems Sciences 4, 160–177. Bader, Brett W, and Tamara G Kolda (2008) Efficient MATLAB Computations with Sparse and Factored Tensors. SIAM J. Scientific Computing 30, 205–231. See Also kronecker. Examples ## Example with very small matrices: m <- matrix(1:12,3,4) d <- diag(1:4) KhatriRao(m,d) KhatriRao(d,m) dimnames(m) <- list(LETTERS[1:3], letters[1:4]) KhatriRao(m,d, make.dimnames=TRUE) KhatriRao(d,m, make.dimnames=TRUE) dimnames(d) <- list(NULL, paste0("D", 1:4)) KhatriRao(m,d, make.dimnames=TRUE) KhatriRao(d,m, make.dimnames=TRUE) dimnames(d) <- list(paste0("d", 10*1:4), paste0("D", 1:4)) (Kmd <- KhatriRao(m,d, make.dimnames=TRUE)) (Kdm <- KhatriRao(d,m, make.dimnames=TRUE)) nm <- as(m,"nMatrix") nd <- as(d,"nMatrix") KhatriRao(nm,nd, make.dimnames=TRUE) KhatriRao(nd,nm, make.dimnames=TRUE) stopifnot(dim(KhatriRao(m,d)) == c(nrow(m)*nrow(d), ncol(d))) ## border cases / checks: zm <- nm; zm[] <- 0 # all 0 matrix stopifnot(all(K1 <- KhatriRao(nd, zm) == 0), identical(dim(K1), c(12L, 4L)), all(K2 <- KhatriRao(zm, nd) == 0), identical(dim(K2), c(12L, 4L))) d0 <- d; d0[] <- 0; m0 <- Matrix(d0[-1,]) stopifnot(all(K3 <- KhatriRao(d0, m) == 0), identical(dim(K3), dim(Kdm)), all(K4 <- KhatriRao(m, d0) == 0), identical(dim(K4), dim(Kmd)), all(KhatriRao(d0, d0) == 0), all(KhatriRao(m0, d0) == 0), all(KhatriRao(d0, m0) == 0), all(KhatriRao(m0, m0) == 0), identical(dimnames(KhatriRao(m, d0, make.dimnames=TRUE)), dimnames(Kmd))) Copyright (
Compose file versions and upgrading The Compose file is a YAML file defining services, networks, and volumes for a Docker application. The Compose file formats are now described in these references, specific to each version. Reference file What changed in this version Version 3 (most current, and recommended) Version 3 updates Version 2 Version 2 updates Version 1 Version 1 updates The topics below explain the differences among the versions, Docker Engine compatibility, and how to upgrade. Compatibility matrix There are several versions of the Compose file format – 1, 2, 2.1 and 3. For details on versions and how to upgrade, see Versioning and Upgrading. This table shows which Compose file versions support specific Docker releases. Compose file format Docker Engine release 3.0 ; 3.1 1.13.0+ 2.1 1.12.0+ 2.0 1.10.0+ 1.0 1.9.1.+ Versioning There are currently three versions of the Compose file format: Version 1, the legacy format. This is specified by omitting a version key at the root of the YAML. Version 2.x. This is specified with a version: '2' or version: '2.1' entry at the root of the YAML. Version 3.x, the latest and recommended version, designed to be cross-compatible between Compose and the Docker Engine’s swarm mode. This is specified with a version: '3' or version: '3.1', etc., entry at the root of the YAML. The Compatibility Matrix shows Compose file versions mapped to Docker Engine releases. To move your project to a later version, see the Upgrading section. Note: If you’re using multiple Compose files or extending services, each file must be of the same version - you cannot, for example, mix version 1 and 2 in a single project. Several things differ depending on which version you use: The structure and permitted configuration keys The minimum Docker Engine version you must be running Compose’s behaviour with regards to networking These differences are explained below. Version 1 Compose files that do not declare a version are considered “version 1”. In those files, all the services are declared at the root of the document. Version 1 is supported by Compose up to 1.6.x. It will be deprecated in a future Compose release. Version 1 files cannot declare named volumes, networks or build arguments. Compose does not take advantage of networking when you use version 1: every container is placed on the default bridge network and is reachable from every other container at its IP address. You will need to use links to enable discovery between containers. Example: web: build: . ports: - "5000:5000" volumes: - .:/code links: - redis redis: image: redis Version 2 Compose files using the version 2 syntax must indicate the version number at the root of the document. All services must be declared under the services key. Version 2 files are supported by Compose 1.6.0+ and require a Docker Engine of version 1.10.0+. Named volumes can be declared under the volumes key, and networks can be declared under the networks key. By default, every container joins an application-wide default network, and is discoverable at a hostname that’s the same as the service name. This means links are largely unnecessary. For more details, see Networking in Compose. Simple example: version: '2' services: web: build: . ports: - "5000:5000" volumes: - .:/code redis: image: redis A more extended example, defining volumes and networks: version: '2' services: web: build: . ports: - "5000:5000" volumes: - .:/code networks: - front-tier - back-tier redis: image: redis volumes: - redis-data:/var/lib/redis networks: - back-tier volumes: redis-data: driver: local networks: front-tier: driver: bridge back-tier: driver: bridge Several other options were added to support networking, such as: aliases The depends_on option can be used in place of links to indicate dependencies between services and startup order. version: '2' services: web: build: . depends_on: - db - redis redis: image: redis db: image: postgres ipv4_address, ipv6_address Variable substitution also was added in Version 2. Version 2.1 An upgrade of version 2 that introduces new parameters only available with Docker Engine version 1.12.0+ Introduces the following additional parameters: link_local_ips isolation labels for volumes and networks userns_mode healthcheck sysctls Version 3 Designed to be cross-compatible between Compose and the Docker Engine’s swarm mode, version 3 removes several options and adds several more. Removed: volume_driver, volumes_from, cpu_shares, cpu_quota, cpuset, mem_limit, memswap_limit. See the upgrading guide for how to migrate away from these. Added: deploy Upgrading Version 2.x to 3.x Between versions 2.x and 3.x, the structure of the Compose file is the same, but several options have been removed: volume_driver: Instead of setting the volume driver on the service, define a volume using the top-level volumes option and specify the driver there. version: "3" services: db: image: postgres volumes: - data:/var/lib/postgresql/data volumes: data: driver: mydriver volumes_from: To share a volume between services, define it using the top-level volumes option and reference it from each service that shares it using the service-level volumes option. cpu_shares, cpu_quota, cpuset, mem_limit, memswap_limit: These have been replaced by the resources key under deploy. Note that deploy configuration only takes effect when using docker stack deploy, and is ignored by docker-compose. extends: This option has been removed for version: "3.x" Compose files. Version 1 to 2.x In the majority of cases, moving from version 1 to 2 is a very simple process: Indent the whole file by one level and put a services: key at the top. Add a version: '2' line at the top of the file. It’s more complicated if you’re using particular configuration features: dockerfile: This now lives under the build key: build: context: . dockerfile: Dockerfile-alternate log_driver, log_opt: These now live under the logging key: logging: driver: syslog options: syslog-address: "tcp://518-295-6606:123" links with environment variables: As documented in the environment variables reference, environment variables created by links have been deprecated for some time. In the new Docker network system, they have been removed. You should either connect directly to the appropriate hostname or set the relevant environment variable yourself, using the link hostname: web: links: - db environment: - DB_PORT=tcp://db:5432 external_links: Compose uses Docker networks when running version 2 projects, so links behave slightly differently. In particular, two containers must be connected to at least one network in common in order to communicate, even if explicitly linked together. Either connect the external container to your app’s default network, or connect both the external container and your service’s containers to an external network. net: This is now replaced by network_mode: net: host -> network_mode: host net: bridge -> network_mode: bridge net: none -> network_mode: none If you’re using net: "container:[service name]", you must now use network_mode: "service:[service name]" instead. net: "container:web" -> network_mode: "service:web" If you’re using net: "container:[container name/id]", the value does not need to change. net: "container:cont-name" -> network_mode: "container:cont-name" net: "container:abc12345" -> network_mode: "container:abc12345" volumes with named volumes: these must now be explicitly declared in a top-level volumes section of your Compose file. If a service mounts a named volume called data, you must declare a data volume in your top-level volumes section. The whole file might look like this: version: '2' services: db: image: postgres volumes: - data:/var/lib/postgresql/data volumes: data: {} By default, Compose creates a volume whose name is prefixed with your project name. If you want it to just be called data, declare it as external: volumes: data: external: true Compose file format references Compose file version 3 Compose file version 2 Compose file version 1
QCustomAudioRoleControl Class The QCustomAudioRoleControl class provides control over the audio role of a media object. More... Header: #include <QCustomAudioRoleControl> qmake: QT += multimedia Since: Qt 5.11 Inherits: QMediaControl This class was introduced in Qt 5.11. List of all members, including inherited members Public Functions virtual ~QCustomAudioRoleControl() virtual QString customAudioRole() const = 0 virtual void setCustomAudioRole(const QString &role) = 0 virtual QStringList supportedCustomAudioRoles() const = 0 Signals void customAudioRoleChanged(const QString &role) Protected Functions QCustomAudioRoleControl(QObject *parent = nullptr) Macros QCustomAudioRoleControl_iid Detailed Description If a QMediaService supports audio roles it may implement QCustomAudioRoleControl in order to provide access to roles unknown to Qt. The functionality provided by this control is exposed to application code through the QMediaPlayer class. The interface name of QCustomAudioRoleControl is org.qt-project.qt.customaudiorolecontrol/5.11 as defined in QCustomAudioRoleControl_iid. See also QMediaServi8b7c:f320:99b9:690f:4595:cd17:293a:c069requestControl() and QMediaPlayer. Member Function Documentation [protected] QCustomAudioRoleControl8b7c:f320:99b9:690f:4595:cd17:293a:c069QCustomAudioRoleControl(QObject *parent = nullptr) Construct a QCustomAudioRoleControl with the given parent. [signal] void QCustomAudioRoleControl8b7c:f320:99b9:690f:4595:cd17:293a:c069ustomAudioRoleChanged(const QString &role) Signal emitted when the audio role has changed. [virtual] QCustomAudioRoleControl8b7c:f320:99b9:690f:4595:cd17:293a:c069~QCustomAudioRoleControl() Destroys the audio role control. [pure virtual] QString QCustomAudioRoleControl8b7c:f320:99b9:690f:4595:cd17:293a:c069ustomAudioRole() const Returns the audio role of the media played by the media service. See also setCustomAudioRole(). [pure virtual] void QCustomAudioRoleControl8b7c:f320:99b9:690f:4595:cd17:293a:c069setCustomAudioRole(const QString &role) Sets the audio role of the media played by the media service. See also customAudioRole(). [pure virtual] QStringList QCustomAudioRoleControl8b7c:f320:99b9:690f:4595:cd17:293a:c069supportedCustomAudioRoles() const Returns a list of custom audio roles that the media service supports. An empty list may indicate that the supported custom audio roles aren't known. The list may not be complete. Macro Documentation QCustomAudioRoleControl8b7c:f320:99b9:690f:4595:cd17:293a:c069QCustomAudioRoleControl_iid org.qt-project.qt.customaudiorolecontrol/5.11 Defines the interface name of the QCustomAudioRoleControl class.
class JSON8b7c:f320:99b9:690f:4595:cd17:293a:c069NestingError Parent: JSON8b7c:f320:99b9:690f:4595:cd17:293a:c069ParserError This exception is raised if the nesting of parsed data structures is too deep. Ruby Core © 1993–2017 Yukihiro MatsumotoLicensed under the Ruby License.Ruby Standard Library
na_cdot_user_role - useradmin configuration and management New in version 2.3. Synopsis Requirements Parameters Notes Examples Status Author Synopsis Create or destroy user roles Requirements The below requirements are needed on the host that executes this module. A physical or virtual clustered Data ONTAP system. The modules were developed with Clustered Data ONTAP 8.3 Ansible 2.2 netapp-lib (2015.9.25). Install using ‘pip install netapp-lib’ Parameters Parameter Choices/Defaults Comments access_level Choices: none readonly all ← The name of the role to manage. command_directory_name required The command or command directory to which the role has an access. hostname required The hostname or IP address of the ONTAP instance. name required The name of the role to manage. password required Password for the specified user. aliases: pass state required Choices: present absent Whether the specified user should exist or not. username required This can be a Cluster-scoped or SVM-scoped account, depending on whether a Cluster-level or SVM-level API is required. For more information, please read the documentation https://goo.gl/BRu78Z. aliases: user vserver required The name of the vserver to use. Notes Note The modules prefixed with netapp\_cdot are built to support the ONTAP storage platform. Examples - name: Create User Role na_cdot_user_role: state: present name: ansibleRole command_directory_name: DEFAULT access_level: none vserver: ansibleVServer hostname: "{{ netapp_hostname }}" username: "{{ netapp_username }}" password: "{{ netapp_password }}" Status This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface. Author Sumit Kumar ([email protected]) Hint If you notice any issues in this documentation you can edit this document to improve it. © 2012–2018 Michael DeHaan
dart:indexed_db getAll method Request getAll(Object range, [ int maxCount ]) Source Request getAll(Object range, [int maxCount]) { if (maxCount != null) { return _blink.BlinkIDBObjectStore.instance .getAll_Callback_2_(this, range, maxCount); } return _blink.BlinkIDBObjectStore.instance.getAll_Callback_1_(this, range); }
tf.compat.v1.layers.batch_normalization Functional interface for the batch normalization layer from_config(Ioffe et al., 2015). (deprecated) tf.compat.v1.layers.batch_normalization( inputs, axis=-1, momentum=0.99, epsilon=0.001, center=True, scale=True, beta_initializer=tf.zeros_initializer(), gamma_initializer=tf.ones_initializer(), moving_mean_initializer=tf.zeros_initializer(), moving_variance_initializer=tf.ones_initializer(), beta_regularizer=None, gamma_regularizer=None, beta_constraint=None, gamma_constraint=None, training=False, trainable=True, name=None, reuse=None, renorm=False, renorm_clipping=None, renorm_momentum=0.99, fused=None, virtual_batch_size=None, adjustment=None ) Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use keras.layers.BatchNormalization instead. In particular, tf.control_dependencies(tf.GraphKeys.UPDATE_OPS) should not be used (consult the tf.keras.layers.BatchNormalization documentation). Note: when training, the moving_mean and moving_variance need to be updated. By default the update ops are placed in tf.GraphKeys.UPDATE_OPS, so they need to be executed alongside the train_op. Also, be sure to add any batch_normalization ops before getting the update_ops collection. Otherwise, update_ops will be empty, and training/inference will not work properly. For example: x_norm = tf.compat.v1.layers.batch_normalization(x, training=training) # ... update_ops = tf.compat.v1.get_collection(tf.GraphKeys.UPDATE_OPS) train_op = optimizer.minimize(loss) train_op = tf.group([train_op, update_ops]) Arguments inputs Tensor input. axis An int, the axis that should be normalized (typically the features axis). For instance, after a Convolution2D layer with data_format="channels_first", set axis=1 in BatchNormalization. momentum Momentum for the moving average. epsilon Small float added to variance to avoid dividing by zero. center If True, add offset of beta to normalized tensor. If False, beta is ignored. scale If True, multiply by gamma. If False, gamma is not used. When the next layer is linear (also e.g. nn.relu), this can be disabled since the scaling can be done by the next layer. beta_initializer Initializer for the beta weight. gamma_initializer Initializer for the gamma weight. moving_mean_initializer Initializer for the moving mean. moving_variance_initializer Initializer for the moving variance. beta_regularizer Optional regularizer for the beta weight. gamma_regularizer Optional regularizer for the gamma weight. beta_constraint An optional projection function to be applied to the beta weight after being updated by an Optimizer (e.g. used to implement 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. gamma_constraint An optional projection function to be applied to the gamma weight after being updated by an Optimizer. training Either a Python boolean, or a TensorFlow boolean scalar tensor (e.g. a placeholder). Whether to return the output in training mode (normalized with statistics of the current batch) or in inference mode (normalized with moving statistics). NOTE: make sure to set this parameter correctly, or else your training/inference will not work properly. trainable Boolean, if True also add variables to the graph collection GraphKeys.TRAINABLE_VARIABLES (see tf.Variable). name String, the name of the layer. reuse Boolean, whether to reuse the weights of a previous layer by the same name. renorm Whether to use Batch Renormalization (Ioffe, 2017). This adds extra variables during training. The inference is the same for either value of this parameter. renorm_clipping A dictionary that may map keys 'rmax', 'rmin', 'dmax' to scalar Tensors used to clip the renorm correction. The correction (r, d) is used as corrected_value = normalized_value * r + d, with r clipped to [rmin, rmax], and d to [-dmax, dmax]. Missing rmax, rmin, dmax are set to inf, 0, inf, respectively. renorm_momentum Momentum used to update the moving means and standard deviations with renorm. Unlike momentum, this affects training and should be neither too small (which would add noise) nor too large (which would give stale estimates). Note that momentum is still applied to get the means and variances for inference. fused if None or True, use a faster, fused implementation if possible. If False, use the system recommended implementation. virtual_batch_size An int. By default, virtual_batch_size is None, which means batch normalization is performed across the whole batch. When virtual_batch_size is not None, instead perform "Ghost Batch Normalization", which creates virtual sub-batches which are each normalized separately (with shared gamma, beta, and moving statistics). Must divide the actual batch size during execution. adjustment A function taking the Tensor containing the (dynamic) shape of the input tensor and returning a pair (scale, bias) to apply to the normalized values (before gamma and beta), only during training. For example, if axis==-1, adjustment = lambda shape: ( tf.random.uniform(shape[-1:], 0.93, 1.07), tf.random.uniform(shape[-1:], -0.1, 0.1)) will scale the normalized value by up to 7% up or down, then shift the result by up to 0.1 (with independent scaling and bias for each feature but shared across all examples), and finally apply gamma and/or beta. If None, no adjustment is applied. Cannot be specified if virtual_batch_size is specified. Returns Output tensor. Raises ValueError if eager execution is enabled. References: Batch Normalization - Accelerating Deep Network Training by Reducing Internal Covariate Shift: Ioffe et al., 2015 (pdf) Batch Renormalization - Towards Reducing Minibatch Dependence in Batch-Normalized Models: Ioffe, 2017 (pdf)
community.aws.ec2_elb_facts – Gather information about EC2 Elastic Load Balancers in AWS Note This plugin is part of the community.aws collection (version 1.3.0). To install it use: ansible-galaxy collection install community.aws. To use it in a playbook, specify: community.aws.ec2_elb_facts. New in version 1.0.0: of community.aws Synopsis Requirements Parameters Notes Examples Synopsis Gather information about EC2 Elastic Load Balancers in AWS This module was called ec2_elb_facts before Ansible 2.9. The usage did not change. Requirements The below requirements are needed on the host that executes this module. python >= 2.6 boto Parameters Parameter Choices/Defaults Comments aws_access_key string AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used. If profile is set this parameter is ignored. Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. aliases: ec2_access_key, access_key aws_ca_bundle path The location of a CA Bundle to use when validating SSL certificates. Only used for boto3 based modules. Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally. aws_config dictionary A dictionary to modify the botocore configuration. Parameters can be found at https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config. Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration. aws_secret_key string AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used. If profile is set this parameter is ignored. Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. aliases: ec2_secret_key, secret_key debug_botocore_endpoint_logs boolean Choices: no ← yes Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used. ec2_url string Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used. aliases: aws_endpoint_url, endpoint_url names list / elements=string List of ELB names to gather information about. Pass this option to gather information about a set of ELBs, otherwise, all ELBs are returned. profile string Uses a boto profile. Only works with boto >= 2.24.0. Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated. aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01. aliases: aws_profile region string The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region aliases: aws_region, ec2_region security_token string AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used. If profile is set this parameter is ignored. Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01. aliases: aws_security_token, access_token validate_certs boolean Choices: no yes ← When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. Notes Note If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence AWS_URL or EC2_URL, AWS_PROFILE or AWS_DEFAULT_PROFILE, AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY or EC2_ACCESS_KEY, AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY or EC2_SECRET_KEY, AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN, AWS_REGION or EC2_REGION, AWS_CA_BUNDLE Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html AWS_REGION or EC2_REGION can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file Examples # Note: These examples do not set authentication details, see the AWS Guide for details. # Output format tries to match amazon.aws.ec2_elb_lb module input parameters - name: Gather information about all ELBs community.aws.ec2_elb_info: register: elb_info - ansible.builtin.debug: msg: "{{ item.dns_name }}" loop: "{{ elb_info.elbs }}" - name: Gather information about a particular ELB community.aws.ec2_elb_info: names: frontend-prod-elb register: elb_info - ansible.builtin.debug: msg: "{{ elb_info.elbs.0.dns_name }}" - name: Gather information about a set of ELBs community.aws.ec2_elb_info: names: - frontend-prod-elb - backend-prod-elb register: elb_info - ansible.builtin.debug: msg: "{{ item.dns_name }}" loop: "{{ elb_info.elbs }}" Authors Michael Schultz (@mjschultz) Fernando Jose Pando (@nand0p) © 2012–2018 Michael DeHaan
module ActiveRecor8b7c:f320:99b9:690f:4595:cd17:293a:c069ConnectionAdapters8b7c:f320:99b9:690f:4595:cd17:293a:c069Quoting Public Instance Methods fetch_type_metadata(sql_type) Show source # File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 67 def fetch_type_metadata(sql_type) cast_type = lookup_cast_type(sql_type) SqlTypeMetadata.new( sql_type: sql_type, type: cast_type.type, limit: cast_type.limit, precision: cast_type.precision, scale: cast_type.scale, ) end quote(value, column = nil) Show source # File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 9 def quote(value, column = nil) # records are quoted as their primary key return value.quoted_id if value.respond_to?(:quoted_id) if column ActiveSupport8b7c:f320:99b9:690f:4595:cd17:293a:c069precation.warn(" Passing a column to `quote` has been deprecated. It is only used for type casting, which should be handled elsewhere. See https://github.com/rails/arel/commit/6160bfbda1d1781c3b08a33ec4955f170e95be11 for more information. ".squish) value = type_cast_from_column(column, value) end _quote(value) end Quotes the column value to help prevent SQL injection attacks. quote_column_name(column_name) Show source # File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 85 def quote_column_name(column_name) column_name.to_s end Quotes the column name. Defaults to no quoting. quote_string(s) Show source # File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 80 def quote_string(s) s.gsub('\'.freeze, '\&\&'.freeze).gsub("'".freeze, "''".freeze) # ' (for ruby-mode) end Quotes a string, escaping any ' (single quote) and \ (backslash) characters. quote_table_name(table_name) Show source # File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 90 def quote_table_name(table_name) quote_column_name(table_name) end Quotes the table name. Defaults to column name quoting. quote_table_name_for_assignment(table, attr) Show source # File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 102 def quote_table_name_for_assignment(table, attr) quote_table_name("#{table}.#{attr}") end Override to return the quoted table name for assignment. Defaults to table quoting. This works for mysql2 where table.column can be used to resolve ambiguity. We override this in the sqlite3 and postgresql adapters to use only the column name (as per syntax requirements). quoted_date(value) Show source # File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 133 def quoted_date(value) if value.acts_like?(:time) zone_conversion_method = ActiveRecor8b7c:f320:99b9:690f:4595:cd17:293a:c069Base.default_timezone == :utc ? :getutc : :getlocal if value.respond_to?(zone_conversion_method) value = value.send(zone_conversion_method) end end result = value.to_s(:db) if value.respond_to?(:usec) && value.usec > 0 "#{result}.#{sprintf("%06d", value.usec)}" else result end end Quote date/time values for use in SQL input. Includes microseconds if the value is a Time responding to usec. quoted_false() Show source # File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 123 def quoted_false "'f'".freeze end quoted_true() Show source # File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 115 def quoted_true "'t'".freeze end type_cast(value, column = nil) Show source # File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 29 def type_cast(value, column = nil) if value.respond_to?(:quoted_id) && value.respond_to?(:id) return value.id end if column value = type_cast_from_column(column, value) end _type_cast(value) rescue TypeError to_type = column ? " to #{column.type}" : "" raise TypeError, "can't cast #{value.class}#{to_type}" end Cast a value to a type that the database understands. For example, SQLite does not understand dates, so this method will convert a Date to a String. unquoted_false() Show source # File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 127 def unquoted_false 'f'.freeze end unquoted_true() Show source # File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 119 def unquoted_true 't'.freeze end
OS Stability: 2 - Stable Source Code: lib/os.js The os module provides operating system-related utility methods and properties. It can be accessed using: const os = require('os'); os.EOL Added in: v0.7.8 <string> The operating system-specific end-of-line marker. \n on POSIX \r\n on Windows os.arch() Added in: v0.5.0 Returns: <string> Returns the operating system CPU architecture for which the Node.js binary was compiled. Possible values are 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x', 'x32', and 'x64'. The return value is equivalent to process.arch. os.constants Added in: v6.3.0 <Object> Contains commonly used operating system-specific constants for error codes, process signals, and so on. The specific constants defined are described in OS constants. os.cpus() Added in: v0.3.3 Returns: <Object[]> Returns an array of objects containing information about each logical CPU core. The properties included on each object include: model <string> speed <number> (in MHz) times <Object> user <number> The number of milliseconds the CPU has spent in user mode. nice <number> The number of milliseconds the CPU has spent in nice mode. sys <number> The number of milliseconds the CPU has spent in sys mode. idle <number> The number of milliseconds the CPU has spent in idle mode. irq <number> The number of milliseconds the CPU has spent in irq mode. [ { model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', speed: 2926, times: { user: 252020, nice: 0, sys: 30340, idle: 1070356870, irq: 0 } }, { model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', speed: 2926, times: { user: 306960, nice: 0, sys: 26980, idle: 1071569080, irq: 0 } }, { model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', speed: 2926, times: { user: 248450, nice: 0, sys: 21750, idle: 1070919370, irq: 0 } }, { model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', speed: 2926, times: { user: 256880, nice: 0, sys: 19430, idle: 1070905480, irq: 20 } } ] nice values are POSIX-only. On Windows, the nice values of all processors are always 0. os.endianness() Added in: v0.9.4 Returns: <string> Returns a string identifying the endianness of the CPU for which the Node.js binary was compiled. Possible values are 'BE' for big endian and 'LE' for little endian. os.freemem() Added in: v0.3.3 Returns: <integer> Returns the amount of free system memory in bytes as an integer. os.getPriority([pid]) Added in: v10.10.0 pid <integer> The process ID to retrieve scheduling priority for. Default 0. Returns: <integer> Returns the scheduling priority for the process specified by pid. If pid is not provided or is 0, the priority of the current process is returned. os.homedir() Added in: v2.3.0 Returns: <string> Returns the string path of the current user's home directory. On POSIX, it uses the $HOME environment variable if defined. Otherwise it uses the effective UID to look up the user's home directory. On Windows, it uses the USERPROFILE environment variable if defined. Otherwise it uses the path to the profile directory of the current user. os.hostname() Added in: v0.3.3 Returns: <string> Returns the host name of the operating system as a string. os.loadavg() Added in: v0.3.3 Returns: <number[]> Returns an array containing the 1, 5, and 15 minute load averages. The load average is a measure of system activity calculated by the operating system and expressed as a fractional number. The load average is a Unix-specific concept. On Windows, the return value is always [0, 0, 0]. os.networkInterfaces() Added in: v0.6.0 Returns: <Object> Returns an object containing network interfaces that have been assigned a network address. Each key on the returned object identifies a network interface. The associated value is an array of objects that each describe an assigned network address. The properties available on the assigned network address object include: address <string> The assigned IPv4 or IPv6 address netmask <string> The IPv4 or IPv6 network mask family <string> Either IPv4 or IPv6 mac <string> The MAC address of the network interface internal <boolean> true if the network interface is a loopback or similar interface that is not remotely accessible; otherwise false scopeid <number> The numeric IPv6 scope ID (only specified when family is IPv6) cidr <string> The assigned IPv4 or IPv6 address with the routing prefix in CIDR notation. If the netmask is invalid, this property is set to null. { lo: [ { address: '+1-820-468-0787', netmask: '+1-820-468-0787', family: 'IPv4', mac: '00:00:00:00:00:00', internal: true, cidr: '+1-820-468-0787/8' }, { address: '8b7c:f320:99b9:690f:4595:cd17:293a:c069', netmask: '8b7c:f320:99b9:690f:4595:cd17:293a:c069', family: 'IPv6', mac: '00:00:00:00:00:00', scopeid: 0, internal: true, cidr: '8b7c:f320:99b9:690f:4595:cd17:293a:c069/128' } ], eth0: [ { address: '+1-820-468-0787', netmask: '+1-820-468-0787', family: 'IPv4', mac: '01:02:03:0a:0b:0c', internal: false, cidr: '+1-820-468-0787/24' }, { address: '8b7c:f320:99b9:690f:4595:cd17:293a:c069a00:27ff:fe4e:66a1', netmask: '8b7c:f320:99b9:690f:4595:cd17:293a:c069', family: 'IPv6', mac: '01:02:03:0a:0b:0c', scopeid: 1, internal: false, cidr: '8b7c:f320:99b9:690f:4595:cd17:293a:c069a00:27ff:fe4e:66a1/64' } ] } os.platform() Added in: v0.5.0 Returns: <string> Returns a string identifying the operating system platform. The value is set at compile time. Possible values are 'aix', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos', and 'win32'. The return value is equivalent to process.platform. The value 'android' may also be returned if Node.js is built on the Android operating system. Android support is experimental. os.release() Added in: v0.3.3 Returns: <string> Returns the operating system as a string. On POSIX systems, the operating system release is determined by calling uname(3). On Windows, GetVersionExW() is used. See https://en.wikipedia.org/wiki/Uname#Examples for more information. os.setPriority([pid, ]priority) Added in: v10.10.0 pid <integer> The process ID to set scheduling priority for. Default 0. priority <integer> The scheduling priority to assign to the process. Attempts to set the scheduling priority for the process specified by pid. If pid is not provided or is 0, the process ID of the current process is used. The priority input must be an integer between -20 (high priority) and 19 (low priority). Due to differences between Unix priority levels and Windows priority classes, priority is mapped to one of six priority constants in os.constants.priority. When retrieving a process priority level, this range mapping may cause the return value to be slightly different on Windows. To avoid confusion, set priority to one of the priority constants. On Windows, setting priority to PRIORITY_HIGHEST requires elevated user privileges. Otherwise the set priority will be silently reduced to PRIORITY_HIGH. os.tmpdir() History Version Changes v2.0.0 This function is now cross-platform consistent and no longer returns a path with a trailing slash on any platform v0.9.9 Added in: v0.9.9 Returns: <string> Returns the operating system's default directory for temporary files as a string. os.totalmem() Added in: v0.3.3 Returns: <integer> Returns the total amount of system memory in bytes as an integer. os.type() Added in: v0.3.3 Returns: <string> Returns the operating system name as returned by uname(3). For example, it returns 'Linux' on Linux, 'Darwin' on macOS, and 'Windows_NT' on Windows. See https://en.wikipedia.org/wiki/Uname#Examples for additional information about the output of running uname(3) on various operating systems. os.uptime() History Version Changes v10.0.0 The result of this function no longer contains a fraction component on Windows. v0.3.3 Added in: v0.3.3 Returns: <integer> Returns the system uptime in number of seconds. os.userInfo([options]) Added in: v6.0.0 options <Object> encoding <string> Character encoding used to interpret resulting strings. If encoding is set to 'buffer', the username, shell, and homedir values will be Buffer instances. Default: 'utf8'. Returns: <Object> Returns information about the currently effective user. On POSIX platforms, this is typically a subset of the password file. The returned object includes the username, uid, gid, shell, and homedir. On Windows, the uid and gid fields are -1, and shell is null. The value of homedir returned by os.userInfo() is provided by the operating system. This differs from the result of os.homedir(), which queries environment variables for the home directory before falling back to the operating system response. Throws a SystemError if a user has no username or homedir. os.version() Added in: v12.17.0 Returns <string> Returns a string identifying the kernel version. On POSIX systems, the operating system release is determined by calling uname(3). On Windows, RtlGetVersion() is used, and if it is not available, GetVersionExW() will be used. See https://en.wikipedia.org/wiki/Uname#Examples for more information. OS constants The following constants are exported by os.constants. Not all constants will be available on every operating system. Signal constants History Version Changes v5.11.0 Added support for SIGINFO. The following signal constants are exported by os.constants.signals. Constant Description SIGHUP Sent to indicate when a controlling terminal is closed or a parent process exits. SIGINT Sent to indicate when a user wishes to interrupt a process ((Ctrl+C)). SIGQUIT Sent to indicate when a user wishes to terminate a process and perform a core dump. SIGILL Sent to a process to notify that it has attempted to perform an illegal, malformed, unknown, or privileged instruction. SIGTRAP Sent to a process when an exception has occurred. SIGABRT Sent to a process to request that it abort. SIGIOT Synonym for SIGABRT SIGBUS Sent to a process to notify that it has caused a bus error. SIGFPE Sent to a process to notify that it has performed an illegal arithmetic operation. SIGKILL Sent to a process to terminate it immediately. SIGUSR1 SIGUSR2 Sent to a process to identify user-defined conditions. SIGSEGV Sent to a process to notify of a segmentation fault. SIGPIPE Sent to a process when it has attempted to write to a disconnected pipe. SIGALRM Sent to a process when a system timer elapses. SIGTERM Sent to a process to request termination. SIGCHLD Sent to a process when a child process terminates. SIGSTKFLT Sent to a process to indicate a stack fault on a coprocessor. SIGCONT Sent to instruct the operating system to continue a paused process. SIGSTOP Sent to instruct the operating system to halt a process. SIGTSTP Sent to a process to request it to stop. SIGBREAK Sent to indicate when a user wishes to interrupt a process. SIGTTIN Sent to a process when it reads from the TTY while in the background. SIGTTOU Sent to a process when it writes to the TTY while in the background. SIGURG Sent to a process when a socket has urgent data to read. SIGXCPU Sent to a process when it has exceeded its limit on CPU usage. SIGXFSZ Sent to a process when it grows a file larger than the maximum allowed. SIGVTALRM Sent to a process when a virtual timer has elapsed. SIGPROF Sent to a process when a system timer has elapsed. SIGWINCH Sent to a process when the controlling terminal has changed its size. SIGIO Sent to a process when I/O is available. SIGPOLL Synonym for SIGIO SIGLOST Sent to a process when a file lock has been lost. SIGPWR Sent to a process to notify of a power failure. SIGINFO Synonym for SIGPWR SIGSYS Sent to a process to notify of a bad argument. SIGUNUSED Synonym for SIGSYS Error constants The following error constants are exported by os.constants.errno. POSIX error constants Constant Description E2BIG Indicates that the list of arguments is longer than expected. EACCES Indicates that the operation did not have sufficient permissions. EADDRINUSE Indicates that the network address is already in use. EADDRNOTAVAIL Indicates that the network address is currently unavailable for use. EAFNOSUPPORT Indicates that the network address family is not supported. EAGAIN Indicates that there is no data available and to try the operation again later. EALREADY Indicates that the socket already has a pending connection in progress. EBADF Indicates that a file descriptor is not valid. EBADMSG Indicates an invalid data message. EBUSY Indicates that a device or resource is busy. ECANCELED Indicates that an operation was canceled. ECHILD Indicates that there are no child processes. ECONNABORTED Indicates that the network connection has been aborted. ECONNREFUSED Indicates that the network connection has been refused. ECONNRESET Indicates that the network connection has been reset. EDEADLK Indicates that a resource deadlock has been avoided. EDESTADDRREQ Indicates that a destination address is required. EDOM Indicates that an argument is out of the domain of the function. EDQUOT Indicates that the disk quota has been exceeded. EEXIST Indicates that the file already exists. EFAULT Indicates an invalid pointer address. EFBIG Indicates that the file is too large. EHOSTUNREACH Indicates that the host is unreachable. EIDRM Indicates that the identifier has been removed. EILSEQ Indicates an illegal byte sequence. EINPROGRESS Indicates that an operation is already in progress. EINTR Indicates that a function call was interrupted. EINVAL Indicates that an invalid argument was provided. EIO Indicates an otherwise unspecified I/O error. EISCONN Indicates that the socket is connected. EISDIR Indicates that the path is a directory. ELOOP Indicates too many levels of symbolic links in a path. EMFILE Indicates that there are too many open files. EMLINK Indicates that there are too many hard links to a file. EMSGSIZE Indicates that the provided message is too long. EMULTIHOP Indicates that a multihop was attempted. ENAMETOOLONG Indicates that the filename is too long. ENETDOWN Indicates that the network is down. ENETRESET Indicates that the connection has been aborted by the network. ENETUNREACH Indicates that the network is unreachable. ENFILE Indicates too many open files in the system. ENOBUFS Indicates that no buffer space is available. ENODATA Indicates that no message is available on the stream head read queue. ENODEV Indicates that there is no such device. ENOENT Indicates that there is no such file or directory. ENOEXEC Indicates an exec format error. ENOLCK Indicates that there are no locks available. ENOLINK Indications that a link has been severed. ENOMEM Indicates that there is not enough space. ENOMSG Indicates that there is no message of the desired type. ENOPROTOOPT Indicates that a given protocol is not available. ENOSPC Indicates that there is no space available on the device. ENOSR Indicates that there are no stream resources available. ENOSTR Indicates that a given resource is not a stream. ENOSYS Indicates that a function has not been implemented. ENOTCONN Indicates that the socket is not connected. ENOTDIR Indicates that the path is not a directory. ENOTEMPTY Indicates that the directory is not empty. ENOTSOCK Indicates that the given item is not a socket. ENOTSUP Indicates that a given operation is not supported. ENOTTY Indicates an inappropriate I/O control operation. ENXIO Indicates no such device or address. EOPNOTSUPP Indicates that an operation is not supported on the socket. Although ENOTSUP and EOPNOTSUPP have the same value on Linux, according to POSIX.1 these error values should be distinct.) EOVERFLOW Indicates that a value is too large to be stored in a given data type. EPERM Indicates that the operation is not permitted. EPIPE Indicates a broken pipe. EPROTO Indicates a protocol error. EPROTONOSUPPORT Indicates that a protocol is not supported. EPROTOTYPE Indicates the wrong type of protocol for a socket. ERANGE Indicates that the results are too large. EROFS Indicates that the file system is read only. ESPIPE Indicates an invalid seek operation. ESRCH Indicates that there is no such process. ESTALE Indicates that the file handle is stale. ETIME Indicates an expired timer. ETIMEDOUT Indicates that the connection timed out. ETXTBSY Indicates that a text file is busy. EWOULDBLOCK Indicates that the operation would block. EXDEV Indicates an improper link. Windows-specific error constants The following error codes are specific to the Windows operating system. Constant Description WSAEINTR Indicates an interrupted function call. WSAEBADF Indicates an invalid file handle. WSAEACCES Indicates insufficient permissions to complete the operation. WSAEFAULT Indicates an invalid pointer address. WSAEINVAL Indicates that an invalid argument was passed. WSAEMFILE Indicates that there are too many open files. WSAEWOULDBLOCK Indicates that a resource is temporarily unavailable. WSAEINPROGRESS Indicates that an operation is currently in progress. WSAEALREADY Indicates that an operation is already in progress. WSAENOTSOCK Indicates that the resource is not a socket. WSAEDESTADDRREQ Indicates that a destination address is required. WSAEMSGSIZE Indicates that the message size is too long. WSAEPROTOTYPE Indicates the wrong protocol type for the socket. WSAENOPROTOOPT Indicates a bad protocol option. WSAEPROTONOSUPPORT Indicates that the protocol is not supported. WSAESOCKTNOSUPPORT Indicates that the socket type is not supported. WSAEOPNOTSUPP Indicates that the operation is not supported. WSAEPFNOSUPPORT Indicates that the protocol family is not supported. WSAEAFNOSUPPORT Indicates that the address family is not supported. WSAEADDRINUSE Indicates that the network address is already in use. WSAEADDRNOTAVAIL Indicates that the network address is not available. WSAENETDOWN Indicates that the network is down. WSAENETUNREACH Indicates that the network is unreachable. WSAENETRESET Indicates that the network connection has been reset. WSAECONNABORTED Indicates that the connection has been aborted. WSAECONNRESET Indicates that the connection has been reset by the peer. WSAENOBUFS Indicates that there is no buffer space available. WSAEISCONN Indicates that the socket is already connected. WSAENOTCONN Indicates that the socket is not connected. WSAESHUTDOWN Indicates that data cannot be sent after the socket has been shutdown. WSAETOOMANYREFS Indicates that there are too many references. WSAETIMEDOUT Indicates that the connection has timed out. WSAECONNREFUSED Indicates that the connection has been refused. WSAELOOP Indicates that a name cannot be translated. WSAENAMETOOLONG Indicates that a name was too long. WSAEHOSTDOWN Indicates that a network host is down. WSAEHOSTUNREACH Indicates that there is no route to a network host. WSAENOTEMPTY Indicates that the directory is not empty. WSAEPROCLIM Indicates that there are too many processes. WSAEUSERS Indicates that the user quota has been exceeded. WSAEDQUOT Indicates that the disk quota has been exceeded. WSAESTALE Indicates a stale file handle reference. WSAEREMOTE Indicates that the item is remote. WSASYSNOTREADY Indicates that the network subsystem is not ready. WSAVERNOTSUPPORTED Indicates that the winsock.dll version is out of range. WSANOTINITIALISED Indicates that successful WSAStartup has not yet been performed. WSAEDISCON Indicates that a graceful shutdown is in progress. WSAENOMORE Indicates that there are no more results. WSAECANCELLED Indicates that an operation has been canceled. WSAEINVALIDPROCTABLE Indicates that the procedure call table is invalid. WSAEINVALIDPROVIDER Indicates an invalid service provider. WSAEPROVIDERFAILEDINIT Indicates that the service provider failed to initialized. WSASYSCALLFAILURE Indicates a system call failure. WSASERVICE_NOT_FOUND Indicates that a service was not found. WSATYPE_NOT_FOUND Indicates that a class type was not found. WSA_E_NO_MORE Indicates that there are no more results. WSA_E_CANCELLED Indicates that the call was canceled. WSAEREFUSED Indicates that a database query was refused. dlopen constants If available on the operating system, the following constants are exported in os.constants.dlopen. See dlopen(3) for detailed information. Constant Description RTLD_LAZY Perform lazy binding. Node.js sets this flag by default. RTLD_NOW Resolve all undefined symbols in the library before dlopen(3) returns. RTLD_GLOBAL Symbols defined by the library will be made available for symbol resolution of subsequently loaded libraries. RTLD_LOCAL The converse of RTLD_GLOBAL. This is the default behavior if neither flag is specified. RTLD_DEEPBIND Make a self-contained library use its own symbols in preference to symbols from previously loaded libraries. Priority constants Added in: v10.10.0 The following process scheduling constants are exported by os.constants.priority. Constant Description PRIORITY_LOW The lowest process scheduling priority. This corresponds to IDLE_PRIORITY_CLASS on Windows, and a nice value of 19 on all other platforms. PRIORITY_BELOW_NORMAL The process scheduling priority above PRIORITY_LOW and below PRIORITY_NORMAL. This corresponds to BELOW_NORMAL_PRIORITY_CLASS on Windows, and a nice value of 10 on all other platforms. PRIORITY_NORMAL The default process scheduling priority. This corresponds to NORMAL_PRIORITY_CLASS on Windows, and a nice value of 0 on all other platforms. PRIORITY_ABOVE_NORMAL The process scheduling priority above PRIORITY_NORMAL and below PRIORITY_HIGH. This corresponds to ABOVE_NORMAL_PRIORITY_CLASS on Windows, and a nice value of -7 on all other platforms. PRIORITY_HIGH The process scheduling priority above PRIORITY_ABOVE_NORMAL and below PRIORITY_HIGHEST. This corresponds to HIGH_PRIORITY_CLASS on Windows, and a nice value of -14 on all other platforms. PRIORITY_HIGHEST The highest process scheduling priority. This corresponds to REALTIME_PRIORITY_CLASS on Windows, and a nice value of -20 on all other platforms. libuv constants Constant Description UV_UDP_REUSEADDR
Class scala.runtime.ArrayCharSequence Source code final class ArrayCharSequence(val xs: Array[Char], start: Int, end: Int) extends CharSequence Supertypes trait CharSequence class Object trait Matchable class Any Concrete methods Source def charAt(index: Int): Char Source def length: Int Source def subSequence(start0: Int, end0: Int): CharSequence Source override def toString: String Definition Classes CharSequence -> Any Inherited methods def chars(): IntStream Inherited from CharSequence def codePoints(): IntStream Inherited from CharSequence def isEmpty(): Boolean Inherited from CharSequence Concrete fields Source val xs: Array[Char]
Information Schema COLUMN_PRIVILEGES Table The Information Schema COLUMN_PRIVILEGES table contains column privilege information derived from the mysql.columns_priv grant table. It has the following columns: Column Description GRANTEE In the format user_name@host_name. TABLE_CATALOG Always def. TABLE_SCHEMA Database name. TABLE_NAME Table name. COLUMN_NAME Column name. PRIVILEGE_TYPE One of SELECT, INSERT, UPDATE or REFERENCES. IS_GRANTABLE Whether the user has the GRANT OPTION for this privilege. Similar information can be accessed with the SHOW FULL COLUMNS and SHOW GRANTS statements. See the GRANT article for more about privileges. This information is also stored in the columns_priv table, in the mysql system database. For a description of the privileges that are shown in this table, see column privileges. Example In the following example, no column-level privilege has been explicitly assigned: SELECT * FROM information_schema.COLUMN_PRIVILEGES; Empty set 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.
module LLVM8b7c:f320:99b9:690f:4595:cd17:293a:c069ValueMethods Direct including types LLVM8b7c:f320:99b9:690f:4595:cd17:293a:c069unction LLVM8b7c:f320:99b9:690f:4595:cd17:293a:c069Value Defined in: llvm/value_methods.cr Constructors .new(unwrap : LibLLVM8b7c:f320:99b9:690f:4595:cd17:293a:c069ValueRef) Instance Method Summary #add_instruction_attribute(index : Int, attribute : LLVM8b7c:f320:99b9:690f:4595:cd17:293a:c069ttribute, context : LLVM8b7c:f320:99b9:690f:4595:cd17:293a:c069ontext, type : LLVM8b7c:f320:99b9:690f:4595:cd17:293a:c069Type? = nil) #alignment=(bytes) #call_convention #call_convention=(call_convention) #const_int_get_sext_value #const_int_get_zext_value #constant? #dll_storage_class=(storage_class) #dump #global_constant=(global_constant) #global_constant? #initializer #initializer=(initializer) #inspect(io : IO) : Nil #kind #linkage #linkage=(linkage) #name #name=(name) #ordering=(ordering) #thread_local=(thread_local) #thread_local? #to_unsafe #to_value #type #volatile=(volatile) Constructor Detail def self.new(unwrap : LibLLVM8b7c:f320:99b9:690f:4595:cd17:293a:c069ValueRef)Source Instance Method Detail def add_instruction_attribute(index : Int, attribute : LLVM8b7c:f320:99b9:690f:4595:cd17:293a:c069ttribute, context : LLVM8b7c:f320:99b9:690f:4595:cd17:293a:c069ontext, type : LLVM8b7c:f320:99b9:690f:4595:cd17:293a:c069Type? = nil)Source def alignment=(bytes)Source def call_conventionSource def call_convention=(call_convention)Source def const_int_get_sext_valueSource def const_int_get_zext_valueSource def constant?Source def dll_storage_class=(storage_class)Source def dumpSource def global_constant=(global_constant)Source def global_constant?Source def initializerSource def initializer=(initializer)Source def inspect(io : IO) : NilSource def kindSource def linkageSource def linkage=(linkage)Source def nameSource def name=(name)Source def ordering=(ordering)Source def thread_local=(thread_local)Source def thread_local?Source def to_unsafeSource def to_valueSource def typeSource def volatile=(volatile)Source
salt.pillar.mysql Retrieve Pillar data by doing a MySQL query MariaDB provides Python support through the MySQL Python package. Therefore, you may use this module with both MySQL or MariaDB. This module is a concrete implementation of the sql_base ext_pillar for MySQL. maturity new depends python-mysqldb platform all Configuring the mysql ext_pillar Use the 'mysql' key under ext_pillar for configuration of queries. MySQL configuration of the MySQL returner is being used (mysql.db, mysql.user, mysql.pass, mysql.port, mysql.host) for database connection info. Required python modules: MySQLdb Complete example mysql: user: 'salt' pass: 'super_secret_password' db: 'salt_db' port: 3306 ssl: cert: /etc/mysql/client-cert.pem key: /etc/mysql/client-key.pem ext_pillar: - mysql: fromdb: query: 'SELECT col1,col2,col3,col4,col5,col6,col7 FROM some_random_table WHERE minion_pattern LIKE %s' depth: 5 as_list: True with_lists: [1,3] class salt.pillar.mysql.MySQLExtPillar This class receives and processes the database rows from MySQL. extract_queries(args, kwargs) This function normalizes the config block into a set of queries we can use. The return is a list of consistently laid out dicts. salt.pillar.mysql.ext_pillar(minion_id, pillar, *args, **kwargs) Execute queries against MySQL, merge and return as a dict
public function DatabaseLog8b7c:f320:99b9:690f:4595:cd17:293a:c069log public DatabaseLog8b7c:f320:99b9:690f:4595:cd17:293a:c069log(DatabaseStatementInterface $statement, $args, $time) Log a query to all active logging keys. Parameters $statement: The prepared statement object to log. $args: The arguments passed to the statement object. $time: The time in milliseconds the query took to execute. File includes/database/log.inc, line 115 Logging classes for the database layer. Class DatabaseLog Database query logger. Code public function log(DatabaseStatementInterface $statement, $args, $time) { foreach (array_keys($this->queryLog) as $key) { $this->queryLog[$key][] = array( 'query' => $statement->getQueryString(), 'args' => $args, 'target' => $statement->dbh->getTarget(), 'caller' => $this->findCaller(), 'time' => $time, ); } }
date_get_last_errors (PHP 5 >= 5.3.0, PHP 7, PHP 8) date_get_last_errors — Alias of DateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069getLastErrors() Description This function is an alias of: DateTim8b7c:f320:99b9:690f:4595:cd17:293a:c069getLastErrors()
function hook_field_widget_form_alter hook_field_widget_form_alter(&$element, &$form_state, $context) Alter forms for field widgets provided by other modules. Parameters $element: The field widget form element as constructed by hook_field_widget_form(). $form_state: An associative array containing the current state of the form. $context: An associative array containing the following key-value pairs, matching the arguments received by hook_field_widget_form(): form: The form structure to which widgets are being attached. This may be a full form structure, or a sub-element of a larger form. field: The field structure. instance: The field instance structure. langcode: The language associated with $items. items: Array of default values for this field. delta: The order of this item in the array of subelements (0, 1, 2, etc). See also hook_field_widget_form() hook_field_widget_WIDGET_TYPE_form_alter() Related topics Field Widget API Define Field API widget types. Hooks Allow modules to interact with the Drupal core. File modules/field/field.api.php, line 922 Hooks provided by the Field module. Code function hook_field_widget_form_alter(&$element, &$form_state, $context) { // Add a css class to widget form elements for all fields of type mytype. if ($context['field']['type'] == 'mytype') { // Be sure not to overwrite existing attributes. $element['#attributes']['class'][] = 'myclass'; } }
Class scala.reflect.api.Trees.ClassDefExtractor abstract class ClassDefExtractor extends AnyRef An extractor class to create and pattern match with syntax ClassDef(mods, name, tparams, impl). This AST node corresponds to the following Scala code: mods class name [tparams] impl Where impl stands for: extends parents { defs } Source Trees.scala Linear Supertypes Instance Constructors new ClassDefExtractor() Abstract Value Members abstract def apply(mods: Universe.Modifiers, name: Universe.TypeName, tparams: List[Universe.TypeDef], impl: Universe.Template): Universe.ClassDef abstract def unapply(classDef: Universe.ClassDef): Option[(Universe.Modifiers, Universe.TypeName, List[Universe.TypeDef], Universe.Template)] Concrete Value Members final def !=(arg0: Any): Boolean Definition Classes AnyRef → Any final def ##(): Int Definition Classes AnyRef → Any def +(other: String): String Implicit This member is added by an implicit conversion from Universe.ClassDefExtractor to any2stringadd[Universe.ClassDefExtractor] performed by method any2stringadd in scala.Predef. Definition Classes any2stringadd def ->[B](y: B): (Universe.ClassDefExtractor, B) Implicit This member is added by an implicit conversion from Universe.ClassDefExtractor to ArrowAssoc[Universe.ClassDefExtractor] performed by method ArrowAssoc in scala.Predef. Definition Classes ArrowAssoc Annotations @inline() final def ==(arg0: Any): Boolean Definition Classes AnyRef → Any final def asInstanceOf[T0]: T0 Definition Classes Any def clone(): AnyRef Attributes protected[lang] Definition Classes AnyRef Annotations @throws( ... ) @native() def ensuring(cond: (Universe.ClassDefExtractor) ⇒ Boolean, msg: ⇒ Any): Universe.ClassDefExtractor Implicit This member is added by an implicit conversion from Universe.ClassDefExtractor to Ensuring[Universe.ClassDefExtractor] performed by method Ensuring in scala.Predef. Definition Classes Ensuring def ensuring(cond: (Universe.ClassDefExtractor) ⇒ Boolean): Universe.ClassDefExtractor Implicit This member is added by an implicit conversion from Universe.ClassDefExtractor to Ensuring[Universe.ClassDefExtractor] performed by method Ensuring in scala.Predef. Definition Classes Ensuring def ensuring(cond: Boolean, msg: ⇒ Any): Universe.ClassDefExtractor Implicit This member is added by an implicit conversion from Universe.ClassDefExtractor to Ensuring[Universe.ClassDefExtractor] performed by method Ensuring in scala.Predef. Definition Classes Ensuring def ensuring(cond: Boolean): Universe.ClassDefExtractor Implicit This member is added by an implicit conversion from Universe.ClassDefExtractor to Ensuring[Universe.ClassDefExtractor] performed by method Ensuring in scala.Predef. Definition Classes Ensuring final def eq(arg0: AnyRef): Boolean Definition Classes AnyRef def equals(arg0: Any): Boolean Definition Classes AnyRef → Any def finalize(): Unit Attributes protected[lang] Definition Classes AnyRef Annotations @throws( classOf[java.lang.Throwable] ) def formatted(fmtstr: String): String Implicit This member is added by an implicit conversion from Universe.ClassDefExtractor to StringFormat[Universe.ClassDefExtractor] performed by method StringFormat in scala.Predef. Definition Classes StringFormat Annotations @inline() final def getClass(): Class[_] Definition Classes AnyRef → Any Annotations @native() def hashCode(): Int Definition Classes AnyRef → Any Annotations @native() final def isInstanceOf[T0]: Boolean Definition Classes Any final def ne(arg0: AnyRef): Boolean Definition Classes AnyRef final def notify(): Unit Definition Classes AnyRef Annotations @native() final def notifyAll(): Unit Definition Classes AnyRef Annotations @native() final def synchronized[T0](arg0: ⇒ T0): T0 Definition Classes AnyRef def toString(): String Definition Classes AnyRef → Any final def wait(): Unit Definition Classes AnyRef Annotations @throws( ... ) final def wait(arg0: Long, arg1: Int): Unit Definition Classes AnyRef Annotations @throws( ... ) final def wait(arg0: Long): Unit Definition Classes AnyRef Annotations @throws( ... ) @native() def →[B](y: B): (Universe.ClassDefExtractor, B) Implicit This member is added by an implicit conversion from Universe.ClassDefExtractor to ArrowAssoc[Universe.ClassDefExtractor] performed by method ArrowAssoc in scala.Predef. Definition Classes ArrowAssoc
This is the complete list of members for pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber, including all inherited members. block_signal() pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber protected block_signals() pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber inlineprotected connections_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber protected convertDepthToPointXYZ(const rs8b7c:f320:99b9:690f:4595:cd17:293a:c069points &points) pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected convertIntensityDepthToPointXYZRGBI(const rs8b7c:f320:99b9:690f:4595:cd17:293a:c069points &points, const rs8b7c:f320:99b9:690f:4595:cd17:293a:c069video_frame &ir) pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected convertRealsensePointsToPointCloud(const rs8b7c:f320:99b9:690f:4595:cd17:293a:c069points &points, Functor mapColorFunc) pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected convertRGBADepthToPointXYZRGBA(const rs8b7c:f320:99b9:690f:4595:cd17:293a:c069points &points, const rs8b7c:f320:99b9:690f:4595:cd17:293a:c069video_frame &rgb) pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected convertRGBDepthToPointXYZRGB(const rs8b7c:f320:99b9:690f:4595:cd17:293a:c069points &points, const rs8b7c:f320:99b9:690f:4595:cd17:293a:c069video_frame &rgb) pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected createSignal() pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber protected device_height_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected device_width_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected disconnect_all_slots() pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber protected file_name_or_serial_number_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected find_signal() const noexcept pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber protected fps_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected getFramesPerSecond() const override pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber virtual getName() const override pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber inlinevirtual getTextureColor(const rs8b7c:f320:99b9:690f:4595:cd17:293a:c069video_frame &texture, float u, float v) pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protectedstatic getTextureIdx(const rs8b7c:f320:99b9:690f:4595:cd17:293a:c069video_frame &texture, float u, float v) pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protectedstatic getTextureIntensity(const rs8b7c:f320:99b9:690f:4595:cd17:293a:c069video_frame &texture, float u, float v) pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protectedstatic Grabber()=default pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber Grabber(const Grabber &)=delete pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber Grabber(Grabber &&)=default pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber isRunning() const override pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber virtual num_slots() const noexcept pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber protected operator=(const Grabber &)=delete pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber operator=(Grabber &&)=default pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber pc_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected pipe_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected providesCallback() const noexcept pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber quit_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected RealSense2Grabber(const st8b7c:f320:99b9:690f:4595:cd17:293a:c069string &file_name_or_serial_number="", const bool repeat_playback=true) pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber registerCallback(const st8b7c:f320:99b9:690f:4595:cd17:293a:c069function< T > &callback) pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber reInitialize() pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected repeat_playback_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected running_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected setDeviceOptions(st8b7c:f320:99b9:690f:4595:cd17:293a:c069uint32_t width, st8b7c:f320:99b9:690f:4595:cd17:293a:c069uint32_t height, st8b7c:f320:99b9:690f:4595:cd17:293a:c069uint32_t fps=30) pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber inline shared_connections_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber protected signal_librealsense_PointXYZ typedef pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber signal_librealsense_PointXYZI typedef pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber signal_librealsense_PointXYZRGB typedef pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber signal_librealsense_PointXYZRGBA typedef pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber signal_PointXYZ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected signal_PointXYZI pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected signal_PointXYZRGB pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected signal_PointXYZRGBA pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected signals_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber protected signalsChanged() override pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protectedvirtual start() override pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber virtual stop() override pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber virtual target_fps_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected thread_ pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected threadFunction() pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber protected toggle() pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber inline unblock_signal() pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber protected unblock_signals() pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber inlineprotected ~Grabber() noexcept=default pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069Grabber inlinevirtual ~RealSense2Grabber() pcl8b7c:f320:99b9:690f:4595:cd17:293a:c069RealSense2Grabber © 2009–2012, Willow Garage, Inc.
matplotlib.axes.Axes.phase_spectrum Axes.phase_spectrum(x, Fs=None, Fc=None, window=None, pad_to=None, sides=None, *, data=None, **kwargs) Plot the phase spectrum. Call signature: phase_spectrum(x, Fs=2, Fc=0, window=mlab.window_hanning, pad_to=None, sides='default', **kwargs) Compute the phase spectrum (unwrapped angle spectrum) of x. Data is padded to a length of pad_to and the windowing function window is applied to the signal. Parameters: x : 1-D array or sequence Array or sequence containing the data Fs : scalar The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. window : callable or ndarray A function or a vector of length NFFT. To create window vectors see window_hanning(), window_none(), numpy.blackman(), numpy.hamming(), numpy.bartlett(), scipy.signal(), scipy.signal.get_window(), etc. The default is window_hanning(). If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. sides : [ ‘default’ | ‘onesided’ | ‘twosided’ ] Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. ‘onesided’ forces the return of a one-sided spectrum, while ‘twosided’ forces two-sided. pad_to : integer The number of points to which the data segment is padded when performing the FFT. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the n parameter in the call to fft(). The default is None, which sets pad_to equal to the length of the input signal (i.e. no padding). Fc : integer The center frequency of x (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. Returns: spectrum : 1-D array The values for the phase spectrum in radians (real valued) freqs : 1-D array The frequencies corresponding to the elements in spectrum line : a Line2D instance The line created by this function Other Parameters: **kwargs : Keyword arguments control the Line2D properties: Property Description agg_filter unknown alpha float (0.0 transparent through 1.0 opaque) animated [True | False] antialiased or aa [True | False] clip_box a matplotlib.transforms.Bbox instance clip_on [True | False] clip_path [ (Path, Transform) | Patch | None ] color or c any matplotlib color contains a callable function dash_capstyle [‘butt’ | ‘round’ | ‘projecting’] dash_joinstyle [‘miter’ | ‘round’ | ‘bevel’] dashes sequence of on/off ink in points drawstyle [‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’] figure a matplotlib.figure.Figure instance fillstyle [‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’] gid an id string label string or anything printable with ‘%s’ conversion. linestyle or ls [‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) | '-' | '--' | '-.' | ':' | 'None' | ' ' | ''] linewidth or lw float value in points marker A valid marker style markeredgecolor or mec any matplotlib color markeredgewidth or mew float value in points markerfacecolor or mfc any matplotlib color markerfacecoloralt or mfcalt any matplotlib color markersize or ms float markevery [None | int | length-2 tuple of int | slice | list/array of int | float | length-2 tuple of float] path_effects unknown picker float distance in points or callable pick function fn(artist, event) pickradius float distance in points rasterized [True | False | None] sketch_params unknown snap unknown solid_capstyle [‘butt’ | ‘round’ | ‘projecting’] solid_joinstyle [‘miter’ | ‘round’ | ‘bevel’] transform a matplotlib.transforms.Transform instance url a url string visible [True | False] xdata 1D array ydata 1D array zorder any number See also magnitude_spectrum() magnitude_spectrum() plots the magnitudes of the corresponding frequencies. angle_spectrum() angle_spectrum() plots the wrapped version of this function. specgram() specgram() can plot the phase spectrum of segments within the signal in a colormap. In addition to the above described arguments, this function can take a data keyword argument. If such a data argument is given, the following arguments are replaced by data[<arg>]: * All arguments with the following names: ‘x’.
CMAKE_SUPPRESS_REGENERATION If CMAKE_SUPPRESS_REGENERATION is OFF, which is default, then CMake adds a special target on which all other targets depend that checks the build system and optionally re-runs CMake to regenerate the build system when the target specification source changes. If this variable evaluates to ON at the end of the top-level CMakeLists.txt file, CMake will not add the regeneration target to the build system or perform any build system checks.
OBJC_STANDARD New in version 3.16. The OBJC standard whose features are requested to build this target. This property specifies the OBJC standard whose features are requested to build this target. For some compilers, this results in adding a flag such as -std=gnu11 to the compile line. Supported values are: 90 Objective C89/C90 99 Objective C99 11 Objective C11 If the value requested does not result in a compile flag being added for the compiler in use, a previous standard flag will be added instead. This means that using: set_property(TARGET tgt PROPERTY OBJC_STANDARD 11) with a compiler which does not support -std=gnu11 or an equivalent flag will not result in an error or warning, but will instead add the -std=gnu99 or -std=gnu90 flag if supported. This "decay" behavior may be controlled with the OBJC_STANDARD_REQUIRED target property. Additionally, the OBJC_EXTENSIONS target property may be used to control whether compiler-specific extensions are enabled on a per-target basis. If the property is not set, and the project has set the C_STANDARD, the value of C_STANDARD is set for OBJC_STANDARD. See the cmake-compile-features(7) manual for information on compile features and a list of supported compilers. This property is initialized by the value of the CMAKE_OBJC_STANDARD variable if it is set when a target is created.
FreezableAtomicReference kotlin-stdlib / kotlin.native.concurrent / FreezableAtomicReference Platform and version requirements: Native (1.3) class FreezableAtomicReference<T> An atomic reference to a Kotlin object. Can be used in concurrent scenarious, but must be frozen first, otherwise behaves as regular box for the value. If frozen, shall be zeroed out once no longer needed. Otherwise memory leak could happen if atomic reference is a part of a reference cycle. Constructors Platform and version requirements: Native (1.3) <init> An atomic reference to a Kotlin object. Can be used in concurrent scenarious, but must be frozen first, otherwise behaves as regular box for the value. If frozen, shall be zeroed out once no longer needed. Otherwise memory leak could happen if atomic reference is a part of a reference cycle. FreezableAtomicReference(value_: T) Properties Platform and version requirements: Native (1.3) value The referenced value. Gets the value or sets the new value. If new value is not null, and this is frozen - it must be frozen or permanent object. var value: T Functions Platform and version requirements: Native (1.3) compareAndSet Compares value with expected and replaces it with new value if values matches. Note that comparison is identity-based, not value-based. fun compareAndSet(expected: T, new: T): Boolean Platform and version requirements: Native (1.3) compareAndSwap Compares value with expected and replaces it with new value if values matches. If new value is not null and object is frozen, it must be frozen or permanent object. fun compareAndSwap(expected: T, new: T): T Platform and version requirements: Native (1.3) toString Returns the string representation of this object. fun toString(): String
9.3 Names Identifiers are used to give names to several classes of language objects and refer to these objects by name later: value names (syntactic class value-name), value constructors and exception constructors (class constr-name), labels (label-name, defined in section 9.1), polymorphic variant tags (tag-name), type constructors (typeconstr-name), record fields (field-name), class names (class-name), method names (method-name), instance variable names (inst-var-name), module names (module-name), module type names (modtype-name). These eleven name spaces are distinguished both by the context and by the capitalization of the identifier: whether the first letter of the identifier is in lowercase (written lowercase-ident below) or in uppercase (written capitalized-ident). Underscore is considered a lowercase letter for this purpose. Naming objects value-name 8b7c:f320:99b9:690f:4595:cd17:293a:c069= lowercase-ident ∣ ( operator-name ) operator-name 8b7c:f320:99b9:690f:4595:cd17:293a:c069= prefix-symbol ∣ infix-op infix-op 8b7c:f320:99b9:690f:4595:cd17:293a:c069= infix-symbol ∣ * ∣ + ∣ - ∣ -. ∣ = ∣ != ∣ < ∣ > ∣ or ∣ || ∣ & ∣ && ∣ := ∣ mod ∣ land ∣ lor ∣ lxor ∣ lsl ∣ lsr ∣ asr constr-name 8b7c:f320:99b9:690f:4595:cd17:293a:c069= capitalized-ident tag-name 8b7c:f320:99b9:690f:4595:cd17:293a:c069= capitalized-ident typeconstr-name 8b7c:f320:99b9:690f:4595:cd17:293a:c069= lowercase-ident field-name 8b7c:f320:99b9:690f:4595:cd17:293a:c069= lowercase-ident module-name 8b7c:f320:99b9:690f:4595:cd17:293a:c069= capitalized-ident modtype-name 8b7c:f320:99b9:690f:4595:cd17:293a:c069= ident class-name 8b7c:f320:99b9:690f:4595:cd17:293a:c069= lowercase-ident inst-var-name 8b7c:f320:99b9:690f:4595:cd17:293a:c069= lowercase-ident method-name 8b7c:f320:99b9:690f:4595:cd17:293a:c069= lowercase-ident See also the following language extension: extended indexing operators. As shown above, prefix and infix symbols as well as some keywords can be used as value names, provided they are written between parentheses. The capitalization rules are summarized in the table below. Name space Case of first letter Values lowercase Constructors uppercase Labels lowercase Polymorphic variant tags uppercase Exceptions uppercase Type constructors lowercase Record fields lowercase Classes lowercase Instance variables lowercase Methods lowercase Modules uppercase Module types any Note on polymorphic variant tags: the current implementation accepts lowercase variant tags in addition to capitalized variant tags, but we suggest you avoid lowercase variant tags for portability and compatibility with future OCaml versions. Referring to named objects value-path 8b7c:f320:99b9:690f:4595:cd17:293a:c069= [ module-path . ] value-name constr 8b7c:f320:99b9:690f:4595:cd17:293a:c069= [ module-path . ] constr-name typeconstr 8b7c:f320:99b9:690f:4595:cd17:293a:c069= [ extended-module-path . ] typeconstr-name field 8b7c:f320:99b9:690f:4595:cd17:293a:c069= [ module-path . ] field-name modtype-path 8b7c:f320:99b9:690f:4595:cd17:293a:c069= [ extended-module-path . ] modtype-name class-path 8b7c:f320:99b9:690f:4595:cd17:293a:c069= [ module-path . ] class-name classtype-path 8b7c:f320:99b9:690f:4595:cd17:293a:c069= [ extended-module-path . ] class-name module-path 8b7c:f320:99b9:690f:4595:cd17:293a:c069= module-name { . module-name } extended-module-path 8b7c:f320:99b9:690f:4595:cd17:293a:c069= extended-module-name { . extended-module-name } extended-module-name 8b7c:f320:99b9:690f:4595:cd17:293a:c069= module-name { ( extended-module-path ) } A named object can be referred to either by its name (following the usual static scoping rules for names) or by an access path prefix . name, where prefix designates a module and name is the name of an object defined in that module. The first component of the path, prefix, is either a simple module name or an access path name1 . name2 …, in case the defining module is itself nested inside other modules. For referring to type constructors, module types, or class types, the prefix can also contain simple functor applications (as in the syntactic class extended-module-path above) in case the defining module is the result of a functor application. Label names, tag names, method names and instance variable names need not be qualified: the former three are global labels, while the latter are local to a class.
Class IsUnique Checks that a list of fields from an entity are unique in the table Namespace: Cake\ORM\Rule Location: ORM/Rule/IsUnique.php Properties summary $_fields protected array The list of fields to check Method Summary __construct() public Constructor. __invoke() public Performs the uniqueness check _alias() protected Add a model alias to all the keys in a set of conditions. Method Detail __construct()source public __construct( array $fields ) Constructor. Parameters array $fields The list of fields to check uniqueness for __invoke()source public __invoke( Cake\Datasource\EntityInterface $entity , array $options ) Performs the uniqueness check Parameters Cake\Datasource\EntityInterface $entity The entity from where to extract the fields array $options Options passed to the check, where the repository key is required. Returns boolean _alias()source protected _alias( string $alias , array $conditions ) Add a model alias to all the keys in a set of conditions. Null values will be omitted from the generated conditions, as SQL UNIQUE indexes treat NULL != NULL Parameters string $alias The alias to add. array $conditions The conditions to alias. Returns array Properties detail $_fieldssource protected array The list of fields to check
GearmanClient8b7c:f320:99b9:690f:4595:cd17:293a:c069lone (PECL gearman >= 0.5.0) GearmanClient8b7c:f320:99b9:690f:4595:cd17:293a:c069lone — Create a copy of a GearmanClient object Description public GearmanClient8b7c:f320:99b9:690f:4595:cd17:293a:c069lone(): GearmanClient Creates a copy of a GearmanClient object. Parameters This function has no parameters. Return Values A GearmanClient on success, false on failure.
ec2_snapshot - creates a snapshot from an existing volume New in version 1.5. Synopsis Requirements Parameters Notes Examples Status Support Author Synopsis creates an EC2 snapshot from an existing EBS volume Requirements The below requirements are needed on the host that executes this module. python >= 2.6 boto Parameters Parameter Choices/Defaults Comments aws_access_key Default:None AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used. aliases: ec2_access_key, access_key aws_secret_key Default:None AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used. aliases: ec2_secret_key, secret_key description description to be applied to the snapshot device_name device name of a mounted volume to be snapshotted ec2_url Default:None Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used. instance_id instance that has the required volume to snapshot mounted last_snapshot_min_age (added in 2.0) Default:0 If the volume's most recent snapshot has started less than `last_snapshot_min_age' minutes ago, a new snapshot will not be created. profile (added in 1.6) Default:None Uses a boto profile. Only works with boto >= 2.24.0. region The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region aliases: aws_region, ec2_region security_token (added in 1.6) Default:None AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used. aliases: access_token snapshot_id (added in 1.9) snapshot id to remove snapshot_tags (added in 1.6) a hash/dictionary of tags to add to the snapshot state (added in 1.9) Choices: absent present ← whether to add or create a snapshot validate_certs (added in 1.5) Choices: no yes ← When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. volume_id volume from which to take the snapshot wait (added in 1.5.1) Choices: yes ← no wait for the snapshot to be ready wait_timeout (added in 1.5.1) Default:0 how long before wait gives up, in seconds specify 0 to wait forever Notes Note If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence AWS_URL or EC2_URL, AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY or EC2_ACCESS_KEY, AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY or EC2_SECRET_KEY, AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN, AWS_REGION or EC2_REGION Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See http://boto.readthedocs.org/en/latest/boto_config_tut.html AWS_REGION or EC2_REGION can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file Examples # Simple snapshot of volume using volume_id - ec2_snapshot: volume_id: vol-abcdef12 description: snapshot of /data from DB123 taken 2013/11/28 12:18:32 # Snapshot of volume mounted on device_name attached to instance_id - ec2_snapshot: instance_id: i-12345678 device_name: /dev/sdb1 description: snapshot of /data from DB123 taken 2013/11/28 12:18:32 # Snapshot of volume with tagging - ec2_snapshot: instance_id: i-12345678 device_name: /dev/sdb1 snapshot_tags: frequency: hourly source: /data # Remove a snapshot - local_action: module: ec2_snapshot snapshot_id: snap-abcd1234 state: absent # Create a snapshot only if the most recent one is older than 1 hour - local_action: module: ec2_snapshot volume_id: vol-abcdef12 last_snapshot_min_age: 60 Status This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface. Support For more information about Red Hat’s support of this module, please refer to this Knowledge Base article Author Will Thames (@willthames) Hint If you notice any issues in this documentation you can edit this document to improve it. © 2012–2018 Michael DeHaan
CanDeactivate interface Interface that a class can implement to be a guard deciding if a route can be deactivated. If all guards return true, navigation will continue. If any guard returns false, navigation will be cancelled. If any guard returns a UrlTree, current navigation will be cancelled and a new navigation will be kicked off to the UrlTree returned from the guard. See more... interface CanDeactivate<T> { canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree } Description class UserToken {} class Permissions { canDeactivate(user: UserToken, id: string): boolean { return true; } } @Injectable() class CanDeactivateTeam implements CanDeactivate<TeamComponent> { constructor(private permissions: Permissions, private currentUser: UserToken) {} canDeactivate( component: TeamComponent, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState: RouterStateSnapshot ): Observable<boolean|UrlTree>|Promise<boolean|UrlTree>|boolean|UrlTree { return this.permissions.canDeactivate(this.currentUser, route.params.id); } } @NgModule({ imports: [ RouterModule.forRoot([ { path: 'team/:id', component: TeamComponent, canDeactivate: [CanDeactivateTeam] } ]) ], providers: [CanDeactivateTeam, UserToken, Permissions] }) class AppModule {} You can alternatively provide a function with the canDeactivate signature: @NgModule({ imports: [ RouterModule.forRoot([ { path: 'team/:id', component: TeamComponent, canDeactivate: ['canDeactivateTeam'] } ]) ], providers: [ { provide: 'canDeactivateTeam', useValue: (component: TeamComponent, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState: RouterStateSnapshot) => true } ] }) class AppModule {} Methods canDeactivate() canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree Parameters component T currentRoute ActivatedRouteSnapshot currentState RouterStateSnapshot nextState RouterStateSnapshot Optional. Default is undefined. Returns Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree
downloads.search() The search() function of the downloads API queries the DownloadItems available in the browser's downloads manager, and returns those that match the specified search criteria. This is an asynchronous function that returns a Promise. Syntax let searching = browser.downloads.search(query); Parameters query A downloads.DownloadQuery object. Return value A Promise. The promise is fulfilled with an array of downloads.DownloadItem objects that match the given criteria.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 search Yes 79 47 ? Yes No ? ? 48-79 ? No ? Examples In general, you restrict the items retrieved using the query parameter.Get downloads matching "query" function logDownloads(downloads) { for (const download of downloads) { console.log(download.id); console.log(download.url); } } function onError(error) { console.log(`Error: ${error}`); } browser.downloads .search({ query: ["imgur"], }) .then(logDownloads, onError); Get a specific item To get a specific DownloadItem, the easiest way is to set only the id field, as seen in the snippet below: function logDownloads(downloads) { for (const download of downloads) { console.log(download.id); console.log(download.url); } } function onError(error) { console.log(`Error: ${error}`); } const id = 13; browser.downloads.search({ id }).then(logDownloads, onError); Get all downloads If you want to return all DownloadItems, set query to an empty object. function logDownloads(downloads) { for (const download of downloads) { console.log(download.id); console.log(download.url); } } function onError(error) { console.log(`Error: ${error}`); } browser.downloads.search({}).then(logDownloads, onError); Get the most recent download You can get the most recent download by specifying the following search parameters: function logDownloads(downloads) { for (const download of downloads) { console.log(download.id); console.log(download.url); } } function onError(error) { console.log(`Error: ${error}`); } browser.downloads .search({ limit: 1, orderBy: ["-startTime"], }) .then(logDownloads, onError); You can see this code in action in our latest-download example. Example extensions latest-download Note: This API is based on Chromium's chrome.downloads API. Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.
Cloud modules Amazon aws_acm_facts - Retrieve certificate facts from AWS Certificate Manager service aws_api_gateway - Manage AWS API Gateway APIs aws_application_scaling_policy - Manage Application Auto Scaling Scaling Policies aws_az_facts - Gather facts about availability zones in AWS. aws_batch_compute_environment - Manage AWS Batch Compute Environments aws_batch_job_definition - Manage AWS Batch Job Definitions aws_batch_job_queue - Manage AWS Batch Job Queues aws_direct_connect_connection - Creates, deletes, modifies a DirectConnect connection aws_direct_connect_gateway - Manage AWS Direct Connect Gateway. aws_direct_connect_link_aggregation_group - Manage Direct Connect LAG bundles. aws_direct_connect_virtual_interface - Manage Direct Connect virtual interfaces. aws_elasticbeanstalk_app - create, update, and delete an elastic beanstalk application aws_kms - Perform various KMS management tasks. aws_kms_facts - Gather facts about AWS KMS keys aws_region_facts - Gather facts about AWS regions. aws_s3 - manage objects in S3. aws_s3_bucket_facts - Lists S3 buckets in AWS aws_s3_cors - Manage CORS for S3 buckets in AWS aws_ses_identity - Manages SES email and domain identity aws_ssm_parameter_store - Manage key-value pairs in aws parameter store. aws_waf_condition - create and delete WAF Conditions aws_waf_facts - Retrieve facts for WAF ACLs, Rule , Conditions and Filters. aws_waf_rule - create and delete WAF Rules aws_waf_web_acl - create and delete WAF Web ACLs cloudformation - Create or delete an AWS CloudFormation stack cloudformation_facts - Obtain facts about an AWS CloudFormation stack cloudfront_distribution - create, update and delete aws cloudfront distributions. cloudfront_facts - Obtain facts about an AWS CloudFront distribution cloudfront_invalidation - create invalidations for aws cloudfront distributions cloudfront_origin_access_identity - create, update and delete origin access identities for a cloudfront distribution. cloudtrail - manage CloudTrail create, delete, update cloudwatchevent_rule - Manage CloudWatch Event rules and targets cloudwatchlogs_log_group - create or delete log_group in CloudWatchLogs cloudwatchlogs_log_group_facts - get facts about log_group in CloudWatchLogs data_pipeline - Create and manage AWS Datapipelines dynamodb_table - Create, update or delete AWS Dynamo DB tables. dynamodb_ttl - set TTL for a given DynamoDB table. ec2 - create, terminate, start or stop an instance in ec2 ec2_ami - create or destroy an image in ec2 ec2_ami_copy - copies AMI between AWS regions, return new image id ec2_ami_facts - Gather facts about ec2 AMIs ec2_ami_find - Searches for AMIs to obtain the AMI ID and other information (D) ec2_ami_search - Retrieve AWS AMI information for a given operating system. (D) ec2_asg - Create or delete AWS Autoscaling Groups ec2_asg_facts - Gather facts about ec2 Auto Scaling Groups (ASGs) in AWS ec2_asg_lifecycle_hook - Create, delete or update AWS ASG Lifecycle Hooks. ec2_customer_gateway - Manage an AWS customer gateway ec2_customer_gateway_facts - Gather facts about customer gateways in AWS ec2_eip - manages EC2 elastic IP (EIP) addresses. ec2_elb - De-registers or registers instances from EC2 ELBs ec2_elb_facts - Gather facts about EC2 Elastic Load Balancers in AWS ec2_elb_lb - Creates or destroys Amazon ELB. ec2_eni - Create and optionally attach an Elastic Network Interface (ENI) to an instance ec2_eni_facts - Gather facts about ec2 ENI interfaces in AWS ec2_group - maintain an ec2 VPC security group. ec2_group_facts - Gather facts about ec2 security groups in AWS. ec2_instance - Create & manage EC2 instances ec2_instance_facts - Gather facts about ec2 instances in AWS ec2_key - create or delete an ec2 key pair ec2_lc - Create or delete AWS Autoscaling Launch Configurations ec2_lc_facts - Gather facts about AWS Autoscaling Launch Configurations ec2_lc_find - Find AWS Autoscaling Launch Configurations ec2_metadata_facts - Gathers facts (instance metadata) about remote hosts within ec2 ec2_metric_alarm - Create/update or delete AWS Cloudwatch ‘metric alarms’ ec2_placement_group - Create or delete an EC2 Placement Group ec2_placement_group_facts - List EC2 Placement Group(s) details ec2_remote_facts - Gather facts about ec2 instances in AWS (D) ec2_scaling_policy - Create or delete AWS scaling policies for Autoscaling groups ec2_snapshot - creates a snapshot from an existing volume ec2_snapshot_copy - copies an EC2 snapshot and returns the new Snapshot ID. ec2_snapshot_facts - Gather facts about ec2 volume snapshots in AWS ec2_tag - create and remove tag(s) to ec2 resources. ec2_vol - create and attach a volume, return volume id and device map ec2_vol_facts - Gather facts about ec2 volumes in AWS ec2_vpc - configure AWS virtual private clouds (D) ec2_vpc_dhcp_option - Manages DHCP Options, and can ensure the DHCP options for the given VPC match what’s requested ec2_vpc_dhcp_option_facts - Gather facts about dhcp options sets in AWS ec2_vpc_egress_igw - Manage an AWS VPC Egress Only Internet gateway ec2_vpc_endpoint - Create and delete AWS VPC Endpoints. ec2_vpc_endpoint_facts - Retrieves AWS VPC endpoints details using AWS methods. ec2_vpc_igw - Manage an AWS VPC Internet gateway ec2_vpc_igw_facts - Gather facts about internet gateways in AWS ec2_vpc_nacl - create and delete Network ACLs. ec2_vpc_nacl_facts - Gather facts about Network ACLs in an AWS VPC ec2_vpc_nat_gateway - Manage AWS VPC NAT Gateways. ec2_vpc_nat_gateway_facts - Retrieves AWS VPC Managed Nat Gateway details using AWS methods. ec2_vpc_net - Configure AWS virtual private clouds ec2_vpc_net_facts - Gather facts about ec2 VPCs in AWS ec2_vpc_peer - create, delete, accept, and reject VPC peering connections between two VPCs. ec2_vpc_peering_facts - Retrieves AWS VPC Peering details using AWS methods. ec2_vpc_route_table - Manage route tables for AWS virtual private clouds ec2_vpc_route_table_facts - Gather facts about ec2 VPC route tables in AWS ec2_vpc_subnet - Manage subnets in AWS virtual private clouds ec2_vpc_subnet_facts - Gather facts about ec2 VPC subnets in AWS ec2_vpc_vgw - Create and delete AWS VPN Virtual Gateways. ec2_vpc_vgw_facts - Gather facts about virtual gateways in AWS ec2_vpc_vpn - Create, modify, and delete EC2 VPN connections. ec2_win_password - gets the default administrator password for ec2 windows instances ecs_attribute - manage ecs attributes ecs_cluster - create or terminate ecs clusters ecs_ecr - Manage Elastic Container Registry repositories ecs_service - create, terminate, start or stop a service in ecs ecs_service_facts - list or describe services in ecs ecs_task - run, start or stop a task in ecs ecs_taskdefinition - register a task definition in ecs ecs_taskdefinition_facts - describe a task definition in ecs efs - create and maintain EFS file systems efs_facts - Get information about Amazon EFS file systems elasticache - Manage cache clusters in Amazon Elasticache. elasticache_facts - Retrieve facts for AWS Elasticache clusters elasticache_parameter_group - Manage cache security groups in Amazon Elasticache. elasticache_snapshot - Manage cache snapshots in Amazon Elasticache. elasticache_subnet_group - manage Elasticache subnet groups elb_application_lb - Manage an Application load balancer elb_application_lb_facts - Gather facts about application ELBs in AWS elb_classic_lb - Creates or destroys Amazon ELB. elb_classic_lb_facts - Gather facts about EC2 Elastic Load Balancers in AWS elb_instance - De-registers or registers instances from EC2 ELBs elb_target - Manage a target in a target group elb_target_group - Manage a target group for an Application or Network load balancer elb_target_group_facts - Gather facts about ELB target groups in AWS execute_lambda - Execute an AWS Lambda function iam - Manage IAM users, groups, roles and keys iam_cert - Manage server certificates for use on ELBs and CloudFront iam_group - Manage AWS IAM groups iam_managed_policy - Manage User Managed IAM policies iam_mfa_device_facts - List the MFA (Multi-Factor Authentication) devices registered for a user iam_policy - Manage IAM policies for users, groups, and roles iam_role - Manage AWS IAM roles iam_role_facts - Gather information on IAM roles iam_server_certificate_facts - Retrieve the facts of a server certificate iam_user - Manage AWS IAM users kinesis_stream - Manage a Kinesis Stream. lambda - Manage AWS Lambda functions lambda_alias - Creates, updates or deletes AWS Lambda function aliases. lambda_event - Creates, updates or deletes AWS Lambda function event mappings. lambda_facts - Gathers AWS Lambda function details as Ansible facts lambda_policy - Creates, updates or deletes AWS Lambda policy statements. lightsail - Create or delete a virtual machine instance in AWS Lightsail rds - create, delete, or modify an Amazon rds instance rds_param_group - manage RDS parameter groups rds_subnet_group - manage RDS database subnet groups redshift - create, delete, or modify an Amazon Redshift instance redshift_facts - Gather facts about Redshift cluster(s) redshift_subnet_group - manage Redshift cluster subnet groups route53 - add or delete entries in Amazons Route53 DNS service route53_facts - Retrieves route53 details using AWS methods route53_health_check - add or delete health-checks in Amazons Route53 DNS service route53_zone - add or delete Route53 zones s3_bucket - Manage S3 buckets in AWS, Ceph, Walrus and FakeS3 s3_lifecycle - Manage s3 bucket lifecycle rules in AWS s3_logging - Manage logging facility of an s3 bucket in AWS s3_sync - Efficiently upload multiple files to S3 s3_website - Configure an s3 bucket as a website sns - Send Amazon Simple Notification Service (SNS) messages sns_topic - Manages AWS SNS topics and subscriptions sqs_queue - Creates or deletes AWS SQS queues. sts_assume_role - Assume a role using AWS Security Token Service and obtain temporary credentials sts_session_token - Obtain a session token from the AWS Security Token Service Atomic atomic_container - Manage the containers on the atomic host platform atomic_host - Manage the atomic host platform atomic_image - Manage the container images on the atomic host platform Azure azure - create or terminate a virtual machine in azure (D) azure_rm_acs - Manage an Azure Container Service Instance (ACS). azure_rm_availabilityset - Manage Azure availability set. azure_rm_availabilityset_facts - Get availability set facts. azure_rm_containerinstance - Manage an Azure Container Instance. azure_rm_containerregistry - Manage an Azure Container Registry. azure_rm_deployment - Create or destroy Azure Resource Manager template deployments azure_rm_dnsrecordset - Create, delete and update DNS record sets and records. azure_rm_dnsrecordset_facts - Get DNS Record Set facts. azure_rm_dnszone - Manage Azure DNS zones. azure_rm_dnszone_facts - Get DNS zone facts. azure_rm_functionapp - Manage Azure Function Apps azure_rm_functionapp_facts - Get Azure Function App facts azure_rm_image - Manage Azure image. azure_rm_keyvault - Manage Key Vault instance. azure_rm_keyvaultkey - Use Azure KeyVault keys. azure_rm_keyvaultsecret - Use Azure KeyVault Secrets. azure_rm_loadbalancer - Manage Azure load balancers. azure_rm_loadbalancer_facts - Get load balancer facts. azure_rm_managed_disk - Manage Azure Manage Disks azure_rm_managed_disk_facts - Get managed disk facts. azure_rm_mysqldatabase - Manage MySQL Database instance. azure_rm_mysqlserver - Manage MySQL Server instance. azure_rm_networkinterface - Manage Azure network interfaces. azure_rm_networkinterface_facts - Get network interface facts. azure_rm_postgresqldatabase - Manage PostgreSQL Database instance. azure_rm_postgresqlserver - Manage PostgreSQL Server instance. azure_rm_publicipaddress - Manage Azure Public IP Addresses. azure_rm_publicipaddress_facts - Get public IP facts. azure_rm_resourcegroup - Manage Azure resource groups. azure_rm_resourcegroup_facts - Get resource group facts. azure_rm_securitygroup - Manage Azure network security groups. azure_rm_securitygroup_facts - Get security group facts. azure_rm_sqldatabase - Manage SQL Database instance. azure_rm_sqlserver - Manage SQL Server instance azure_rm_sqlserver_facts - Get SQL Server facts. azure_rm_storageaccount - Manage Azure storage accounts. azure_rm_storageaccount_facts - Get storage account facts. azure_rm_storageblob - Manage blob containers and blob objects. azure_rm_subnet - Manage Azure subnets. azure_rm_virtualmachine - Manage Azure virtual machines. azure_rm_virtualmachine_extension - Managed Azure Virtual Machine extension azure_rm_virtualmachine_scaleset - Manage Azure virtual machine scale sets. azure_rm_virtualmachine_scaleset_facts - Get Virtual Machine Scale Set facts azure_rm_virtualmachineimage_facts - Get virtual machine image facts. azure_rm_virtualnetwork - Manage Azure virtual networks. azure_rm_virtualnetwork_facts - Get virtual network facts. Centurylink clc_aa_policy - Create or Delete Anti Affinity Policies at CenturyLink Cloud. clc_alert_policy - Create or Delete Alert Policies at CenturyLink Cloud. clc_blueprint_package - deploys a blue print package on a set of servers in CenturyLink Cloud. clc_firewall_policy - Create/delete/update firewall policies clc_group - Create/delete Server Groups at Centurylink Cloud clc_loadbalancer - Create, Delete shared loadbalancers in CenturyLink Cloud. clc_modify_server - modify servers in CenturyLink Cloud. clc_publicip - Add and Delete public ips on servers in CenturyLink Cloud. clc_server - Create, Delete, Start and Stop servers in CenturyLink Cloud. clc_server_snapshot - Create, Delete and Restore server snapshots in CenturyLink Cloud. Cloudscale cloudscale_floating_ip - Manages floating IPs on the cloudscale.ch IaaS service cloudscale_server - Manages servers on the cloudscale.ch IaaS service Cloudstack cs_account - Manages accounts on Apache CloudStack based clouds. cs_affinitygroup - Manages affinity groups on Apache CloudStack based clouds. cs_cluster - Manages host clusters on Apache CloudStack based clouds. cs_configuration - Manages configuration on Apache CloudStack based clouds. cs_domain - Manages domains on Apache CloudStack based clouds. cs_facts - Gather facts on instances of Apache CloudStack based clouds. cs_firewall - Manages firewall rules on Apache CloudStack based clouds. cs_host - Manages hosts on Apache CloudStack based clouds. cs_instance - Manages instances and virtual machines on Apache CloudStack based clouds. cs_instance_facts - Gathering facts from the API of instances from Apache CloudStack based clouds. cs_instance_nic - Manages NICs of an instance on Apache CloudStack based clouds. cs_instance_nic_secondaryip - Manages secondary IPs of an instance on Apache CloudStack based clouds. cs_instancegroup - Manages instance groups on Apache CloudStack based clouds. cs_ip_address - Manages public IP address associations on Apache CloudStack based clouds. cs_iso - Manages ISO images on Apache CloudStack based clouds. cs_loadbalancer_rule - Manages load balancer rules on Apache CloudStack based clouds. cs_loadbalancer_rule_member - Manages load balancer rule members on Apache CloudStack based clouds. cs_network - Manages networks on Apache CloudStack based clouds. cs_network_acl - Manages network access control lists (ACL) on Apache CloudStack based clouds. cs_network_acl_rule - Manages network access control list (ACL) rules on Apache CloudStack based clouds. cs_network_offering - Manages network offerings on Apache CloudStack based clouds. cs_nic - Manages NICs and secondary IPs of an instance on Apache CloudStack based clouds (D) cs_pod - Manages pods on Apache CloudStack based clouds. cs_portforward - Manages port forwarding rules on Apache CloudStack based clouds. cs_project - Manages projects on Apache CloudStack based clouds. cs_region - Manages regions on Apache CloudStack based clouds. cs_resourcelimit - Manages resource limits on Apache CloudStack based clouds. cs_role - Manages user roles on Apache CloudStack based clouds. cs_router - Manages routers on Apache CloudStack based clouds. cs_securitygroup - Manages security groups on Apache CloudStack based clouds. cs_securitygroup_rule - Manages security group rules on Apache CloudStack based clouds. cs_service_offering - Manages service offerings on Apache CloudStack based clouds. cs_snapshot_policy - Manages volume snapshot policies on Apache CloudStack based clouds. cs_sshkeypair - Manages SSH keys on Apache CloudStack based clouds. cs_staticnat - Manages static NATs on Apache CloudStack based clouds. cs_storage_pool - Manages Primary Storage Pools on Apache CloudStack based clouds. cs_template - Manages templates on Apache CloudStack based clouds. cs_user - Manages users on Apache CloudStack based clouds. cs_vmsnapshot - Manages VM snapshots on Apache CloudStack based clouds. cs_volume - Manages volumes on Apache CloudStack based clouds. cs_vpc - Manages VPCs on Apache CloudStack based clouds. cs_vpc_offering - Manages vpc offerings on Apache CloudStack based clouds. cs_vpn_connection - Manages site-to-site VPN connections on Apache CloudStack based clouds. cs_vpn_customer_gateway - Manages site-to-site VPN customer gateway configurations on Apache CloudStack based clouds. cs_vpn_gateway - Manages site-to-site VPN gateways on Apache CloudStack based clouds. cs_zone - Manages zones on Apache CloudStack based clouds. cs_zone_facts - Gathering facts of zones from Apache CloudStack based clouds. Digital_Ocean digital_ocean - Create/delete a droplet/SSH_key in DigitalOcean digital_ocean_block_storage - Create/destroy or attach/detach Block Storage volumes in DigitalOcean digital_ocean_certificate - Manage certificates in DigitalOcean. digital_ocean_domain - Create/delete a DNS record in DigitalOcean digital_ocean_floating_ip - Manage DigitalOcean Floating IPs digital_ocean_floating_ip_facts - DigitalOcean Floating IPs facts digital_ocean_sshkey - Manage DigitalOcean SSH keys digital_ocean_sshkey_facts - DigitalOcean SSH keys facts digital_ocean_tag - Create and remove tag(s) to DigitalOcean resource. Dimensiondata dimensiondata_network - Create, update, and delete MCP 1.0 & 2.0 networks dimensiondata_vlan - Manage a VLAN in a Cloud Control network domain. Docker docker - manage docker containers (D) docker_container - manage docker containers docker_image - Manage docker images. docker_image_facts - Inspect docker images docker_login - Log into a Docker registry. docker_network - Manage Docker networks docker_secret - Manage docker secrets. docker_service - Manage docker services and containers. docker_volume - Manage Docker volumes Google gc_storage - This module manages objects/buckets in Google Cloud Storage. gcdns_record - Creates or removes resource records in Google Cloud DNS gcdns_zone - Creates or removes zones in Google Cloud DNS gce - create or terminate GCE instances gce_eip - Create or Destroy Global or Regional External IP addresses. gce_img - utilize GCE image resources gce_instance_template - create or destroy instance templates of Compute Engine of GCP. gce_labels - Create, Update or Destroy GCE Labels. gce_lb - create/destroy GCE load-balancer resources gce_mig - Create, Update or Destroy a Managed Instance Group (MIG). gce_net - create/destroy GCE networks and firewall rules gce_pd - utilize GCE persistent disk resources gce_snapshot - Create or destroy snapshots for GCE storage volumes gce_tag - add or remove tag(s) to/from GCE instances gcp_backend_service - Create or Destroy a Backend Service. gcp_dns_managed_zone - Creates a GCP ManagedZone gcp_forwarding_rule - Create, Update or Destroy a Forwarding_Rule. gcp_healthcheck - Create, Update or Destroy a Healthcheck. gcp_target_proxy - Create, Update or Destroy a Target_Proxy. gcp_url_map - Create, Update or Destory a Url_Map. gcpubsub - Create and Delete Topics/Subscriptions, Publish and pull messages on PubSub gcpubsub_facts - List Topics/Subscriptions and Messages from Google PubSub. gcspanner - Create and Delete Instances/Databases on Spanner Linode linode - Manage instances on the Linode Public Cloud Lxc lxc_container - Manage LXC Containers Lxd lxd_container - Manage LXD Containers lxd_profile - Manage LXD profiles Misc helm - Manages Kubernetes packages with the Helm package manager ovirt - oVirt/RHEV platform management proxmox - management of instances in Proxmox VE cluster proxmox_kvm - Management of Qemu(KVM) Virtual Machines in Proxmox VE cluster. proxmox_template - management of OS templates in Proxmox VE cluster rhevm - RHEV/oVirt automation serverless - Manages a Serverless Framework project terraform - Manages a Terraform deployment (and plans) virt - Manages virtual machines supported by libvirt virt_net - Manage libvirt network configuration virt_pool - Manage libvirt storage pools xenserver_facts - get facts reported on xenserver Oneandone oneandone_firewall_policy - Configure 1&1 firewall policy. oneandone_load_balancer - Configure 1&1 load balancer. oneandone_monitoring_policy - Configure 1&1 monitoring policy. oneandone_private_network - Configure 1&1 private networking. oneandone_public_ip - Configure 1&1 public IPs. oneandone_server - Create, destroy, start, stop, and reboot a 1&1 Host server. Openstack os_auth - Retrieve an auth token os_client_config - Get OpenStack Client config os_flavor_facts - Retrieve facts about one or more flavors os_floating_ip - Add/Remove floating IP from an instance os_group - Manage OpenStack Identity Groups os_image - Add/Delete images from OpenStack Cloud os_image_facts - Retrieve facts about an image within OpenStack. os_ironic - Create/Delete Bare Metal Resources from OpenStack os_ironic_inspect - Explicitly triggers baremetal node introspection in ironic. os_ironic_node - Activate/Deactivate Bare Metal Resources from OpenStack os_keypair - Add/Delete a keypair from OpenStack os_keystone_domain - Manage OpenStack Identity Domains os_keystone_domain_facts - Retrieve facts about one or more OpenStack domains os_keystone_endpoint - Manage OpenStack Identity service endpoints os_keystone_role - Manage OpenStack Identity Roles os_keystone_service - Manage OpenStack Identity services os_network - Creates/removes networks from OpenStack os_networks_facts - Retrieve facts about one or more OpenStack networks. os_nova_flavor - Manage OpenStack compute flavors os_nova_host_aggregate - Manage OpenStack host aggregates os_object - Create or Delete objects and containers from OpenStack os_port - Add/Update/Delete ports from an OpenStack cloud. os_port_facts - Retrieve facts about ports within OpenStack. os_project - Manage OpenStack Projects os_project_access - Manage OpenStack compute flavors acceess os_project_facts - Retrieve facts about one or more OpenStack projects os_quota - Manage OpenStack Quotas os_recordset - Manage OpenStack DNS recordsets os_router - Create or delete routers from OpenStack os_security_group - Add/Delete security groups from an OpenStack cloud. os_security_group_rule - Add/Delete rule from an existing security group os_server - Create/Delete Compute Instances from OpenStack os_server_action - Perform actions on Compute Instances from OpenStack os_server_facts - Retrieve facts about one or more compute instances os_server_group - Manage OpenStack server groups os_server_volume - Attach/Detach Volumes from OpenStack VM’s os_stack - Add/Remove Heat Stack os_subnet - Add/Remove subnet to an OpenStack network os_subnets_facts - Retrieve facts about one or more OpenStack subnets. os_user - Manage OpenStack Identity Users os_user_facts - Retrieve facts about one or more OpenStack users os_user_group - Associate OpenStack Identity users and groups os_user_role - Associate OpenStack Identity users and roles os_volume - Create/Delete Cinder Volumes os_zone - Manage OpenStack DNS zones Ovh ovh_ip_loadbalancing_backend - Manage OVH IP LoadBalancing backends Ovirt ovirt_affinity_group - Module to manage affinity groups in oVirt/RHV ovirt_affinity_label - Module to manage affinity labels in oVirt/RHV ovirt_affinity_label_facts - Retrieve facts about one or more oVirt/RHV affinity labels ovirt_api_facts - Retrieve facts about the oVirt/RHV API ovirt_auth - Module to manage authentication to oVirt/RHV ovirt_cluster - Module to manage clusters in oVirt/RHV ovirt_cluster_facts - Retrieve facts about one or more oVirt/RHV clusters ovirt_datacenter - Module to manage data centers in oVirt/RHV ovirt_datacenter_facts - Retrieve facts about one or more oVirt/RHV datacenters ovirt_disk - Module to manage Virtual Machine and floating disks in oVirt/RHV ovirt_disk_facts - Retrieve facts about one or more oVirt/RHV disks ovirt_external_provider - Module to manage external providers in oVirt/RHV ovirt_external_provider_facts - Retrieve facts about one or more oVirt/RHV external providers ovirt_group - Module to manage groups in oVirt/RHV ovirt_group_facts - Retrieve facts about one or more oVirt/RHV groups ovirt_host_networks - Module to manage host networks in oVirt/RHV ovirt_host_pm - Module to manage power management of hosts in oVirt/RHV ovirt_host_storage_facts - Retrieve facts about one or more oVirt/RHV HostStorages (applicable only for block storage) ovirt_hosts - Module to manage hosts in oVirt/RHV ovirt_hosts_facts - Retrieve facts about one or more oVirt/RHV hosts ovirt_mac_pools - Module to manage MAC pools in oVirt/RHV ovirt_networks - Module to manage logical networks in oVirt/RHV ovirt_networks_facts - Retrieve facts about one or more oVirt/RHV networks ovirt_nics - Module to manage network interfaces of Virtual Machines in oVirt/RHV ovirt_nics_facts - Retrieve facts about one or more oVirt/RHV virtual machine network interfaces ovirt_permissions - Module to manage permissions of users/groups in oVirt/RHV ovirt_permissions_facts - Retrieve facts about one or more oVirt/RHV permissions ovirt_quotas - Module to manage datacenter quotas in oVirt/RHV ovirt_quotas_facts - Retrieve facts about one or more oVirt/RHV quotas ovirt_scheduling_policies_facts - Retrieve facts about one or more oVirt scheduling policies ovirt_snapshots - Module to manage Virtual Machine Snapshots in oVirt/RHV ovirt_snapshots_facts - Retrieve facts about one or more oVirt/RHV virtual machine snapshots ovirt_storage_connections - Module to manage storage connections in oVirt ovirt_storage_domains - Module to manage storage domains in oVirt/RHV ovirt_storage_domains_facts - Retrieve facts about one or more oVirt/RHV storage domains ovirt_storage_templates_facts - Retrieve facts about one or more oVirt/RHV templates relate to a storage domain. ovirt_storage_vms_facts - Retrieve facts about one or more oVirt/RHV virtual machines relate to a storage domain. ovirt_tags - Module to manage tags in oVirt/RHV ovirt_tags_facts - Retrieve facts about one or more oVirt/RHV tags ovirt_templates - Module to manage virtual machine templates in oVirt/RHV ovirt_templates_facts - Retrieve facts about one or more oVirt/RHV templates ovirt_users - Module to manage users in oVirt/RHV ovirt_users_facts - Retrieve facts about one or more oVirt/RHV users ovirt_vmpools - Module to manage VM pools in oVirt/RHV ovirt_vmpools_facts - Retrieve facts about one or more oVirt/RHV vmpools ovirt_vms - Module to manage Virtual Machines in oVirt/RHV ovirt_vms_facts - Retrieve facts about one or more oVirt/RHV virtual machines Packet packet_device - Manage a bare metal server in the Packet Host. packet_sshkey - Create/delete an SSH key in Packet host. Profitbricks profitbricks - Create, destroy, start, stop, and reboot a ProfitBricks virtual machine. profitbricks_datacenter - Create or destroy a ProfitBricks Virtual Datacenter. profitbricks_nic - Create or Remove a NIC. profitbricks_volume - Create or destroy a volume. profitbricks_volume_attachments - Attach or detach a volume. Pubnub pubnub_blocks - PubNub blocks management module. Rackspace rax - create / delete an instance in Rackspace Public Cloud rax_cbs - Manipulate Rackspace Cloud Block Storage Volumes rax_cbs_attachments - Manipulate Rackspace Cloud Block Storage Volume Attachments rax_cdb - create/delete or resize a Rackspace Cloud Databases instance rax_cdb_database - create / delete a database in the Cloud Databases rax_cdb_user - create / delete a Rackspace Cloud Database rax_clb - create / delete a load balancer in Rackspace Public Cloud rax_clb_nodes - add, modify and remove nodes from a Rackspace Cloud Load Balancer rax_clb_ssl - Manage SSL termination for a Rackspace Cloud Load Balancer. rax_dns - Manage domains on Rackspace Cloud DNS rax_dns_record - Manage DNS records on Rackspace Cloud DNS rax_facts - Gather facts for Rackspace Cloud Servers rax_files - Manipulate Rackspace Cloud Files Containers rax_files_objects - Upload, download, and delete objects in Rackspace Cloud Files rax_identity - Load Rackspace Cloud Identity rax_keypair - Create a keypair for use with Rackspace Cloud Servers rax_meta - Manipulate metadata for Rackspace Cloud Servers rax_mon_alarm - Create or delete a Rackspace Cloud Monitoring alarm. rax_mon_check - Create or delete a Rackspace Cloud Monitoring check for an existing entity. rax_mon_entity - Create or delete a Rackspace Cloud Monitoring entity rax_mon_notification - Create or delete a Rackspace Cloud Monitoring notification. rax_mon_notification_plan - Create or delete a Rackspace Cloud Monitoring notification plan. rax_network - create / delete an isolated network in Rackspace Public Cloud rax_queue - create / delete a queue in Rackspace Public Cloud rax_scaling_group - Manipulate Rackspace Cloud Autoscale Groups rax_scaling_policy - Manipulate Rackspace Cloud Autoscale Scaling Policy Smartos imgadm - Manage SmartOS images smartos_image_facts - Get SmartOS image details. vmadm - Manage SmartOS virtual machines and zones. Softlayer sl_vm - create or cancel a virtual instance in SoftLayer Spotinst spotinst_aws_elastigroup - Create, update or delete Spotinst AWS Elastigroups Univention udm_dns_record - Manage dns entries on a univention corporate server udm_dns_zone - Manage dns zones on a univention corporate server udm_group - Manage of the posix group udm_share - Manage samba shares on a univention corporate server udm_user - Manage posix users on a univention corporate server Vmware vca_fw - add remove firewall rules in a gateway in a vca vca_nat - add remove nat rules in a gateway in a vca vca_vapp - Manages vCloud Air vApp instances. vcenter_folder - Manage folders on given datacenter vcenter_license - Manage VMware vCenter license keys vmware_cfg_backup - Backup / Restore / Reset ESXi host configuration vmware_cluster - Manage VMware vSphere clusters vmware_datacenter - Manage VMware vSphere Datacenters vmware_datastore_facts - Gather facts about datastores vmware_dns_config - Manage VMware ESXi DNS Configuration vmware_drs_rule_facts - Gathers facts about DRS rule on the given cluster vmware_dvs_host - Add or remove a host from distributed virtual switch vmware_dvs_portgroup - Create or remove a Distributed vSwitch portgroup. vmware_dvswitch - Create or remove a distributed vSwitch vmware_guest - Manages virtual machines in vCenter vmware_guest_facts - Gather facts about a single VM vmware_guest_file_operation - Files operation in a VMware guest operating system without network vmware_guest_find - Find the folder path(s) for a virtual machine by name or UUID vmware_guest_powerstate - Manages power states of virtual machines in vCenter vmware_guest_snapshot - Manages virtual machines snapshots in vCenter vmware_guest_tools_wait - Wait for VMware tools to become available vmware_host - Add / Remove ESXi host to / from vCenter vmware_host_acceptance - Manage acceptance level of ESXi host vmware_host_config_facts - Gathers facts about an ESXi host’s advance configuration information vmware_host_config_manager - Manage advance configurations about an ESXi host vmware_host_datastore - Manage a datastore on ESXi host vmware_host_dns_facts - Gathers facts about an ESXi host’s DNS configuration information vmware_host_facts - Gathers facts about remote vmware host vmware_host_firewall_facts - Gathers facts about an ESXi host’s firewall configuration information vmware_host_firewall_manager - Manage firewall configurations about an ESXi host vmware_host_lockdown - Manage administrator permission for the local administrative account for the ESXi host vmware_host_ntp - Manage NTP configurations about an ESXi host vmware_host_package_facts - Gathers facts about available packages on an ESXi host vmware_host_service_facts - Gathers facts about an ESXi host’s services vmware_host_service_manager - Manage services on a given ESXi host vmware_host_vmnic_facts - Gathers facts about vmnics available on the given ESXi host vmware_local_role_manager - Manage local roles on an ESXi host vmware_local_user_manager - Manage local users on an ESXi host vmware_maintenancemode - Place a host into maintenance mode vmware_migrate_vmk - Migrate a VMK interface from VSS to VDS vmware_portgroup - Create a VMware portgroup vmware_resource_pool - Add/remove resource pools to/from vCenter vmware_target_canonical_facts - Return canonical (NAA) from an ESXi host vmware_vm_facts - Return basic facts pertaining to a vSphere virtual machine guest vmware_vm_shell - Run commands in a VMware guest operating system vmware_vm_vm_drs_rule - Configure VMware DRS Affinity rule for virtual machine in given cluster vmware_vm_vss_dvs_migrate - Migrates a virtual machine from a standard vswitch to distributed vmware_vmkernel - Manage a VMware VMkernel Interface aka. Virtual NICs of host system. vmware_vmkernel_facts - Gathers VMKernel facts about an ESXi host vmware_vmkernel_ip_config - Configure the VMkernel IP Address vmware_vmotion - Move a virtual machine using vMotion vmware_vsan_cluster - Configure VSAN clustering on an ESXi host vmware_vswitch - Add or remove a VMware Standard Switch to an ESXi host vsphere_copy - Copy a file to a vCenter datastore vsphere_guest - Create/delete/manage a guest VM through VMware vSphere. (D) Vultr vr_account_facts - Gather facts about the Vultr account. vr_dns_domain - Manages DNS domains on Vultr. vr_dns_record - Manages DNS records on Vultr. vr_firewall_group - Manages firewall groups on Vultr. vr_firewall_rule - Manages firewall rules on Vultr. vr_server - Manages virtual servers on Vultr. vr_ssh_key - Manages ssh keys on Vultr. vr_startup_script - Manages startup scripts on Vultr. vr_user - Manages users on Vultr. Webfaction webfaction_app - Add or remove applications on a Webfaction host webfaction_db - Add or remove a database on Webfaction webfaction_domain - Add or remove domains and subdomains on Webfaction webfaction_mailbox - Add or remove mailboxes on Webfaction webfaction_site - Add or remove a website on a Webfaction host Note (D): This marks a module as deprecated, which means a module is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale. © 2012–2018 Michael DeHaan
community.windows.win_dotnet_ngen – Runs ngen to recompile DLLs after .NET updates Note This plugin is part of the community.windows collection (version 1.2.0). To install it use: ansible-galaxy collection install community.windows. To use it in a playbook, specify: community.windows.win_dotnet_ngen. Synopsis Notes Examples Return Values Synopsis After .NET framework is installed/updated, Windows will probably want to recompile things to optimise for the host. This happens via scheduled task, usually at some inopportune time. This module allows you to run this task on your own schedule, so you incur the CPU hit at some more convenient and controlled time. https://docs.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator#native-image-service http://blogs.msdn.com/b/dotnet/archive/2013/08/06/wondering-why-mscorsvw-exe-has-high-cpu-usage-you-can-speed-it-up.aspx Notes Note There are in fact two scheduled tasks for ngen but they have no triggers so aren’t a problem. There’s no way to test if they’ve been completed. The stdout is quite likely to be several megabytes. Examples - name: Run ngen tasks community.windows.win_dotnet_ngen: Return Values Common return values are documented here, the following are the fields unique to this module: Key Returned Description dotnet_ngen64_eqi_exit_code integer 64-bit ngen executable exists The exit code after running the 64-bit ngen.exe executeQueuedItems command. dotnet_ngen64_eqi_output string 64-bit ngen executable exists The stdout after running the 64-bit ngen.exe executeQueuedItems command. Sample: sample output dotnet_ngen64_update_exit_code integer 64-bit ngen executable exists The exit code after running the 64-bit ngen.exe update /force command. dotnet_ngen64_update_output string 64-bit ngen executable exists The stdout after running the 64-bit ngen.exe update /force command. Sample: sample output dotnet_ngen_eqi_exit_code integer 32-bit ngen executable exists The exit code after running the 32-bit ngen.exe executeQueuedItems command. dotnet_ngen_eqi_output string 32-bit ngen executable exists The stdout after running the 32-bit ngen.exe executeQueuedItems command. Sample: sample output dotnet_ngen_update_exit_code integer 32-bit ngen executable exists The exit code after running the 32-bit ngen.exe update /force command. dotnet_ngen_update_output string 32-bit ngen executable exists The stdout after running the 32-bit ngen.exe update /force command. Sample: sample output Authors Peter Mounce (@petemounce) © 2012–2018 Michael DeHaan
QVideoSurfaceFormat Class The QVideoSurfaceFormat class specifies the stream format of a video presentation surface. More... Header: #include <QVideoSurfaceFormat> qmake: QT += multimedia List of all members, including inherited members Public Types enum Direction { TopToBottom, BottomToTop } enum YCbCrColorSpace { YCbCr_Undefined, YCbCr_BT601, YCbCr_BT709, YCbCr_xvYCC601, YCbCr_xvYCC709, YCbCr_JPEG } Public Functions QVideoSurfaceFormat() QVideoSurfaceFormat(const QSize &size, QVideoFram8b7c:f320:99b9:690f:4595:cd17:293a:c069PixelFormat format, QAbstractVideoBuffer8b7c:f320:99b9:690f:4595:cd17:293a:c069HandleType type = QAbstractVideoBuffer8b7c:f320:99b9:690f:4595:cd17:293a:c069NoHandle) QVideoSurfaceFormat(const QVideoSurfaceFormat &other) ~QVideoSurfaceFormat() int frameHeight() const qreal frameRate() const QSize frameSize() const int frameWidth() const QAbstractVideoBuffer8b7c:f320:99b9:690f:4595:cd17:293a:c069HandleType handleType() const bool isValid() const QSize pixelAspectRatio() const QVideoFram8b7c:f320:99b9:690f:4595:cd17:293a:c069PixelFormat pixelFormat() const QVariant property(const char *name) const QList<QByteArray> propertyNames() const Direction scanLineDirection() const void setFrameRate(qreal rate) void setFrameSize(const QSize &size) void setFrameSize(int width, int height) void setPixelAspectRatio(const QSize &ratio) void setPixelAspectRatio(int horizontal, int vertical) void setProperty(const char *name, const QVariant &value) void setScanLineDirection(Direction direction) void setViewport(const QRect &viewport) void setYCbCrColorSpace(YCbCrColorSpace space) QSize sizeHint() const QRect viewport() const YCbCrColorSpace yCbCrColorSpace() const bool operator!=(const QVideoSurfaceFormat &other) const QVideoSurfaceFormat & operator=(const QVideoSurfaceFormat &other) bool operator==(const QVideoSurfaceFormat &other) const Detailed Description The QVideoSurfaceFormat class specifies the stream format of a video presentation surface. A video surface presents a stream of video frames. The surface's format describes the type of the frames and determines how they should be presented. The core properties of a video stream required to setup a video surface are the pixel format given by pixelFormat(), and the frame dimensions given by frameSize(). If the surface is to present frames using a frame's handle a surface format will also include a handle type which is given by the handleType() function. The region of a frame that is actually displayed on a video surface is given by the viewport(). A stream may have a viewport less than the entire region of a frame to allow for videos smaller than the nearest optimal size of a video frame. For example the width of a frame may be extended so that the start of each scan line is eight byte aligned. Other common properties are the pixelAspectRatio(), scanLineDirection(), and frameRate(). Additionally a stream may have some additional type specific properties which are listed by the dynamicPropertyNames() function and can be accessed using the property(), and setProperty() functions. Member Type Documentation enum QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069irection Enumerates the layout direction of video scan lines. Constant Value Description QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069TopToBottom 0 Scan lines are arranged from the top of the frame to the bottom. QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069ottomToTop 1 Scan lines are arranged from the bottom of the frame to the top. enum QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069YCbCrColorSpace Enumerates the Y'CbCr color space of video frames. Constant Value Description QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069YCbCr_Undefined 0 No color space is specified. QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069YCbCr_BT601 1 A Y'CbCr color space defined by ITU-R recommendation BT.601 with Y value range from 16 to 235, and Cb/Cr range from 16 to 240. Used in standard definition video. QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069YCbCr_BT709 2 A Y'CbCr color space defined by ITU-R BT.709 with the same values range as YCbCr_BT601. Used for HDTV. QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069YCbCr_xvYCC601 3 The BT.601 color space with the value range extended to 0 to 255. It is backward compatibile with BT.601 and uses values outside BT.601 range to represent a wider range of colors. QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069YCbCr_xvYCC709 4 The BT.709 color space with the value range extended to 0 to 255. QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069YCbCr_JPEG 5 The full range Y'CbCr color space used in JPEG files. Member Function Documentation QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069QVideoSurfaceFormat() Constructs a null video stream format. QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069QVideoSurfaceFormat(const QSize &size, QVideoFram8b7c:f320:99b9:690f:4595:cd17:293a:c069PixelFormat format, QAbstractVideoBuffer8b7c:f320:99b9:690f:4595:cd17:293a:c069HandleType type = QAbstractVideoBuffer8b7c:f320:99b9:690f:4595:cd17:293a:c069NoHandle) Contructs a description of stream which receives stream of type buffers with given frame size and pixel format. QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069QVideoSurfaceFormat(const QVideoSurfaceFormat &other) Constructs a copy of other. QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069~QVideoSurfaceFormat() Destroys a video stream description. int QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069rameHeight() const Returns the height of frame in a video stream. qreal QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069rameRate() const Returns the frame rate of a video stream in frames per second. See also setFrameRate(). QSize QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069rameSize() const Returns the dimensions of frames in a video stream. See also setFrameSize(), frameWidth(), and frameHeight(). int QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069rameWidth() const Returns the width of frames in a video stream. See also frameSize() and frameHeight(). QAbstractVideoBuffer8b7c:f320:99b9:690f:4595:cd17:293a:c069HandleType QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069handleType() const Returns the type of handle the surface uses to present the frame data. If the handle type is QAbstractVideoBuffer8b7c:f320:99b9:690f:4595:cd17:293a:c069NoHandle, buffers with any handle type are valid provided they can be mapped with the QAbstractVideoBuffer8b7c:f320:99b9:690f:4595:cd17:293a:c069ReadOnly flag. If the handleType() is not QAbstractVideoBuffer8b7c:f320:99b9:690f:4595:cd17:293a:c069NoHandle then the handle type of the buffer must be the same as that of the surface format. bool QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069isValid() const Identifies if a video surface format has a valid pixel format and frame size. Returns true if the format is valid, and false otherwise. QSize QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069pixelAspectRatio() const Returns a video stream's pixel aspect ratio. See also setPixelAspectRatio(). QVideoFram8b7c:f320:99b9:690f:4595:cd17:293a:c069PixelFormat QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069pixelFormat() const Returns the pixel format of frames in a video stream. QVariant QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069property(const char *name) const Returns the value of the video format's name property. See also setProperty(). QList<QByteArray> QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069propertyNames() const Returns a list of video format dynamic property names. Direction QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069scanLineDirection() const Returns the direction of scan lines. See also setScanLineDirection(). void QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069setFrameRate(qreal rate) Sets the frame rate of a video stream in frames per second. See also frameRate(). void QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069setFrameSize(const QSize &size) Sets the size of frames in a video stream to size. This will reset the viewport() to fill the entire frame. See also frameSize(). void QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069setFrameSize(int width, int height) This is an overloaded function. Sets the width and height of frames in a video stream. This will reset the viewport() to fill the entire frame. void QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069setPixelAspectRatio(const QSize &ratio) Sets a video stream's pixel aspect ratio. See also pixelAspectRatio(). void QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069setPixelAspectRatio(int horizontal, int vertical) This is an overloaded function. Sets the horizontal and vertical elements of a video stream's pixel aspect ratio. void QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069setProperty(const char *name, const QVariant &value) Sets the video format's name property to value. Trying to set a read only property will be ignored. See also property(). void QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069setScanLineDirection(Direction direction) Sets the direction of scan lines. See also scanLineDirection(). void QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069setViewport(const QRect &viewport) Sets the viewport of a video stream to viewport. See also viewport(). void QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069setYCbCrColorSpace(YCbCrColorSpace space) Sets the Y'CbCr color space of a video stream. It is only used with raw YUV frame types. See also yCbCrColorSpace(). QSize QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069sizeHint() const Returns a suggested size in pixels for the video stream. This is the size of the viewport scaled according to the pixel aspect ratio. QRect QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069viewport() const Returns the viewport of a video stream. The viewport is the region of a video frame that is actually displayed. By default the viewport covers an entire frame. See also setViewport(). YCbCrColorSpace QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069yCbCrColorSpace() const Returns the Y'CbCr color space of a video stream. See also setYCbCrColorSpace(). bool QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069operator!=(const QVideoSurfaceFormat &other) const Returns true if other is different to this video format, and false if they are the same. QVideoSurfaceFormat &QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069operator=(const QVideoSurfaceFormat &other) Assigns the values of other to this object. bool QVideoSurfaceFormat8b7c:f320:99b9:690f:4595:cd17:293a:c069operator==(const QVideoSurfaceFormat &other) const Returns true if other is the same as this video format, and false if they are different.
Class JTree.AccessibleJTree.AccessibleJTreeNode java.lang.Object javax.accessibility.AccessibleContext javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode All Implemented Interfaces: Accessible, AccessibleAction, AccessibleComponent, AccessibleSelection Enclosing class: JTree.AccessibleJTree protected class JTree.AccessibleJTree.AccessibleJTreeNode extends AccessibleContext implements Accessible, AccessibleComponent, AccessibleSelection, AccessibleAction This class implements accessibility support for the JTree child. It provides an implementation of the Java Accessibility API appropriate to tree nodes. Field Summary Fields declared in class javax.accessibility.AccessibleContext ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_COMPONENT_BOUNDS_CHANGED, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_HYPERTEXT_OFFSET, ACCESSIBLE_INVALIDATE_CHILDREN, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName Fields declared in interface javax.accessibility.AccessibleAction CLICK, DECREMENT, INCREMENT, TOGGLE_EXPAND, TOGGLE_POPUP Constructor Summary Constructor Description AccessibleJTreeNode(JTree t, TreePath p, Accessible ap) Constructs an AccessibleJTreeNode Method Summary Modifier and Type Method Description void addAccessibleSelection(int i) Adds the specified selected item in the object to the object's selection. void addFocusListener(FocusListener l) Adds the specified focus listener to receive focus events from this component. void addPropertyChangeListener(PropertyChangeListener l) Add a PropertyChangeListener to the listener list. void clearAccessibleSelection() Clears the selection in the object, so that nothing in the object is selected. boolean contains(Point p) Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object. boolean doAccessibleAction(int i) Perform the specified Action on the tree node. AccessibleAction getAccessibleAction() Get the AccessibleAction associated with this object. int getAccessibleActionCount() Returns the number of accessible actions available in this tree node. String getAccessibleActionDescription(int i) Return a description of the specified action of the tree node. Accessible getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point. Accessible getAccessibleChild(int i) Return the specified Accessible child of the object. int getAccessibleChildrenCount() Returns the number of accessible children in the object. AccessibleComponent getAccessibleComponent() Get the AccessibleComponent associated with this object. AccessibleContext getAccessibleContext() Get the AccessibleContext associated with this tree node. String getAccessibleDescription() Get the accessible description of this object. int getAccessibleIndexInParent() Get the index of this object in its accessible parent. String getAccessibleName() Get the accessible name of this object. Accessible getAccessibleParent() Get the Accessible parent of this object. AccessibleRole getAccessibleRole() Get the role of this object. AccessibleSelection getAccessibleSelection() Get the AccessibleSelection associated with this object if one exists. Accessible getAccessibleSelection(int i) Returns an Accessible representing the specified selected item in the object. int getAccessibleSelectionCount() Returns the number of items currently selected. AccessibleStateSet getAccessibleStateSet() Get the state set of this object. AccessibleText getAccessibleText() Get the AccessibleText associated with this object if one exists. AccessibleValue getAccessibleValue() Get the AccessibleValue associated with this object if one exists. Color getBackground() Get the background color of this object. Rectangle getBounds() Gets the bounds of this object in the form of a Rectangle object. Cursor getCursor() Gets the cursor of this object. Font getFont() Gets the font of this object. FontMetrics getFontMetrics(Font f) Gets the FontMetrics of this object. Color getForeground() Get the foreground color of this object. Locale getLocale() Gets the locale of the component. Point getLocation() Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space. protected Point getLocationInJTree() Returns the relative location of the node Point getLocationOnScreen() Returns the location of the object on the screen. Dimension getSize() Returns the size of this object in the form of a Dimension object. boolean isAccessibleChildSelected(int i) Returns true if the current child of this object is selected. boolean isEnabled() Determines if the object is enabled. boolean isFocusTraversable() Returns whether this object can accept focus or not. boolean isShowing() Determines if the object is showing. boolean isVisible() Determines if the object is visible. void removeAccessibleSelection(int i) Removes the specified selected item in the object from the object's selection. void removeFocusListener(FocusListener l) Removes the specified focus listener so it no longer receives focus events from this component. void removePropertyChangeListener(PropertyChangeListener l) Remove a PropertyChangeListener from the listener list. void requestFocus() Requests focus for this object. void selectAllAccessibleSelection() Causes every selected item in the object to be selected if the object supports multiple selections. void setAccessibleDescription(String s) Set the accessible description of this object. void setAccessibleName(String s) Set the localized accessible name of this object. void setBackground(Color c) Set the background color of this object. void setBounds(Rectangle r) Sets the bounds of this object in the form of a Rectangle object. void setCursor(Cursor c) Sets the cursor of this object. void setEnabled(boolean b) Sets the enabled state of the object. void setFont(Font f) Sets the font of this object. void setForeground(Color c) Sets the foreground color of this object. void setLocation(Point p) Sets the location of the object relative to the parent. void setSize(Dimension d) Resizes this object so that it has width and height. void setVisible(boolean b) Sets the visible state of the object. Methods declared in class javax.accessibility.AccessibleContext firePropertyChange, getAccessibleEditableText, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, setAccessibleParent Methods declared in class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructor Details AccessibleJTreeNode public AccessibleJTreeNode(JTree t, TreePath p, Accessible ap) Constructs an AccessibleJTreeNode Parameters: t - an instance of JTree p - an instance of TreePath ap - an instance of Accessible Since: 1.4 Method Details getAccessibleContext public AccessibleContext getAccessibleContext() Get the AccessibleContext associated with this tree node. In the implementation of the Java Accessibility API for this class, return this object, which is its own AccessibleContext. Specified by: getAccessibleContext in interface Accessible Returns: this object getAccessibleName public String getAccessibleName() Get the accessible name of this object. Overrides: getAccessibleName in class AccessibleContext Returns: the localized name of the object; null if this object does not have a name See Also: AccessibleContext.setAccessibleName(java.lang.String) setAccessibleName public void setAccessibleName(String s) Set the localized accessible name of this object. Overrides: setAccessibleName in class AccessibleContext Parameters: s - the new localized name of the object. See Also: AccessibleContext.getAccessibleName() AccessibleContext.addPropertyChangeListener(java.beans.PropertyChangeListener) getAccessibleDescription public String getAccessibleDescription() Get the accessible description of this object. Overrides: getAccessibleDescription in class AccessibleContext Returns: the localized description of the object; null if this object does not have a description See Also: AccessibleContext.setAccessibleDescription(java.lang.String) setAccessibleDescription public void setAccessibleDescription(String s) Set the accessible description of this object. Overrides: setAccessibleDescription in class AccessibleContext Parameters: s - the new localized description of the object See Also: AccessibleContext.setAccessibleName(java.lang.String) AccessibleContext.addPropertyChangeListener(java.beans.PropertyChangeListener) getAccessibleRole public AccessibleRole getAccessibleRole() Get the role of this object. Specified by: getAccessibleRole in class AccessibleContext Returns: an instance of AccessibleRole describing the role of the object See Also: AccessibleRole getAccessibleStateSet public AccessibleStateSet getAccessibleStateSet() Get the state set of this object. Specified by: getAccessibleStateSet in class AccessibleContext Returns: an instance of AccessibleStateSet containing the current state set of the object See Also: AccessibleState getAccessibleParent public Accessible getAccessibleParent() Get the Accessible parent of this object. Overrides: getAccessibleParent in class AccessibleContext Returns: the Accessible parent of this object; null if this object does not have an Accessible parent getAccessibleIndexInParent public int getAccessibleIndexInParent() Get the index of this object in its accessible parent. Specified by: getAccessibleIndexInParent in class AccessibleContext Returns: the index of this object in its parent; -1 if this object does not have an accessible parent. See Also: getAccessibleParent() getAccessibleChildrenCount public int getAccessibleChildrenCount() Returns the number of accessible children in the object. Specified by: getAccessibleChildrenCount in class AccessibleContext Returns: the number of accessible children in the object. getAccessibleChild public Accessible getAccessibleChild(int i) Return the specified Accessible child of the object. Specified by: getAccessibleChild in class AccessibleContext Parameters: i - zero-based index of child Returns: the Accessible child of the object See Also: AccessibleContext.getAccessibleChildrenCount() getLocale public Locale getLocale() Gets the locale of the component. If the component does not have a locale, then the locale of its parent is returned. Specified by: getLocale in class AccessibleContext Returns: This component's locale. If this component does not have a locale, the locale of its parent is returned. Throws: IllegalComponentStateException - If the Component does not have its own locale and has not yet been added to a containment hierarchy such that the locale can be determined from the containing parent. See Also: Component.setLocale(java.util.Locale) addPropertyChangeListener public void addPropertyChangeListener(PropertyChangeListener l) Add a PropertyChangeListener to the listener list. The listener is registered for all properties. Overrides: addPropertyChangeListener in class AccessibleContext Parameters: l - The PropertyChangeListener to be added See Also: AccessibleContext.ACCESSIBLE_NAME_PROPERTY AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY AccessibleContext.ACCESSIBLE_STATE_PROPERTY AccessibleContext.ACCESSIBLE_VALUE_PROPERTY AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY AccessibleContext.ACCESSIBLE_TEXT_PROPERTY AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY removePropertyChangeListener public void removePropertyChangeListener(PropertyChangeListener l) Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. Overrides: removePropertyChangeListener in class AccessibleContext Parameters: l - The PropertyChangeListener to be removed getAccessibleAction public AccessibleAction getAccessibleAction() Get the AccessibleAction associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleAction interface on behalf of itself. Overrides: getAccessibleAction in class AccessibleContext Returns: this object See Also: AccessibleAction getAccessibleComponent public AccessibleComponent getAccessibleComponent() Get the AccessibleComponent associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleComponent interface on behalf of itself. Overrides: getAccessibleComponent in class AccessibleContext Returns: this object See Also: AccessibleComponent getAccessibleSelection public AccessibleSelection getAccessibleSelection() Get the AccessibleSelection associated with this object if one exists. Otherwise return null. Overrides: getAccessibleSelection in class AccessibleContext Returns: the AccessibleSelection, or null See Also: AccessibleSelection getAccessibleText public AccessibleText getAccessibleText() Get the AccessibleText associated with this object if one exists. Otherwise return null. Overrides: getAccessibleText in class AccessibleContext Returns: the AccessibleText, or null See Also: AccessibleText getAccessibleValue public AccessibleValue getAccessibleValue() Get the AccessibleValue associated with this object if one exists. Otherwise return null. Overrides: getAccessibleValue in class AccessibleContext Returns: the AccessibleValue, or null See Also: AccessibleValue getBackground public Color getBackground() Get the background color of this object. Specified by: getBackground in interface AccessibleComponent Returns: the background color, if supported, of the object; otherwise, null See Also: AccessibleComponent.setBackground(java.awt.Color) setBackground public void setBackground(Color c) Set the background color of this object. Specified by: setBackground in interface AccessibleComponent Parameters: c - the new Color for the background See Also: AccessibleComponent.setBackground(java.awt.Color) getForeground public Color getForeground() Get the foreground color of this object. Specified by: getForeground in interface AccessibleComponent Returns: the foreground color, if supported, of the object; otherwise, null See Also: AccessibleComponent.setForeground(java.awt.Color) setForeground public void setForeground(Color c) Description copied from interface: AccessibleComponent Sets the foreground color of this object. Specified by: setForeground in interface AccessibleComponent Parameters: c - the new color for the foreground See Also: AccessibleComponent.getForeground() getCursor public Cursor getCursor() Description copied from interface: AccessibleComponent Gets the cursor of this object. Specified by: getCursor in interface AccessibleComponent Returns: the cursor, if supported, of the object; otherwise, null See Also: AccessibleComponent.setCursor(java.awt.Cursor) setCursor public void setCursor(Cursor c) Description copied from interface: AccessibleComponent Sets the cursor of this object. Specified by: setCursor in interface AccessibleComponent Parameters: c - the new cursor for the object See Also: AccessibleComponent.getCursor() getFont public Font getFont() Description copied from interface: AccessibleComponent Gets the font of this object. Specified by: getFont in interface AccessibleComponent Returns: the font, if supported, for the object; otherwise, null See Also: AccessibleComponent.setFont(java.awt.Font) setFont public void setFont(Font f) Description copied from interface: AccessibleComponent Sets the font of this object. Specified by: setFont in interface AccessibleComponent Parameters: f - the new font for the object See Also: AccessibleComponent.getFont() getFontMetrics public FontMetrics getFontMetrics(Font f) Description copied from interface: AccessibleComponent Gets the FontMetrics of this object. Specified by: getFontMetrics in interface AccessibleComponent Parameters: f - the font for which font metrics is to be obtained Returns: the FontMetrics, if supported, the object; otherwise, null See Also: AccessibleComponent.getFont() isEnabled public boolean isEnabled() Description copied from interface: AccessibleComponent Determines if the object is enabled. Objects that are enabled will also have the AccessibleState.ENABLED state set in their AccessibleStateSets. Specified by: isEnabled in interface AccessibleComponent Returns: true if object is enabled; otherwise, false See Also: AccessibleComponent.setEnabled(boolean) AccessibleContext.getAccessibleStateSet() AccessibleState.ENABLED AccessibleStateSet setEnabled public void setEnabled(boolean b) Description copied from interface: AccessibleComponent Sets the enabled state of the object. Specified by: setEnabled in interface AccessibleComponent Parameters: b - if true, enables this object; otherwise, disables it See Also: AccessibleComponent.isEnabled() isVisible public boolean isVisible() Description copied from interface: AccessibleComponent Determines if the object is visible. Note: this means that the object intends to be visible; however, it may not be showing on the screen because one of the objects that this object is contained by is currently not visible. To determine if an object is showing on the screen, use AccessibleComponent.isShowing() Objects that are visible will also have the AccessibleState.VISIBLE state set in their AccessibleStateSets. Specified by: isVisible in interface AccessibleComponent Returns: true if object is visible; otherwise, false See Also: AccessibleComponent.setVisible(boolean) AccessibleContext.getAccessibleStateSet() AccessibleState.VISIBLE AccessibleStateSet setVisible public void setVisible(boolean b) Description copied from interface: AccessibleComponent Sets the visible state of the object. Specified by: setVisible in interface AccessibleComponent Parameters: b - if true, shows this object; otherwise, hides it See Also: AccessibleComponent.isVisible() isShowing public boolean isShowing() Description copied from interface: AccessibleComponent Determines if the object is showing. This is determined by checking the visibility of the object and its ancestors. Note: this will return true even if the object is obscured by another (for example, it is underneath a menu that was pulled down). Specified by: isShowing in interface AccessibleComponent Returns: true if object is showing; otherwise, false contains public boolean contains(Point p) Description copied from interface: AccessibleComponent Checks whether the specified point is within this object's bounds, where the point's x and y coordinates are defined to be relative to the coordinate system of the object. Specified by: contains in interface AccessibleComponent Parameters: p - the point relative to the coordinate system of the object Returns: true if object contains point; otherwise false See Also: AccessibleComponent.getBounds() getLocationOnScreen public Point getLocationOnScreen() Description copied from interface: AccessibleComponent Returns the location of the object on the screen. Specified by: getLocationOnScreen in interface AccessibleComponent Returns: the location of the object on screen; null if this object is not on the screen See Also: AccessibleComponent.getBounds() AccessibleComponent.getLocation() getLocationInJTree protected Point getLocationInJTree() Returns the relative location of the node Returns: the relative location of the node getLocation public Point getLocation() Description copied from interface: AccessibleComponent Gets the location of the object relative to the parent in the form of a point specifying the object's top-left corner in the screen's coordinate space. Specified by: getLocation in interface AccessibleComponent Returns: An instance of Point representing the top-left corner of the object's bounds in the coordinate space of the screen; null if this object or its parent are not on the screen See Also: AccessibleComponent.getBounds() AccessibleComponent.getLocationOnScreen() setLocation public void setLocation(Point p) Description copied from interface: AccessibleComponent Sets the location of the object relative to the parent. Specified by: setLocation in interface AccessibleComponent Parameters: p - the new position for the top-left corner See Also: AccessibleComponent.getLocation() getBounds public Rectangle getBounds() Description copied from interface: AccessibleComponent Gets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent. Specified by: getBounds in interface AccessibleComponent Returns: A rectangle indicating this component's bounds; null if this object is not on the screen. See Also: AccessibleComponent.contains(java.awt.Point) setBounds public void setBounds(Rectangle r) Description copied from interface: AccessibleComponent Sets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent. Specified by: setBounds in interface AccessibleComponent Parameters: r - rectangle indicating this component's bounds See Also: AccessibleComponent.getBounds() getSize public Dimension getSize() Description copied from interface: AccessibleComponent Returns the size of this object in the form of a Dimension object. The height field of the Dimension object contains this object's height, and the width field of the Dimension object contains this object's width. Specified by: getSize in interface AccessibleComponent Returns: A Dimension object that indicates the size of this component; null if this object is not on the screen See Also: AccessibleComponent.setSize(java.awt.Dimension) setSize public void setSize(Dimension d) Description copied from interface: AccessibleComponent Resizes this object so that it has width and height. Specified by: setSize in interface AccessibleComponent Parameters: d - The dimension specifying the new size of the object See Also: AccessibleComponent.getSize() getAccessibleAt public Accessible getAccessibleAt(Point p) Returns the Accessible child, if one exists, contained at the local coordinate Point. Otherwise returns null. Specified by: getAccessibleAt in interface AccessibleComponent Parameters: p - point in local coordinates of this Accessible Returns: the Accessible, if it exists, at the specified location; else null isFocusTraversable public boolean isFocusTraversable() Description copied from interface: AccessibleComponent Returns whether this object can accept focus or not. Objects that can accept focus will also have the AccessibleState.FOCUSABLE state set in their AccessibleStateSets. Specified by: isFocusTraversable in interface AccessibleComponent Returns: true if object can accept focus; otherwise false See Also: AccessibleContext.getAccessibleStateSet() AccessibleState.FOCUSABLE AccessibleState.FOCUSED AccessibleStateSet requestFocus public void requestFocus() Description copied from interface: AccessibleComponent Requests focus for this object. If this object cannot accept focus, nothing will happen. Otherwise, the object will attempt to take focus. Specified by: requestFocus in interface AccessibleComponent See Also: AccessibleComponent.isFocusTraversable() addFocusListener public void addFocusListener(FocusListener l) Description copied from interface: AccessibleComponent Adds the specified focus listener to receive focus events from this component. Specified by: addFocusListener in interface AccessibleComponent Parameters: l - the focus listener See Also: AccessibleComponent.removeFocusListener(java.awt.event.FocusListener) removeFocusListener public void removeFocusListener(FocusListener l) Description copied from interface: AccessibleComponent Removes the specified focus listener so it no longer receives focus events from this component. Specified by: removeFocusListener in interface AccessibleComponent Parameters: l - the focus listener See Also: AccessibleComponent.addFocusListener(java.awt.event.FocusListener) getAccessibleSelectionCount public int getAccessibleSelectionCount() Returns the number of items currently selected. If no items are selected, the return value will be 0. Specified by: getAccessibleSelectionCount in interface AccessibleSelection Returns: the number of items currently selected. getAccessibleSelection public Accessible getAccessibleSelection(int i) Returns an Accessible representing the specified selected item in the object. If there isn't a selection, or there are fewer items selected than the integer passed in, the return value will be null. Specified by: getAccessibleSelection in interface AccessibleSelection Parameters: i - the zero-based index of selected items Returns: an Accessible containing the selected item See Also: AccessibleSelection.getAccessibleSelectionCount() isAccessibleChildSelected public boolean isAccessibleChildSelected(int i) Returns true if the current child of this object is selected. Specified by: isAccessibleChildSelected in interface AccessibleSelection Parameters: i - the zero-based index of the child in this Accessible object. Returns: true if the current child of this object is selected; else false See Also: AccessibleContext.getAccessibleChild(int) addAccessibleSelection public void addAccessibleSelection(int i) Adds the specified selected item in the object to the object's selection. If the object supports multiple selections, the specified item is added to any existing selection, otherwise it replaces any existing selection in the object. If the specified item is already selected, this method has no effect. Specified by: addAccessibleSelection in interface AccessibleSelection Parameters: i - the zero-based index of selectable items See Also: AccessibleContext.getAccessibleChild(int) removeAccessibleSelection public void removeAccessibleSelection(int i) Removes the specified selected item in the object from the object's selection. If the specified item isn't currently selected, this method has no effect. Specified by: removeAccessibleSelection in interface AccessibleSelection Parameters: i - the zero-based index of selectable items See Also: AccessibleContext.getAccessibleChild(int) clearAccessibleSelection public void clearAccessibleSelection() Clears the selection in the object, so that nothing in the object is selected. Specified by: clearAccessibleSelection in interface AccessibleSelection selectAllAccessibleSelection public void selectAllAccessibleSelection() Causes every selected item in the object to be selected if the object supports multiple selections. Specified by: selectAllAccessibleSelection in interface AccessibleSelection getAccessibleActionCount public int getAccessibleActionCount() Returns the number of accessible actions available in this tree node. If this node is not a leaf, there is at least one action (toggle expand), in addition to any available on the object behind the TreeCellRenderer. Specified by: getAccessibleActionCount in interface AccessibleAction Returns: the number of Actions in this object getAccessibleActionDescription public String getAccessibleActionDescription(int i) Return a description of the specified action of the tree node. If this node is not a leaf, there is at least one action description (toggle expand), in addition to any available on the object behind the TreeCellRenderer. Specified by: getAccessibleActionDescription in interface AccessibleAction Parameters: i - zero-based index of the actions Returns: a description of the action See Also: AccessibleAction.getAccessibleActionCount() doAccessibleAction public boolean doAccessibleAction(int i) Perform the specified Action on the tree node. If this node is not a leaf, there is at least one action which can be done (toggle expand), in addition to any available on the object behind the TreeCellRenderer. Specified by: doAccessibleAction in interface AccessibleAction Parameters: i - zero-based index of actions Returns: true if the action was performed; else false. See Also: AccessibleAction.getAccessibleActionCount()
Form Input Bindings Basics Usage You can use the v-model directive to create two-way data bindings on form input and textarea elements. It automatically picks the correct way to update the element based on the input type. Although a bit magical, v-model is essentially syntax sugar for updating data on user input events, plus special care for some edge cases. Text <span>Message is: {{ message }}</span> <br> <input type="text" v-model="message" placeholder="edit me"> Multiline text <span>Multiline message is:</span> <p>{{ message }}</p> <br> <textarea v-model="message" placeholder="add multiple lines"></textarea> Checkbox Single checkbox, boolean value: <input type="checkbox" id="checkbox" v-model="checked"> <label for="checkbox">{{ checked }}</label> Mutiple checkboxes, bound to the same Array: <input type="checkbox" id="jack" value="Jack" v-model="checkedNames"> <label for="jack">Jack</label> <input type="checkbox" id="john" value="John" v-model="checkedNames"> <label for="john">John</label> <input type="checkbox" id="mike" value="Mike" v-model="checkedNames"> <label for="mike">Mike</label> <br> <span>Checked names: {{ checkedNames | json }}</span> new Vue({ el: '...', data: { checkedNames: [] } }) Radio <input type="radio" id="one" value="One" v-model="picked"> <label for="one">One</label> <br> <input type="radio" id="two" value="Two" v-model="picked"> <label for="two">Two</label> <br> <span>Picked: {{ picked }}</span> Select Single select: <select v-model="selected"> <option selected>A</option> <option>B</option> <option>C</option> </select> <span>Selected: {{ selected }}</span> Multiple select (bound to Array): <select v-model="selected" multiple> <option selected>A</option> <option>B</option> <option>C</option> </select> <br> <span>Selected: {{ selected | json }}</span> Dynamic options rendered with v-for: <select v-model="selected"> <option v-for="option in options" v-bind:value="option.value"> {{ option.text }} </option> </select> <span>Selected: {{ selected }}</span> new Vue({ el: '...', data: { selected: 'A', options: [ { text: 'One', value: 'A' }, { text: 'Two', value: 'B' }, { text: 'Three', value: 'C' } ] } }) Value Bindings For radio, checkbox and select options, the v-model binding values are usually static strings (or booleans for checkbox): <!-- `picked` is a string "a" when checked --> <input type="radio" v-model="picked" value="a"> <!-- `toggle` is either true or false --> <input type="checkbox" v-model="toggle"> <!-- `selected` is a string "abc" when selected --> <select v-model="selected"> <option value="abc">ABC</option> </select> But sometimes we may want to bind the value to a dynamic property on the Vue instance. We can use v-bind to achieve that. In addition, using v-bind allows us to bind the input value to non-string values. Checkbox <input type="checkbox" v-model="toggle" v-bind:true-value="a" v-bind:false-value="b"> // when checked: vm.toggle === vm.a // when unchecked: vm.toggle === vm.b Radio <input type="radio" v-model="pick" v-bind:value="a"> // when checked: vm.pick === vm.a Select Options <select v-model="selected"> <!-- inline object literal --> <option v-bind:value="{ number: 123 }">123</option> </select> // when selected: typeof vm.selected // -> 'object' vm.selected.number // -> 123 Param Attributes lazy By default, v-model syncs the input with the data after each input event. You can add a lazy attribute to change the behavior to sync after change events: <!-- synced after "change" instead of "input" --> <input v-model="msg" lazy> number If you want user input to be automatically persisted as numbers, you can add a number attribute to your v-model managed inputs: <input v-model="age" number> debounce The debounce param allows you to set a minimum delay after each keystroke before the input’s value is synced to the model. This can be useful when you are performing expensive operations on each update, for example making an Ajax request for type-ahead autocompletion. <input v-model="msg" debounce="500"> Note that the debounce param does not debounce the user’s input events: it debounces the “write” operation to the underlying data. Therefore you should use vm.$watch() to react to data changes when using debounce. For debouncing real DOM events you should use the debounce filter.
ArtisanServiceProvider class ArtisanServiceProvider extends ServiceProvider (View source) Properties protected Application $app The application instance. from ServiceProvider protected bool $defer Indicates if loading of the provider is deferred. static protected array $publishes The paths that should be published. from ServiceProvider static protected array $publishGroups The paths that should be published by group. from ServiceProvider protected array $commands The commands to be registered. protected array $devCommands The commands to be registered. Methods void __construct(Application $app) Create a new service provider instance. from ServiceProvider void register() Register the service provider. void mergeConfigFrom(string $path, string $key) Merge the given configuration with the existing configuration. from ServiceProvider void loadViewsFrom(string $path, string $namespace) Register a view file namespace. from ServiceProvider void loadTranslationsFrom(string $path, string $namespace) Register a translation file namespace. from ServiceProvider void publishes(array $paths, string $group = null) Register paths to be published by the publish command. from ServiceProvider static array pathsToPublish(string $provider = null, string $group = null) Get the paths to publish. from ServiceProvider void commands(array|mixed $commands) Register the package's custom Artisan commands. from ServiceProvider array provides() Get the services provided by the provider. array when() Get the events that trigger this service provider to register. from ServiceProvider bool isDeferred() Determine if the provider is deferred. from ServiceProvider static array compiles() Get a list of files that should be compiled for the package. from ServiceProvider mixed __call(string $method, array $parameters) Dynamically handle missing method calls. from ServiceProvider void registerCommands(array $commands) Register the given commands. void registerAppNameCommand() Register the command. void registerAuthMakeCommand() Register the command. void registerCacheTableCommand() Register the command. void registerClearCompiledCommand() Register the command. void registerClearResetsCommand() Register the command. void registerConfigCacheCommand() Register the command. void registerConfigClearCommand() Register the command. void registerConsoleMakeCommand() Register the command. void registerControllerMakeCommand() Register the command. void registerEventGenerateCommand() Register the command. void registerEventMakeCommand() Register the command. void registerDownCommand() Register the command. void registerEnvironmentCommand() Register the command. void registerJobMakeCommand() Register the command. void registerKeyGenerateCommand() Register the command. void registerListenerMakeCommand() Register the command. void registerMiddlewareMakeCommand() Register the command. void registerModelMakeCommand() Register the command. void registerOptimizeCommand() Register the command. void registerProviderMakeCommand() Register the command. void registerQueueFailedTableCommand() Register the command. void registerQueueTableCommand() Register the command. void registerRequestMakeCommand() Register the command. void registerSeederMakeCommand() Register the command. void registerSessionTableCommand() Register the command. void registerRouteCacheCommand() Register the command. void registerRouteClearCommand() Register the command. void registerRouteListCommand() Register the command. void registerServeCommand() Register the command. void registerTestMakeCommand() Register the command. void registerTinkerCommand() Register the command. void registerUpCommand() Register the command. void registerVendorPublishCommand() Register the command. void registerViewClearCommand() Register the command. void registerPolicyMakeCommand() Register the command. Details void __construct(Application $app) Create a new service provider instance. Parameters Application $app Return Value void void register() Register the service provider. Return Value void protected void mergeConfigFrom(string $path, string $key) Merge the given configuration with the existing configuration. Parameters string $path string $key Return Value void protected void loadViewsFrom(string $path, string $namespace) Register a view file namespace. Parameters string $path string $namespace Return Value void protected void loadTranslationsFrom(string $path, string $namespace) Register a translation file namespace. Parameters string $path string $namespace Return Value void protected void publishes(array $paths, string $group = null) Register paths to be published by the publish command. Parameters array $paths string $group Return Value void static array pathsToPublish(string $provider = null, string $group = null) Get the paths to publish. Parameters string $provider string $group Return Value array void commands(array|mixed $commands) Register the package's custom Artisan commands. Parameters array|mixed $commands Return Value void array provides() Get the services provided by the provider. Return Value array array when() Get the events that trigger this service provider to register. Return Value array bool isDeferred() Determine if the provider is deferred. Return Value bool static array compiles() Get a list of files that should be compiled for the package. Return Value array mixed __call(string $method, array $parameters) Dynamically handle missing method calls. Parameters string $method array $parameters Return Value mixed Exceptions BadMethodCallException protected void registerCommands(array $commands) Register the given commands. Parameters array $commands Return Value void protected void registerAppNameCommand() Register the command. Return Value void protected void registerAuthMakeCommand() Register the command. Return Value void protected void registerCacheTableCommand() Register the command. Return Value void protected void registerClearCompiledCommand() Register the command. Return Value void protected void registerClearResetsCommand() Register the command. Return Value void protected void registerConfigCacheCommand() Register the command. Return Value void protected void registerConfigClearCommand() Register the command. Return Value void protected void registerConsoleMakeCommand() Register the command. Return Value void protected void registerControllerMakeCommand() Register the command. Return Value void protected void registerEventGenerateCommand() Register the command. Return Value void protected void registerEventMakeCommand() Register the command. Return Value void protected void registerDownCommand() Register the command. Return Value void protected void registerEnvironmentCommand() Register the command. Return Value void protected void registerJobMakeCommand() Register the command. Return Value void protected void registerKeyGenerateCommand() Register the command. Return Value void protected void registerListenerMakeCommand() Register the command. Return Value void protected void registerMiddlewareMakeCommand() Register the command. Return Value void protected void registerModelMakeCommand() Register the command. Return Value void protected void registerOptimizeCommand() Register the command. Return Value void protected void registerProviderMakeCommand() Register the command. Return Value void protected void registerQueueFailedTableCommand() Register the command. Return Value void protected void registerQueueTableCommand() Register the command. Return Value void protected void registerRequestMakeCommand() Register the command. Return Value void protected void registerSeederMakeCommand() Register the command. Return Value void protected void registerSessionTableCommand() Register the command. Return Value void protected void registerRouteCacheCommand() Register the command. Return Value void protected void registerRouteClearCommand() Register the command. Return Value void protected void registerRouteListCommand() Register the command. Return Value void protected void registerServeCommand() Register the command. Return Value void protected void registerTestMakeCommand() Register the command. Return Value void protected void registerTinkerCommand() Register the command. Return Value void protected void registerUpCommand() Register the command. Return Value void protected void registerVendorPublishCommand() Register the command. Return Value void protected void registerViewClearCommand() Register the command. Return Value void protected void registerPolicyMakeCommand() Register the command. Return Value void
Interface ConsoleApplicationInterface An interface defining the methods that the console runner depend on. Direct Implementers Cake\Http\BaseApplication Namespace: Cake\Core Location: Core/ConsoleApplicationInterface.php Method Summary bootstrap() public Load all the application configuration and bootstrap logic. console() public Define the console commands for an application. Method Detail bootstrap()source public bootstrap( ) Load all the application configuration and bootstrap logic. Override this method to add additional bootstrap logic for your application. console()source public console( Cake\Console\CommandCollection $commands ) Define the console commands for an application. Parameters Cake\Console\CommandCollection $commands The CommandCollection to add commands into. Returns Cake\Console\CommandCollectionThe updated collection.
tf.distribute.OneDeviceStrategy View source on GitHub A distribution strategy for running on a single device. Inherits From: Strategy tf.distribute.OneDeviceStrategy( device ) Using this strategy will place any variables created in its scope on the specified device. Input distributed through this strategy will be prefetched to the specified device. Moreover, any functions called via strategy.run will also be placed on the specified device as well. Typical usage of this strategy could be testing your code with the tf.distribute.Strategy API before switching to other strategies which actually distribute to multiple devices/machines. For example: strategy = tf.distribute.OneDeviceStrategy(device="/gpu:0") with strategy.scope(): v = tf.Variable(1.0) print(v.device) # /job:localhost/replica:0/task:0/device:GPU:0 def step_fn(x): return x * 2 result = 0 for i in range(10): result += strategy.run(step_fn, args=(i,)) print(result) # 90 Args device Device string identifier for the device on which the variables should be placed. See class docs for more details on how the device is used. Examples: "/cpu:0", "/gpu:0", "/device:CPU:0", "/device:GPU:0" Attributes cluster_resolver Returns the cluster resolver associated with this strategy. In general, when using a multi-worker tf.distribute strategy such as tf.distribute.experimental.MultiWorkerMirroredStrategy or tf.distribute.experimental.TPUStrategy(), there is a tf.distribute.cluster_resolver.ClusterResolver associated with the strategy used, and such an instance is returned by this property. Strategies that intend to have an associated tf.distribute.cluster_resolver.ClusterResolver must set the relevant attribute, or override this property; otherwise, None is returned by default. Those strategies should also provide information regarding what is returned by this property. Single-worker strategies usually do not have a tf.distribute.cluster_resolver.ClusterResolver, and in those cases this property will return None. The tf.distribute.cluster_resolver.ClusterResolver may be useful when the user needs to access information such as the cluster spec, task type or task id. For example, os.environ['TF_CONFIG'] = json.dumps({ 'cluster': { 'worker': ["localhost:12345", "localhost:23456"], 'ps': ["localhost:34567"] }, 'task': {'type': 'worker', 'index': 0} }) # This implicitly uses TF_CONFIG for the cluster and current task info. strategy = tf.distribute.experimental.MultiWorkerMirroredStrategy() ... if strategy.cluster_resolver.task_type == 'worker': # Perform something that's only applicable on workers. Since we set this # as a worker above, this block will run on this particular instance. elif strategy.cluster_resolver.task_type == 'ps': # Perform something that's only applicable on parameter servers. Since we # set this as a worker above, this block will not run on this particular # instance. For more information, please see tf.distribute.cluster_resolver.ClusterResolver's API docstring. extended tf.distribute.StrategyExtended with additional methods. num_replicas_in_sync Returns number of replicas over which gradients are aggregated. Methods experimental_assign_to_logical_device View source experimental_assign_to_logical_device( tensor, logical_device_id ) Adds annotation that tensor will be assigned to a logical device. Note: This API is only supported in TPUStrategy for now. This adds an annotation to tensor specifying that operations on tensor will be invoked on logical core device id logical_device_id. When model parallelism is used, the default behavior is that all ops are placed on zero-th logical device. # Initializing TPU system with 2 logical devices and 4 replicas. resolver = tf.distribute.cluster_resolver.TPUClusterResolver(tpu='') tf.config.experimental_connect_to_cluster(resolver) topology = tf.tpu.experimental.initialize_tpu_system(resolver) device_assignment = tf.tpu.experimental.DeviceAssignment.build( topology, computation_shape=[1, 1, 1, 2], num_replicas=4) strategy = tf.distribute.TPUStrategy( resolver, experimental_device_assignment=device_assignment) iterator = iter(inputs) @tf.function() def step_fn(inputs): output = tf.add(inputs, inputs) # Add operation will be executed on logical device 0. output = strategy.experimental_assign_to_logical_device(output, 0) return output strategy.run(step_fn, args=(next(iterator),)) Args tensor Input tensor to annotate. logical_device_id Id of the logical core to which the tensor will be assigned. Raises ValueError The logical device id presented is not consistent with total number of partitions specified by the device assignment. Returns Annotated tensor with idential value as tensor. experimental_distribute_dataset View source experimental_distribute_dataset( dataset ) Distributes a tf.data.Dataset instance provided via dataset. In this case, there is only one device, so this is only a thin wrapper around the input dataset. It will, however, prefetch the input data to the specified device. The returned distributed dataset can be iterated over similar to how regular datasets can. Note: Currently, the user cannot add any more transformations to a distributed dataset. Example: strategy = tf.distribute.OneDeviceStrategy() dataset = tf.data.Dataset.range(10).batch(2) dist_dataset = strategy.experimental_distribute_dataset(dataset) for x in dist_dataset: print(x) # [0, 1], [2, 3],... Args: dataset: tf.data.Dataset to be prefetched to device. Returns A "distributed Dataset" that the caller can iterate over. experimental_distribute_datasets_from_function View source experimental_distribute_datasets_from_function( dataset_fn ) Distributes tf.data.Dataset instances created by calls to dataset_fn. dataset_fn will be called once for each worker in the strategy. In this case, we only have one worker and one device so dataset_fn is called once. The dataset_fn should take an tf.distribute.InputContext instance where information about batching and input replication can be accessed: def dataset_fn(input_context): batch_size = input_context.get_per_replica_batch_size(global_batch_size) d = tf.data.Dataset.from_tensors([[1.]]).repeat().batch(batch_size) return d.shard( input_context.num_input_pipelines, input_context.input_pipeline_id) inputs = strategy.experimental_distribute_datasets_from_function(dataset_fn) for batch in inputs: replica_results = strategy.run(replica_fn, args=(batch,)) Key Point: The tf.data.Dataset returned by dataset_fn should have a per-replica batch size, unlike experimental_distribute_dataset, which uses the global batch size. This may be computed using input_context.get_per_replica_batch_size. Args dataset_fn A function taking a tf.distribute.InputContext instance and returning a tf.data.Dataset. Returns A "distributed Dataset", which the caller can iterate over like regular datasets. experimental_distribute_values_from_function View source experimental_distribute_values_from_function( value_fn ) Generates tf.distribute.DistributedValues from value_fn. This function is to generate tf.distribute.DistributedValues to pass into run, reduce, or other methods that take distributed values when not using datasets. Args value_fn The function to run to generate values. It is called for each replica with tf.distribute.ValueContext as the sole argument. It must return a Tensor or a type that can be converted to a Tensor. Returns A tf.distribute.DistributedValues containing a value for each replica. Example usage: Return constant value per replica: strategy = tf.distribute.MirroredStrategy() def value_fn(ctx): return tf.constant(1.) distributed_values = ( strategy.experimental_distribute_values_from_function( value_fn)) local_result = strategy.experimental_local_results(distributed_values) local_result (<tf.Tensor: shape=(), dtype=float32, numpy=1.0>,) Distribute values in array based on replica_id: strategy = tf.distribute.MirroredStrategy() array_value = np.array([3., 2., 1.]) def value_fn(ctx): return array_value[ctx.replica_id_in_sync_group] distributed_values = ( strategy.experimental_distribute_values_from_function( value_fn)) local_result = strategy.experimental_local_results(distributed_values) local_result (3.0,) Specify values using num_replicas_in_sync: strategy = tf.distribute.MirroredStrategy() def value_fn(ctx): return ctx.num_replicas_in_sync distributed_values = ( strategy.experimental_distribute_values_from_function( value_fn)) local_result = strategy.experimental_local_results(distributed_values) local_result (1,) Place values on devices and distribute: strategy = tf.distribute.TPUStrategy() worker_devices = strategy.extended.worker_devices multiple_values = [] for i in range(strategy.num_replicas_in_sync): with tf.device(worker_devices[i]): multiple_values.append(tf.constant(1.0)) def value_fn(ctx): return multiple_values[ctx.replica_id_in_sync_group] distributed_values = strategy. experimental_distribute_values_from_function( value_fn) experimental_local_results View source experimental_local_results( value ) Returns the list of all local per-replica values contained in value. In OneDeviceStrategy, the value is always expected to be a single value, so the result is just the value in a tuple. Args value A value returned by experimental_run(), run(), extended.call_for_each_replica(), or a variable created in scope. Returns A tuple of values contained in value. If value represents a single value, this returns (value,). experimental_make_numpy_dataset View source experimental_make_numpy_dataset( numpy_input ) Makes a tf.data.Dataset from a numpy array. (deprecated) Warning: THIS FUNCTION IS DEPRECATED. It will be removed after 2020-09-30. Instructions for updating: Please use tf.data.Dataset.from_tensor_slices instead This avoids adding numpy_input as a large constant in the graph, and copies the data to the machine or machines that will be processing the input. Note that you will likely need to use experimental_distribute_dataset with the returned dataset to further distribute it with the strategy. Example: strategy = tf.distribute.MirroredStrategy() numpy_input = np.ones([10], dtype=np.float32) dataset = strategy.experimental_make_numpy_dataset(numpy_input) dataset <TensorSliceDataset shapes: (), types: tf.float32> dataset = dataset.batch(2) dist_dataset = strategy.experimental_distribute_dataset(dataset) Args numpy_input a nest of NumPy input arrays that will be converted into a dataset. Note that the NumPy arrays are stacked, as that is normal tf.data.Dataset behavior. Returns A tf.data.Dataset representing numpy_input. experimental_replicate_to_logical_devices View source experimental_replicate_to_logical_devices( tensor ) Adds annotation that tensor will be replicated to all logical devices. Note: This API is only supported in TPUStrategy for now. This adds an annotation to tensor tensor specifying that operations on tensor will be invoked on all logical devices. # Initializing TPU system with 2 logical devices and 4 replicas. resolver = tf.distribute.cluster_resolver.TPUClusterResolver(tpu='') tf.config.experimental_connect_to_cluster(resolver) topology = tf.tpu.experimental.initialize_tpu_system(resolver) device_assignment = tf.tpu.experimental.DeviceAssignment.build( topology, computation_shape=[1, 1, 1, 2], num_replicas=4) strategy = tf.distribute.TPUStrategy( resolver, experimental_device_assignment=device_assignment) iterator = iter(inputs) @tf.function() def step_fn(inputs): images, labels = inputs images = strategy.experimental_split_to_logical_devices( inputs, [1, 2, 4, 1]) # model() function will be executed on 8 logical devices with `inputs` # split 2 * 4 ways. output = model(inputs) # For loss calculation, all logical devices share the same logits # and labels. labels = strategy.experimental_replicate_to_logical_devices(labels) output = strategy.experimental_replicate_to_logical_devices(output) loss = loss_fn(labels, output) return loss strategy.run(step_fn, args=(next(iterator),)) Args: tensor: Input tensor to annotate. Returns Annotated tensor with idential value as tensor. experimental_split_to_logical_devices View source experimental_split_to_logical_devices( tensor, partition_dimensions ) Adds annotation that tensor will be split across logical devices. Note: This API is only supported in TPUStrategy for now. This adds an annotation to tensor tensor specifying that operations on tensor will be be split among multiple logical devices. Tensor tensor will be split across dimensions specified by partition_dimensions. The dimensions of tensor must be divisible by corresponding value in partition_dimensions. For example, for system with 8 logical devices, if tensor is an image tensor with shape (batch_size, width, height, channel) and partition_dimensions is [1, 2, 4, 1], then tensor will be split 2 in width dimension and 4 way in height dimension and the split tensor values will be fed into 8 logical devices. # Initializing TPU system with 8 logical devices and 1 replica. resolver = tf.distribute.cluster_resolver.TPUClusterResolver(tpu='') tf.config.experimental_connect_to_cluster(resolver) topology = tf.tpu.experimental.initialize_tpu_system(resolver) device_assignment = tf.tpu.experimental.DeviceAssignment.build( topology, computation_shape=[1, 2, 2, 2], num_replicas=1) strategy = tf.distribute.TPUStrategy( resolver, experimental_device_assignment=device_assignment) iterator = iter(inputs) @tf.function() def step_fn(inputs): inputs = strategy.experimental_split_to_logical_devices( inputs, [1, 2, 4, 1]) # model() function will be executed on 8 logical devices with `inputs` # split 2 * 4 ways. output = model(inputs) return output strategy.run(step_fn, args=(next(iterator),)) Args: tensor: Input tensor to annotate. partition_dimensions: An unnested list of integers with the size equal to rank of tensor specifying how tensor will be partitioned. The product of all elements in partition_dimensions must be equal to the total number of logical devices per replica. Raises ValueError 1) If the size of partition_dimensions does not equal to rank of tensor or 2) if product of elements of partition_dimensions does not match the number of logical devices per replica defined by the implementing DistributionStrategy's device specification or 3) if a known size of tensor is not divisible by corresponding value in partition_dimensions. Returns Annotated tensor with idential value as tensor. reduce View source reduce( reduce_op, value, axis ) Reduce value across replicas. In OneDeviceStrategy, there is only one replica, so if axis=None, value is simply returned. If axis is specified as something other than None, such as axis=0, value is reduced along that axis and returned. Example: t = tf.range(10) result = strategy.reduce(tf.distribute.ReduceOp.SUM, t, axis=None).numpy() # result: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] result = strategy.reduce(tf.distribute.ReduceOp.SUM, t, axis=0).numpy() # result: 45 Args reduce_op A tf.distribute.ReduceOp value specifying how values should be combined. value A "per replica" value, e.g. returned by run to be combined into a single tensor. axis Specifies the dimension to reduce along within each replica's tensor. Should typically be set to the batch dimension, or None to only reduce across replicas (e.g. if the tensor has no batch dimension). Returns A Tensor. run View source run( fn, args=(), kwargs=None, options=None ) Run fn on each replica, with the given arguments. In OneDeviceStrategy, fn is simply called within a device scope for the given device, with the provided arguments. Args fn The function to run. The output must be a tf.nest of Tensors. args (Optional) Positional arguments to fn. kwargs (Optional) Keyword arguments to fn. options (Optional) An instance of tf.distribute.RunOptions specifying the options to run fn. Returns Return value from running fn. scope View source scope() Returns a context manager selecting this Strategy as current. Inside a with strategy.scope(): code block, this thread will use a variable creator set by strategy, and will enter its "cross-replica context". In OneDeviceStrategy, all variables created inside strategy.scope() will be on device specified at strategy construction time. See example in the docs for this class. Returns A context manager to use for creating variables with this strategy.
interfaces resource [edit on GitHub] Use the interfaces Chef InSpec audit resource to test the properties of multiple network interfaces on the system. Syntax An interfaces resource block may take no arguments, in which case it will list all interfaces: describe interfaces do its('names') { should include 'eth0' } end An interfaces resource block may take a where clause, filtering on a Filter Criterion: # All eth- interfaces describe interfaces.where(name: /^eth\d+/) its('names') { should include 'eth0' } end Like any Chef InSpec resource, you may also use it for data lookup instead of testing: # We are an IPv6 shop interfaces.where(name: /^eth/).names do |name| describe interface(name) do it { should have_ipv6_address } end end # Obtain the machine's main IP address my_ip = interfaces.ipv4_address Filter Criteria name String. The name of an interface. Properties count The count property returns an Integer describing how many interfaces matched. its(“count”) { should eq 6 } ipv4_address Attempts to guess the “first” “real” IPv4 address on any interface. Looks for interfaces that are up and have IPv4 addresses assigned, then tries to filter out loopback, management (10/8) and local (192.168/16) IP addresses, returning the best of of those that it can; you may still get nil, or a loopback address. Note that if the machine is behind NAT this will not be the external IP address; use the http resource to query an IP lookup service for that. its(‘ipv4_address’) { should_not eq ‘(800)714-9390’ } names The names property returns an Array of Strings representing the names of the interfaces. its(“names”) { should include “eth0” } Matchers For a full list of available universal matchers, please visit our matchers page. exist The exist matcher tests true if at least one interface exists on the system. This is almost always the case. it { should exist }
PrivateChannel class PrivateChannel extends Channel (View source) Properties string $name The channel's name. from Channel Methods void __construct(string $name) Create a new channel instance. string __toString() Convert the channel instance to a string. from Channel Details void __construct(string $name) Create a new channel instance. Parameters string $name Return Value void string __toString() Convert the channel instance to a string. Return Value string
break statement Causes the enclosing for, range-for, while or do-while loop or switch statement to terminate. Used when it is otherwise awkward to terminate the loop using the condition expression and conditional statements. Syntax attr(optional) break ; Explanation After this statement the control is transferred to the statement immediately following the enclosing loop or switch. As with any block exit, all automatic storage objects declared in enclosing compound statement or in the condition of a loop/switch are destroyed, in reverse order of construction, before the execution of the first line following the enclosing loop. Keywords break. Notes A break statement cannot be used to break out of multiple nested loops. The goto statement may be used for this purpose. Example #include <iostream> int main() { int i = 2; switch (i) { case 1: st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << "1"; //<---- maybe warning: fall through case 2: st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << "2"; //execution starts at this case label (+warning) case 3: st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << "3"; //<---- maybe warning: fall through case 4: //<---- maybe warning: fall through case 5: st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << "45"; // break; //execution of subsequent statements is terminated case 6: st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << "6"; } st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << '\n'; for (int j = 0; j < 2; j++) { for (int k = 0; k < 5; k++) { //only this loop is affected by break if (k == 2) break; // st8b7c:f320:99b9:690f:4595:cd17:293a:c069cout << j << k << ' '; // } } } Possible output: 2345 00 01 10 11 See also [[fallthrough]](C++17) indicates that the fall through from the previous case label is intentional and should not be diagnosed by a compiler that warns on fall-through C documentation for break
dojo/NodeList-traverse Summary Adds chainable methods to dojo/query() / NodeList instances for traversing the DOM Usage NodeList-traverse(); See the dojo/NodeList-traverse reference documentation for more information. Methods
Note Click here to download the full example code or to run this example in your browser via Binder Univariate Feature Selection This notebook is an example of using univariate feature selection to improve classification accuracy on a noisy dataset. In this example, some noisy (non informative) features are added to the iris dataset. Support vector machine (SVM) is used to classify the dataset both before and after applying univariate feature selection. For each feature, we plot the p-values for the univariate feature selection and the corresponding weights of SVMs. With this, we will compare model accuracy and examine the impact of univariate feature selection on model weights. Generate sample data import numpy as np from sklearn.datasets import load_iris from sklearn.model_selection import train_test_split # The iris dataset X, y = load_iris(return_X_y=True) # Some noisy data not correlated E = np.random.RandomState(42).uniform(0, 0.1, size=(X.shape[0], 20)) # Add the noisy data to the informative features X = np.hstack((X, E)) # Split dataset to select feature and evaluate the classifier X_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y, random_state=0) Univariate feature selection Univariate feature selection with F-test for feature scoring. We use the default selection function to select the four most significant features. from sklearn.feature_selection import SelectKBest, f_classif selector = SelectKBest(f_classif, k=4) selector.fit(X_train, y_train) scores = -np.log10(selector.pvalues_) scores /= scores.max() import matplotlib.pyplot as plt X_indices = np.arange(X.shape[-1]) plt.figure(1) plt.clf() plt.bar(X_indices - 0.05, scores, width=0.2) plt.title("Feature univariate score") plt.xlabel("Feature number") plt.ylabel(r"Univariate score ($-Log(p_{value})$)") plt.show() In the total set of features, only the 4 of the original features are significant. We can see that they have the highest score with univariate feature selection. Compare with SVMs Without univariate feature selection from sklearn.pipeline import make_pipeline from sklearn.preprocessing import MinMaxScaler from sklearn.svm import LinearSVC clf = make_pipeline(MinMaxScaler(), LinearSVC()) clf.fit(X_train, y_train) print( "Classification accuracy without selecting features: {:.3f}".format( clf.score(X_test, y_test) ) ) svm_weights = np.abs(clf[-1].coef_).sum(axis=0) svm_weights /= svm_weights.sum() Classification accuracy without selecting features: 0.789 After univariate feature selection clf_selected = make_pipeline(SelectKBest(f_classif, k=4), MinMaxScaler(), LinearSVC()) clf_selected.fit(X_train, y_train) print( "Classification accuracy after univariate feature selection: {:.3f}".format( clf_selected.score(X_test, y_test) ) ) svm_weights_selected = np.abs(clf_selected[-1].coef_).sum(axis=0) svm_weights_selected /= svm_weights_selected.sum() Classification accuracy after univariate feature selection: 0.868 plt.bar( X_indices - 0.45, scores, width=0.2, label=r"Univariate score ($-Log(p_{value})$)" ) plt.bar(X_indices - 0.25, svm_weights, width=0.2, label="SVM weight") plt.bar( X_indices[selector.get_support()] - 0.05, svm_weights_selected, width=0.2, label="SVM weights after selection", ) plt.title("Comparing feature selection") plt.xlabel("Feature number") plt.yticks(()) plt.axis("tight") plt.legend(loc="upper right") plt.show() Without univariate feature selection, the SVM assigns a large weight to the first 4 original significant features, but also selects many of the non-informative features. Applying univariate feature selection before the SVM increases the SVM weight attributed to the significant features, and will thus improve classification. Total running time of the script: ( 0 minutes 0.168 seconds) Download Python source code: plot_feature_selection.py Download Jupyter notebook: plot_feature_selection.ipynb
Object package js.lib Available on js The js.lib.Object constructor creates an object wrapper. Documentation Object by Mozilla Contributors, licensed under CC-BY-SA 2.5. Static variables staticread onlyprototype:ObjectPrototype Allows the addition of properties to all objects of type Object. Static methods staticassign<T>(target:T, sources:Rest<{}>):T Copies the values of all enumerable own properties from one or more source objects to a target object. staticcreate<T>(proto:{}, ?propertiesObject:DynamicAccess<ObjectPropertyDescriptor>):T Creates a new object with the specified prototype object and properties. staticdefineProperties<T>(obj:T, props:DynamicAccess<ObjectPropertyDescriptor>):T Adds the named properties described by the given descriptors to an object. staticdefineProperty<T>(obj:T, prop:String, descriptor:ObjectPropertyDescriptor):T Adds the named property described by a given descriptor to an object. staticentries(obj:{}):Array<ObjectEntry> Returns an array containing all of the [key, value] pairs of a given object's own enumerable string properties. staticfreeze<T>(obj:T):T Freezes an object: other code can't delete or change any properties. staticfromEntries<T>(iterable:Any):T Returns a new object from an iterable of key-value pairs (reverses Object.entries). staticgetOwnPropertyDescriptor(obj:{}, prop:String):Null<ObjectPropertyDescriptor> Returns a property descriptor for a named property on an object. staticgetOwnPropertyNames(obj:{}):Array<String> Returns an array containing the names of all of the given object's own enumerable and non-enumerable properties. staticgetOwnPropertySymbols(obj:{}):Array<Symbol> Returns an array of all symbol properties found directly upon a given object. staticgetPrototypeOf<TProto>(obj:{}):Null<TProto> Returns the prototype of the specified object. staticis<T>(value1:T, value2:T):Bool Compares if two values are the same value. Equates all NaN values (which differs from both Abstract Equality Comparison and Strict Equality Comparison). staticisExtensible(obj:{}):Bool Determines if extending of an object is allowed. staticisFrozen(obj:{}):Bool Determines if an object was frozen. staticisSealed(obj:{}):Bool Determines if an object is sealed. statickeys(obj:{}):Array<String> Returns an array containing the names of all of the given object's own enumerable string properties. staticpreventExtensions<T>(obj:T):T Prevents any extensions of an object. staticseal<T>(obj:T):T Prevents other code from deleting properties of an object. staticsetPrototypeOf<T>(obj:T, prototype:Null<{}>):T Sets the prototype (i.e., the internal Prototype property). staticvalues(obj:{}):Array<Any> Returns an array containing the values that correspond to all of a given object's own enumerable string properties. Constructor new(?value:Any) The Object constructor creates an object wrapper.
st8b7c:f320:99b9:690f:4595:cd17:293a:c069exception Defined in header <exception> class exception; Provides consistent interface to handle errors through the throw expression. All exceptions generated by the standard library inherit from st8b7c:f320:99b9:690f:4595:cd17:293a:c069exception. logic_error invalid_argument domain_error length_error out_of_range future_error(C++11) runtime_error range_error overflow_error underflow_error regex_error(C++11) system_error(C++11) ios_bas8b7c:f320:99b9:690f:4595:cd17:293a:c069failure(C++11) filesystem8b7c:f320:99b9:690f:4595:cd17:293a:c069ilesystem_error(C++17) tx_exception(TM TS) nonexistent_local_time(C++20) ambiguous_local_time(C++20) format_error(C++20) bad_typeid bad_cast bad_any_cast(C++17) bad_optional_access(C++17) bad_expected_access(C++23) bad_weak_ptr(C++11) bad_function_call(C++11) bad_alloc bad_array_new_length(C++11) bad_exception ios_bas8b7c:f320:99b9:690f:4595:cd17:293a:c069failure(until C++11) bad_variant_access(C++17) Member functions (constructor) constructs the exception object (public member function) (destructor) [virtual] destroys the exception object (virtual public member function) operator= copies exception object (public member function) what [virtual] returns an explanatory string (virtual public member function)
Module: restoration Image restoration module. skimage.restoration.ball_kernel(radius, ndim) Create a ball kernel for restoration.rolling_ball. skimage.restoration.calibrate_denoiser(…) Calibrate a denoising function and return optimal J-invariant version. skimage.restoration.cycle_spin(x, func, …) Cycle spinning (repeatedly apply func to shifted versions of x). skimage.restoration.denoise_bilateral(image) Denoise image using bilateral filter. skimage.restoration.denoise_nl_means(image) Perform non-local means denoising on 2-D or 3-D grayscale images, and 2-D RGB images. skimage.restoration.denoise_tv_bregman(…) Perform total-variation denoising using split-Bregman optimization. skimage.restoration.denoise_tv_chambolle(image) Perform total-variation denoising on n-dimensional images. skimage.restoration.denoise_wavelet(image[, …]) Perform wavelet denoising on an image. skimage.restoration.ellipsoid_kernel(shape, …) Create an ellipoid kernel for restoration.rolling_ball. skimage.restoration.estimate_sigma(image[, …]) Robust wavelet-based estimator of the (Gaussian) noise standard deviation. skimage.restoration.inpaint_biharmonic(…) Inpaint masked points in image with biharmonic equations. skimage.restoration.richardson_lucy(image, psf) Richardson-Lucy deconvolution. skimage.restoration.rolling_ball(image, *[, …]) Estimate background intensity by rolling/translating a kernel. skimage.restoration.unsupervised_wiener(…) Unsupervised Wiener-Hunt deconvolution. skimage.restoration.unwrap_phase(image[, …]) Recover the original from a wrapped phase image. skimage.restoration.wiener(image, psf, balance) Wiener-Hunt deconvolution ball_kernel skimage.restoration.ball_kernel(radius, ndim) [source] Create a ball kernel for restoration.rolling_ball. Parameters radiusint Radius of the ball. ndimint Number of dimensions of the ball. ndim should match the dimensionality of the image the kernel will be applied to. Returns kernelndarray The kernel containing the surface intensity of the top half of the ellipsoid. See also rolling_ball calibrate_denoiser skimage.restoration.calibrate_denoiser(image, denoise_function, denoise_parameters, *, stride=4, approximate_loss=True, extra_output=False) [source] Calibrate a denoising function and return optimal J-invariant version. The returned function is partially evaluated with optimal parameter values set for denoising the input image. Parameters imagendarray Input data to be denoised (converted using img_as_float). denoise_functionfunction Denoising function to be calibrated. denoise_parametersdict of list Ranges of parameters for denoise_function to be calibrated over. strideint, optional Stride used in masking procedure that converts denoise_function to J-invariance. approximate_lossbool, optional Whether to approximate the self-supervised loss used to evaluate the denoiser by only computing it on one masked version of the image. If False, the runtime will be a factor of stride**image.ndim longer. extra_outputbool, optional If True, return parameters and losses in addition to the calibrated denoising function Returns best_denoise_functionfunction The optimal J-invariant version of denoise_function. If extra_output is True, the following tuple is also returned: (parameters_tested, losses)tuple (list of dict, list of int) List of parameters tested for denoise_function, as a dictionary of kwargs Self-supervised loss for each set of parameters in parameters_tested. Notes The calibration procedure uses a self-supervised mean-square-error loss to evaluate the performance of J-invariant versions of denoise_function. The minimizer of the self-supervised loss is also the minimizer of the ground-truth loss (i.e., the true MSE error) [1]. The returned function can be used on the original noisy image, or other images with similar characteristics. Increasing the stride increases the performance of best_denoise_function at the expense of increasing its runtime. It has no effect on the runtime of the calibration. References 1 J. Batson & L. Royer. Noise2Self: Blind Denoising by Self-Supervision, International Conference on Machine Learning, p. 524-533 (2019). Examples >>> from skimage import color, data >>> from skimage.restoration import denoise_wavelet >>> import numpy as np >>> img = color.rgb2gray(data.astronaut()[:50, :50]) >>> noisy = img + 0.5 * img.std() * np.random.randn(*img.shape) >>> parameters = {'sigma': np.arange(0.1, 0.4, 0.02)} >>> denoising_function = calibrate_denoiser(noisy, denoise_wavelet, ... denoise_parameters=parameters) >>> denoised_img = denoising_function(img) cycle_spin skimage.restoration.cycle_spin(x, func, max_shifts, shift_steps=1, num_workers=None, multichannel=False, func_kw={}) [source] Cycle spinning (repeatedly apply func to shifted versions of x). Parameters xarray-like Data for input to func. funcfunction A function to apply to circularly shifted versions of x. Should take x as its first argument. Any additional arguments can be supplied via func_kw. max_shiftsint or tuple If an integer, shifts in range(0, max_shifts+1) will be used along each axis of x. If a tuple, range(0, max_shifts[i]+1) will be along axis i. shift_stepsint or tuple, optional The step size for the shifts applied along axis, i, ar8b7c:f320:99b9:690f:4595:cd17:293a:c069 range((0, max_shifts[i]+1, shift_steps[i])). If an integer is provided, the same step size is used for all axes. num_workersint or None, optional The number of parallel threads to use during cycle spinning. If set to None, the full set of available cores are used. multichannelbool, optional Whether to treat the final axis as channels (no cycle shifts are performed over the channels axis). func_kwdict, optional Additional keyword arguments to supply to func. Returns avg_ynp.ndarray The output of func(x, **func_kw) averaged over all combinations of the specified axis shifts. Notes Cycle spinning was proposed as a way to approach shift-invariance via performing several circular shifts of a shift-variant transform [1]. For a n-level discrete wavelet transforms, one may wish to perform all shifts up to max_shifts = 2**n - 1. In practice, much of the benefit can often be realized with only a small number of shifts per axis. For transforms such as the blockwise discrete cosine transform, one may wish to evaluate shifts up to the block size used by the transform. References 1 R.R. Coifman and D.L. Donoho. “Translation-Invariant De-Noising”. Wavelets and Statistics, Lecture Notes in Statistics, vol.103. Springer, New York, 1995, pp.125-150. DOI:10.1007/978-1-4612-2544-7_9 Examples >>> import skimage.data >>> from skimage import img_as_float >>> from skimage.restoration import denoise_wavelet, cycle_spin >>> img = img_as_float(skimage.data.camera()) >>> sigma = 0.1 >>> img = img + sigma * np.random.standard_normal(img.shape) >>> denoised = cycle_spin(img, func=denoise_wavelet, ... max_shifts=3) denoise_bilateral skimage.restoration.denoise_bilateral(image, win_size=None, sigma_color=None, sigma_spatial=1, bins=10000, mode='constant', cval=0, multichannel=False) [source] Denoise image using bilateral filter. Parameters imagendarray, shape (M, N[, 3]) Input image, 2D grayscale or RGB. win_sizeint Window size for filtering. If win_size is not specified, it is calculated as max(5, 2 * ceil(3 * sigma_spatial) + 1). sigma_colorfloat Standard deviation for grayvalue/color distance (radiometric similarity). A larger value results in averaging of pixels with larger radiometric differences. Note, that the image will be converted using the img_as_float function and thus the standard deviation is in respect to the range [0, 1]. If the value is None the standard deviation of the image will be used. sigma_spatialfloat Standard deviation for range distance. A larger value results in averaging of pixels with larger spatial differences. binsint Number of discrete values for Gaussian weights of color filtering. A larger value results in improved accuracy. mode{‘constant’, ‘edge’, ‘symmetric’, ‘reflect’, ‘wrap’} How to handle values outside the image borders. See numpy.pad for detail. cvalstring Used in conjunction with mode ‘constant’, the value outside the image boundaries. multichannelbool Whether the last axis of the image is to be interpreted as multiple channels or another spatial dimension. Returns denoisedndarray Denoised image. Notes This is an edge-preserving, denoising filter. It averages pixels based on their spatial closeness and radiometric similarity [1]. Spatial closeness is measured by the Gaussian function of the Euclidean distance between two pixels and a certain standard deviation (sigma_spatial). Radiometric similarity is measured by the Gaussian function of the Euclidean distance between two color values and a certain standard deviation (sigma_color). References 1 C. Tomasi and R. Manduchi. “Bilateral Filtering for Gray and Color Images.” IEEE International Conference on Computer Vision (1998) 839-846. DOI:10.1109/ICCV.1998.710815 Examples >>> from skimage import data, img_as_float >>> astro = img_as_float(data.astronaut()) >>> astro = astro[220:300, 220:320] >>> noisy = astro + 0.6 * astro.std() * np.random.random(astro.shape) >>> noisy = np.clip(noisy, 0, 1) >>> denoised = denoise_bilateral(noisy, sigma_color=0.05, sigma_spatial=15, ... multichannel=True) Examples using skimage.restoration.denoise_bilateral Rank filters denoise_nl_means skimage.restoration.denoise_nl_means(image, patch_size=7, patch_distance=11, h=0.1, multichannel=False, fast_mode=True, sigma=0.0, *, preserve_range=None) [source] Perform non-local means denoising on 2-D or 3-D grayscale images, and 2-D RGB images. Parameters image2D or 3D ndarray Input image to be denoised, which can be 2D or 3D, and grayscale or RGB (for 2D images only, see multichannel parameter). patch_sizeint, optional Size of patches used for denoising. patch_distanceint, optional Maximal distance in pixels where to search patches used for denoising. hfloat, optional Cut-off distance (in gray levels). The higher h, the more permissive one is in accepting patches. A higher h results in a smoother image, at the expense of blurring features. For a Gaussian noise of standard deviation sigma, a rule of thumb is to choose the value of h to be sigma of slightly less. multichannelbool, optional Whether the last axis of the image is to be interpreted as multiple channels or another spatial dimension. fast_modebool, optional If True (default value), a fast version of the non-local means algorithm is used. If False, the original version of non-local means is used. See the Notes section for more details about the algorithms. sigmafloat, optional The standard deviation of the (Gaussian) noise. If provided, a more robust computation of patch weights is computed that takes the expected noise variance into account (see Notes below). preserve_rangebool, optional Whether to keep the original range of values. Otherwise, the input image is converted according to the conventions of img_as_float. Also see https://scikit-image.org/docs/dev/user_guide/data_types.html Returns resultndarray Denoised image, of same shape as image. Notes The non-local means algorithm is well suited for denoising images with specific textures. The principle of the algorithm is to average the value of a given pixel with values of other pixels in a limited neighbourhood, provided that the patches centered on the other pixels are similar enough to the patch centered on the pixel of interest. In the original version of the algorithm [1], corresponding to fast=False, the computational complexity is: image.size * patch_size ** image.ndim * patch_distance ** image.ndim Hence, changing the size of patches or their maximal distance has a strong effect on computing times, especially for 3-D images. However, the default behavior corresponds to fast_mode=True, for which another version of non-local means [2] is used, corresponding to a complexity of: image.size * patch_distance ** image.ndim The computing time depends only weakly on the patch size, thanks to the computation of the integral of patches distances for a given shift, that reduces the number of operations [1]. Therefore, this algorithm executes faster than the classic algorithm (fast_mode=False), at the expense of using twice as much memory. This implementation has been proven to be more efficient compared to other alternatives, see e.g. [3]. Compared to the classic algorithm, all pixels of a patch contribute to the distance to another patch with the same weight, no matter their distance to the center of the patch. This coarser computation of the distance can result in a slightly poorer denoising performance. Moreover, for small images (images with a linear size that is only a few times the patch size), the classic algorithm can be faster due to boundary effects. The image is padded using the reflect mode of skimage.util.pad before denoising. If the noise standard deviation, sigma, is provided a more robust computation of patch weights is used. Subtracting the known noise variance from the computed patch distances improves the estimates of patch similarity, giving a moderate improvement to denoising performance [4]. It was also mentioned as an option for the fast variant of the algorithm in [3]. When sigma is provided, a smaller h should typically be used to avoid oversmoothing. The optimal value for h depends on the image content and noise level, but a reasonable starting point is h = 0.8 * sigma when fast_mode is True, or h = 0.6 * sigma when fast_mode is False. References 1(1,2) A. Buades, B. Coll, & J-M. Morel. A non-local algorithm for image denoising. In CVPR 2005, Vol. 2, pp. 60-65, IEEE. DOI:10.1109/CVPR.2005.38 2 J. Darbon, A. Cunha, T.F. Chan, S. Osher, and G.J. Jensen, Fast nonlocal filtering applied to electron cryomicroscopy, in 5th IEEE International Symposium on Biomedical Imaging: From Nano to Macro, 2008, pp. 1331-1334. DOI:10.1109/ISBI.2008.4541250 3(1,2) Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means Denoising. Image Processing On Line, 2014, vol. 4, pp. 300-326. DOI:10.5201/ipol.2014.120 4 A. Buades, B. Coll, & J-M. Morel. Non-Local Means Denoising. Image Processing On Line, 2011, vol. 1, pp. 208-212. DOI:10.5201/ipol.2011.bcm_nlm Examples >>> a = np.zeros((40, 40)) >>> a[10:-10, 10:-10] = 1. >>> a += 0.3 * np.random.randn(*a.shape) >>> denoised_a = denoise_nl_means(a, 7, 5, 0.1) denoise_tv_bregman skimage.restoration.denoise_tv_bregman(image, weight, max_iter=100, eps=0.001, isotropic=True, *, multichannel=False) [source] Perform total-variation denoising using split-Bregman optimization. Total-variation denoising (also know as total-variation regularization) tries to find an image with less total-variation under the constraint of being similar to the input image, which is controlled by the regularization parameter ([1], [2], [3], [4]). Parameters imagendarray Input data to be denoised (converted using img_as_float`). weightfloat Denoising weight. The smaller the weight, the more denoising (at the expense of less similarity to the input). The regularization parameter lambda is chosen as 2 * weight. epsfloat, optional Relative difference of the value of the cost function that determines the stop criterion. The algorithm stops when: SUM((u(n) - u(n-1))**2) < eps max_iterint, optional Maximal number of iterations used for the optimization. isotropicboolean, optional Switch between isotropic and anisotropic TV denoising. multichannelbool, optional Apply total-variation denoising separately for each channel. This option should be true for color images, otherwise the denoising is also applied in the channels dimension. Returns undarray Denoised image. References 1 https://en.wikipedia.org/wiki/Total_variation_denoising 2 Tom Goldstein and Stanley Osher, “The Split Bregman Method For L1 Regularized Problems”, ftp://ftp.math.ucla.edu/pub/camreport/cam08-29.pdf 3 Pascal Getreuer, “Rudin–Osher–Fatemi Total Variation Denoising using Split Bregman” in Image Processing On Line on 2012–05–19, https://www.ipol.im/pub/art/2012/g-tvd/article_lr.pdf 4 https://web.math.ucsb.edu/~cgarcia/UGProjects/BregmanAlgorithms_JacquelineBush.pdf denoise_tv_chambolle skimage.restoration.denoise_tv_chambolle(image, weight=0.1, eps=0.0002, n_iter_max=200, multichannel=False) [source] Perform total-variation denoising on n-dimensional images. Parameters imagendarray of ints, uints or floats Input data to be denoised. image can be of any numeric type, but it is cast into an ndarray of floats for the computation of the denoised image. weightfloat, optional Denoising weight. The greater weight, the more denoising (at the expense of fidelity to input). epsfloat, optional Relative difference of the value of the cost function that determines the stop criterion. The algorithm stops when: (E_(n-1) - E_n) < eps * E_0 n_iter_maxint, optional Maximal number of iterations used for the optimization. multichannelbool, optional Apply total-variation denoising separately for each channel. This option should be true for color images, otherwise the denoising is also applied in the channels dimension. Returns outndarray Denoised image. Notes Make sure to set the multichannel parameter appropriately for color images. The principle of total variation denoising is explained in https://en.wikipedia.org/wiki/Total_variation_denoising The principle of total variation denoising is to minimize the total variation of the image, which can be roughly described as the integral of the norm of the image gradient. Total variation denoising tends to produce “cartoon-like” images, that is, piecewise-constant images. This code is an implementation of the algorithm of Rudin, Fatemi and Osher that was proposed by Chambolle in [1]. References 1 A. Chambolle, An algorithm for total variation minimization and applications, Journal of Mathematical Imaging and Vision, Springer, 2004, 20, 89-97. Examples 2D example on astronaut image: >>> from skimage import color, data >>> img = color.rgb2gray(data.astronaut())[:50, :50] >>> img += 0.5 * img.std() * np.random.randn(*img.shape) >>> denoised_img = denoise_tv_chambolle(img, weight=60) 3D example on synthetic data: >>> x, y, z = np.ogrid[0:20, 0:20, 0:20] >>> mask = (x - 22)**2 + (y - 20)**2 + (z - 17)**2 < 8**2 >>> mask = mask.astype(float) >>> mask += 0.2*np.random.randn(*mask.shape) >>> res = denoise_tv_chambolle(mask, weight=100) denoise_wavelet skimage.restoration.denoise_wavelet(image, sigma=None, wavelet='db1', mode='soft', wavelet_levels=None, multichannel=False, convert2ycbcr=False, method='BayesShrink', rescale_sigma=True) [source] Perform wavelet denoising on an image. Parameters imagendarray ([M[, N[, …P]][, C]) of ints, uints or floats Input data to be denoised. image can be of any numeric type, but it is cast into an ndarray of floats for the computation of the denoised image. sigmafloat or list, optional The noise standard deviation used when computing the wavelet detail coefficient threshold(s). When None (default), the noise standard deviation is estimated via the method in [2]. waveletstring, optional The type of wavelet to perform and can be any of the options pywt.wavelist outputs. The default is ‘db1’. For example, wavelet can be any of {'db2', 'haar', 'sym9'} and many more. mode{‘soft’, ‘hard’}, optional An optional argument to choose the type of denoising performed. It noted that choosing soft thresholding given additive noise finds the best approximation of the original image. wavelet_levelsint or None, optional The number of wavelet decomposition levels to use. The default is three less than the maximum number of possible decomposition levels. multichannelbool, optional Apply wavelet denoising separately for each channel (where channels correspond to the final axis of the array). convert2ycbcrbool, optional If True and multichannel True, do the wavelet denoising in the YCbCr colorspace instead of the RGB color space. This typically results in better performance for RGB images. method{‘BayesShrink’, ‘VisuShrink’}, optional Thresholding method to be used. The currently supported methods are “BayesShrink” [1] and “VisuShrink” [2]. Defaults to “BayesShrink”. rescale_sigmabool, optional If False, no rescaling of the user-provided sigma will be performed. The default of True rescales sigma appropriately if the image is rescaled internally. New in version 0.16: rescale_sigma was introduced in 0.16 Returns outndarray Denoised image. Notes The wavelet domain is a sparse representation of the image, and can be thought of similarly to the frequency domain of the Fourier transform. Sparse representations have most values zero or near-zero and truly random noise is (usually) represented by many small values in the wavelet domain. Setting all values below some threshold to 0 reduces the noise in the image, but larger thresholds also decrease the detail present in the image. If the input is 3D, this function performs wavelet denoising on each color plane separately. Changed in version 0.16: For floating point inputs, the original input range is maintained and there is no clipping applied to the output. Other input types will be converted to a floating point value in the range [-1, 1] or [0, 1] depending on the input image range. Unless rescale_sigma = False, any internal rescaling applied to the image will also be applied to sigma to maintain the same relative amplitude. Many wavelet coefficient thresholding approaches have been proposed. By default, denoise_wavelet applies BayesShrink, which is an adaptive thresholding method that computes separate thresholds for each wavelet sub-band as described in [1]. If method == "VisuShrink", a single “universal threshold” is applied to all wavelet detail coefficients as described in [2]. This threshold is designed to remove all Gaussian noise at a given sigma with high probability, but tends to produce images that appear overly smooth. Although any of the wavelets from PyWavelets can be selected, the thresholding methods assume an orthogonal wavelet transform and may not choose the threshold appropriately for biorthogonal wavelets. Orthogonal wavelets are desirable because white noise in the input remains white noise in the subbands. Biorthogonal wavelets lead to colored noise in the subbands. Additionally, the orthogonal wavelets in PyWavelets are orthonormal so that noise variance in the subbands remains identical to the noise variance of the input. Example orthogonal wavelets are the Daubechies (e.g. ‘db2’) or symmlet (e.g. ‘sym2’) families. References 1(1,2) Chang, S. Grace, Bin Yu, and Martin Vetterli. “Adaptive wavelet thresholding for image denoising and compression.” Image Processing, IEEE Transactions on 9.9 (2000): 1532-1546. DOI:10.1109/83.862633 2(1,2,3) D. L. Donoho and I. M. Johnstone. “Ideal spatial adaptation by wavelet shrinkage.” Biometrika 81.3 (1994): 425-455. DOI:10.1093/biomet/81.3.425 Examples >>> from skimage import color, data >>> img = img_as_float(data.astronaut()) >>> img = color.rgb2gray(img) >>> img += 0.1 * np.random.randn(*img.shape) >>> img = np.clip(img, 0, 1) >>> denoised_img = denoise_wavelet(img, sigma=0.1, rescale_sigma=True) ellipsoid_kernel skimage.restoration.ellipsoid_kernel(shape, intensity) [source] Create an ellipoid kernel for restoration.rolling_ball. Parameters shapearraylike Length of the principal axis of the ellipsoid (excluding the intensity axis). The kernel needs to have the same dimensionality as the image it will be applied to. intensityint Length of the intensity axis of the ellipsoid. Returns kernelndarray The kernel containing the surface intensity of the top half of the ellipsoid. See also rolling_ball Examples using skimage.restoration.ellipsoid_kernel Use rolling-ball algorithm for estimating background intensity estimate_sigma skimage.restoration.estimate_sigma(image, average_sigmas=False, multichannel=False) [source] Robust wavelet-based estimator of the (Gaussian) noise standard deviation. Parameters imagendarray Image for which to estimate the noise standard deviation. average_sigmasbool, optional If true, average the channel estimates of sigma. Otherwise return a list of sigmas corresponding to each channel. multichannelbool Estimate sigma separately for each channel. Returns sigmafloat or list Estimated noise standard deviation(s). If multichannel is True and average_sigmas is False, a separate noise estimate for each channel is returned. Otherwise, the average of the individual channel estimates is returned. Notes This function assumes the noise follows a Gaussian distribution. The estimation algorithm is based on the median absolute deviation of the wavelet detail coefficients as described in section 4.2 of [1]. References 1 D. L. Donoho and I. M. Johnstone. “Ideal spatial adaptation by wavelet shrinkage.” Biometrika 81.3 (1994): 425-455. DOI:10.1093/biomet/81.3.425 Examples >>> import skimage.data >>> from skimage import img_as_float >>> img = img_as_float(skimage.data.camera()) >>> sigma = 0.1 >>> img = img + sigma * np.random.standard_normal(img.shape) >>> sigma_hat = estimate_sigma(img, multichannel=False) inpaint_biharmonic skimage.restoration.inpaint_biharmonic(image, mask, multichannel=False) [source] Inpaint masked points in image with biharmonic equations. Parameters image(M[, N[, …, P]][, C]) ndarray Input image. mask(M[, N[, …, P]]) ndarray Array of pixels to be inpainted. Have to be the same shape as one of the ‘image’ channels. Unknown pixels have to be represented with 1, known pixels - with 0. multichannelboolean, optional If True, the last image dimension is considered as a color channel, otherwise as spatial. Returns out(M[, N[, …, P]][, C]) ndarray Input image with masked pixels inpainted. References 1 N.S.Hoang, S.B.Damelin, “On surface completion and image inpainting by biharmonic functions: numerical aspects”, arXiv:1707.06567 2 C. K. Chui and H. N. Mhaskar, MRA Contextual-Recovery Extension of Smooth Functions on Manifolds, Appl. and Comp. Harmonic Anal., 28 (2010), 104-113, DOI:10.1016/j.acha.2009.04.004 Examples >>> img = np.tile(np.square(np.linspace(0, 1, 5)), (5, 1)) >>> mask = np.zeros_like(img) >>> mask[2, 2:] = 1 >>> mask[1, 3:] = 1 >>> mask[0, 4:] = 1 >>> out = inpaint_biharmonic(img, mask) richardson_lucy skimage.restoration.richardson_lucy(image, psf, iterations=50, clip=True, filter_epsilon=None) [source] Richardson-Lucy deconvolution. Parameters imagendarray Input degraded image (can be N dimensional). psfndarray The point spread function. iterationsint, optional Number of iterations. This parameter plays the role of regularisation. clipboolean, optional True by default. If true, pixel value of the result above 1 or under -1 are thresholded for skimage pipeline compatibility. filter_epsilon: float, optional Value below which intermediate results become 0 to avoid division by small numbers. Returns im_deconvndarray The deconvolved image. References 1 https://en.wikipedia.org/wiki/Richardson%E2%80%93Lucy_deconvolution Examples >>> from skimage import img_as_float, data, restoration >>> camera = img_as_float(data.camera()) >>> from scipy.signal import convolve2d >>> psf = np.ones((5, 5)) / 25 >>> camera = convolve2d(camera, psf, 'same') >>> camera += 0.1 * camera.std() * np.random.standard_normal(camera.shape) >>> deconvolved = restoration.richardson_lucy(camera, psf, 5) rolling_ball skimage.restoration.rolling_ball(image, *, radius=100, kernel=None, nansafe=False, num_threads=None) [source] Estimate background intensity by rolling/translating a kernel. This rolling ball algorithm estimates background intensity for a ndimage in case of uneven exposure. It is a generalization of the frequently used rolling ball algorithm [1]. Parameters imagendarray The image to be filtered. radiusint, optional Radius of a ball shaped kernel to be rolled/translated in the image. Used if kernel = None. kernelndarray, optional The kernel to be rolled/translated in the image. It must have the same number of dimensions as image. Kernel is filled with the intensity of the kernel at that position. nansafe: bool, optional If False (default) assumes that none of the values in image are np.nan, and uses a faster implementation. num_threads: int, optional The maximum number of threads to use. If None use the OpenMP default value; typically equal to the maximum number of virtual cores. Note: This is an upper limit to the number of threads. The exact number is determined by the system’s OpenMP library. Returns backgroundndarray The estimated background of the image. Notes For the pixel that has its background intensity estimated (without loss of generality at center) the rolling ball method centers kernel under it and raises the kernel until the surface touches the image umbra at some pos=(y,x). The background intensity is then estimated using the image intensity at that position (image[pos]) plus the difference of kernel[center] - kernel[pos]. This algorithm assumes that dark pixels correspond to the background. If you have a bright background, invert the image before passing it to the function, e.g., using utils.invert. See the gallery example for details. This algorithm is sensitive to noise (in particular salt-and-pepper noise). If this is a problem in your image, you can apply mild gaussian smoothing before passing the image to this function. References 1 Sternberg, Stanley R. “Biomedical image processing.” Computer 1 (1983): 22-34. DOI:10.1109/MC.1983.1654163 Examples >>> import numpy as np >>> from skimage import data >>> from skimage.restoration import rolling_ball >>> image = data.coins() >>> background = rolling_ball(data.coins()) >>> filtered_image = image - background >>> import numpy as np >>> from skimage import data >>> from skimage.restoration import rolling_ball, ellipsoid_kernel >>> image = data.coins() >>> kernel = ellipsoid_kernel((101, 101), 75) >>> background = rolling_ball(data.coins(), kernel=kernel) >>> filtered_image = image - background Examples using skimage.restoration.rolling_ball Use rolling-ball algorithm for estimating background intensity unsupervised_wiener skimage.restoration.unsupervised_wiener(image, psf, reg=None, user_params=None, is_real=True, clip=True) [source] Unsupervised Wiener-Hunt deconvolution. Return the deconvolution with a Wiener-Hunt approach, where the hyperparameters are automatically estimated. The algorithm is a stochastic iterative process (Gibbs sampler) described in the reference below. See also wiener function. Parameters image(M, N) ndarray The input degraded image. psfndarray The impulse response (input image’s space) or the transfer function (Fourier space). Both are accepted. The transfer function is automatically recognized as being complex (np.iscomplexobj(psf)). regndarray, optional The regularisation operator. The Laplacian by default. It can be an impulse response or a transfer function, as for the psf. user_paramsdict, optional Dictionary of parameters for the Gibbs sampler. See below. clipboolean, optional True by default. If true, pixel values of the result above 1 or under -1 are thresholded for skimage pipeline compatibility. Returns x_postmean(M, N) ndarray The deconvolved image (the posterior mean). chainsdict The keys noise and prior contain the chain list of noise and prior precision respectively. Other Parameters The keys of ``user_params`` are: thresholdfloat The stopping criterion: the norm of the difference between to successive approximated solution (empirical mean of object samples, see Notes section). 1e-4 by default. burninint The number of sample to ignore to start computation of the mean. 15 by default. min_iterint The minimum number of iterations. 30 by default. max_iterint The maximum number of iterations if threshold is not satisfied. 200 by default. callbackcallable (None by default) A user provided callable to which is passed, if the function exists, the current image sample for whatever purpose. The user can store the sample, or compute other moments than the mean. It has no influence on the algorithm execution and is only for inspection. Notes The estimated image is design as the posterior mean of a probability law (from a Bayesian analysis). The mean is defined as a sum over all the possible images weighted by their respective probability. Given the size of the problem, the exact sum is not tractable. This algorithm use of MCMC to draw image under the posterior law. The practical idea is to only draw highly probable images since they have the biggest contribution to the mean. At the opposite, the less probable images are drawn less often since their contribution is low. Finally the empirical mean of these samples give us an estimation of the mean, and an exact computation with an infinite sample set. References 1 François Orieux, Jean-François Giovannelli, and Thomas Rodet, “Bayesian estimation of regularization and point spread function parameters for Wiener-Hunt deconvolution”, J. Opt. Soc. Am. A 27, 1593-1607 (2010) https://www.osapublishing.org/josaa/abstract.cfm?URI=josaa-27-7-1593 http://research.orieux.fr/files/papers/OGR-JOSA10.pdf Examples >>> from skimage import color, data, restoration >>> img = color.rgb2gray(data.astronaut()) >>> from scipy.signal import convolve2d >>> psf = np.ones((5, 5)) / 25 >>> img = convolve2d(img, psf, 'same') >>> img += 0.1 * img.std() * np.random.standard_normal(img.shape) >>> deconvolved_img = restoration.unsupervised_wiener(img, psf) unwrap_phase skimage.restoration.unwrap_phase(image, wrap_around=False, seed=None) [source] Recover the original from a wrapped phase image. From an image wrapped to lie in the interval [-pi, pi), recover the original, unwrapped image. Parameters image1D, 2D or 3D ndarray of floats, optionally a masked array The values should be in the range [-pi, pi). If a masked array is provided, the masked entries will not be changed, and their values will not be used to guide the unwrapping of neighboring, unmasked values. Masked 1D arrays are not allowed, and will raise a ValueError. wrap_aroundbool or sequence of bool, optional When an element of the sequence is True, the unwrapping process will regard the edges along the corresponding axis of the image to be connected and use this connectivity to guide the phase unwrapping process. If only a single boolean is given, it will apply to all axes. Wrap around is not supported for 1D arrays. seedint, optional Unwrapping 2D or 3D images uses random initialization. This sets the seed of the PRNG to achieve deterministic behavior. Returns image_unwrappedarray_like, double Unwrapped image of the same shape as the input. If the input image was a masked array, the mask will be preserved. Raises ValueError If called with a masked 1D array or called with a 1D array and wrap_around=True. References 1 Miguel Arevallilo Herraez, David R. Burton, Michael J. Lalor, and Munther A. Gdeisat, “Fast two-dimensional phase-unwrapping algorithm based on sorting by reliability following a noncontinuous path”, Journal Applied Optics, Vol. 41, No. 35 (2002) 7437, 2 Abdul-Rahman, H., Gdeisat, M., Burton, D., & Lalor, M., “Fast three-dimensional phase-unwrapping algorithm based on sorting by reliability following a non-continuous path. In W. Osten, C. Gorecki, & E. L. Novak (Eds.), Optical Metrology (2005) 32–40, International Society for Optics and Photonics. Examples >>> c0, c1 = np.ogrid[-1:1:128j, -1:1:128j] >>> image = 12 * np.pi * np.exp(-(c0**2 + c1**2)) >>> image_wrapped = np.angle(np.exp(1j * image)) >>> image_unwrapped = unwrap_phase(image_wrapped) >>> np.std(image_unwrapped - image) < 1e-6 # A constant offset is normal True Examples using skimage.restoration.unwrap_phase Phase Unwrapping wiener skimage.restoration.wiener(image, psf, balance, reg=None, is_real=True, clip=True) [source] Wiener-Hunt deconvolution Return the deconvolution with a Wiener-Hunt approach (i.e. with Fourier diagonalisation). Parameters image(M, N) ndarray Input degraded image psfndarray Point Spread Function. This is assumed to be the impulse response (input image space) if the data-type is real, or the transfer function (Fourier space) if the data-type is complex. There is no constraints on the shape of the impulse response. The transfer function must be of shape (M, N) if is_real is True, (M, N // 2 + 1) otherwise (see np.fft.rfftn). balancefloat The regularisation parameter value that tunes the balance between the data adequacy that improve frequency restoration and the prior adequacy that reduce frequency restoration (to avoid noise artifacts). regndarray, optional The regularisation operator. The Laplacian by default. It can be an impulse response or a transfer function, as for the psf. Shape constraint is the same as for the psf parameter. is_realboolean, optional True by default. Specify if psf and reg are provided with hermitian hypothesis, that is only half of the frequency plane is provided (due to the redundancy of Fourier transform of real signal). It’s apply only if psf and/or reg are provided as transfer function. For the hermitian property see uft module or np.fft.rfftn. clipboolean, optional True by default. If True, pixel values of the result above 1 or under -1 are thresholded for skimage pipeline compatibility. Returns im_deconv(M, N) ndarray The deconvolved image. Notes This function applies the Wiener filter to a noisy and degraded image by an impulse response (or PSF). If the data model is \[y = Hx + n\] where \(n\) is noise, \(H\) the PSF and \(x\) the unknown original image, the Wiener filter is \[\hat x = F^\dagger (|\Lambda_H|^2 + \lambda |\Lambda_D|^2) \Lambda_H^\dagger F y\] where \(F\) and \(F^\dagger\) are the Fourier and inverse Fourier transforms respectively, \(\Lambda_H\) the transfer function (or the Fourier transform of the PSF, see [Hunt] below) and \(\Lambda_D\) the filter to penalize the restored image frequencies (Laplacian by default, that is penalization of high frequency). The parameter \(\lambda\) tunes the balance between the data (that tends to increase high frequency, even those coming from noise), and the regularization. These methods are then specific to a prior model. Consequently, the application or the true image nature must corresponds to the prior model. By default, the prior model (Laplacian) introduce image smoothness or pixel correlation. It can also be interpreted as high-frequency penalization to compensate the instability of the solution with respect to the data (sometimes called noise amplification or “explosive” solution). Finally, the use of Fourier space implies a circulant property of \(H\), see [Hunt]. References 1 François Orieux, Jean-François Giovannelli, and Thomas Rodet, “Bayesian estimation of regularization and point spread function parameters for Wiener-Hunt deconvolution”, J. Opt. Soc. Am. A 27, 1593-1607 (2010) https://www.osapublishing.org/josaa/abstract.cfm?URI=josaa-27-7-1593 http://research.orieux.fr/files/papers/OGR-JOSA10.pdf 2 B. R. Hunt “A matrix theory proof of the discrete convolution theorem”, IEEE Trans. on Audio and Electroacoustics, vol. au-19, no. 4, pp. 285-288, dec. 1971 Examples >>> from skimage import color, data, restoration >>> img = color.rgb2gray(data.astronaut()) >>> from scipy.signal import convolve2d >>> psf = np.ones((5, 5)) / 25 >>> img = convolve2d(img, psf, 'same') >>> img += 0.1 * img.std() * np.random.standard_normal(img.shape) >>> deconvolved_img = restoration.wiener(img, psf, 1100)
FileProfilerStorage class FileProfilerStorage implements ProfilerStorageInterface Storage for profiler using files. Methods __construct(string $dsn) Constructs the file storage using a "dsn-like" path. array find(string $ip, string $url, string $limit, string $method, int|null $start = null, int|null $end = null, $statusCode = null) Finds profiler tokens for the given criteria. purge() Purges all data from the database. Profile read(string $token) Reads data associated with the given token. bool write(Profile $profile) Saves a Profile. string getFilename(string $token) Gets filename to store data, associated to the token. string getIndexFilename() Gets the index filename. mixed readLineFromFile(resource $file) Reads a line in the file, backward. createProfileFromData($token, $data, $parent = null) Details __construct(string $dsn) Constructs the file storage using a "dsn-like" path. Example : "file:/path/to/the/storage/folder" Parameters string $dsn Exceptions RuntimeException array find(string $ip, string $url, string $limit, string $method, int|null $start = null, int|null $end = null, $statusCode = null) Finds profiler tokens for the given criteria. Parameters string $ip The IP string $url The URL string $limit The maximum number of tokens to return string $method The request method int|null $start The start date to search from int|null $end The end date to search to $statusCode Return Value array An array of tokens purge() Purges all data from the database. Profile read(string $token) Reads data associated with the given token. The method returns false if the token does not exist in the storage. Parameters string $token A token Return Value Profile The profile associated with token bool write(Profile $profile) Saves a Profile. Parameters Profile $profile Return Value bool Write operation successful protected string getFilename(string $token) Gets filename to store data, associated to the token. Parameters string $token Return Value string The profile filename protected string getIndexFilename() Gets the index filename. Return Value string The index filename protected mixed readLineFromFile(resource $file) Reads a line in the file, backward. This function automatically skips the empty lines and do not include the line return in result value. Parameters resource $file The file resource, with the pointer placed at the end of the line to read Return Value mixed A string representing the line or null if beginning of file is reached protected createProfileFromData($token, $data, $parent = null) Parameters $token $data $parent