_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 52 373k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q30300 | train | function() {
inputEx.Form.superclass.disable.call(this);
for (var i = 0 ; i < this.buttons.length ; i++) {
this.buttons[i].disable();
}
} | javascript | {
"resource": ""
} | |
q30301 | train | function(parentEl) {
this.appendSeparator(0);
if(!this.options.fields) {return;}
var i, n=this.options.fields.length, f, field, fieldEl,t;
for(i = 0 ; i < n ; i++) {
f = this.options.fields[i];
if (this.options.required) {f.required = true;}
field = this.renderF... | javascript | {
"resource": ""
} | |
q30302 | train | function(fieldOptions) {
// Subfields should inherit required property
if (this.options.required) {
fieldOptions.required = true;
}
return inputEx.CombineField.superclass.renderField.call(this, fieldOptions);
} | javascript | {
"resource": ""
} | |
q30303 | train | function(i) {
if(this.options.separators && this.options.separators[i]) {
var sep = inputEx.cn('div', {className: 'inputEx-CombineField-separator'}, null, this.options.separators[i]);
this.divEl.appendChild(sep);
}
} | javascript | {
"resource": ""
} | |
q30304 | train | function(options) {
inputEx.AutoComplete.superclass.setOptions.call(this, options);
// Overwrite options
this.options.className = options.className ? options.className : 'inputEx-Field inputEx-AutoComplete';
// Added options
this.options.datasource = options.datasource;
thi... | javascript | {
"resource": ""
} | |
q30305 | train | function() {
// This element wraps the input node in a float: none div
this.wrapEl = inputEx.cn('div', {className: 'inputEx-StringField-wrapper'});
// Attributes of the input field
var attributes = {
type: 'text',
id: YAHOO.util.Dom.generateId()
};
if(thi... | javascript | {
"resource": ""
} | |
q30306 | train | function() {
// Call this function only when this.el AND this.listEl are available
if(!this._nElementsReady) { this._nElementsReady = 0; }
this._nElementsReady++;
if(this._nElementsReady != 2) return;
if(!lang.isUndefined(this.options.datasourceParameters))
{
for (param in ... | javascript | {
"resource": ""
} | |
q30307 | train | function(e) {
this.setClassFromState();
// Clear the field when no value
if (this.hiddenEl.value != this.el.value) this.hiddenEl.value = this.el.value;
lang.later(50, this, function() {
if(this.el.value == "") {
this.setValue("");
}
});
} | javascript | {
"resource": ""
} | |
q30308 | train | function(options) {
inputEx.ColorField.superclass.setOptions.call(this, options);
// Overwrite options
this.options.className = options.className ? options.className : 'inputEx-Field inputEx-ColorField inputEx-PickerField';
// Added options
this.options.palette = options.palette;
this.... | javascript | {
"resource": ""
} | |
q30309 | train | function() {
var grid, eventDelegation, square, i;
// remember squares
this.squares = [];
// container
grid = inputEx.cn('div', {className: 'inputEx-ColorField-Grid'});
// Is event delegation available ?
// (YAHOO.util.Event.delegate method is in "event-delegate" YUI-module)... | javascript | {
"resource": ""
} | |
q30310 | train | function(e,square,container) {
// Stop the event to prevent a selection
Event.stopEvent(e);
// Overlay closure
this.oOverlay.hide();
// SetValue
var color = Dom.getStyle(square,'background-color');
var hexaColor = inputEx.ColorField.ensureHexa(color);
this.setValue(hexaColor... | javascript | {
"resource": ""
} | |
q30311 | train | function(options) {
inputEx.DateField.superclass.setOptions.call(this, options);
// Overwrite options
this.options.className = options.className ? options.className : 'inputEx-Field inputEx-DateField';
this.options.messages.invalid = inputEx.messages.invalidDate ? inputEx.messages.invalidDate : "In... | javascript | {
"resource": ""
} | |
q30312 | train | function() {
var value = this.el.value;
var separator = this.options.dateFormat.match(/[^Ymd ]/g)[0];
var ladate = value.split(separator);
if( ladate.length != 3) { return false; }
if ( isNaN(parseInt(ladate[0],10)) || isNaN(parseInt(ladate[1],10)) || isNaN(parseInt(ladate[2],10))) { return false; }... | javascript | {
"resource": ""
} | |
q30313 | train | function(val, sendUpdatedEvt) {
// Don't try to parse a date if there is no date
if( val === '' ) {
inputEx.DateField.superclass.setValue.call(this, '', sendUpdatedEvt);
return;
}
var str = "";
if (val instanceof Date) {
str = inputEx.DateField.formatDate(val, this.options.dateFor... | javascript | {
"resource": ""
} | |
q30314 | train | function(forceDate) {
// let parent class function check if typeInvite, etc...
var value = inputEx.DateField.superclass.getValue.call(this);
// Hack to validate if field not required and empty
if (value === '') { return '';}
var finalDate = inputEx.DateField.parseWithFormat(value,this.options.dateF... | javascript | {
"resource": ""
} | |
q30315 | train | function(value, sendUpdatedEvt) {
var values = [];
// !value catches "" (empty field), and invalid dates
if(!value || !lang.isFunction(value.getTime) || !lang.isNumber(value.getTime()) ) {
values[this.monthIndex] = "";
values[this.yearIndex] = "";
values[this.dayIndex... | javascript | {
"resource": ""
} | |
q30316 | train | function(options) {
inputEx.DatePickerField.superclass.setOptions.call(this, options);
// Overwrite default options
this.options.className = options.className ? options.className : 'inputEx-Field inputEx-DateField inputEx-PickerField inputEx-DatePickerField';
this.options.readonly = YAHO... | javascript | {
"resource": ""
} | |
q30317 | train | function() {
inputEx.DatePickerField.superclass.renderComponent.call(this);
// Create overlay
this.oOverlay = new YAHOO.widget.Overlay(Dom.generateId(), { visible: false });
this.oOverlay.setBody(" ");
this.oOverlay.body.id = Dom.generateId();
// Create bu... | javascript | {
"resource": ""
} | |
q30318 | train | function() {
// if already rendered, ignore call
if (!!this.calendarRendered) return;
// Render the calendar
var calendarId = Dom.generateId();
this.calendar = new YAHOO.widget.Calendar(calendarId,this.oOverlay.body.id, this.options.calendar );
/*
this.cale... | javascript | {
"resource": ""
} | |
q30319 | train | function(e) {
var date = this.getValue(true);
if (!!this.calendar) {
if(!!date) {
// HACK: don't fire Field updatedEvt when selecting date
this.ignoreBeforeShowOverlayCall = true;
// select the previous date in calendar
this.calendar.select(date);
t... | javascript | {
"resource": ""
} | |
q30320 | train | function() {
this.type = inputEx.HiddenField;
this.divEl = inputEx.cn('div', null, {display: 'none'});
this.el = inputEx.cn('input', {type: 'hidden'});
this.rawValue = ''; // initialize the rawValue with '' (default value of a hidden field)
if(this.options.name) this.el.name = this.options.... | javascript | {
"resource": ""
} | |
q30321 | train | function(options) {
inputEx.IntegerField.superclass.setOptions.call(this, options);
this.options.negative = lang.isUndefined(options.negative) ? false : options.negative;
this.options.min = lang.isUndefined(options.min) ? (this.options.negative ? -Infinity : 0) : parseInt(options.min,10);
... | javascript | {
"resource": ""
} | |
q30322 | train | function() {
var v = this.getValue(), str_value = inputEx.IntegerField.superclass.getValue.call(this);
// empty field
if (v === '') {
// validate only if not required
return !this.options.required;
}
if (isNaN(v)) {
return false;
}
... | javascript | {
"resource": ""
} | |
q30323 | train | function(value) {
// Render the subField
var subFieldEl = this.renderSubField(value);
if(this.options.name) {
subFieldEl.setFieldName(this.options.name+"["+this.subFields.length+"]");
}
// Adds it to the local list
this.subFields.push(subFieldEl);
return subFieldEl;
} | javascript | {
"resource": ""
} | |
q30324 | train | function(e) {
var childElement = Event.getTarget(e).parentNode;
var previousChildNode = null;
var nodeIndex = -1;
for(var i = 1 ; i < childElement.parentNode.childNodes.length ; i++) {
var el=childElement.parentNode.childNodes[i];
if(el == childElement) {
previousChildNode =... | javascript | {
"resource": ""
} | |
q30325 | train | function(e) {
Event.stopEvent(e);
// Prevent removing a field if already at minItems
if( lang.isNumber(this.options.minItems) && this.subFields.length <= this.options.minItems ) {
return;
}
// Get the wrapping div element
var elementDiv = Event.getTarget(e).parentNode... | javascript | {
"resource": ""
} | |
q30326 | train | function(options) {
inputEx.NumberField.superclass.setOptions.call(this, options);
this.options.min = lang.isUndefined(options.min) ? -Infinity : parseFloat(options.min);
this.options.max = lang.isUndefined(options.max) ? Infinity : parseFloat(options.max);
} | javascript | {
"resource": ""
} | |
q30327 | train | function() {
var v = this.getValue(), str_value = inputEx.NumberField.superclass.getValue.call(this);
// empty field
if (v === '') {
// validate only if not required
return !this.options.required;
}
if (isNaN(v)) {
return false;
}
... | javascript | {
"resource": ""
} | |
q30328 | train | function(options) {
inputEx.PasswordField.superclass.setOptions.call(this, options);
this.options.className = options.className ? options.className : "inputEx-Field inputEx-PasswordField";
// Add the password regexp (overridable)
this.options.regexp = options.regexp || inputEx.regexps.password... | javascript | {
"resource": ""
} | |
q30329 | train | function() {
// IE doesn't want to set the "type" property to 'password' if the node has a parent
// even if the parent is not in the DOM yet !!
// This element wraps the input node in a float: none div
this.wrapEl = inputEx.cn('div', {className: 'inputEx-StringField-wrapper'});
// At... | javascript | {
"resource": ""
} | |
q30330 | train | function() {
if(this.options.confirmPasswordField) {
if(this.options.confirmPasswordField.getValue() != this.getValue() ) {
return false;
}
}
return inputEx.PasswordField.superclass.validate.call(this);
} | javascript | {
"resource": ""
} | |
q30331 | train | function(e) {
inputEx.PasswordField.superclass.onInput.call(this,e);
if(this.options.confirmationPasswordField) {
this.options.confirmationPasswordField.setClassFromState();
}
} | javascript | {
"resource": ""
} | |
q30332 | train | function(e) {
inputEx.PasswordField.superclass.onKeyPress.call(this,e);
if(this.options.capsLockWarning) {
var ev = e ? e : window.event;
if (!ev) {
return;
}
var targ = ev.target ? ev.target : ev.srcElement;
// get key pressed
var wh... | javascript | {
"resource": ""
} | |
q30333 | train | function(e) {
inputEx.PasswordField.superclass.onKeyUp.call(this,e);
if(this.options.strengthIndicator) {
lang.later( 0, this, this.updateStrengthIndicator);
}
} | javascript | {
"resource": ""
} | |
q30334 | train | function (options) {
var i, length;
inputEx.RadioField.superclass.setOptions.call(this, options);
// Display mode
this.options.display = options.display === "vertically" ? "vertically" : "inline"; // default "inline"
// Classname
this.options.className = options.className ? options.cla... | javascript | {
"resource": ""
} | |
q30335 | train | function () {
// Delegate event listening because list of choices is dynamic
// so we can't listen on each <input type="radio" class='inputEx-RadioField-radio' />
// Change event (IE does not fire "change" event, so listen to click instead)
Event.delegate(this.fieldContainer, YAHOO.env.ua.ie ? "clic... | javascript | {
"resource": ""
} | |
q30336 | train | function () {
var i, length;
for (i = 0, length = this.choicesList.length ; i < length ; i += 1) {
if (this.choicesList[i].node.firstChild.checked) {
Dom.addClass(this.choicesList[i].node,"inputEx-selected");
} else {
Dom.removeClass(this.choicesList[i].node,"inputEx-selected");
... | javascript | {
"resource": ""
} | |
q30337 | train | function () {
var i, length;
for (i = 0, length = this.choicesList.length ; i < length ; i += 1) {
if (this.choicesList[i].node.firstChild.checked) {
if (this.radioAny && this.radioAny == this.choicesList[i].node.firstChild) {
return this.anyField.getValue();
}
re... | javascript | {
"resource": ""
} | |
q30338 | train | function (value, sendUpdatedEvt) {
var checkAny = true, valueFound = false, i, length;
for (i = 0, length = this.choicesList.length ; i < length ; i += 1) {
// valueFound is a useful when "real" choice has a value equal to allowAny choice default value
// so we check only the first value-matc... | javascript | {
"resource": ""
} | |
q30339 | train | function (sendUpdatedEvt) {
if (this.radioAny){
this.anyField.setValue(this.options.allowAny.value, false);
}
inputEx.RadioField.superclass.clear.call(this, sendUpdatedEvt);
} | javascript | {
"resource": ""
} | |
q30340 | train | function () {
var i, length, radioInput;
for (i = 0, length = this.choicesList.length ; i < length ; i += 1) {
radioInput = this.choicesList[i].node.firstChild;
if (radioInput.checked) {
// if "any" option checked
if (this.radioAny && this.radioAny == radioInput) {
... | javascript | {
"resource": ""
} | |
q30341 | train | function () {
var i, length;
for (i = 0, length = this.choicesList.length; i < length; i += 1) {
this.disableChoice(this.choicesList[i], false);
}
} | javascript | {
"resource": ""
} | |
q30342 | train | function () {
var i, length;
for (i = 0, length = this.choicesList.length; i < length; i += 1) {
this.enableChoice(this.choicesList[i]);
}
} | javascript | {
"resource": ""
} | |
q30343 | train | function(val, sendUpdatedEvt) {
this.value = val;
inputEx.renderVisu(this.options.visu, val, this.fieldContainer);
inputEx.UneditableField.superclass.setValue.call(this, val, sendUpdatedEvt);
} | javascript | {
"resource": ""
} | |
q30344 | train | function(x, y) {
// make the proxy look like the source element
var dragEl = this.getDragEl();
var clickEl = this.getEl();
Dom.setStyle(clickEl, "visibility", "hidden");
this._originalIndex = inputEx.indexOf(clickEl ,clickEl.parentNode.childNodes);
dragEl.className = clic... | javascript | {
"resource": ""
} | |
q30345 | train | function(e) {
Dom.setStyle(this.id, "visibility", "");
// Fire the reordered event if position in list has changed
var clickEl = this.getEl();
var newIndex = inputEx.indexOf(clickEl ,clickEl.parentNode.childNodes);
if(this._originalIndex != newIndex) {
this._l... | javascript | {
"resource": ""
} | |
q30346 | train | function(e) {
var y = Event.getPageY(e);
if (y < this.lastY) {
this.goingUp = true;
} else if (y > this.lastY) {
this.goingUp = false;
}
this.lastY = y;
} | javascript | {
"resource": ""
} | |
q30347 | train | function(i) {
var itemValue = this.items[i];
this.ul.removeChild(this.ul.childNodes[i]);
this.items[i] = null;
this.items = inputEx.compactArray(this.items);
return itemValue;
} | javascript | {
"resource": ""
} | |
q30348 | train | function(originalIndex, newIndex) {
if(originalIndex < newIndex) {
this.items.splice(newIndex+1,0, this.items[originalIndex]);
this.items[originalIndex] = null;
}
else {
this.items.splice(newIndex,0, this.items[originalIndex]);
this.items[originalIndex+1] = null;
... | javascript | {
"resource": ""
} | |
q30349 | train | function(index, item) {
this.items[index] = (typeof item == "object") ? item.value : item;
this.ul.childNodes[index].childNodes[0].innerHTML = (typeof item == "object") ? item.label : item;
} | javascript | {
"resource": ""
} | |
q30350 | train | function() {
var value, position, choice;
if (this.el.selectedIndex !== 0) {
// Get the selector value
value = inputEx.MultiSelectField.superclass.getValue.call(this);
position = this.getChoicePosition({ value : value });
choice = this.choicesList[position];
this.ddlist.... | javascript | {
"resource": ""
} | |
q30351 | train | function(sType, aArgs) {
var aData = aArgs[2];
var value = lang.isFunction(this.options.returnValue) ? this.options.returnValue(aData) : aData[0];
var label = lang.isFunction(this.options.returnLabel) ? this.options.returnLabel(aData) : value;
this.ddlist.addItem({label: label, value: value});
t... | javascript | {
"resource": ""
} | |
q30352 | train | function(options) {
inputEx.SliderField.superclass.setOptions.call(this, options);
this.options.className = options.className ? options.className : 'inputEx-SliderField';
this.options.minValue = lang.isUndefined(options.minValue) ? 0 : options.minValue;
this.options.maxValue = lan... | javascript | {
"resource": ""
} | |
q30353 | train | function() {
this.sliderbg = inputEx.cn('div', {id: YAHOO.util.Dom.generateId(), className: 'inputEx-SliderField-bg'});
this.sliderthumb = inputEx.cn('div', {className: 'inputEx-SliderField-thumb'} );
this.sliderbg.appendChild(this.sliderthumb);
this.fieldContainer.appendChild... | javascript | {
"resource": ""
} | |
q30354 | train | function() {
var val = Math.floor(this.options.minValue+(this.options.maxValue-this.options.minValue)*this.slider.getValue()/100);
return val;
} | javascript | {
"resource": ""
} | |
q30355 | train | function(attr) {
TabView.superclass.initAttributes.call(this, attr);
if (!attr.orientation) {
attr.orientation = 'top';
}
var el = this.get(ELEMENT);
if (!Dom.hasClass(el, this.CLASSNAME)) {
Dom.addCla... | javascript | {
"resource": ""
} | |
q30356 | train | function() {
var el = this.getEl() || {};
var id = el.id || el.tagName;
return (this.constructor.NAME + ': ' + id);
} | javascript | {
"resource": ""
} | |
q30357 | train | function(attr, val, unit) {
var el = this.getEl();
if ( this.patterns.noNegatives.test(attr) ) {
val = (val > 0) ? val : 0;
}
if (attr in el && !('style' in el && attr in el.style)) {
el[attr] = val;
} else {
Y.Dom.setStyle(el, attr, val + uni... | javascript | {
"resource": ""
} | |
q30358 | train | function(attr) {
var el = this.getEl();
var val = Y.Dom.getStyle(el, attr);
if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) {
return parseFloat(val);
}
var a = this.patterns.offsetAttribute.exec(attr) || [];
var pos = !!( a[3] ); // top or... | javascript | {
"resource": ""
} | |
q30359 | train | function(attr) {
var start;
var end;
var attributes = this.attributes;
this.runtimeAttributes[attr] = {};
var isset = function(prop) {
return (typeof prop !== 'undefined');
};
if ( !isset(attributes[attr]['to']) && !isset(attributes[... | javascript | {
"resource": ""
} | |
q30360 | train | function(tween) {
var frames = tween.totalFrames;
var frame = tween.currentFrame;
var expected = (tween.currentFrame * tween.duration * 1000 / tween.totalFrames);
var elapsed = (new Date() - tween.getStartTime());
var tweak = 0;
if (elapsed < tween.duration * 100... | javascript | {
"resource": ""
} | |
q30361 | train | function (t, b, c, d) {
return c - YAHOO.util.Easing.bounceOut(d-t, 0, c, d) + b;
} | javascript | {
"resource": ""
} | |
q30362 | train | function (t, b, c, d) {
if (t < d/2) {
return YAHOO.util.Easing.bounceIn(t*2, 0, c, d) * .5 + b;
}
return YAHOO.util.Easing.bounceOut(t*2-d, 0, c, d) * .5 + c*.5 + b;
} | javascript | {
"resource": ""
} | |
q30363 | train | function(n) {
var a = (n === Math.floor(n)) ? n : (Math.round(n*1000))/1000;
return (a + " " + YAHOO.widget.ProfilerViewer.STRINGS.millisecondsAbbrev);
} | javascript | {
"resource": ""
} | |
q30364 | train | function(n) {
var a = (n === Math.floor(n)) ? n : (Math.round(n*100))/100;
return (a + "%");
} | javascript | {
"resource": ""
} | |
q30365 | train | function(arr){
var ct = 0;
for(var i = 0; i < arr.length; ct+=arr[i++]){}
return ct;
} | javascript | {
"resource": ""
} | |
q30366 | train | function(elCell, oRecord, oColumn, oData) {
var a = (oData === Math.floor(oData)) ? oData : (Math.round(oData*1000))/1000;
elCell.innerHTML = a + " " + PV.STRINGS.millisecondsAbbrev;
} | javascript | {
"resource": ""
} | |
q30367 | train | function(yql, callback) {
var ud = 'yqlexecuteconsole'+(inputEx.YQL.query_index)++,
API = 'http://query.yahooapis.com/v1/public/yql?q=',
url = API + window.encodeURIComponent(yql) + '&format=json&diagnostics=true&callback=' + ud;
window[ud]= function(o){ callback && callback(o); };
document.b... | javascript | {
"resource": ""
} | |
q30368 | train | function(codeUrl, callback) {
var url = ("http://javascript.neyric.com/yql/js.php?url="+window.encodeURIComponent(codeUrl)).replace(new RegExp("'","g"),"\\'");
var yql = "use '"+url+"' as yqlexconsole; select * from yqlexconsole;";
inputEx.YQL.query(yql,callback);
} | javascript | {
"resource": ""
} | |
q30369 | train | function(r, s) {
if (!s||!r) {
throw new Error("Augment failed, verify dependencies.");
}
//var a=[].concat(arguments);
var a=[r.prototype,s.prototype], i;
for (i=2;i<arguments.length;i=i+1) {
a.push(arguments[i]);
}
L.augmentObject.apply(t... | javascript | {
"resource": ""
} | |
q30370 | train | function(o, d) {
var i,len,s=[],OBJ="{...}",FUN="f(){...}",
COMMA=', ', ARROW=' => ';
// Cast non-objects to string
// Skip dates because the std toString is what we want
// Skip HTMLElement-like objects because trying to dump
// an element will cause an unhandled e... | javascript | {
"resource": ""
} | |
q30371 | train | function() {
var o={}, a=arguments, l=a.length, i;
for (i=0; i<l; i=i+1) {
L.augmentObject(o, a[i], true);
}
return o;
} | javascript | {
"resource": ""
} | |
q30372 | train | function(when, o, fn, data, periodic) {
when = when || 0;
o = o || {};
var m=fn, d=data, f, r;
if (L.isString(fn)) {
m = o[fn];
}
if (!m) {
throw new TypeError("method undefined");
}
if (d && !L.isArray(d)) {
d = [da... | javascript | {
"resource": ""
} | |
q30373 | train | function(type, attr, win) {
var w = win || window, d=w.document, n=d.createElement(type);
for (var i in attr) {
if (attr[i] && YAHOO.lang.hasOwnProperty(attr, i)) {
n.setAttribute(i, attr[i]);
}
}
return n;
} | javascript | {
"resource": ""
} | |
q30374 | train | function(url, win, attributes) {
var o = {
id: "yui__dyn_" + (nidx++),
type: "text/css",
rel: "stylesheet",
href: url
};
if (attributes) {
lang.augmentObject(o, attributes);
}
return _node("link", o, win);
} | javascript | {
"resource": ""
} | |
q30375 | train | function(url, win, attributes) {
var o = {
id: "yui__dyn_" + (nidx++),
type: "text/javascript",
src: url
};
if (attributes) {
lang.augmentObject(o, attributes);
}
return _node("script", o, win);
} | javascript | {
"resource": ""
} | |
q30376 | train | function(q, msg) {
return {
tId: q.tId,
win: q.win,
data: q.data,
nodes: q.nodes,
msg: msg,
purge: function() {
_purge(this.tId);
}
};
} | javascript | {
"resource": ""
} | |
q30377 | train | function(id) {
var q = queues[id];
q.finished = true;
if (q.aborted) {
var msg = "transaction " + id + " was aborted";
_fail(id, msg);
return;
}
// execute success callback
if (q.onSuccess) {
var sc=q.scope || q.win;
... | javascript | {
"resource": ""
} | |
q30378 | train | function(id, loaded) {
var q = queues[id];
if (q.timer) {
// Y.log('cancel timer');
q.timer.cancel();
}
if (q.aborted) {
var msg = "transaction " + id + " was aborted";
_fail(id, msg);
return;
}
if (loaded) {
... | javascript | {
"resource": ""
} | |
q30379 | train | function() {
if (purging) {
return;
}
purging = true;
for (var i in queues) {
var q = queues[i];
if (q.autopurge && q.finished) {
_purge(q.tId);
delete queues[i];
}
}
purging = false;
} | javascript | {
"resource": ""
} | |
q30380 | train | function(tId) {
if (queues[tId]) {
var q = queues[tId],
nodes = q.nodes,
l = nodes.length,
d = q.win.document,
h = d.getElementsByTagName("head")[0],
sib, i, node, attr;
if (q.insertBefor... | javascript | {
"resource": ""
} | |
q30381 | train | function(type, url, opts) {
var id = "q" + (qidx++);
opts = opts || {};
if (qidx % YAHOO.util.Get.PURGE_THRESH === 0) {
_autoPurge();
}
queues[id] = lang.merge(opts, {
tId: id,
type: type,
url: url,
finished: false,
... | javascript | {
"resource": ""
} | |
q30382 | train | function(type, n, id, url, win, qlength, trackfn) {
var f = trackfn || _next;
// IE supports the readystatechange event for script and css nodes
if (ua.ie) {
n.onreadystatechange = function() {
var rs = this.readyState;
if ("loaded" === rs || "complet... | javascript | {
"resource": ""
} | |
q30383 | train | function(mm) {
if (!done[mm]) {
// Y.log(name + ' provides worker trying: ' + mm);
done[mm] = true;
// we always want the return value normal behavior
// (provides) for superseded modules.
lang.augmentOb... | javascript | {
"resource": ""
} | |
q30384 | train | function(o) {
if (o || this.dirty) {
this._config(o);
this._setup();
this._explode();
// this._skin(); // deprecated
if (this.allowRollup) {
this._rollup();
}
this._reduce();
... | javascript | {
"resource": ""
} | |
q30385 | train | function(aa, bb) {
var mm=info[aa];
if (loaded[bb] || !mm) {
return false;
}
var ii,
rr = mm.expanded,
after = mm.after,
other = info[bb],
optional = ... | javascript | {
"resource": ""
} | |
q30386 | train | function(str) {
var f = this.filter;
return (f) ? str.replace(new RegExp(f.searchExp, 'g'), f.replaceStr) : str;
} | javascript | {
"resource": ""
} | |
q30387 | train | function () {
var i, j, ilength, jlength, currentSubChoices, currentSubChoice, currentValue,
testValue, isDuplicateChoice, secondSelectChoices;
// object used in updateSecondSelectChoices
//
// * key : string representing a value in 1st select
// * value : array of values availab... | javascript | {
"resource": ""
} | |
q30388 | train | function() {
var i, length, choicesList, secondSelectValues, testValue;
// allowed values in second select
secondSelectValues = this.valuesMatching[this.selects[0].getValue()];
// all choices in second select
choicesList = this.selects[1].choicesList;
for (i = 0, length = choicesList.l... | javascript | {
"resource": ""
} | |
q30389 | train | function() {
// if the field is empty :
if( this.getValue() === this.options.valueSeparator ) {
return this.options.required ? inputEx.stateRequired : inputEx.stateEmpty;
}
return this.validate() ? inputEx.stateValid : inputEx.stateInvalid;
} | javascript | {
"resource": ""
} | |
q30390 | parse | train | function parse(name, options, fn) {
if ('function' === typeof options) {
fn = options;
options = null;
}
//
// Fix circular require.
//
if (!Registry) Registry = require('npm-registry');
options = options || {};
options.githulk = options.githulk || null;
options.order = options.order || ['re... | javascript | {
"resource": ""
} |
q30391 | fetch | train | function fetch(next) {
if ('string' !== typeof name) return next(undefined, name);
options.npmjs.packages.get(name, next);
} | javascript | {
"resource": ""
} |
q30392 | search | train | function search(data, next) {
if (!options.order.length) return next();
if (Array.isArray(data)) data = data[0];
debug('searching for licensing information for %s', data.name);
var parser, result, name;
async.doWhilst(function does(next) {
name = options.order.shift();
p... | javascript | {
"resource": ""
} |
q30393 | train | function() {
var scrollHeight = (document[COMPAT_MODE] != CSS1_COMPAT || isSafari) ? document.body.scrollHeight : documentElement.scrollHeight,
h = Math.max(scrollHeight, Y.Dom.getViewportHeight());
return h;
} | javascript | {
"resource": ""
} | |
q30394 | train | function() {
var scrollWidth = (document[COMPAT_MODE] != CSS1_COMPAT || isSafari) ? document.body.scrollWidth : documentElement.scrollWidth,
w = Math.max(scrollWidth, Y.Dom.getViewportWidth());
return w;
} | javascript | {
"resource": ""
} | |
q30395 | train | function() {
var width = self.innerWidth, // Safari
mode = document[COMPAT_MODE];
if (mode || isIE) { // IE, Gecko, Opera
width = (mode == CSS1_COMPAT) ?
documentElement.clientWidth : // Standards
docum... | javascript | {
"resource": ""
} | |
q30396 | train | function(node, className) {
node = Y.Dom.get(node);
if (!node) {
return null;
}
var method = function(el) { return Y.Dom.hasClass(el, className); };
return Y.Dom.getAncestorBy(node, method);
} | javascript | {
"resource": ""
} | |
q30397 | train | function(node, tagName) {
node = Y.Dom.get(node);
if (!node) {
return null;
}
var method = function(el) {
return el[TAG_NAME] && el[TAG_NAME].toUpperCase() == tagName.toUpperCase();
};
return Y.Dom.getAncestorBy(no... | javascript | {
"resource": ""
} | |
q30398 | train | function(newNode, referenceNode) {
newNode = Y.Dom.get(newNode);
referenceNode = Y.Dom.get(referenceNode);
if (!newNode || !referenceNode || !referenceNode[PARENT_NODE]) {
return null;
}
return referenceNode[PARENT_NODE].... | javascript | {
"resource": ""
} | |
q30399 | train | function (sel) {
var rule,css;
if (lang.isString(sel)) {
// IE's addRule doesn't support multiple comma delimited
// selectors so rules are mapped internally by atomic selectors
rule = cssRules[sel.split(/\s*,\s*/)[0]];
return rul... | javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.