Qt QML Type
Provides a global object with useful enums and functions from Qt. More...
| Import Statement: | import QtQml 2.2 |
Properties
- application : object
- inputMethod : object
- platform : object
- styleHints : object
Methods
- string atob(data)
- binding(function)
- string btoa(data)
- callLater(function, argument1, argument2, ...)
- callLater(function)
- color colorEqual(color lhs, string rhs)
- object createComponent(url, mode, parent)
- object createQmlObject(string qml, object parent, string filepath)
- color darker(color baseColor, real factor)
- exit(int retCode)
- font(object fontSpecifier)
- list<string> fontFamilies()
- string formatDate(datetime date, variant format)
- string formatDateTime(datetime dateTime, variant format)
- string formatTime(datetime time, variant format)
- color hsla(real hue, real saturation, real lightness, real alpha)
- color hsva(real hue, real saturation, real value, real alpha)
- object include(string url, jsobject callback)
- bool isQtObject(object)
- color lighter(color baseColor, real factor)
- locale(name)
- string md5(data)
- matrix4x4(real m11, real m12, real m13, real m14, real m21, real m22, real m23, real m24, real m31, real m32, real m33, real m34, real m41, real m42, real m43, real m44)
- bool openUrlExternally(url target)
- point point(int x, int y)
- string qsTr(string sourceText, string disambiguation, int n)
- string qsTrId(string id, int n)
- string qsTrIdNoOp(string id)
- string qsTrNoOp(string sourceText, string disambiguation)
- string qsTranslate(string context, string sourceText, string disambiguation, int n)
- string qsTranslateNoOp(string context, string sourceText, string disambiguation)
- quaternion(real scalar, real x, real y, real z)
- quit()
- rect rect(int x, int y, int width, int height)
- url resolvedUrl(url url)
- color rgba(real red, real green, real blue, real alpha)
- size(int width, int height)
- color tint(color baseColor, color tintColor)
- vector2d(real x, real y)
- vector3d(real x, real y, real z)
- vector4d(real x, real y, real z, real w)
Detailed Description
The Qt
object is a global object with utility functions, properties and enums.
It is not instantiable; to use it, call the members of the global Qt
object directly. For example:
import QtQuick 2.0 Text { color: Qt.rgba(1, 0, 0, 1) text: Qt.md5("hello, world") }
Enums
The Qt object contains the enums available in the Qt Namespace. For example, you can access the Qt::LeftButton and Qt::RightButton enumeration values as Qt.LeftButton
and Qt.RightButton
.
Types
The Qt object also contains helper functions for creating objects of specific data types. This is primarily useful when setting the properties of an item when the property has one of the following types:
rect
- use Qt.rect()point
- use Qt.point()size
- use Qt.size()
If the QtQuick
module has been imported, the following helper functions for creating objects of specific data types are also available for clients to use:
color
- use Qt.rgba(), Qt.hsla(), Qt.darker(), Qt.lighter() or Qt.tint()font
- use Qt.font()vector2d
- use Qt.vector2d()vector3d
- use Qt.vector3d()vector4d
- use Qt.vector4d()quaternion
- use Qt.quaternion()matrix4x4
- use Qt.matrix4x4()
There are also string based constructors for these types. See QML Basic Types for more information.
Date/Time Formatters
The Qt object contains several functions for formatting QDateTime, QDate and QTime values.
- string Qt.formatDateTime(datetime date, variant format)
- string Qt.formatDate(datetime date, variant format)
- string Qt.formatTime(datetime date, variant format)
The format specification is described at Qt.formatDateTime.
Dynamic Object Creation
The following functions on the global object allow you to dynamically create QML items from files or strings. See Dynamic QML Object Creation from JavaScript for an overview of their use.
- object Qt.createComponent(url)
- object Qt.createQmlObject(string qml, object parent, string filepath)
Other Functions
The following functions are also on the Qt object.
- Qt.quit()
- Qt.md5(string)
- string Qt.btoa(string)
- string Qt.atob(string)
- object Qt.binding(function)
- object Qt.locale()
- string Qt.resolvedUrl(string)
- Qt.openUrlExternally(string)
- list<string> Qt.fontFamilies()
Property Documentation
The application
object provides access to global application state properties shared by many QML components.
Its properties are:
application.active | Deprecated, use Qt.application.state == Qt.ApplicationActive instead. |
application.state | This read-only property indicates the current state of the application. Possible values are:
|
application.layoutDirection | This read-only property can be used to query the default layout direction of the application. On system start-up, the default layout direction depends on the application's language. The property has a value of Qt.RightToLeft in locales where text and graphic elements are read from right to left, and Qt.LeftToRight where the reading direction flows from left to right. You can bind to this property to customize your application layouts to support both layout directions.Possible values are:
|
application.font | This read-only property holds the default application font as returned by QGuiApplication::font(). |
application.arguments | This is a string list of the arguments the executable was invoked with. |
application.name | This is the application name set on the QCoreApplication instance. This property can be written to in order to set the application name. |
application.displayName (since Qt 5.9) | This is the application display name set on the QGuiApplication instance. This property can be written to in order to set the application display name. |
application.version | This is the application version set on the QCoreApplication instance. This property can be written to in order to set the application version. |
application.organization | This is the organization name set on the QCoreApplication instance. This property can be written to in order to set the organization name. |
application.domain | This is the organization domain set on the QCoreApplication instance. This property can be written to in order to set the organization domain. |
application.supportsMultipleWindows | This read-only property can be used to determine whether or not the platform supports multiple windows. Some embedded platforms do not support multiple windows, for example. |
application.screens | An array containing the descriptions of all connected screens. The elements of the array are objects with the same properties as the Screen attached object. In practice the array corresponds to the screen list returned by QGuiApplication::screens(). In addition to examining properties like name, width, height, etc., the array elements can also be assigned to the screen property of Window items, thus serving as an alternative to the C++ side's QWindow::setScreen(). This property has been added in Qt 5.9. |
The object also has one signal, aboutToQuit(), which is the same as QCoreApplication::aboutToQuit().
The following example uses the application
object to indicate whether the application is currently active:
import QtQuick 2.0 Rectangle { width: 300; height: 55 color: Qt.application.active ? "white" : "lightgray" Text { text: "Application " + (Qt.application.active ? "active" : "inactive") opacity: Qt.application.active ? 1.0 : 0.5 anchors.centerIn: parent } }
Note that when using QML without a QGuiApplication, the following properties will be undefined:
- application.active
- application.state
- application.layoutDirection
- application.font
This QML property was introduced in Qt 5.1.
The inputMethod
object allows access to application's QInputMethod object and all its properties and slots. See the QInputMethod documentation for further details.
This QML property was introduced in Qt 5.0.
The platform
object provides info about the underlying platform.
Its properties are:
platform.os | This read-only property contains the name of the operating system. Possible values are: |
This QML property was introduced in Qt 5.1.
The styleHints
object provides platform-specific style hints and settings. See the QStyleHints documentation for further details.
Note: The styleHints
object is only available when using the Qt Quick module.
The following example uses the styleHints
object to determine whether an item should gain focus on mouse press or touch release:
import QtQuick 2.4 MouseArea { id: button onPressed: { if (!Qt.styleHints.setFocusOnTouchRelease) button.forceActiveFocus() } onReleased: { if (Qt.styleHints.setFocusOnTouchRelease) button.forceActiveFocus() } }
This QML property was introduced in Qt 5.5.
Method Documentation
ASCII to binary - this function decodes the base64 encoded data string and returns it.
Returns a JavaScript object representing a property binding.
There are two main use-cases for the function: firstly, to apply a property binding imperatively from JavaScript code:
Item { property bool someCondition: true property int edgePosition Component.onCompleted: { if (someCondition == true) { // bind to the result of the binding expression passed to Qt.binding() edgePosition = Qt.binding(function() { return x + width }) } } }
and secondly, to apply a property binding when initializing property values of dynamically constructed objects (via Component.createObject() or Loader.setSource()).
For example, assuming the existence of a DynamicText component:
import QtQuick 2.0 Text { id: textElement width: 200 height: 200 text: "Default text" property string dynamicText: "Dynamic text" onTextChanged: console.log(text) }
the output from:
Item { id: root property string dynamicText: "Root text" Component.onCompleted: { var c = Qt.createComponent("DynamicText.qml") var obj1 = c.createObject(root, { 'text': Qt.binding(function() { return dynamicText + ' extra text' }) }) root.dynamicText = "Modified root text" var obj2 = c.createObject(root, { 'text': Qt.binding(function() { return this.dynamicText + ' extra text' }) }) obj2.dynamicText = "Modified dynamic text" } }
and from:
Item { id: root property string dynamicText: "Root text" Loader { id: loaderOne onLoaded: root.dynamicText = "Modified root text" } Loader { id: loaderTwo onLoaded: item.dynamicText = "Modified dynamic text" } Component.onCompleted: { loaderOne.setSource("DynamicText.qml", { 'text': Qt.binding(function() { return dynamicText + ' extra text' }) }) loaderTwo.setSource("DynamicText.qml", { 'text': Qt.binding(function() { return this.dynamicText + ' extra text' }) }) } }
should both be:
Root text extra text Modified root text extra text Dynamic text extra text Modified dynamic text extra text
This function cannot be used in property binding declarations (see the documentation on binding declarations and binding assignments) except when the result is stored in an array bound to a var property.
Item { width: 50 property var storedBindings: [ Qt.binding(function() { return x + width }) ] // stored property int a: Qt.binding(function() { return x + width }) // error! property int b Component.onCompleted: { b = storedBindings[0] // causes binding assignment } }
Note: In Qt Quick 1, all function assignments were treated as binding assignments. The Qt.binding() function is new to Qt Quick 2.
This QML method was introduced in Qt 5.0.
Use this function to eliminate redundant calls to a function or signal.
The function passed as the first argument to Qt.callLater() will be called later, once the QML engine returns to the event loop.
When this function is called multiple times in quick succession with the same function as its first argument, that function will be called only once.
For example:
import QtQuick 2.0 Rectangle { width: 480 height: 320 property int callsToUpdateMinimumWidth: 0 property bool optimize: true property int currentTextModel: 0 property var columnTexts: [ ["Click on either", "rectangle above", "and note how the counter", "below updates", "significantly faster using the", "regular (non-optimized)", "implementation"], ["The width", "of this column", "is", "no wider than the", "widest item"], ["Note how using Qt.callLater()", "the minimum width is", "calculated a bare-minimum", "number", "of times"] ] Text { x: 20; y: 280 text: "Times minimum width has been calculated: " + callsToUpdateMinimumWidth } Row { y: 25; spacing: 30; anchors.horizontalCenter: parent.horizontalCenter Rectangle { width: 200; height: 50; color: "lightgreen" Text { text: "Optimized behavior\nusing Qt.callLater()"; anchors.centerIn: parent } MouseArea { anchors.fill: parent; onClicked: { optimize = true; currentTextModel++ } } } Rectangle { width: 200; height: 50; color: "lightblue" Text { text: "Regular behavior"; anchors.centerIn: parent} MouseArea { anchors.fill: parent; onClicked: { optimize = false; currentTextModel++ } } } } Column { id: column anchors.centerIn: parent onChildrenChanged: optimize ? Qt.callLater(updateMinimumWidth) : updateMinimumWidth() property int widestChild function updateMinimumWidth() { callsToUpdateMinimumWidth++ var w = 0; for (var i in children) { var child = children[i]; if (child.implicitWidth > w) { w = child.implicitWidth; } } widestChild = w; } Repeater { id: repeater model: columnTexts[currentTextModel%3] delegate: Text { color: "white" text: modelData width: column.widestChild horizontalAlignment: Text.Center Rectangle { anchors.fill: parent; z: -1; color: index%2 ? "gray" : "darkgray" } } } } }
Any additional arguments passed to Qt.callLater() will be passed on to the function invoked. Note that if redundant calls are eliminated, then only the last set of arguments will be passed to the function.
This QML method was introduced in Qt 5.8.
Use this function to eliminate redundant calls to a function or signal.
The function passed as the first argument to Qt.callLater() will be called later, once the QML engine returns to the event loop.
When this function is called multiple times in quick succession with the same function as its first argument, that function will be called only once.
For example:
import QtQuick 2.0 Rectangle { width: 480 height: 320 property int callsToUpdateMinimumWidth: 0 property bool optimize: true property int currentTextModel: 0 property var columnTexts: [ ["Click on either", "rectangle above", "and note how the counter", "below updates", "significantly faster using the", "regular (non-optimized)", "implementation"], ["The width", "of this column", "is", "no wider than the", "widest item"], ["Note how using Qt.callLater()", "the minimum width is", "calculated a bare-minimum", "number", "of times"] ] Text { x: 20; y: 280 text: "Times minimum width has been calculated: " + callsToUpdateMinimumWidth } Row { y: 25; spacing: 30; anchors.horizontalCenter: parent.horizontalCenter Rectangle { width: 200; height: 50; color: "lightgreen" Text { text: "Optimized behavior\nusing Qt.callLater()"; anchors.centerIn: parent } MouseArea { anchors.fill: parent; onClicked: { optimize = true; currentTextModel++ } } } Rectangle { width: 200; height: 50; color: "lightblue" Text { text: "Regular behavior"; anchors.centerIn: parent} MouseArea { anchors.fill: parent; onClicked: { optimize = false; currentTextModel++ } } } } Column { id: column anchors.centerIn: parent onChildrenChanged: optimize ? Qt.callLater(updateMinimumWidth) : updateMinimumWidth() property int widestChild function updateMinimumWidth() { callsToUpdateMinimumWidth++ var w = 0; for (var i in children) { var child = children[i]; if (child.implicitWidth > w) { w = child.implicitWidth; } } widestChild = w; } Repeater { id: repeater model: columnTexts[currentTextModel%3] delegate: Text { color: "white" text: modelData width: column.widestChild horizontalAlignment: Text.Center Rectangle { anchors.fill: parent; z: -1; color: index%2 ? "gray" : "darkgray" } } } } }
Any additional arguments passed to Qt.callLater() will be passed on to the function invoked. Note that if redundant calls are eliminated, then only the last set of arguments will be passed to the function.
This QML method was introduced in Qt 5.8.
Returns true if both lhs
and rhs
yield equal color values. Both arguments may be either color values or string values. If a string value is supplied it must be convertible to a color, as described for the color basic type.
Returns a Component object created using the QML file at the specified url, or null
if an empty string was given.
The returned component's Component::status property indicates whether the component was successfully created. If the status is Component.Error
, see Component::errorString() for an error description.
If the optional mode parameter is set to Component.Asynchronous
, the component will be loaded in a background thread. The Component::status property will be Component.Loading
while it is loading. The status will change to Component.Ready
if the component loads successfully, or Component.Error
if loading fails. This parameter defaults to Component.PreferSynchronous
if omitted.
If mode is set to Component.PreferSynchronous
, Qt will attempt to load the component synchronously, but may end up loading it asynchronously if necessary. Scenarios that may cause asynchronous loading include, but are not limited to, the following:
- The URL refers to a network resource
- The component is being created as a result of another component that is being loaded asynchronously
If the optional parent parameter is given, it should refer to the object that will become the parent for the created Component object. If no mode was passed, this can be the second argument.
Call Component.createObject() on the returned component to create an object instance of the component.
For example:
import QtQuick 2.0 Item { id: container width: 300; height: 300 function loadButton() { var component = Qt.createComponent("Button.qml"); if (component.status == Component.Ready) { var button = component.createObject(container); button.color = "red"; } } Component.onCompleted: loadButton() }
See Dynamic QML Object Creation from JavaScript for more information on using this function.
To create a QML object from an arbitrary string of QML (instead of a file), use Qt.createQmlObject().
Returns a new object created from the given qml string which will have the specified parent, or null
if there was an error in creating the object.
If filepath is specified, it will be used for error reporting for the created object.
Example (where parentItem
is the id of an existing QML item):
var newObject = Qt.createQmlObject('import QtQuick 2.0; Rectangle {color: "red"; width: 20; height: 20}', parentItem, "dynamicSnippet1");
In the case of an error, a Qt Script Error object is thrown. This object has an additional property, qmlErrors
, which is an array of the errors encountered. Each object in this array has the members lineNumber
, columnNumber
, fileName
and message
. For example, if the above snippet had misspelled color as 'colro' then the array would contain an object like the following: { "lineNumber" : 1, "columnNumber" : 32, "fileName" : "dynamicSnippet1", "message" : "Cannot assign to non-existent property "colro""}.
Note that this function returns immediately, and therefore may not work if the qml string loads new components (that is, external QML files that have not yet been loaded). If this is the case, consider using Qt.createComponent() instead.
See Dynamic QML Object Creation from JavaScript for more information on using this function.
Returns a color darker than baseColor
by the factor
provided.
If the factor is greater than 1.0, this function returns a darker color. Setting factor to 3.0 returns a color that has one-third the brightness. If the factor is less than 1.0, the return color is lighter, but we recommend using the Qt.lighter() function for this purpose. If the factor is 0 or negative, the return value is unspecified.
The function converts the current RGB color to HSV, divides the value (V) component by factor and converts the color back to RGB.
If factor
is not supplied, returns a color 50% darker than baseColor
(factor 2.0).
This function causes the QQmlEngine::exit(int) signal to be emitted. Within the Prototyping with qmlscene, this causes the launcher application to exit the specified return code. To exit from the event loop with a specified return code when this method is called, a C++ application can connect the QQmlEngine::exit(int) signal to the QCoreApplication::exit(int) slot.
See also quit().
Returns a Font with the properties specified in the fontSpecifier
object or the nearest matching font. The fontSpecifier
object should contain key-value pairs where valid keys are the font type's subproperty names, and the values are valid values for each subproperty. Invalid keys will be ignored.
string formatDate(datetime date, variant format) |
Returns a string representation of date
, optionally formatted according to format
.
The date parameter may be a JavaScript Date
object, a date property, a QDate, or QDateTime value. The format parameter may be any of the possible format values as described for Qt.formatDateTime().
If format is not specified, date is formatted using Qt.DefaultLocaleShortDate.
See also Locale.
string formatDateTime(datetime dateTime, variant format) |
Returns a string representation of datetime
, optionally formatted according to format
.
The date parameter may be a JavaScript Date
object, a date property, a QDate, QTime, or QDateTime value.
If format is not provided, dateTime is formatted using Qt.DefaultLocaleShortDate. Otherwise, format should be either:
- One of the Qt::DateFormat enumeration values, such as
Qt.DefaultLocaleShortDate
orQt.ISODate
- A string that specifies the format of the returned string, as detailed below.
If format specifies a format string, it should use the following expressions to specify the date:
| Expression | Output |
|---|---|
| d | the day as number without a leading zero (1 to 31) |
| dd | the day as number with a leading zero (01 to 31) |
| ddd | the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses QDate::shortDayName(). |
| dddd | the long localized day name (e.g. 'Monday' to 'Qt::Sunday'). Uses QDate::longDayName(). |
| M | the month as number without a leading zero (1-12) |
| MM | the month as number with a leading zero (01-12) |
| MMM | the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses QDate::shortMonthName(). |
| MMMM | the long localized month name (e.g. 'January' to 'December'). Uses QDate::longMonthName(). |
| yy | the year as two digit number (00-99) |
| yyyy | the year as four digit number |
In addition the following expressions can be used to specify the time:
| Expression | Output |
|---|---|
| h | the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display) |
| hh | the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display) |
| m | the minute without a leading zero (0 to 59) |
| mm | the minute with a leading zero (00 to 59) |
| s | the second without a leading zero (0 to 59) |
| ss | the second with a leading zero (00 to 59) |
| z | the milliseconds without leading zeroes (0 to 999) |
| zzz | the milliseconds with leading zeroes (000 to 999) |
| AP | use AM/PM display. AP will be replaced by either "AM" or "PM". |
| ap | use am/pm display. ap will be replaced by either "am" or "pm". |
All other input characters will be ignored. Any sequence of characters that are enclosed in single quotes will be treated as text and not be used as an expression. Two consecutive single quotes ("''") are replaced by a single quote in the output.
For example, if the following date/time value was specified:
// 21 May 2001 14:13:09 var dateTime = new Date(2001, 5, 21, 14, 13, 09)
This dateTime value could be passed to Qt.formatDateTime()
, Qt.formatDate() or Qt.formatTime() with the format values below to produce the following results:
| Format | Result |
|---|---|
| "dd.MM.yyyy" | 21.05.2001 |
| "ddd MMMM d yy" | Tue May 21 01 |
| "hh:mm:ss.zzz" | 14:13:09.042 |
| "h:m:s ap" | 2:13:9 pm |
See also Locale.
string formatTime(datetime time, variant format) |
Returns a string representation of time
, optionally formatted according to format
.
The time parameter may be a JavaScript Date
object, a QTime, or QDateTime value. The format parameter may be any of the possible format values as described for Qt.formatDateTime().
If format is not specified, time is formatted using Qt.DefaultLocaleShortDate.
See also Locale.
Returns a color with the specified hue
, saturation
, lightness
and alpha
components. All components should be in the range 0-1 inclusive.
Returns a color with the specified hue
, saturation
, value
and alpha
components. All components should be in the range 0-1 inclusive.
This QML method was introduced in Qt 5.5.
Includes another JavaScript file. This method can only be used from within JavaScript files, and not regular QML files.
This imports all functions from url into the current script's namespace.
Qt.include() returns an object that describes the status of the operation. The object has a single property, status
, that is set to one of the following values:
| Symbol | Value | Description |
|---|---|---|
| result.OK | 0 | The include completed successfully. |
| result.LOADING | 1 | Data is being loaded from the network. |
| result.NETWORK_ERROR | 2 | A network error occurred while fetching the url. |
| result.EXCEPTION | 3 | A JavaScript exception occurred while executing the included code. An additional exception property will be set in this case. |
The status
property will be updated as the operation progresses.
If provided, callback is invoked when the operation completes. The callback is passed the same object as is returned from the Qt.include() call.
Returns true if object
is a valid reference to a Qt or QML object, otherwise false.
Returns a color lighter than baseColor
by the factor
provided.
If the factor is greater than 1.0, this functions returns a lighter color. Setting factor to 1.5 returns a color that is 50% brighter. If the factor is less than 1.0, the return color is darker, but we recommend using the Qt.darker() function for this purpose. If the factor is 0 or negative, the return value is unspecified.
The function converts the current RGB color to HSV, multiplies the value (V) component by factor and converts the color back to RGB.
If factor
is not supplied, returns a color 50% lighter than baseColor
(factor 1.5).
Returns a JS object representing the locale with the specified name, which has the format "language[_territory][.codeset][@modifier]" or "C", where:
- language is a lowercase, two-letter, ISO 639 language code,
- territory is an uppercase, two-letter, ISO 3166 country code,
- and codeset and modifier are ignored.
If the string violates the locale format, or language is not a valid ISO 369 code, the "C" locale is used instead. If country is not present, or is not a valid ISO 3166 code, the most appropriate country is chosen for the specified language.
See also Locale.
Returns a Matrix4x4 with the specified values. Alternatively, the function may be called with a single argument where that argument is a JavaScript array which contains the sixteen matrix values. Finally, the function may be called with no arguments and the resulting matrix will be the identity matrix.
bool openUrlExternally(url target) |
Attempts to open the specified target
url in an external application, based on the user's desktop preferences. Returns true if it succeeds, and false otherwise.
Warning: A return value of true
indicates that the application has successfully requested the operating system to open the URL in an external application. The external application may still fail to launch or fail to open the requested URL. This result will not be reported back to the application.
point point(int x, int y) |
Returns a Point with the specified x
and y
coordinates.
Returns a translated version of sourceText, optionally based on a disambiguation string and value of n for strings containing plurals; otherwise returns sourceText itself if no appropriate translated string is available.
If the same sourceText is used in different roles within the same translation context, an additional identifying string may be passed in for disambiguation.
Example:
Text { text: qsTr("hello") }
See also Internationalization and Localization with Qt Quick.
Returns a translated string identified by id. If no matching string is found, the id itself is returned. This should not happen under normal conditions.
If n >= 0, all occurrences of %n
in the resulting string are replaced with a decimal representation of n. In addition, depending on n's value, the translation text may vary.
Example:
Text { text: qsTrId("hello_id") }
It is possible to supply a source string template like:
//% <string>
or
\begincomment% <string> \endcomment
Example:
Text { //% "hello" text: qsTrId("hello_id") }
Creating binary translation (QM) files suitable for use with this function requires passing the -idbased
option to the lrelease
tool.
See also QT_TRID_NOOP() and Internationalization and Localization with Qt Quick.
Marks id for dynamic translation.
Returns the id.
QT_TRID_NOOP is used in conjunction with the dynamic translation function qsTrId(). It identifies a string as requiring translation (so it can be identified by lupdate
), but leaves the actual translation to qsTrId().
Example:
Item { property string greetingId: QT_TRID_NOOP("hello_id") Text { text: qsTrId(greetingId) } }
See also qsTrId() and Internationalization and Localization with Qt Quick.
Marks sourceText for dynamic translation; i.e, the stored sourceText will not be altered.
If the same sourceText is used in different roles within the same translation context, an additional identifying string may be passed in for disambiguation.
Returns the sourceText.
QT_TR_NOOP is used in conjunction with the dynamic translation functions qsTr() and qsTranslate(). It identifies a string as requiring translation (so it can be identified by lupdate
), but leaves the actual translation to the dynamic functions.
Example:
Item { property string greeting: QT_TR_NOOP("hello") Text { text: qsTr(greeting) } }
See also Internationalization and Localization with Qt Quick.
Returns a translated version of sourceText within the given context, optionally based on a disambiguation string and value of n for strings containing plurals; otherwise returns sourceText itself if no appropriate translated string is available.
If the same sourceText is used in different roles within the same translation context, an additional identifying string may be passed in for disambiguation.
Example:
Text { text: qsTranslate("CustomContext", "hello") }
See also Internationalization and Localization with Qt Quick.
Marks sourceText for dynamic translation in the given context; i.e, the stored sourceText will not be altered.
If the same sourceText is used in different roles within the same translation context, an additional identifying string may be passed in for disambiguation.
Returns the sourceText.
QT_TRANSLATE_NOOP is used in conjunction with the dynamic translation functions qsTr() and qsTranslate(). It identifies a string as requiring translation (so it can be identified by lupdate
), but leaves the actual translation to the dynamic functions.
Example:
Item { property string greeting: QT_TRANSLATE_NOOP("CustomContext", "hello") Text { text: qsTranslate("CustomContext", greeting) } }
See also Internationalization and Localization with Qt Quick.
Returns a Quaternion with the specified scalar
, x
, y
, and z
.
This function causes the QQmlEngine::quit() signal to be emitted. Within the Prototyping with qmlscene, this causes the launcher application to exit; to quit a C++ application when this method is called, connect the QQmlEngine::quit() signal to the QCoreApplication::quit() slot.
See also exit().
rect rect(int x, int y, int width, int height) |
Returns a rect
with the top-left corner at x
, y
and the specified width
and height
.
The returned object has x
, y
, width
and height
attributes with the given values.
Returns a color with the specified red
, green
, blue
and alpha
components. All components should be in the range 0-1 inclusive.
This function allows tinting one color with another.
The tint color should usually be mostly transparent, or you will not be able to see the underlying color. The below example provides a slight red tint by having the tint color be pure red which is only 1/16th opaque.
Item { Rectangle { x: 0; width: 80; height: 80 color: "lightsteelblue" } Rectangle { x: 100; width: 80; height: 80 color: Qt.tint("lightsteelblue", "#10FF0000") } }
Tint is most useful when a subtle change is intended to be conveyed due to some event; you can then use tinting to more effectively tune the visible color.


{:C('CDN_RESOURCE_LIST')}
让考勤更简单
登录
Powered by RFID
Copyright ©
{:C('COMPANY_NAME')}
All rights reserved.


Computes the Karhunen-Loeve decomposition of a univariate stochastic process.
More...
#include <kle.h>
|
| | KLDecompUni (const Array1D< double > &tSamples) |
| | Constructor that takes the autocorrelation matrix "corr" ( ) of the process we are studying as well as the array "tsamples" ( ) with the points in time where snapshots of the system were taken. More...
|
| |
| | KLDecompUni () |
| |
| | ~KLDecompUni () |
| | Destructor. More...
|
| |
| void | Init () |
| |
| void | SetWeights (const Array1D< double > &weights) |
| | Set weights for computing the integral needed for Nystrom's method for solving the Fredholm integral equation. More...
|
| |
| void | SetWeights (const double *weights, const int npts) |
| | Set weights for computing the integral needed for Nystrom's method for solving the Fredholm integral equation. More...
|
| |
| int | decompose (const Array2D< double > &corr, const int &nKL) |
| | Perform KL decomposition into nKL modes and return actual number of modes that were obtained. More...
|
| |
| int | decompose (const double *corr, const int &nKL) |
| | Perform KL decomposition into nKL modes and return actual number of modes that were obtained. More...
|
| |
| void | KLproject (const Array2D< double > &realiz, Array2D< double > &xi) |
| | Project realizations to the KL modes and store them in xi ( ) More...
|
| |
| const Array1D< double > & | eigenvalues () const |
| | Get eigenvalues in descending order. More...
|
| |
| void | eigenvalues (const int nEIG, double *eigs) const |
| |
| const Array2D< double > & | KLmodes () const |
| | Get associated KL modes. More...
|
| |
| void | KLmodes (const int npts, const int nKL, double *klModes) const |
| | Get associated KL modes. More...
|
| |
| void | meanRealiz (const Array2D< double > &realiz, Array1D< double > &mean_realiz) |
| | Calculate (in meanRealiz) the mean realizations. More...
|
| |
| void | truncRealiz (const Array1D< double > &meanrea, const Array2D< double > &xi, const int &nKL, Array2D< double > &trunc_realiz) |
| | Returns the truncated KL sum. More...
|
| |
|
| bool | decomposed_ |
| | Flag to determine whether KL decomposition has taken place (and consequently that the interal data structures contain meaningful eigenvalues and vectors ... ) More...
|
| |
| Array2D< double > | whcwh_ |
| | Matrix to hold the upper triangular part of the matrix to get eigenvalues of. More...
|
| |
| Array1D< double > | w_ |
| | Array to hold weights for Nystrom's method for Fredholm integral equation solution. More...
|
| |
| Array1D< double > | wh_ |
| | Array to hold square roots of weights. More...
|
| |
| char | jobz_ |
| | Option to determine what to compute (eigenvalues and eigenvectors) More...
|
| |
| char | eigRange_ |
| | Option to set the type of range for eigenvalues. More...
|
| |
| char | uplo_ |
| | Option to indicate how matrix is stored. More...
|
| |
| double | vl_ |
| | Lower bound for range of eigenvalues. More...
|
| |
| double | vu_ |
| | Upper bound for range of eigenvalues. More...
|
| |
| int | il_ |
| | Lower index of range of eigenvalues requested. More...
|
| |
| int | iu_ |
| | Upper index of range of eigenvalues requested. More...
|
| |
| double | absTol_ |
| | Absolute tolerance for convergence. More...
|
| |
| Array1D< double > | eig_values_ |
| | Array to store eigenvalues. More...
|
| |
| Array2D< double > | KL_modes_ |
| | Matrix to store KL modes. More...
|
| |
| int | eig_info_ |
| | info on success of the eigenvector solutions More...
|
| |
| Array1D< int > | ifail_ |
| | Array to store indices of eigenvectors that failed to converge. More...
|
| |
Computes the Karhunen-Loeve decomposition of a univariate stochastic process.
◆ KLDecompUni() [1/3]
| KLDecompUni::KLDecompUni |
( |
const Array1D< double > & |
tSamples | ) |
|
Constructor that takes the autocorrelation matrix "corr" ( ) of the process we are studying as well as the array "tsamples" ( ) with the points in time where snapshots of the system were taken.
Constructs weights ( ) needed for the Nystrom method to solve the Fredholm integral equation
◆ KLDecompUni() [2/3]
| KLDecompUni::KLDecompUni |
( |
| ) |
|
◆ ~KLDecompUni()
| KLDecompUni::~KLDecompUni |
( |
| ) |
|
|
inline |
◆ KLDecompUni() [3/3]
Dummy default constructor, which should not be used as it is not well defined.
Dummy copy constructor, which should not be used as it is currently not well defined
◆ decompose() [1/2]
| int KLDecompUni::decompose |
( |
const Array2D< double > & |
corr, |
|
|
const int & |
nKL |
|
) |
| |
◆ decompose() [2/2]
| int KLDecompUni::decompose |
( |
const double * |
corr, |
|
|
const int & |
nKL |
|
) |
| |
◆ eigenvalues() [1/2]
| const Array1D< double > & KLDecompUni::eigenvalues |
( |
| ) |
const |
Get eigenvalues in descending order.
◆ eigenvalues() [2/2]
| void KLDecompUni::eigenvalues |
( |
const int |
nEIG, |
|
|
double * |
eigs |
|
) |
| const |
◆ Init()
| void KLDecompUni::Init |
( |
| ) |
|
◆ KLmodes() [1/2]
| const Array2D< double > & KLDecompUni::KLmodes |
( |
| ) |
const |
◆ KLmodes() [2/2]
| void KLDecompUni::KLmodes |
( |
const int |
npts, |
|
|
const int |
nKL, |
|
|
double * |
klModes |
|
) |
| const |
◆ KLproject()
| void KLDecompUni::KLproject |
( |
const Array2D< double > & |
realiz, |
|
|
Array2D< double > & |
xi |
|
) |
| |
Project realizations to the KL modes and store them in xi ( )
Samples of random variables are obtained by projecting realizations of the random process on the eigenmodes
... or numerically
◆ meanRealiz()
| void KLDecompUni::meanRealiz |
( |
const Array2D< double > & |
realiz, |
|
|
Array1D< double > & |
mean_realiz |
|
) |
| |
Calculate (in meanRealiz) the mean realizations.
◆ SetWeights() [1/2]
| void KLDecompUni::SetWeights |
( |
const Array1D< double > & |
weights | ) |
|
Set weights for computing the integral needed for Nystrom's method for solving the Fredholm integral equation.
◆ SetWeights() [2/2]
| void KLDecompUni::SetWeights |
( |
const double * |
weights, |
|
|
const int |
npts |
|
) |
| |
Set weights for computing the integral needed for Nystrom's method for solving the Fredholm integral equation.
◆ truncRealiz()
| void KLDecompUni::truncRealiz |
( |
const Array1D< double > & |
meanrea, |
|
|
const Array2D< double > & |
xi, |
|
|
const int & |
nKL, |
|
|
Array2D< double > & |
trunc_realiz |
|
) |
| |
Returns the truncated KL sum.
◆ absTol_
| double KLDecompUni::absTol_ |
|
private |
Absolute tolerance for convergence.
◆ decomposed_
| bool KLDecompUni::decomposed_ |
|
private |
Flag to determine whether KL decomposition has taken place (and consequently that the interal data structures contain meaningful eigenvalues and vectors ... )
◆ eig_info_
| int KLDecompUni::eig_info_ |
|
private |
info on success of the eigenvector solutions
◆ eig_values_
| Array1D<double> KLDecompUni::eig_values_ |
|
private |
Array to store eigenvalues.
◆ eigRange_
| char KLDecompUni::eigRange_ |
|
private |
Option to set the type of range for eigenvalues.
◆ ifail_
Array to store indices of eigenvectors that failed to converge.
◆ il_
Lower index of range of eigenvalues requested.
◆ iu_
Upper index of range of eigenvalues requested.
◆ jobz_
Option to determine what to compute (eigenvalues and eigenvectors)
◆ KL_modes_
| Array2D<double> KLDecompUni::KL_modes_ |
|
private |
Matrix to store KL modes.
◆ uplo_
Option to indicate how matrix is stored.
◆ vl_
Lower bound for range of eigenvalues.
◆ vu_
Upper bound for range of eigenvalues.
◆ w_
Array to hold weights for Nystrom's method for Fredholm integral equation solution.
◆ wh_
Array to hold square roots of weights.
◆ whcwh_
| Array2D<double> KLDecompUni::whcwh_ |
|
private |
Matrix to hold the upper triangular part of the matrix to get eigenvalues of.
The documentation for this class was generated from the following files:


Learn
The Sage Walkthrough.
Learn about the Sage protocol; how it works, and how to use it. Get tips & tricks about how to build an awesome Sage API and take it to production.
Introduction to Sage
Sage is an open protocol for query-based data exchange, and a server-side runtime for executing those queries using the data schema you define. Sage isn't tied to any specific storage and is instead backed by your existing data and business logic.
A Sage service is created by defining your data schema as entities (with their attributes, acts and links) then writing the code which maps your schema to your existing business logic. You describe and consume data with high awareness using Sage, as how it is in the real world.
Let’s hit the road!
For example, let’s assume that you want to build a Sage service which gives you information about people. You need to define your schema first.
We use a hypothetical, pseudo language for type definitions in our examples to be language-agnostic, but you will write real code to define your schema.
entity Person {
id: @attribute;
name: @attribute(string);
}
Along with functions for each attribute:
function Person($query) {
$id = $query->argument('id');
return [
'id' => $id,
];
}
function Person_id($referenceValue) {
return $referenceValue['id'];
}
function Person_name($referenceValue) {
$person = DataSource::getPersonById($id);
return $person->id;
}
We will use PHP in our real code examples, and JSON as our query/response formats. Because they are widely used in the web community.
But you can use Sage with any language that has an implementation or any format that complies with the Sage specification.
After a Sage service is running (typically at a URL on a web service), it can receive requests with queries to validate and execute. The service first checks a query to ensure it only refers to the types and artifacts defined, and then runs the provided code to produce a result.
For example, the query:
{
"doruk": {
"typ": "Person",
"atr": ["name"],
"arg": {
"id": 5
}
}
}
Could produce the following result:
{
"data": {
"doruk": {
"name": "Doruk Eray"
}
}
}
Queries
— Work in progress.
Schemas and Types
— Work in progress.
Validation
— Work in progress.
Execution
— Work in progress.
Introspection
— Work in progress.
In a nutshell...
This was a beginner-friendly walkthrough on the main building blocks of Sage and some of the concepts &
features it introduces.
If you want to learn more, you can also check out Best Practices for in-depth advices about how to
build an awesome Sage API and take it to production.


@property The default storage container.
Defaults to local.
@type Tact.Storage
@property Stores data in local storage.
Will persist between browsing sessions.
@type Tact.Storage
@property Stores data in session storage.
Will NOT persist between browsing sessions.
@type Tact.Storage


vignettes/SingleStudies.Rmd
SingleStudies.Rmd
This vignette describes how you can use the CaseControl
package to perform a single case-control study. We will walk through all
the steps needed to perform an exemplar study, and we have selected the
well-studied topic of the effect of NSAIDs on gastrointestinal (GI)
bleeding-related hospitalization. For simplicity, we focus on one NSAID:
diclofenac.
Before installing the CaseControl
package make sure you
have Java available. Java can be downloaded from www.java.com. For Windows users, RTools
is also necessary. RTools can be downloaded from CRAN. See these instructions
for properly configuring your R environment.
The CaseControl
package is currently maintained in a Github repository, and
has dependencies on other packages in Github. All of these packages can
be downloaded and installed from within R using the drat
package:
install.packages("drat")
drat::addRepo("OHDSI")
install.packages("CaseControl")
Once installed, you can type library(CaseControl)
to
load the package.
In the CaseControl
package a study requires at least
five steps:
In the following sections these steps will be demonstrated.
We need to tell R how to connect to the server where the data are.
CaseControl
uses the DatabaseConnector
package, which provides the createConnectionDetails
function. Type ?createConnectionDetails
for the specific
settings required for the various database management systems (DBMS).
For example, one might connect to a PostgreSQL database using this
code:
connectionDetails <- createConnectionDetails(dbms = "postgresql",
server = "localhost/ohdsi",
user = "joe",
password = "supersecret")
cdmDatabaseSchema <- "my_cdm_data"
cohortDatabaseSchema <- "my_results"
cohortTable <- "my_cohorts"
cdmVersion <- "5"
The last three lines define the cdmDatabaseSchema
and
cohortDatabaseSchema
variables,as well as the CDM version.
We’ll use these later to tell R where the data in CDM format live, where
we have stored our cohorts of interest, and what version CDM is used.
Note that for Microsoft SQL Server, databaseschemas need to specify both
the database and the schema, so for example
cdmDatabaseSchema <- "my_cdm_data.dbo"
.
We need to define the exposures and outcomes for our study.
Additionally, we can specify a cohort in which to nest the study. The
CDM also already contains standard cohorts in the drug_era
and condition_era
table that could be used if those meet
the requirement of the study, but often we require custom cohort
definitions. One way to define cohorts is by writing SQL statements
against the OMOP CDM that populate a table of events in which we are
interested. The resulting table should have the same structure as the
cohort
table in the CDM, meaning it should have the fields
cohort_definition_id
, cohort_start_date
,
cohort_end_date
,and subject_id
.
For our example study, we will rely on drug_era
to
define exposures, and we have created a file called
vignette.sql with the following contents to define the outcome
and the nesting cohort:
/***********************************
File vignette.sql
***********************************/
IF OBJECT_ID('@cohortDatabaseSchema.@cohortTable', 'U') IS NOT NULL
DROP TABLE @cohortDatabaseSchema.@cohortTable;
SELECT 1 AS cohort_definition_id,
AS cohort_start_date,
condition_start_date AS cohort_end_date,
condition_end_date AS subject_id
condition_occurrence.person_id INTO @cohortDatabaseSchema.@cohortTable
FROM @cdmDatabaseSchema.condition_occurrence
INNER JOIN @cdmDatabaseSchema.visit_occurrence
ON condition_occurrence.visit_occurrence_id = visit_occurrence.visit_occurrence_id
WHERE condition_concept_id IN (
SELECT descendant_concept_id
FROM @cdmDatabaseSchema.concept_ancestor
WHERE ancestor_concept_id = 192671 -- GI - Gastrointestinal haemorrhage
)AND visit_occurrence.visit_concept_id IN (9201, 9203);
INSERT INTO @cohortDatabaseSchema.@cohortTable
(cohort_definition_id, cohort_start_date, cohort_end_date, subject_id)SELECT 2 AS cohort_definition_id,
MIN(condition_start_date) AS cohort_start_date,
NULL AS cohort_end_date,
AS subject_id
person_id FROM @cdmDatabaseSchema.condition_occurrence
WHERE condition_concept_id IN (
SELECT descendant_concept_id
FROM @cdmDatabaseSchema.concept_ancestor
WHERE ancestor_concept_id = 80809 -- rheumatoid arthritis
)GROUP BY person_id;
This is parameterized SQL which can be used by the
SqlRender
package. We use parameterized SQL so we do not
have to pre-specify the names of the CDM and cohort schemas. That way,
if we want to run the SQL on a different schema, we only need to change
the parameter values; we do not have to change the SQL code. By also
making use of translation functionality in SqlRender
, we
can make sure the SQL code can be run in many different
environments.
library(SqlRender)
<- readSql("vignette.sql")
sql <- render(sql,
sql cdmDatabaseSchema = cdmDatabaseSchema,
cohortDatabaseSchema = cohortDatabaseSchema
cohortTable = cohortTable)
<- translate(sql, targetDialect = connectionDetails$dbms)
sql
<- connect(connectionDetails)
connection executeSql(connection, sql)
In this code, we first read the SQL from the file into memory. In the
next line, we replace the three parameter names with the actual values.
We then translate the SQL into the dialect appropriate for the DBMS we
already specified in the connectionDetails
. Next, we
connect to the server, and submit the rendered and translated SQL.
If all went well, we now have a table with the outcome of interest and the nesting cohort. We can see how many events:
sql <- paste("SELECT cohort_definition_id, COUNT(*) AS count",
"FROM @cohortDatabaseSchema.@cohortTable",
"GROUP BY cohort_definition_id")
sql <- render(sql,
cohortDatabaseSchema = cohortDatabaseSchema,
cohortTable = cohortTable)
sql <- translate(sql, targetDialect = connectionDetails$dbms)
querySql(connection, sql)
## cohort_definition_id count
## 1 1 1225890
## 2 2 285459
Now we can tell CaseControl
to extract the necessary
data on cases and potential controls:
caseData <- getDbCaseData(connectionDetails = connectionDetails,
cdmDatabaseSchema = cdmDatabaseSchema,
oracleTempSchema = oracleTempSchema,
outcomeDatabaseSchema = cohortDatabaseSchema,
cohortTable = cohortTable,
outcomeIds = 1,
useNestingCohort = TRUE,
nestingCohortDatabaseSchema = cohortDatabaseSchema,
nestingCohortTable = cohortTable,
nestingCohortId = 2,
useObservationEndAsNestingEndDate = TRUE,
getVisits = TRUE)
caseData
## # CaseData object
##
## Outcome of interest ID(s): 1
##
## Nesting cohort ID: 2
##
## Inherits from Andromeda:
## # Andromeda object
## # Physical location: C:\Users\mschuemi.EU\AppData\Local\Temp\RtmpKoeq8G\filea97183cf87f9e.sqlite
##
## Tables:
## $cases (nestingCohortId, outcomeId, indexDate)
## $nestingCohorts (nestingCohortId, personSeqId, personId, observationPeriodStartDate, startDate, endDate, dateOfBirth, genderConceptId, providerSeqId, careSiteSeqId)
## $visits (nestingCohortId, visitStartDate)
There are many parameters, but they are all documented in the
CaseControl
manual. In short, we are pointing the function
to the table created earlier and indicating which concept ID in that
table identifies the outcome. Note that it is possible to fetch the data
for multiple outcomes at once for efficiency. We furthermore specify a
nesting cohort in the same table, meaning that people will be eligible
to be cases or controls if and when they fall inside the specified
cohort. In this case, the nesting cohort starts when people have their
first diagnosis of rheumatoid arthritis. We use the
useObservationEndAsNestingEndDate
argument to indicate
people will stay eligible until the end of their observation period. We
furthermore specify we want to retrieve data on patient visits, which
will be used later on for matching.
Data about the cases and potential controls are extracted from the
server and stored in the caseData
object. This object uses
the package Andromeda
to store information in a way that
ensures R does not run out of memory, even when the data are large.
We can use the generic summary()
function to view some
more information of the data we extracted:
summary(caseData)
## CaseData object summary
##
## Outcome concept ID(s): 1
## Nesting cohort ID: 2
##
## Population count: 238816
## Population window count: 238816
##
## Outcome counts:
## Event count Nesting cohort count Person count
## 1 43636 22388 22388
Creating the caseData
object can take considerable
computing time, and it is probably a good idea to save it for future
sessions. Because caseData
uses Andromeda
, we
cannot use R’s regular save function. Instead, we’ll have to use the
saveCaseData()
function:
saveCaseData(caseData, "GiBleed.zip")
We can use the loadCaseData()
function to load the data
in a future session.
Next, we can use the data to select controls. In this example we’ll selected matched controls, meaning that for every case we’ll find individually matched controls:
matchingCriteria <- createMatchingCriteria(controlsPerCase = 2,
matchOnAge = TRUE,
ageCaliper = 2,
matchOnGender = TRUE,
matchOnProvider = FALSE,
matchOnVisitDate = TRUE,
visitDateCaliper = 30)
caseControls <- selectControls(caseData = caseData,
outcomeId = 1,
firstOutcomeOnly = TRUE,
washoutPeriod = 180,
controlSelectionCriteria = matchingCriteria)
In this example, we specify a washout period of 180 days, meaning that both cases and controls are required to have a minimum of 180 days of observation prior to the index date. We also specify we will only consider the first outcome per person. If a person’s first outcome is within the washout period, that person will be removed from the analysis. We match on calendar time (implicit), age, gender, and visit date, and randomly sample up to two controls per case. Matching on visit date implies that the control should have a visit within n days from the index date of the case (n = 30 in this example), and the index date for the control will be set to the visit date. The purpose of this is to make the index dates more similar between cases and control, because almost by definition we would expect the case to have a visit on the index date. Finally, we ask that cases for which no matching control was found be removed from the analysis.
The caseControls
object is a data frame with four
columns:
head(caseControls)
## personId indexDate isCase stratumId
## 1 3 2009-10-10 TRUE 1
## 2 123 2009-10-11 FALSE 1
## 3 345 2009-10-09 FALSE 1
## 4 6 2010-05-04 TRUE 2
## 5 234 2010-05-04 FALSE 2
## 6 567 2010-05-05 FALSE 2
We can show the attrition to see why cases and events were filtered:
getAttritionTable(caseControls)
## description eventCount caseCount
## 1 Original counts 43636 22388
## 2 First event only 22388 22388
## 3 Require 180 days of prior obs. 13655 1
## 4 Remove unmatched controls 13655 1
An alternative to selecting individually matched controls is to
create a sample controls, controls that are not individually linked to
cases. This can be done using the createSamplingCriteria
instead of the createMatchingCriteria
function. For
example:
samplingCriteria <- createSamplingCriteria(controlsPerCase = 1)
caseControls2 <- selectControls(caseData = caseData,
outcomeId = 1,
firstOutcomeOnly = TRUE,
washoutPeriod = 180,
controlSelectionCriteria = samplingCriteria)
Next, we load information on the exposures of the cases and controls, as well as covariates.
covarSettings <- createCovariateSettings(useCharlsonIndex = TRUE,
useChads2 = TRUE,
useDcsi = TRUE)
caseControlsExposure <- getDbExposureData(connectionDetails = connectionDetails,
caseControls = caseControls,
oracleTempSchema = oracleTempSchema,
exposureDatabaseSchema = cdmDatabaseSchema,
exposureTable = "drug_era",
exposureIds = 1124300,
covariateSettings = covarSettings)
Here we specify that we will use the drug_era
table to
identify exposures, and will only retrieve data on exposure to
Diclofenac (concept ID 1124300). We use the
covariateSettings
function of the FeatureExtraction package
to specify which covariates to construct. In this example the only
coviariates are the Charlson comorbidity index, Diabetes Complications
Severity Index (DCSI), and CHADS2 score.
When including covariates, the caseControlsExposure
object uses Andromeda
to store large objects and therefore
cannot be stored using standard functions. Please use
saveCaseControlsExposure
to save:
saveCaseControlsExposure(caseControlsExposure, "caseControlsExposure")
We can now use the exposure data to determine exposure status for the cases and controls. (The reason why fetching exposure data and determining exposure status is split up is that this is more efficient when we want to evaluate several risk window definitions.)
caseControlData <- createCaseControlData(caseControlsExposure = caseControlsExposure,
exposureId = 1124300,
firstExposureOnly = FALSE,
riskWindowStart = 0,
riskWindowEnd = 0)
Here we specify we are interested in all exposures, not just the
first one, and that the exposure should overlap with the index date (the
risk window starts and ends on day 0, the index date). The
caseControlData
object is a data frame with five
columns:
head(caseControlData)
## personId indexDate isCase stratumId rowId exposed
## 1 3 2009-10-10 TRUE 1 1 1
## 2 123 2009-10-11 FALSE 1 2 0
## 3 345 2009-10-09 FALSE 1 3 0
## 4 6 2010-05-04 TRUE 2 4 0
## 5 234 2010-05-04 FALSE 2 5 0
## 6 567 2010-05-05 FALSE 2 6 0
We can now fit the model. In case we used matching to select controls this will be a logistic regression conditioned on the matched sets. Else it will be an unconditioned logistic regression.
fit <- fitCaseControlModel(caseControlData,
useCovariates = TRUE,
caseControlsExposure = caseControlsExposure,
prior = createPrior("none"))
fit
## Case-Control fitted model
## Status: OK
##
## Counts
## Cases Controls Exposed cases Exposed controls
## Count 13655 27310 220 511
##
## Estimate lower .95 upper .95 logRr seLogRr
## treatment 0.901936 0.762770 1.063169 -0.103212 0.084709
## Log Likelihood Ratio
## treatment 0.7515
The generic functions summary
, coef
, and
confint
are implemented for the fit
object:
summary(fit)
## Length Class Mode
## outcomeModelTreatmentEstimate 5 data.frame list
## outcomeModelCoefficients 4 -none- numeric
## outcomeModelStatus 1 -none- character
## outcomeModelLogLikelihood 1 -none- numeric
## outcomeCounts 4 data.frame list
coef(fit)
## [1] -0.1032116
confint(fit)
## [1] -0.27079908 0.06125374
Considerable work has been dedicated to provide the
CaseControl
package.
citation("CaseControl")
##
## To cite package 'CaseControl' in publications use:
##
## Schuemie M (2022). _CaseControl: Case-Control_.
## http://ohdsi.github.io/CaseControl,
## https://github.com/OHDSI/CaseControl.
##
## A BibTeX entry for LaTeX users is
##
## @Manual{,
## title = {CaseControl: Case-Control},
## author = {Martijn Schuemie},
## year = {2022},
## note = {http://ohdsi.github.io/CaseControl,
## https://github.com/OHDSI/CaseControl},
## }
Furthermore, CaseControl
makes extensive use of the
Cyclops
package.
citation("Cyclops")
##
## To cite Cyclops in publications use:
##
## Suchard MA, Simpson SE, Zorych I, Ryan P, Madigan D (2013). "Massive
## parallelization of serial inference algorithms for complex
## generalized linear models." _ACM Transactions on Modeling and
## Computer Simulation_, *23*, 10.
## <https://dl.acm.org/doi/10.1145/2414416.2414791>.
##
## A BibTeX entry for LaTeX users is
##
## @Article{,
## author = {M. A. Suchard and S. E. Simpson and I. Zorych and P. Ryan and D. Madigan},
## title = {Massive parallelization of serial inference algorithms for complex generalized linear models},
## journal = {ACM Transactions on Modeling and Computer Simulation},
## volume = {23},
## pages = {10},
## year = {2013},
## url = {https://dl.acm.org/doi/10.1145/2414416.2414791},
## }


Sample run of chapter's interpreter examples
// In file traits/Philosophical.scala trait Philosophical: def philosophize = "I consume memory, therefore I am!"
class Frog extends Philosophical: override def toString = "green"
val frog = new Frog frog.philosophize // I consume memory, therefore I am!
val phil: Philosophical = frog phil.philosophize // I consume memory, therefore I am!
// In file traits/Ex1.scala class Animal class Frog extends Animal, Philosophical: override def toString = "green"
// In file traits/Frog.scala class Animal trait HasLegs class Frog extends Animal, Philosophical, HasLegs: override def toString = "green"
// In file traits/Ex2.scala class Animal class Frog extends Animal, Philosophical: override def toString = "green" override def philosophize = s"It ain't easy being $this!"
val phrog: Philosophical = new Frog phrog.philosophize // It ain't easy being green!
class Rational(n: Int, d: Int): // ... def < (that: Rational) = this.numer * that.denom < that.numer * this.denom def > (that: Rational) = that < this def <= (that: Rational) = (this < that) || (this == that) def >= (that: Rational) = (this > that) || (this == that)
// In file traits/Rational.scala class Rational(n: Int, d: Int) extends Ordered[Rational]: // ... def compare(that: Rational) = (this.numer * that.denom) - (that.numer * this.denom)
val half = new Rational(1, 2) val third = new Rational(1, 3) half < third // false half > third // true
// In file traits/Ex2.scala trait Ordered[T]: def compare(that: T): Int def <(that: T): Boolean = (this compare that) < 0 def >(that: T): Boolean = (this compare that) > 0 def <=(that: T): Boolean = (this compare that) <= 0 def >=(that: T): Boolean = (this compare that) >= 0
// In file traits/IntQueue.scala abstract class IntQueue: def get(): Int def put(x: Int): Unit
// In file traits/BasicIntQueue.scala import scala.collection.mutable.ArrayBuffer class BasicIntQueue extends IntQueue: private val buf = ArrayBuffer.empty[Int] def get() = buf.remove(0) def put(x: Int) = buf += x
val queue = new BasicIntQueue queue.put(10) queue.put(20) queue.get() // 10 queue.get() // 20
// In file traits/Doubling.scala trait Doubling extends IntQueue: abstract override def put(x: Int) = super.put(2 * x)
class MyQueue extends BasicIntQueue, Doubling val queue = new MyQueue queue.put(10) queue.get() // 20
val queue = new BasicIntQueue with Doubling queue.put(10) queue.get() // 20
// In file traits/Incrementing.scala trait Incrementing extends IntQueue: abstract override def put(x: Int) = super.put(x + 1) trait Filtering extends IntQueue: abstract override def put(x: Int) = if x >= 0 then super.put(x)
val queue = new BasicIntQueue with Incrementing with Filtering queue.put(-1) queue.put(0) queue.put(1) queue.get() // 1 queue.get() // 2
val queue = new BasicIntQueue with Filtering with Incrementing queue.put(-1) queue.put(0) queue.put(1) queue.get() // 0 queue.get() // 1 queue.get() // 2
// In file traits/Ex2.scala // Multiple inheritance thought experiment val q = new BasicIntQueue with Incrementing with Doubling q.put(42) // which put would be called?
// Multiple inheritance thought experiment trait MyQueue extends BasicIntQueue, Incrementing, Doubling: def put(x: Int) = super[Incrementing].put(x) // (this is rarely used, super[Doubling].put(x) // but valid Scala)
// In file traits/Ex3.scala class Animal trait Furry extends Animal trait HasLegs extends Animal trait FourLegged extends HasLegs class Cat extends Animal, Furry, FourLegged
trait Philosophical(message: String): def philosophize = message
class Frog extends Animal, Philosophical("I croak, therefore I am!") class Duck extends Animal, Philosophical("I quack, therefore I am!")
val frog = new Frog frog.philosophize // I croak, therefore I am! val duck = new Duck duck.philosophize // I quack, therefore I am!
class ProfoundAnimal extends Animal, Philosophical("In the beginning was the deed.")
class Frog extends ProfoundAnimal, Philosophical
val frog = new Frog frog.philosophize // In the beginning was the deed.
trait PhilosophicalAnimal extends Animal with Philosophical
// Does not compile class Frog extends PhilosophicalAnimal( "I croak, therefore I am!")
class Frog extends Philosophical("I croak, therefore I am!"), PhilosophicalAnimal
class Frog extends PhilosophicalAnimal, Philosophical("I croak, therefore I am!")
|
For more information about Programming in Scala, Fifth Edition (the "Stairway Book"), please visit: http://www.artima.com/shop/programming_in_scala_5ed and: |
Copyright © 2007-2020 Artima, Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |


Deep dive into logic, computation, and their history
Static typing vs dynamic typing
Math* and programming* are the Same Thing™
Logic and computation are equivalent
Disclaimer: For some values of math, programming, and Same Thing™Logic and computation are equivalent
Also known as the Curry-Howard correspondent
Linking two fields of study together
Discoveries in one field also applies to the other
Propositions as types
Proofs as programs
Simplification of proofs as evaluation of programs
Writing proofs and writing programming are equivalent
History
Go watch Philip Wadler's Strange Loop video
Equivalent systems and models
How different systems and models can be translated between each other
Illustration
Similarities between natural deduction and simply-typed lambda calculus
Natural deduction : Simply typed lambda calculus
↓
???
↓
Writing proofs : Writing programs
Natural deduction is a proof calculus
Rules and system for describing formal inference
Natural deduction : Simply typed lambda calculus
↓
is a proof calculus for : ???
↓
Writing proofs : Writing programs
Computation models
Turing machines
Recursive functions
Lambda calculus
All the computation models above are equivalent
Natural deduction : Simply typed lambda calculus
↓
is a proof calculus for : can be used to write
↓
Writing proofs : Writing programs
Logical operators/connectives
Conjunction (&, and)
Disjunction (∨, or)
Implication (⊃, if...then)
Types
Product (×)
Javascript: {"name": "Sue", "age": 40}
Tuples in Python: ("Sue", 40)
Function (→)
function convertToString(/* Number */ a) { return a.toString(); }
Natural deduction : Simply typed lambda calculus
↓
is a proof calculus for: can be used to write
↓
Writing proofs : Writing programs
Writing proofs and writing programming are equivalent


Bounded by the Nilgiris hills on the East and the Arabian Sea on the west, the district of Malappuram literally the land atop the hills, is remarkable for its unique natural beauty. Perched among the undulating hills and the meandering rivers that flow to reach the coconut-fringed seacoast, the land conceals a unique and eventful history. The hill country also contributed much to the cultural artistic traditions of the state. The mosques and temples of the land are known for their spectacular festivals. The land of great poets and writers, political and religious leaders, the district has carved a unique place of its own in the history of Kerala Home to the khilafath movement and the mappila revolts, which questioned the British authority in India, Malappuram was the military headquarters of the zamorins of Kozhikode since ancient times. Malappuram District was formed on 16th of June 1969 with the Nilgiris of Tamilnadu in the east, Arabian sea in the west, Kozhikode and Wayanad Districts in the north and Palakkad and Thrissur District in the south. The District has a geographical area of 3550 sq. kms, which is 9.13% of total area of the state and ranks 3rd in the state.
The district has dry season from December to February, hot season from March to May, the South west monsoon from October to November. The South west monsoon is usually very heavy and nearly 75 percent of the annual rains are received during this season. The climate is generally hot and humid; the range of temperature varying between 30 degree C and 20 degree C. the average annual rainfall is 290mm.
Flowing along a stretch of 209 km, Bharathapuzha River is also called River Nila. It is the second longest river in Kerala and provides shelter to 11 reservoirs with Malampuzha dam being the largest.
Scattered over a cluster of islands on the confluence of the Kadalundipuzha River and the Arabian Sea, this sanctuary is home to over a hundred species of native birds, and around 60 species of migratory birds.
One of the oldest mosques in Kerala, the Juma Masjid is an important pilgrimage site. It is situated on the Kozikhod-Nilmbur-Gudallur road and there are some mausoleums of the Malappuram martyrs located in the vicinity of the Mosque.


Sort by:
Duration:
1
2
3
4
5
Country
Country 1
Country 2
Country 3
Department:
Department 1
Department 2
Department 3
Reset
Name of the University
Country
Reference to website
Duration:
Introduction:
some gen info about the university
View
Name of the University
Country
Reference to website
Duration:
Introduction:
some gen info about the university
View
Name of the University
Country
Reference to website
Duration:
Introduction:
some gen info about the university
View


{% include head.html %}
{% include plugins/full_bg_slider/head.html %}
{% include plugins/blockquote/head.html %}
{% include plugins/social_media_button/head.html %}
Image 01
Image 02
Image 03
Image 04
Image 05
Image 06
{% include pages/landing/header.html %}
{% include pages/landing/content.html %}
{% include pages/landing/footer.html %}
{% include footer_script.html %}


Demographics
Population
{% include 'profile/_blocks/_stat_list.html' with stat=demographics.youth_population_total stat_type='number' %}
{% include 'profile/_blocks/_stat_list.html' with stat=demographics.youth_population_perc stat_type='percentage' %}


Hello there!
- My name is Ceylin Brooks. I have traveled an interesting path to get to coding.
- I graduted high school and enlisted in the United States Air Force, while I was in the Air Force I gained customer service experience
through my time in the Air Force in I rotated through working in Food, Fitness, Morturary and Lodging.
- I attended a couple college classes but none of them piqued my interest!
- I seperated from the Air Force and thought that a career in Occupational Therapy
would be the way to go but quickly found that it wasn't I wanted to do either.
- I stumbled into coding and fell in love with it.
- I am fascinated by how we are able to build websites and web applications from the ground up.
- One of my main goals in becoming a Software Engineer is wanting to build an app that can eventually be downloaded my family and friends.
- Another major goal that I have is to encourage more women and people who look like me to enter the feild of technolgy.
- I feel that we are underrepresented and I would to aid in increasing the amount of diversiy present in the field of technolgy.
Foods That I Can't Get Enough Of:
- Potato Chips
- Oven Browned Potatoes
- Chicken Wings
- Spinach Dip
- Apple
- Mangos
- Sandwhiches
- Popciles
- Deviled Eggs
- French Fries


This is the base class for an EasyRoads3D road object
...
public void AddMarker(Vector3 position)
Adds a new marker
public void AddMarkers(Vector3[] pos)
Adds new markers according an array of Vector3 positions
public ERConnection AttachToEnd(ERConnection sourceConnection, int connectionIndex)
Instantiates and connects a new ERConnection object according the sourceConnection to the connection connectionIndex at the end of the road. Returns null in the case a connection is already connected to the end or when sourceConnection is not a valid connection object.
public ERConnection AttachToStart(ERConnection sourceConnection, int connectionIndex)
Instantiates and connects a new ERConnection object according the sourceConnection to the connection connectionIndex at the start of the road. Returns null in the case the new connection object could not be created because a connection is already connected to the start or when sourceConnection is not a valid connection object.
public bool ClosedTrack(bool value)
Activate/deactivate closed track.
public bool ConnectToEnd(ERConnection connectionObject, int connectionIndex)
Connects the already exisiting ERConnection connectionObject to the connection connectionIndex at the end of the road. Returns false in the case a connection is already connected to the start or when connectionObject is not a valid connection object.
public bool ConnectToStart(ERConnection connectionObject, int connectionIndex)
Connects the already exisiting ERConnection connectionObject to the connection connectionIndex at the start of the road. Returns false in the case a connection is already connected to the start or when connectionObject is not a valid connection object.
public void DeleteMarker(int index)
Deleted the marker at the passed index
public bool Destroy()
Removes the road object
public float GetAngleThreshold()
Returns the Angle Threshold of the road object
public ERConnection GetConnectionAtEnd()
Returns the crossing/connection at the end of the road
public ERConnection GetConnectionAtEnd(out int index)
Returns the crossing/connection at the end of the road, index holds the connection index
public ERConnection GetConnectionAtStart()
Returns the crossing/connection at the start of the road
public ERConnection GetConnectionAtStart(out int index)
Returns the crossing/connection at the start of the road, index holds the connection index
public float GetLength()
Returns the length of the road object
public Vector3 GetMarkerPosition(int index)
Returns the position of the marker at index
public Vector3[] GetMarkerPositions()
Returns all marker positions
public string GetName()
Returns the name of the road object
public Vector3 GetPosition(float value, ref int currentElement)
Returns the center position of the road at distance value. currentElement can be used for performance optimization.
public Vector3 GetMarkerTilting(int index)
Returns the tilting value of the marker at index
public Vector3 GetMarkerTiltingCenter(int index)
Returns the tilting center of the marker at index
public Vector3[] GetSplinePointsCenter()
Returns pre-sampled positions at the center of the road
public Vector3[] GetSplinePointsRightSide()
Returns pre-sampled positions at the right side of the road
public Vector3[] GetSplinePointsLeftSide()
Returns pre-sampled positions at the left side of the road
public void InsertMarker(Vector3 pos)
Inserts a new marker before the selected marker
public void InsertMarkerAt(Vector3 pos, int index)
Inserts a new marker before the passed index
public ERRoad InsertIConnector(int index, string connectionName, out ERConnection connection)
Inserts an I Connector at marker index. connectionName will be assigned as the connection name and the new connection object will be assigned to connection. If this index is not at the start or end of the road, the road object will be cut and the newly created road will be returned.
public ERRoad InsertIConnector(int index)
Inserts an I Connector at marker index. If this index is not at the start or end of the road, the road object will be cut and the newly created road will be returned.
public ERRoadType GetRoadType()
Returns the road type
public void IsSideObject(bool value)
Marks the road object as a side object, no road mesh will be created
public void IsStatic(bool value)
Marks the road object as static/none static
public void SetLayer(int index)
Sets the layer of the road game object to index
public bool SetMarkerControlType(int index, ERMarkerControlType type)
Sets the ERMarkerControlType type for the marker at index. Enum options are: Spline, StraightXZ, StraightXZY, Circular
public void SetMarkerPosition(int index, Vector3 position)
This will update the marker position at index to position
public void SetMarkerPositions(Vector3[] positions)
This will update all marker positions provided that the passed array length matches the markers length
public void SetMarkerPositions(Vector3[] positions, int index)
This will update all marker positions corresponding to the passed array length starting at index
public void SetMarkerTilting(float value, int index)
This will set the tilting level of the marker at index. Value represents the tilting angle
public void SetMarkerTiltingCenter(float value, int index)
This will set the tilting center of the marker at index. value represents the position between the left and the right side of the road (0..1)
public void SetMaterial(Material mat)
This will assign the passed material to the road. It is recommended to use road types which includes the road material
public void SetMeshCollider(bool value)
Adds or removes the mesh collider
public void SetName(string name)
Updates the name of the road object
public void SetResolution(float res)
Set the resolution of the road object
public float GetResolution()
Returns the resolution of the road object
public Color GetVertexColor(int index)
Returns the vertex color of the marker at index.
public float GetWidth()
Returns the width of the road object
public void SetAngleThreshold(float res)
Set the Angle Threshold of the road object
public void SetRoadType(ERRoadType rt)
This will update the full road to match the passed road type
public void SetSplatmap(bool active)
This will blend the road shape in the terrain splatmap
public void SetSplatmap(bool active, int splatIndex , int expand, int smoothLevel, float opacity)
This will blend the road shape in the terrain splatmap. Additionally the splatmap parameters will be passed for the terrain splat texture index, width expansion, smooth level and opacity
public void SetSplineStrength(int index, float strength)
Sets the spline strength of the marker at index.
public void SetWidth(float width)
Sets the width of the road object. It is recommended to use road types which includes the width.
public void SetVertexColor(int index, Color color)
Sets the vertex color of the marker at index.
public void SnapToTerrain(bool value)
When active, road vertices will snap to the terrain. No terrain deformation will take place for this road object.
public void SnapToTerrain(bool value, float value)
When active, road vertices will snap to the terrain with an offset value. No terrain deformation will take place for this road object.
public void UnConnectEnd()
Removes the connection at the end of the road object.
public void UnConnectStart()
Removes the connection at the start of the road object.
|


A compendium of new geometries, coordinate systems, statistical
transformations, scales and fonts for 'ggplot2', including splines, 1d and 2d densities,
univariate average shifted histograms, a new map coordinate system based on the
'PROJ.4'-library along with geom_cartogram() that mimics the original functionality of
geom_map(), formatters for "bytes", a stat_stepribbon() function, increased 'plotly'
compatibility and the 'StateFace' open source font 'ProPublica'. Further new
functionality includes lollipop charts, dumbbell charts, the ability to encircle
points and coordinate-system-based text annotations.
| Version: |
0.4.0 |
| Depends: |
R (≥ 3.2.0), ggplot2 (≥ 2.2.1) |
| Imports: |
utils, graphics, grDevices, dplyr, RColorBrewer, KernSmooth, proj4, scales, grid, gtable, ash, maps, MASS, extrafont, tibble, plotly (≥ 3.4.1) |
| Suggests: |
testthat, gridExtra, knitr, rmarkdown, ggthemes, reshape2 |
| Published: |
2017-02-15 |
| Author: |
Bob Rudis [aut, cre],
Ben Bolker [aut, ctb] (Encircling & additional splines),
Ben Marwick [ctb] (General codebase cleanup),
Jan Schulz [aut, ctb] (Annotations),
Rosen Matev [ctb] (Original annotate_textp implementation on
stackoverflow),
ProPublica [dtc] (StateFace font) |
| Maintainer: |
Bob Rudis <bob at rud.is> |
| BugReports: |
https://github.com/hrbrmstr/ggalt/issues |
| License: |
AGPL + file LICENSE |
| URL: |
https://github.com/hrbrmstr/ggalt |
| NeedsCompilation: |
no |
| Materials: |
README NEWS |
| CRAN checks: |
ggalt results |


In this example, we are going to do event processing by batches. Doing it in batches, we don't block completely the thread. To the end user it may represent the same result but with a improved 'perceived performance'. We will create 200k divs with no display. What we are trying to measure here is the time it takes to create them and see if this operation blocks the ui thread.
var LIMIT = 200000;
var CHUNK = 400;
function drawFew(start, callback) {
for (var i = 0; i < CHUNK; i++) {
output.appendChild(document.createElement('div'));
}
if (start >= LIMIT) return callback();
setTimeout(function() {
drawFew(start + CHUNK, callback);
}, 0);
}
...


Apache Mesos 0.19.0 Released
The latest Mesos release, 0.19.0 is now available for download. This new version includes the following features and improvements:
- The master now persists the list of registered slaves in a durable replicated manner using the Registrar and the replicated log.
- Alpha support for custom container technologies has been added with the ExternalContainerizer.
- Metrics reporting has been overhauled and is now exposed on <ip:port>/metrics/snapshot.
- Slave Authentication: optionally, only authenticated slaves can register with the master.
- Numerous bug fixes and stability improvements.
Full release notes are available on JIRA.
Registrar
Mesos 0.19.0 introduces the “Registrar”: the master now persists the list of registered slaves in a durable replicated manner. The previous lack of durable state was an intentional design decision that simplified failover and allowed masters to be run and migrated with ease. However, the stateless design had issues:
- In the event of a dual failure (slave fails while master is down), no lost task notifications are sent. This leads to a task running according to the framework but unknown to Mesos.
- When a new master is elected, we may allow rogue slaves to re-register with the master. This leads to tasks running on the slave that are not known to the framework.
Persisting the list of registered slaves allows failed over masters to detect slaves that do not re-register, and notify frameworks accordingly. It also allows us to prevent rogue slaves from re-registering; terminating the rogue tasks in the process.
The state is persisted using the replicated log (available since 0.9.0).
External Containerization
As alluded to during the containerization / isolation refactor in 0.18.0, the ExternalContainerizer has landed in this release. This provides alpha level support for custom containerization.
Developers can implement their own external containerizers to provide support for custom container technologies. Initial Docker support is now available through some community driven external containerizers: Docker Containerizer for Mesos by Tom Arnfeld and Deimos by Jason Dusek. Please reach out on the mailing lists with questions!
Metrics
Previously, Mesos components had to use custom metrics code and custom HTTP endpoints for exposing metrics. This made it difficult to expose additional system metrics and often required having an endpoint for each libprocess Process (Actor) for which metrics were desired. Having metrics spread across endpoints was operationally complex.
We needed a consistent, simple, and global way to expose metrics, which led to the creation of a metrics library within libprocess. All metrics are now exposed via /metrics/snapshot. The /stats.json endpoint remains for backwards compatibility.
Upgrading
For backwards compatibility, the “Registrar” will be enabled in a phased manner. By default, the “Registrar” is write-only in 0.19.0 and will be read/write in 0.20.0.
If running in high-availability mode with ZooKeeper, operators must now specify the --work_dir
for the master, along with the --quorum
size of the ensemble of masters. This means adding or removing masters must be done carefully! The best practice is to only ever add or remove a single master at a time and to allow a small amount of time for the replicated log to catch up on the new master. Maintenance documentation will be added to reflect this.
Please refer to the upgrades document, which details how to perform an upgrade from 0.18.x.
Future Work
Thanks to the Registrar, reconciliation primitives can now be provided to ensure that the state of tasks between Mesos and frameworks is kept consistent. This will remove the need for frameworks to implement out-of-band task reconciliation to inspect the state of slaves. Reconciliation work is being tracked at MESOS-1407.
The addition of state through the Registrar opens up a rich set of possible features that were previously not possible due to the lack of persistent state in the master. These include:
- Cluster maintenance primitives (MESOS-1474)
- Repair automation (MESOS-695)
- Global resource reservations
Getting Involved
We encourage you to try out this release, and let us know what you think and if you hit any issues on the user mailing list. You can also get in touch with us via @ApacheMesos or via mailing lists and IRC.
Thanks
Thanks to the 32 contributors who made 0.19.0 possible:
Ashutosh Jain, Adam B, Alexandra Sava, Anton Lindström, Archana kumari, Benjamin Hindman, Benjamin Mahler, Bernardo Gomez Palacio, Bernd Mathiske, Charlie Carson, Chengwei Yang, Chi Zhang, Dave Lester, Dominic Hamon, Ian Downes, Isabel Jimenez, Jake Farrell, Jameel, Al-Aziz, Jiang Yan Xu, Jie Yu, Nikita Vetoshkin, Niklas Q. Nielsen, Ritwik Yadav, Sam Taha, Steven Phung, Till Toenshoff, Timothy St. Clair, Tobi Knaup, Tom Arnfeld, Tom Galloway, Vinod Kone, Vinson Lee


{% extends "base.html" %} {% block title %} Chat Rooms {% endblock %} {% block content %} What chat room would you like to enter?


{% extends "mail_layout.html" %} {% block title %}SURF inactive notification{% endblock %} {% block content %}
{{ salutation }},
Your profile will be suspended soon
{{ salutation }},
According to our information, it's been {{ days_ago }} days since you last used SURF Research Access Management. Because we do not want to store your information longer than necessary, your profile will be marked inactive on {{ suspension_date }}. This means non-web services might not work anymore. On {{ deletion_date }}, your profile will be deleted.
If you want to keep using the services available through SURF Research Access Management, simply login using the link below or by going to {{ base_url }}/login.
If you want to delete your profile right away, please go to {{ base_url }}/profile?delete=true.
Login to prevent suspensionIf you have any questions, please let us know by replying to this email.
Kind regards,
SURF Research Access Management support


Uses of Interface
io.sf.carte.doc.style.css.nsac.Condition
Package
Description
This package provide an implementation of the
Document
Object Model (DOM) Level 3 Core Specification that can be used for XML or
HTML documents, albeit with a few deviations from the specification.
This package and its subpackages provide an implementation of the
CSS Object Model API.
NSAC: a non-standard revision to
W3C's SAC api.
Implementation classes for the CSS Object Model API.
Classes related to CSS parsing.
-
Uses of Condition in io.sf.carte.doc.dom
Modifier and TypeMethodDescriptionDOMElement.getOverrideStyle
(Condition pseudoElt) Gets this element's override style declaration for a pseudo-element.boolean
DOMElement.hasOverrideStyle
(Condition pseudoElt) Check whether this element has an override style declaration for the given pseudo-element.boolean
DOMElement.matches
(SelectorList selist, Condition pseudoElement) Does this element (with the provided pseudo-element, if any) match the provided selector list ? -
Uses of Condition in io.sf.carte.doc.style.css
Modifier and TypeMethodDescriptionSelectorMatcher.getPseudoElement()
Get the pseudo-element that this matcher will use to match selectors.Modifier and TypeMethodDescriptionDocumentCSSStyleSheet.getComputedStyle
(CSSElement elm, Condition pseudoElt) Gets the computed style for the given Element and pseudo-element in the DOM Document associated to this style sheet.CSSElement.getOverrideStyle
(Condition pseudoElt) Gets this element's override style declaration for a pseudo-element.boolean
CSSElement.hasOverrideStyle
(Condition pseudoElt) Check whether this element has an override style declaration for the given pseudo-element.boolean
CSSElement.matches
(SelectorList selist, Condition pseudoElement) Does this element (with the provided pseudo-element, if any) match the provided selector list ?void
SelectorMatcher.setPseudoElement
(Condition pseudoElt) Set this selector's pseudo-element. -
Uses of Condition in io.sf.carte.doc.style.css.nsac
Modifier and TypeInterfaceDescriptioninterface
A condition is applied to a list of selectors that is supplied as an argument to the selector name.interface
Based on SAC'sAttributeCondition
interface by Philippe Le Hegaret.interface
Based on SAC'sCombinatorCondition
interface by Philippe Le Hegaret.interface
SAC'sLangCondition
interface by Philippe Le Hegaret.interface
Based on SAC'sPositionalCondition
interface by Philippe Le Hegaret.interface
ACondition
for a pseudo-class or pseudo-element.Modifier and TypeMethodDescriptionConditionalSelector.getCondition()
Returns the condition to be applied on the simple selector.CombinatorCondition.getFirstCondition()
The first condition.CombinatorCondition.getSecondCondition()
The second condition. -
Uses of Condition in io.sf.carte.doc.style.css.om
Modifier and TypeMethodDescriptionprotected ComputedCSSStyle
BaseDocumentCSSStyleSheet.computeRevertedStyle
(ComputedCSSStyle style, SelectorMatcher matcher, Condition pseudoElt, BaseCSSStyleDeclaration inlineStyle, byte origin) protected ComputedCSSStyle
BaseDocumentCSSStyleSheet.computeStyle
(ComputedCSSStyle style, SelectorMatcher matcher, Condition pseudoElt, InlineStyle inlineStyle) Compute the style for an element.abstract ComputedCSSStyle
BaseDocumentCSSStyleSheet.getComputedStyle
(CSSElement elm, Condition pseudoElt) Gets the computed style for the given element and pseudo-element.DOMDocumentCSSStyleSheet.getComputedStyle
(CSSElement elm, Condition pseudoElt) Gets the computed style for the given DOM Element and pseudo-element.ComputedCSSStyle.getRevertStyle
(Condition pseudoElt) boolean
InlineStyle.hasOverrideStyle
(Condition pseudoElt) Has this style's owner element an override style attached to the given pseudo-element?void
AbstractSelectorMatcher.setPseudoElement
(Condition pseudoElt) Set this selector's pseudo-element. -
Uses of Condition in io.sf.carte.doc.style.css.parser


Liam Neeson - Low-Poly
Fedora - Motion Graphics
Reflection - 3D
Cloth - 3D
Abstract - 3D
Acid Sax - 2D
Bridge Rectifier - 3D
Cup Smash - Animation
Filbert Twelve - 3D
Summer - Low-Poly
M.C Escher - Animation
Idris Elba - Low-Poly
The Girl From Jakku - Pixelart
Red - Low-Poly
Pinguy OS- 3D


The Effect of DJs’ Social Network on Music Popularity
This research focuses on two distinctive determinants of DJ popularity in Electronic Dance Music (EDM) culture. While one’s individual artistic tastes (Audio Features) influence the construction of playlists for festivals, social relationships (Social Network) with other DJs also have an effect on the promotion of a DJ’s works.
Motivation: There are many aspects that affect when DJs construct Mix Sets.
Motivation: What are the factors that affect when DJs chooses a song?.
Hypothesis: Audio Features & Social Network.
Dataset: 1001TRACKLISTS.
Popularity: Popularity is calculated according to DJ's song preference.
Models: Popularity / Audio Features, Network Features.
Model 1: Some audio features affect music popularity.
Model 2: Song popularity has a negative relationship with Closeness and Betweness.
Model 3: Even when controlling Audio Features, Closeness and Betweness still show negative relationships.
Analysis: Low Betweeness & Closeness.
Analysis: DJs tend to play songs composed by DJs within their exclusive groups.
Example: The more popular a song is, the more often the song is played within the cluster.
Check out the paper for more info.


The Mean Age of Open Defects is a measure of how much time currently open defects stay unresolved. An
open defect is a defect that wasn't marked as closed.
| mean age (days) |


{% extends "base.html" %} {% load static %} {% block content %}
It seems something has gone wrong in the server. You can report the issue as a issue on GitHub here.


Start
blur
mosaik
crystallize
colorhalftone
plaintext
asterisk
New User
User ID:
Pixelation_Typing_Task
Finish
Filter value: 3.5


← Back to Team Page
Jungsun(June) Eoh
Database Lead
Hello there. My name is Jungsun Eoh, and I go by the name June.
I came to the bay area 4 years ago, but I feel like I've lost one year out of 4 years.
I am majoring in Computer Science at San Francisco State University. This is my senior year.
I mostly coded in C++ and Java, and I enjoy solving problem to build efficient algorithm.
Recently, I started to learn Azure and python. This summer, my internship got canceled,
but I was lucky enough to get into a mentorship program. I learned product cycles and Cloud
computing technology, and I attended my first hackathon with this program. Right now,
I'm working with a mobile application project using Xamarin and C#. I enjoy learning about new technology.
When I have free time, I play video games; not hard-core game player, but I play the Elder scrolls online
and Apex lately. I enjoy binge-watching Netflix when I want to slack off my weekend. For the last fun
thing about me, I bake. I'm looking forward to baking my first (hopefully) eat-able pound cake this weekend.
Contact info


Velocity Tracker is in charge of collecting and evaluating ConductorSamples. GatherSample is used for data evaluation.TrackAndStoreVelocity is used for ConductorSample collection.
More...
|
| struct | ConductorSample |
| | Struct that contains relevant information of the controller. Collected at each frame More...
|
| |
Velocity Tracker is in charge of collecting and evaluating ConductorSamples. GatherSample is used for data evaluation.TrackAndStoreVelocity is used for ConductorSample collection.
Definition at line 15 of file OVRVelocityTracker.cs.
◆ ApproximatelyEquals()
| Boolean OVRVelocityTracker.ApproximatelyEquals |
( |
float |
a, |
|
|
float |
b, |
|
|
float |
offset |
|
) |
| |
Returns true if a is within an offset of b
- Parameters
-
| a | value 1 |
| b | value 2 |
| offset | Room for error within the equality of value 1 and value 2. |
- Returns
- True if a and b are within an offset of each other
Definition at line 438 of file OVRVelocityTracker.cs.
◆ CollectConductorSamples()
| void OVRVelocityTracker.CollectConductorSamples |
( |
OVRInput.Controller |
device | ) |
|
Collects conductor samples every 'DistanceBetweenMeasurements' apart.
- Parameters
-
| device | Device corresponding to the baton |
Definition at line 173 of file OVRVelocityTracker.cs.
◆ GetTimeSincePrevCollisionWithBasePlane()
| void OVRVelocityTracker.GetTimeSincePrevCollisionWithBasePlane |
( |
OVRInput.Controller |
device | ) |
|
Calculates time elapsed since the last recorded collision with the base plane Trigger on device must be pressed down for this function to be called (at every frame) from OVRGestureHandle.cs
- Parameters
-
| device | Device corresponding to the baton |
Definition at line 317 of file OVRVelocityTracker.cs.
◆ RemovePlane()
| void OVRVelocityTracker.RemovePlane |
( |
| ) |
|
◆ SetNewSamples()
Called from OVRVelocityTracker once enough samples are collected Creats a new XML file, populated by ConductorSamples.
- Parameters
-
| samples | List of newly recorded ConductorSamples |
Definition at line 452 of file OVRVelocityTracker.cs.
◆ VelocityTracker()
| delegate void OVRVelocityTracker.VelocityTracker |
( |
| ) |
|
◆ BPMToRecord
| int [] OVRVelocityTracker.BPMToRecord = { 80, 100, 120 } |
◆ currentBPMToRecord
| int OVRVelocityTracker.currentBPMToRecord |
◆ NewBPMToRecord
| int [] OVRVelocityTracker.NewBPMToRecord = { 60, 100, 140 } |
◆ planeHasBeenSpawned
| bool OVRVelocityTracker.planeHasBeenSpawned |
◆ trials
◆ RestrictRecordingData
| bool OVRVelocityTracker.RestrictRecordingData |
|
get |
◆ MusicStart
The documentation for this class was generated from the following file:


This action will unregister the version {{selected?.version}} of the application
{{selected?.name}}{{selected?.type}}.
Are you sure?
This action will make the version {{selected?.version}} as the default version for the application
{{selected?.name}}{{selected?.type}}.
Are you sure?