_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 52 373k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q57300 | train | function (element, start, end) {
if ("selectionStart" in element) {
element.selectionStart = start;
element.selectionEnd = end;
} else {
var document = Aria.$window.document;
if (document.selection) {
var range =... | javascript | {
"resource": ""
} | |
q57301 | train | function (element) {
var start = 0;
var end = (element.value.length) ? element.value.length : 0;
if (end) {
this.setPosition(element, start, end);
}
} | javascript | {
"resource": ""
} | |
q57302 | train | function () {
if (!this.eventsAlreadyAttached) {
this.body = Aria.$window.document.body;
var map = this._getInitialListenersList();
for (var i = 0; i < map.length; i++) {
this._addListener(map[i].evt, map[i].cb);
}
... | javascript | {
"resource": ""
} | |
q57303 | train | function () {
var map = this._getInitialListenersList();
for (var i = 0; i < map.length; i++) {
this._removeListener(map[i].evt, map[i].cb);
}
this.eventsAlreadyAttached = false;
} | javascript | {
"resource": ""
} | |
q57304 | train | function () {
var map = this._getAdditionalListenersList();
for (var i = 0; i < map.length; i++) {
this._addListener(map[i].evt, map[i].cb);
}
} | javascript | {
"resource": ""
} | |
q57305 | train | function () {
var map = this._getAdditionalListenersList();
for (var i = 0; i < map.length; i++) {
this._removeListener(map[i].evt, map[i].cb);
}
} | javascript | {
"resource": ""
} | |
q57306 | train | function (event, name, extraData) {
var target = (event.target) ? event.target : event.srcElement;
var fakeEvent = aria.DomEvent.getFakeEvent(name, target);
if (!event.returnValue) {
fakeEvent.preventDefault();
}
if (event.cancelBubble) {
... | javascript | {
"resource": ""
} | |
q57307 | train | function (ioRes) {
var downloadFailed = (ioRes.status != '200');
if (downloadFailed) {
this.$logError(this.DESCRIPTOR_NOT_LOADED, this._customizationDescriptor);
} else {
var resJson = ariaUtilsJson.load(ioRes.responseText);
if (resJson... | javascript | {
"resource": ""
} | |
q57308 | train | function () {
this._isCustomized = (this._customizationDescriptor ? true : false);
if (this._isCustomized) {
this._descriptorLoaded = false;
if (ariaUtilsType.isString(this._customizationDescriptor)) {
ariaCoreIO.asyncRequest({
... | javascript | {
"resource": ""
} | |
q57309 | train | function (originalCP) {
var newCP = originalCP;
if (this._isCustomized) {
if (this._customizations.flows[originalCP] != null) {
newCP = this._customizations.flows[originalCP];
}
}
return newCP;
} | javascript | {
"resource": ""
} | |
q57310 | train | function (originalCP) {
var newCP = originalCP;
if (this._isCustomized) {
if (this._customizations.templates[originalCP] != null) {
newCP = this._customizations.templates[originalCP];
}
}
return newCP;
} | javascript | {
"resource": ""
} | |
q57311 | getSott | train | function getSott(callback, config, startDate, endDate ) {
var cipher = require('./sdk/sott')(config.apisecret, config.apikey, startDate, endDate);
cipher.then(
function(sott) {
return callback(sott);
},
function(reason) {
console.log(reason);
});
} | javascript | {
"resource": ""
} |
q57312 | train | function () {
this.cleanCache();
var mapping = this.__delegateMapping;
if (mapping) {
for (var id in mapping) {
if (mapping.hasOwnProperty(id)) {
this.remove(id);
}
}
va... | javascript | {
"resource": ""
} | |
q57313 | train | function (handler) {
this.cleanCache();
// initialization of delegation manager
if (!this.__delegateMapping) {
ariaUtilsAriaWindow.attachWindow();
var body = Aria.$window.document.body;
this.rootListener = ariaCoreBrowser.isOldIE ? bo... | javascript | {
"resource": ""
} | |
q57314 | train | function (domElt, id) {
domElt.setAttribute(this.delegateExpando, id);
// for iOS, refer to method getMarkup
if (ariaCoreBrowser.isIOS) {
if (domElt.onclick == null) {
domElt.onclick = Aria.empty;
}
}
} | javascript | {
"resource": ""
} | |
q57315 | train | function (eventName, delegateId, wrapTarget) {
if (ariaCoreBrowser.isOldIE) {
this.getFallbackMarkup = function (eventName, delegateId, wrapTarget) {
wrapTarget = wrapTarget ? "true" : "false";
return " on" + eventName + "=\"aria.utils.Delegate.directC... | javascript | {
"resource": ""
} | |
q57316 | train | function (event, templatesWrapper) {
if (event.$DomEvent) {
// It's already wrapped
return event;
} else {
return templatesWrapper ? new aria.templates.DomEventWrapper(event) : new ariaDomEvent(event);
}
} | javascript | {
"resource": ""
} | |
q57317 | train | function (event, delegateId, wrapTarget, container) {
this.$assert(286, this.__delegateMapping);
var eventWrapper = this.__wrapEvent(event, wrapTarget), result;
var callback = this.__delegateMapping[delegateId];
if (callback) {
result = callback.call(event... | javascript | {
"resource": ""
} | |
q57318 | train | function (id) {
this.cleanCache();
// store id to identify changes during callback execution
if (this._changed) {
this._changed[id] = true;
}
if (this.__delegateMapping) {
this.__delegateMapping[id].$dispose();
... | javascript | {
"resource": ""
} | |
q57319 | train | function () {
if (this.__stackCache) {
for (var key in this.__stackCache) {
if (this.__stackCache.hasOwnProperty(key)) {
var stack = this.__stackCache[key];
// break dom reference
for (var i = 0, l = ... | javascript | {
"resource": ""
} | |
q57320 | train | function (label) {
var report = new aria.widgets.controllers.reports.DropDownControllerReport();
var newSuggestions = ariaUtilsJson.copy(this.selectedSuggestions, false);
var indexToRemove = this._findSuggestion(newSuggestions, {
label : label
... | javascript | {
"resource": ""
} | |
q57321 | train | function (value, removedSuggestionIndex) {
var dataModel = this._dataModel;
this._editedSuggestionIndex = removedSuggestionIndex;
var report = new aria.widgets.controllers.reports.DropDownControllerReport();
dataModel.value = value;
dataMod... | javascript | {
"resource": ""
} | |
q57322 | train | function (selectedValues) {
var selectedValuesCopy = ariaUtilsJson.copy(selectedValues, false);
var selectedSuggestionsCopy = ariaUtilsJson.copy(this.selectedSuggestions, false);
for (var i = 0, l = selectedSuggestionsCopy.length; i < l; i++) {
var cur... | javascript | {
"resource": ""
} | |
q57323 | train | function (value) {
var report = new aria.widgets.controllers.reports.DropDownControllerReport(), dataModel = this._dataModel;
if (value == null) {
dataModel.text = (this._pendingRequestNb > 0 && dataModel.text) ? dataModel.text : "";
dataModel.val... | javascript | {
"resource": ""
} | |
q57324 | train | function (value) {
if (typeUtil.isString(value) || value == null) {
return new aria.widgets.controllers.reports.DropDownControllerReport();
} else {
var report = new aria.widgets.controllers.reports.DropDownControllerReport();
v... | javascript | {
"resource": ""
} | |
q57325 | train | function (suggestionToBeAdded) {
var allSuggestions = ariaUtilsJson.copy(this.selectedSuggestions, false);
var res = [];
var maxOptions = this.maxOptions;
var length = suggestionToBeAdded.length;
if (maxOptions && allSuggestions.length + le... | javascript | {
"resource": ""
} | |
q57326 | train | function (suggestions) {
var selectedSuggestions = this.selectedSuggestions;
var filteredSuggestions = [];
for (var i = 0; i < suggestions.length; i++) {
var curSuggestion = suggestions[i];
if (this._findSuggestion(selectedSuggestio... | javascript | {
"resource": ""
} | |
q57327 | train | function (suggestionsList, suggestion) {
for (var i = 0, l = suggestionsList.length; i < l; i++) {
if (suggestion.label == suggestionsList[i].label) {
return i;
}
}
return -1;
} | javascript | {
"resource": ""
} | |
q57328 | train | function (arrayOfSuggestions, beanName) {
for (var k = 0, l = arrayOfSuggestions.length; k < l; k++) {
var currentSuggestion = arrayOfSuggestions[k];
if (!typeUtil.isString(currentSuggestion)
&& !ariaCoreJsonValidator.check(currentSugge... | javascript | {
"resource": ""
} | |
q57329 | train | function (logError) {
var handle = this.handle;
var cursor = this.cursor;
var element;
if (!handle) {
element = this.getElement(logError);
} else {
var typeUtils = ariaUtilsType;
... | javascript | {
"resource": ""
} | |
q57330 | train | function (logError) {
var element = this.element;
if (!element) {
element = ariaUtilsDom.getElementById(this.id);
if (!element) {
if (logError === true) {
this.$logError(this.INVALID_ATTRIBUTE, [... | javascript | {
"resource": ""
} | |
q57331 | train | function (element) {
var position = ariaUtilsDom.getOffset(element);
this._elementInitialPosition = position;
var style = element.style;
style.position = "absolute";
style.left = position.left + "px";
style.top = position.t... | javascript | {
"resource": ""
} | |
q57332 | train | function (create) {
var proxy = this.proxy;
if (proxy) {
return proxy.overlay;
}
var params = this.params, config = params.proxy;
if (config) {
var classpath = "aria.utils.overlay." + config.type;
... | javascript | {
"resource": ""
} | |
q57333 | train | function (coord) {
this.posX = coord.x;
this.posY = coord.y;
this._mouseInitialPosition = {
left : coord.x,
top : coord.y
};
var element = this.getElement(true), domUtil = ariaUtilsDom;
... | javascript | {
"resource": ""
} | |
q57334 | train | function (evt) {
var movable = this.getMovable();
var domUtil = ariaUtilsDom;
if (movable && movable.style) {
var geometry = ariaUtilsJson.copy(this._movableGeometry);
var mouseInitPos = this._mouseInitialPosition;
... | javascript | {
"resource": ""
} | |
q57335 | train | function () {
var element = this.getElement();
// This is to handle if there is a scroll
element.onselectstart = Aria.returnTrue;
if (this.overlay) {
// remove overlay here
this.overlay.$dispose();
... | javascript | {
"resource": ""
} | |
q57336 | train | function () {
var constrainTo = this.params.constrainTo, domUtil = ariaUtilsDom;
if (!constrainTo || constrainTo === domUtil.VIEWPORT) {
this._boundary = constrainTo;
return;
}
if (ariaUtilsType.isString(constrainTo)... | javascript | {
"resource": ""
} | |
q57337 | train | function (cfg) {
var jsonValidator = ariaCoreJsonValidator;
this._cfgOk = jsonValidator.validateCfg("aria.html.beans.TemplateCfg.Properties", cfg);
if (this._needCreatingModuleCtrl) {
this._cfgOk = this._cfgOk
&& jsonValidator.validateCfg("aria.templa... | javascript | {
"resource": ""
} | |
q57338 | train | function (widgetName, includeLoaded) {
var classpath = this.widgets[widgetName];
if (classpath == null) {
return null;
}
if (includeLoaded || Aria.getClassRef(classpath) == null) {
return [classpath];
}
return [];
... | javascript | {
"resource": ""
} | |
q57339 | train | function (widgetName, out, cfg, lineNbr) {
var classpath = this.widgets[widgetName];
try {
if (classpath) {
// default object if cfg was null
if (!cfg) {
cfg = {};
}
var widget... | javascript | {
"resource": ""
} | |
q57340 | train | function (baseType, args) {
jv._logError(jv.INVALID_TYPE_VALUE, [baseType.typeName, args.beanDef[jv._MD_TYPENAME], args.value, args.path]);
} | javascript | {
"resource": ""
} | |
q57341 | train | function (parentType, childType) {
if (!jv._options.checkInheritance) {
return true;
}
var typeRef = childType;
while (!typeRef[jv._MD_BUILTIN]) {
if (parentType == typeRef) {
return true;
}
typeRef = typeRef[jv._MD_PARENTDE... | javascript | {
"resource": ""
} | |
q57342 | train | function (beanDef, beanName, packageDef) {
var contentType = beanDef.$contentType;
var parentContentType = null;
var parent = beanDef[jv._MD_PARENTDEF];
if (!parent[jv._MD_BUILTIN]) {
parentContentType = parent.$contentType;
if (contentType == null) {
... | javascript | {
"resource": ""
} | |
q57343 | train | function (beanDef, beanName, packageDef) {
var keyType = beanDef.$keyType;
var parentKeyType = null;
var parent = beanDef[jv._MD_PARENTDEF];
if (!parent[jv._MD_BUILTIN]) {
parentKeyType = parent.$keyType;
if (keyType == null) {
beanDef.$keyType = p... | javascript | {
"resource": ""
} | |
q57344 | train | function (args) {
if (typeof(args.value) != 'string') {
return __badTypeError(this, args); // this refers to the correct object (a base type)
}
var beanDef = args.beanDef;
while (!beanDef[jv._MD_BUILTIN]) {
var regexp = beanDef.$regExp;
if (regexp != n... | javascript | {
"resource": ""
} | |
q57345 | train | function (beanDef) {
var parent = beanDef[jv._MD_PARENTDEF];
if (typeof(parent.$minValue) != "undefined") {
if (typeof(beanDef.$minValue) == "undefined") {
beanDef.$minValue = parent.$minValue;
} else if (beanDef.$minValue < parent.$minValue) {
jv.... | javascript | {
"resource": ""
} | |
q57346 | train | function (args) {
var v = args.value;
var beanDef = args.beanDef;
if (typeof(v) != 'number') {
return __badTypeError(this, args);
}
if (typeof(beanDef.$minValue) != "undefined" && v < beanDef.$minValue) {
return jv._logError(jv.NUMBER_RANGE, [args.value, a... | javascript | {
"resource": ""
} | |
q57347 | train | function (args, cb) {
this.bridge = args.bridge;
// add bridge to submodules init parameters
for (var i = 0, l = this.subModulesList.length; i < l; i++) {
if (!this.subModulesList[i].initArgs) {
this.subModulesList[i].initArgs = {};
... | javascript | {
"resource": ""
} | |
q57348 | train | function (options, textFieldValue) {
var selectedOptions = [];
var trim = ariaUtilsString.trim;
var inSplit = textFieldValue.split(this._separator);
if (inSplit) {
for (var i = 0, inSplitLen = aria.utils.Math.min(inSplit.length, this._maxOptions); i < in... | javascript | {
"resource": ""
} | |
q57349 | train | function (selectedValues) {
var toDisplay = this._fieldDisplay, options = this._dataModel.listContent;
var backUp = (this._fieldDisplay == 'value') ? 'label' : 'value';
var display = [], option;
for (var i = 0, l = selectedValues.length; i < l; i++) {
opt... | javascript | {
"resource": ""
} | |
q57350 | train | function (value) {
var report = new ariaWidgetsControllersReportsDropDownControllerReport();
var dataModel = this._dataModel;
if (value === null) {
report.ok = true;
dataModel.value = null;
dataModel.text = '';
} else {
... | javascript | {
"resource": ""
} | |
q57351 | train | function (str) {
var dataModel = this._dataModel, options = dataModel.listContent, selectedValues;
// retrieve selection from string
selectedValues = this._parseInputString(options, str);
if (!ariaUtilsJson.equals(selectedValues, dataModel.value)) {
ar... | javascript | {
"resource": ""
} | |
q57352 | train | function () {
var options = this._dataModel.listContent, value;
for (var i = 0, len = options.length; i < len; i++) {
value = options[i].value + "";
if (value.indexOf(this._separator) != -1) {
this.$logError(this.INVALID_MULTISELECT_CONTENT);
... | javascript | {
"resource": ""
} | |
q57353 | train | function (text, value) {
var cachedValue = this._cacheValues[text];
if (cachedValue) {
return cachedValue;
}
this._cacheValues[text] = value;
return value;
} | javascript | {
"resource": ""
} | |
q57354 | train | function (firstStart) {
this._startTime = (firstStart) ? Aria._start : new Date();
if (firstStart) {
this._logs = [{
classpath : "Aria",
msg : "Framework initialization",
start : Aria._start
... | javascript | {
"resource": ""
} | |
q57355 | train | function () {
this._logsPerClasspath = {};
var i, j, iLog, jLog, max, end;
max = 0;
for (i = 0; i < this._nbLogs; i++) {
iLog = this._logs[i];
if (iLog.start && !("length" in iLog)) {
for (j = i + 1; j < this._nbLogs; j+... | javascript | {
"resource": ""
} | |
q57356 | train | function (div) {
if (this._displayDiv != null) {
return;
}
this.process();
var document = Aria.$window.document;
this._displayDiv = document.createElement('div');
this._displayDiv.style.cssText = "position:absolute;top:0px;left:0... | javascript | {
"resource": ""
} | |
q57357 | train | function () {
this._displayDiv.innerHTML = '';
if (this._displayDiv != null) {
aria.utils.Dom.removeElement(this._displayDiv);
}
this._displayDiv = null;
} | javascript | {
"resource": ""
} | |
q57358 | train | function (classpath, msg) {
this._logs[this._nbLogs++] = {
classpath : classpath,
msg : msg,
timestamp : (new Date()).getTime()
};
} | javascript | {
"resource": ""
} | |
q57359 | train | function (classpath, msg) {
this._logs[this._nbLogs++] = {
classpath : classpath,
msg : msg,
id : this._ids,
start : (new Date()).getTime()
};
return this._ids++;
} | javascript | {
"resource": ""
} | |
q57360 | train | function (classpath, id) {
this._logs[this._nbLogs++] = {
classpath : classpath,
id : id,
stop : (new Date()).getTime()
};
} | javascript | {
"resource": ""
} | |
q57361 | train | function (name, step) {
if (this._counters.hasOwnProperty(name)) {
this._counters[name] += (step || 1);
} else {
this._counters[name] = (step || 1);
}
} | javascript | {
"resource": ""
} | |
q57362 | train | function (name, reason) {
if (!this._counters[name]) {
return;
}
if (!this._counterSplits[name]) {
this._counterSplits[name] = [];
}
this._counterSplits[name].push({
value : this._counters[name],
... | javascript | {
"resource": ""
} | |
q57363 | train | function (name, reason) {
if (!this._counterSplits[name]) {
return 0;
}
var total = 0;
for (var i = 0, len = this._counterSplits[name].length; i < len; i += 1) {
total += this._counterSplits[name][i].value;
}
retur... | javascript | {
"resource": ""
} | |
q57364 | train | function (str) {
var xmlDoc;
var DOMParser = Aria.$global.DOMParser;
if (DOMParser) {
var parser = new DOMParser();
xmlDoc = parser.parseFromString(str, "text/xml");
} else { // Internet Explorer
var ActiveXObject = Aria.$gl... | javascript | {
"resource": ""
} | |
q57365 | train | function (xmlNode) {
if (!xmlNode) {
return;
}
var node = {};
for (var i = 0; i < xmlNode.childNodes.length; i++) {
var currNode = xmlNode.childNodes[i];
// if it's a text node or a CDATA section use the nodeValue directly
... | javascript | {
"resource": ""
} | |
q57366 | train | function (element, overlayId, options) {
// ------------------------------------------ input arguments processing
if (options == null) {
options = {};
}
if (ariaUtilsType.isString(options)) {
options = {message: options};
}
var waiAria = options... | javascript | {
"resource": ""
} | |
q57367 | train | function (attributes) {
var result = [], whiteList = ariaTemplatesDomElementWrapper.attributesWhiteList;
var jsonUtils = ariaUtilsJson;
/*
* This assumes that white list is performed by config validation, but this is only available in debug mode :
* FIXME!
... | javascript | {
"resource": ""
} | |
q57368 | train | function (form) {
var elements = form.elements, params = [], element, name, value;
for (var i = 0, len = elements.length; i < len; i++) {
element = elements[i];
if (this._isSerializable(element)) {
name = encodeURIComponent(element.name);
... | javascript | {
"resource": ""
} | |
q57369 | train | function (element) {
var submittable = /^(?:input|select|textarea|keygen)/i;
var submitterTypes = /^(?:submit|button|image|reset|file)$/i;
var type = element.type;
var checkableTypes = /^(?:checkbox|radio)$/i;
return element.name && !element.disabled && submi... | javascript | {
"resource": ""
} | |
q57370 | train | function (domElement, dataset, remove) {
var fullKey, stringUtil = ariaUtilsString;
for (var dataKey in dataset) {
if (dataset.hasOwnProperty(dataKey) && !ariaUtilsJson.isMetadata(dataKey)) {
if (this.datasetRegex.test(dataKey)) {
fullK... | javascript | {
"resource": ""
} | |
q57371 | train | function () {
if (this._simpleHTML) {
return this._skinObj.states[this._state].color;
}
if (this._isIE7OrLess) {
// As "inherit" does not work in this case in IE7, we are obliged to read the property from
// the frame state and apply it... | javascript | {
"resource": ""
} | |
q57372 | train | function () {
var cfg = this._cfg;
// invalid text and value shouldn't be set at the same time
var text = cfg.invalidText || "";
if (text && cfg.value) {
// There's both a value and an invalid text, prefer the value
this.setProperty("inva... | javascript | {
"resource": ""
} | |
q57373 | train | function (value) {
if (value == null) {
value = this._getText();
}
// _getText only handles valid / invalid values and prefills, not the helptext
if (!value && !this._isPassword) {
// We don't want to handle helptext in password fields, fi... | javascript | {
"resource": ""
} | |
q57374 | train | function (event) {
if (this._keepFocus || this._hasFocus) {
this._reactToControllerReport(event.report, event.arg);
} else if (event.report) {
event.report.$dispose();
}
} | javascript | {
"resource": ""
} | |
q57375 | train | function (report, arg) {
var hasChange = false, cfg = this._cfg;
if (report) {
var resetErrorIfOK = true;
var hasFocus = this._hasFocus;
var stopValueProp = false;
var delayedValidation = false;
if (arg) {
... | javascript | {
"resource": ""
} | |
q57376 | train | function (event) {
if (this._cfg.validationDelay) {
if (this._valTimer) {
ariaCoreTimer.cancelCallback(this._valTimer);
}
this._valTimer = ariaCoreTimer.addCallback({
fn : this.checkValue,
scope : th... | javascript | {
"resource": ""
} | |
q57377 | train | function (domEvent) {
if (!!this._cfg.onclick) {
var domEvtWrapper;
if (domEvent) {
domEvtWrapper = new ariaTemplatesDomEventWrapper(domEvent);
}
this.evalCallback(this._cfg.onclick, domEvtWrapper);
if (domEv... | javascript | {
"resource": ""
} | |
q57378 | train | function (event, avoidCallback) {
this._hasFocus = true;
if (!this._keepFocus) {
var cfg = this._cfg;
if (cfg.readOnly) {
return;
}
this.setHelpText(false);
if (this._isPrefilled) {
... | javascript | {
"resource": ""
} | |
q57379 | train | function (event, avoidCallback) {
if (!this._hasFocus) {
return;
}
if (!this._keepFocus) {
var cfg = this._cfg; // , htc = this._skinObj.helpText;
this._hasFocus = false;
// reinitialize for next time (autoselect feature... | javascript | {
"resource": ""
} | |
q57380 | train | function (enable) {
var cfg = this._cfg;
// check for disposal
if (!cfg) {
return;
}
var helpText = cfg.helptext, helpTextConfig = this._skinObj.helpText;
// stops if no helptext, or trying to disable an helptext that as
... | javascript | {
"resource": ""
} | |
q57381 | train | function (enable, value, updateState) {
var cfg = this._cfg, prefillText;
// check for disposal
if (!cfg) {
return;
}
var field = this.getTextInputField();
if (enable) {
if (!field || (field.value && !this._helpTextS... | javascript | {
"resource": ""
} | |
q57382 | train | function (idArray, fromSelf) {
if (this._cfg.disabled) {
return false;
}
var textInputField = this.getTextInputField();
textInputField.focus();
// IE FIX: requires the value to be reset for the cursor to be positioned
// and focused... | javascript | {
"resource": ""
} | |
q57383 | train | function () {
// this._cfg can be null due to the following execution chain: native focus -> native blur -> AutoComplete
// bound value update in the data model -> bindRefreshTo section refresh
if (this._firstFocus && this._cfg && this._cfg.autoselect) {
// this allow... | javascript | {
"resource": ""
} | |
q57384 | train | function (processStatement, processErrors) {
/**
* Callback used to process a single statement in the content
* @type aria.core.CfgBeans:Callback
* @protected
*/
this._processStatement = processStatement;
/**
* Callback used to process errors
... | javascript | {
"resource": ""
} | |
q57385 | train | function (dependencies, extension) {
if (dependencies) {
for (var i = dependencies.length - 1; i >= 0; i--) {
this.addDependency(dependencies[i], extension);
}
}
} | javascript | {
"resource": ""
} | |
q57386 | train | function (macroName) {
var res = this.macros[macroName];
if (res == null) {
res = {};
this.macros[macroName] = res;
}
return res;
} | javascript | {
"resource": ""
} | |
q57387 | train | function (viewBaseName) {
var res = this.views[viewBaseName];
if (res == null) {
res = {
baseName: viewBaseName
};
this.views[viewBaseName] = res;
}
return res;
} | javascript | {
"resource": ""
} | |
q57388 | train | function (statement, msgId, msgArgs) {
if (this._processErrors) {
this.errors = true;
this._processErrors.fn.call(this._processErrors.scope, statement, msgId, msgArgs, this.errorContext);
} else {
if (!msgArgs) {
msgArgs = [];
... | javascript | {
"resource": ""
} | |
q57389 | train | function () {
var out = this._curblock.out;
if (this._curindent) {
out.push(this._curindent);
}
out.push.apply(out, arguments);
out.push('\n');
} | javascript | {
"resource": ""
} | |
q57390 | train | function (exprStr, statement, errorMsg) {
var container = this.newVarName();
// stringify the expression for the eval
exprStr = this.stringify(exprStr);
this.writeln("var " + container + " = null;");
this.writeln("try {");
this.increaseIndent();
... | javascript | {
"resource": ""
} | |
q57391 | train | function () {
this.parseOnly = true;
// disables functions which are only useful to generate code:
var empty = Aria.empty;
this.writeDependencies = empty;
this.newVarName = empty;
this.writeln = empty;
this.write = empty;
th... | javascript | {
"resource": ""
} | |
q57392 | train | function (string) {
var params = Array.prototype.slice.call(arguments, 1);
params = ariaUtilsArray.flattenDeep(params);
string = string.replace(/%[0-9]+/g, function (token) {
var replacement = params[parseInt(token.substring(1), 10) - 1];
return typeo... | javascript | {
"resource": ""
} | |
q57393 | train | function (str, index) {
var res = false;
for (var i = index - 1; i >= 0; i--) {
if (str.charAt(i) == "\\") {
res = !res;
} else {
return res;
}
}
return res;
} | javascript | {
"resource": ""
} | |
q57394 | train | function (str, findChar, start) {
var index = str.indexOf(findChar, start);
while (index != -1) {
if (!this.isEscaped(str, index)) {
return index;
}
// continue search after escaped character
index = str.indexOf(... | javascript | {
"resource": ""
} | |
q57395 | train | function (str, options, infos) {
// -------------------------------------- input arguments processing
// options ---------------------------------------------------------
if (options == null) {
options = true;
}
if (!ariaUtilsType.isObject(o... | javascript | {
"resource": ""
} | |
q57396 | train | function (str, start, end, regexp) {
var currentCharPos = start, whiteRegexp = regexp || /\s/, currentChar;
while (currentCharPos < end) {
currentChar = str.charAt(currentCharPos);
if (whiteRegexp.test(currentChar)) {
return currentCharPos;
... | javascript | {
"resource": ""
} | |
q57397 | train | function (string, size, character, begin) {
string = "" + string;
var length = string.length;
if (length < size) {
var padding = [];
for (var difference = size - length; difference > 0; difference -= 1) {
padding.push(character);
... | javascript | {
"resource": ""
} | |
q57398 | train | function (string, size, character, begin) {
var start, length;
if (begin === true) {
for (start = 0, length = string.length - size; start < length; start += 1) {
if (string.charAt(start) !== character) {
break;
}
... | javascript | {
"resource": ""
} | |
q57399 | train | function (number, patternString, formatSymbols) {
formatSymbols = this._normalizeSymbols(formatSymbols);
var patternDescription = this._explode(patternString);
if (!patternDescription) {
return this.$logError(this.INVALID_FORMAT, ["formatCurrency", this.CURRENCY_BEAN... | javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.