Dive into secure and efficient coding practices with our curated list of the top 10 examples showcasing 'platform' in functional components in JavaScript. Our advanced machine learning engine meticulously scans each line of code, cross-referencing millions of open source libraries to ensure your implementation is not just functional, but also robust and secure. Elevate your React applications to new heights by mastering the art of handling side effects, API calls, and asynchronous operations with confidence and precision.
eventIri, vocabularies.rdf.type, crmdig.D3_Formal_Derivation
),
Rdf.triple(
eventIri, crmdig.L22_created_derivative, overlayIri
),
// Parameters - param1
Rdf.triple(
eventIri, crmdig.L13_used_parameters, param1
),
Rdf.triple(
param1, vocabularies.rdf.type, crmdig.D1_Digital_Object
),
Rdf.triple(
param1, rso.OverlayImageSource, bottomImage
),
Rdf.triple(
param1, rso.OverlayOrder, Rdf.literal('1')
),
Rdf.triple(
param1, rso.OverlayOpacity, Rdf.literal('' + bottomOpacity)
),
// Parameters - param2
Rdf.triple(
eventIri, crmdig.L13_used_parameters, param2
),
Rdf.triple(
param2, vocabularies.rdf.type, crmdig.D1_Digital_Object
),
Rdf.triple(
param2, rso.OverlayImageSource, topImage
),
Rdf.triple(
// empty IRI will be resolved in LDP later through baseIRI
const baseIri = Rdf.iri('');
/*
* create field, basic information
*/
triples.push(Rdf.triple(baseIri, rdf.type, field.Field ));
label.forEach(lbl => triples.push(Rdf.triple(baseIri, rdfs.label, lbl)));
if (description && description.length > 0) {
triples.push(Rdf.triple(baseIri, rdfs.comment, Rdf.literal(description, xsd._string) ));
}
/*
* adding triples for insert pattern
*/
const bInsert = Rdf.bnode();
triples.push(Rdf.triple(baseIri, field.insert_pattern, bInsert ));
triples.push(Rdf.triple(bInsert, rdf.type, sp.Query ));
triples.push(Rdf.triple(bInsert, sp.text, Rdf.literal(insertPattern, xsd._string) ));
for (const value of domain) {
triples.push(Rdf.triple(baseIri, field.domain, Rdf.iri(value)));
}
if (xsdDatatype) {
triples.push(Rdf.triple(baseIri, field.xsd_datatype, Rdf.iri(xsdDatatype) ));
}
for (const value of range) {
triples.push(Rdf.triple(baseIri, field.range, Rdf.iri(value)));
}
if (min) {
triples.push(Rdf.triple(baseIri, field.min_occurs, Rdf.literal(min, xsd._string) ));
}
if (max) {
triples.push(Rdf.triple(baseIri, field.max_occurs, Rdf.literal(max, xsd._string) ));
}
param1, rso.OverlayOpacity, Rdf.literal('' + bottomOpacity)
),
// Parameters - param2
Rdf.triple(
eventIri, crmdig.L13_used_parameters, param2
),
Rdf.triple(
param2, vocabularies.rdf.type, crmdig.D1_Digital_Object
),
Rdf.triple(
param2, rso.OverlayImageSource, topImage
),
Rdf.triple(
param2, rso.OverlayOrder, Rdf.literal('2')
),
Rdf.triple(
param2, rso.OverlayOpacity, Rdf.literal('' + topOpacity)
),
]);
return resourceGraph;
}
Rdf.graph([
// common typing & labels
Rdf.triple(
overlayIri, vocabularies.rdf.type, rso.Thing
),
Rdf.triple(
overlayIri, vocabularies.rdf.type, rso.EX_Digital_Image
),
Rdf.triple(
overlayIri, vocabularies.rdf.type, crmdig.D9_Data_Object
),
Rdf.triple(
overlayIri, vocabularies.rdfs.label, Rdf.literal(name)
),
Rdf.triple(
overlayIri, rso.displayLabel, Rdf.literal(name)
),
// derivatives info
Rdf.triple(
topImage, crmdig.L21_used_as_derivation_source, eventIri
),
Rdf.triple(
bottomImage, crmdig.L21_used_as_derivation_source, eventIri
),
Rdf.triple(
eventIri, vocabularies.rdf.type, crmdig.D3_Formal_Derivation
),
Rdf.triple(
eventIri, crmdig.L22_created_derivative, overlayIri
),
// Parameters - param1
Rdf.triple(
),
// Parameters - param2
Rdf.triple(
eventIri, crmdig.L13_used_parameters, param2
),
Rdf.triple(
param2, vocabularies.rdf.type, crmdig.D1_Digital_Object
),
Rdf.triple(
param2, rso.OverlayImageSource, topImage
),
Rdf.triple(
param2, rso.OverlayOrder, Rdf.literal('2')
),
Rdf.triple(
param2, rso.OverlayOpacity, Rdf.literal('' + topOpacity)
),
]);
return resourceGraph;
}
private createValue(text: string, language: string): AtomicValue | EmptyValue {
if (text.length === 0) { return FieldValue.empty; }
let datatype = this.props.definition.xsdDatatype || vocabularies.xsd._string;
if (!language && XsdDataTypeValidation.sameXsdDatatype(datatype, vocabularies.rdf.langString)) {
// Replace rdf:langString -> xsd:string if no language specified
datatype = vocabularies.xsd._string;
}
let value: Rdf.Node;
if (language) {
value = Rdf.langLiteral(text, language);
} else if (XsdDataTypeValidation.sameXsdDatatype(datatype, vocabularies.xsd.anyURI)) {
value = Rdf.iri(text);
} else {
value = Rdf.literal(text, datatype);
}
return AtomicValue.set(this.props.value, {value});
}
/**************************************************************************************
* Made for the {N} community by Brad Martin @BradWayneMartin
* https://twitter.com/BradWayneMartin
* https://github.com/bradmartin
* Pull requests are welcome. Enjoy!
*************************************************************************************/
var view = require("ui/core/view");
var platform = require("platform");
var dependencyObservable = require("ui/core/dependency-observable");
var proxy = require("ui/core/proxy");
// on Android we explicitly set propertySettings to None because android will invalidate its layout (skip unnecessary native call).
var AffectsLayout = platform.device.os === platform.platformNames.android ? dependencyObservable.PropertyMetadataSettings.None : dependencyObservable.PropertyMetadataSettings.AffectsLayout;
var Video = (function (_super) {
__extends(Video, _super);
function Video(options) {
_super.call(this, options);
}
Object.defineProperty(Video.prototype, "src", {
get: function () {
return this._getValue(Video.srcProperty);
},
set: function (value) {
this._setValue(Video.srcProperty, value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Video.prototype, "isLoading", {
_this.processToken(token);
if (_this.openvidu.checkSystemRequirements()) {
// Early configuration to deactivate automatic subscription to streams
_this.options = {
sessionId: _this.sessionId,
participantId: token,
metadata: !!metadata ? _this.stringClientMetadata(metadata) : ''
};
_this.connectAux(token).then(function () {
resolve();
})["catch"](function (error) {
reject(error);
});
}
else {
reject(new OpenViduError_1.OpenViduError(OpenViduError_1.OpenViduErrorName.BROWSER_NOT_SUPPORTED, 'Browser ' + platform.name + ' for ' + platform.os.family + ' is not supported in OpenVidu'));
}
});
};
WebRtcStats.prototype.getStatsAgnostic = function (pc, successCb, failureCb) {
var _this = this;
if (platform.name.indexOf('Firefox') !== -1) {
// getStats takes args in different order in Chrome and Firefox
return pc.getStats(null).then(function (response) {
var report = _this.standardizeReport(response);
successCb(report);
})["catch"](failureCb);
}
else if ((platform.name.indexOf('Chrome') !== -1) || (platform.name.indexOf('Opera') !== -1)) {
// In Chrome, the first two arguments are reversed
return pc.getStats(function (response) {
var report = _this.standardizeReport(response);
successCb(report);
}, null, failureCb);
}
};
return WebRtcStats;
_checkAudioContextStaleness() {
if (this._audioContext.state === `running`) {
if (this._suspensionTimerStartedTime !== -1 &&
performance.now() - this._suspensionTimerStartedTime > this._suspensionTimeoutMs) {
this._suspensionTimerStartedTime = -1;
this._resetAudioContext();
}
return;
}
// Reset AudioContext as it's probably ruined despite of suspension efforts.
if (!this._currentStateModificationAction) {
this._resetAudioContext();
} else if (this._currentStateModificationAction.type === `suspend`) {
this._currentStateModificationAction = null;
this._resetAudioContext();
}
}