_id
stringlengths
2
6
title
stringlengths
0
58
partition
stringclasses
3 values
text
stringlengths
52
373k
language
stringclasses
1 value
meta_information
dict
q61100
validation
function(ctl) { var len = ctl.items && ctl.items.length; return utils.sha256(ctl.id + ':' + len).substring(0, 8); }
javascript
{ "resource": "" }
q61101
validation
function(attrs) { for (var k in attrs) if (attrs.hasOwnProperty(k)) this.out.push(' ' + k + '="' + attrs[k] + '"'); }
javascript
{ "resource": "" }
q61102
validation
function(walk) { var _super = BlockCompiler.prototype.emitParagraph.bind(this); if (this.tryGroup('checkbox', walk)) return; if (this.tryGroup('radio', walk)) return; if (this.trySortableGroup(walk)) return; if (this.tryAssociativeGroup(walk)) return; return _super(walk); }
javascript
{ "resource": "" }
q61103
validation
function(type, walk) { if (!this.atGroupMarker(type, walk)) return false; // Find the end of the block, checking for adjacent blocks var startIdx = walk.position; var found = false; while (walk.hasCurrent() && !found) { walk.scrollToTerm().skipWhitespaces(); if (!this.atGroupMarker...
javascript
{ "resource": "" }
q61104
validation
function(walk) { if (!walk.at('^ ')) return false; // Find the end of the block, checking for adjacent blocks var startIdx = walk.position; var found = false; while (walk.hasCurrent() && !found) { walk.scrollToTerm().skipWhitespaces(); if (!walk.at('^ ')) found = true; ...
javascript
{ "resource": "" }
q61105
validation
function(walk) { if (!walk.at('@ ')) return false; // Find the end of the block, checking for adjacent blocks var startIdx = walk.position; var found = false; while (!found && walk.hasCurrent()) { walk.scrollToTerm().skipBlankLines(); if (walk.atSpaces(this.blockIndent)) { ...
javascript
{ "resource": "" }
q61106
validation
function(walk) { if (this.emitText(walk)) return; if (this.tryInputText(walk)) return; if (this.tryInputRegex(walk)) return; if (this.tryInputTextWithDefault(walk)) return; if (this.trySelectMenu(walk)) return; var _super = InlineCompiler.prototype.emitNormal.bind(this); ...
javascript
{ "resource": "" }
q61107
validation
function (walk) { if (!walk.at('{{')) return false; var endIdx = walk.indexOf(']}'); if (endIdx === null) return false; var str = walk.substring(walk.position + 2, endIdx); var data = str.split('}['); if (data.length != 2) return false; var size = data[...
javascript
{ "resource": "" }
q61108
validation
function(walk) { if (!walk.at('({')) return false; var endIdx = walk.indexOf('})'); if (endIdx === null) return false; // We got a select menu walk.skip(2); var ctl = this.formCompiler.createCtl('selectMenu'); ctl.items = []; this.out.push('<sele...
javascript
{ "resource": "" }
q61109
validation
function() { // The `solution` markup is built by distributing correct values // across the controls and disabling them var $ = cheerio.load(this.form.html.template); this.form.controls.forEach(function(ctl) { switch(ctl.type) { case 'checkboxGroup': case 'radioGroup': ct...
javascript
{ "resource": "" }
q61110
validation
function(o){ if (Ext.isString(o)) { o = { text: o }; } o = Ext.applyIf(o || {}, { text: this.busyText, iconCls: this.busyIconCls }); return this.setStatus(o); }
javascript
{ "resource": "" }
q61111
trailer
validation
function trailer(file, fn) { return through({objectMode: true}, function (a, e, cb) { this.push(a) cb() }, function (cb) { var self = this fn(function (err, val) { if (err) { return cb(err) } if (val) { if (typeof val === 'string') { val = new Buffer(string) } ...
javascript
{ "resource": "" }
q61112
validation
function() { var fw, ix = 0; // Find front most window and focus that each (this.windows, function(w) { if (w.zIndex > ix) { fw = w; ix = w.zIndex; } }); return fw; }
javascript
{ "resource": "" }
q61113
validation
function() { var me = this, mon = me.monitor; if (mon) { mon.unbind(); me.monitor = null; } me.clearListeners(); me.checkValidityTask.cancel(); me.checkDirtyTask.cancel(); }
javascript
{ "resource": "" }
q61114
validation
function(errors) { var me = this, e, eLen, error, value, key; function mark(fieldId, msg) { var field = me.findField(fieldId); if (field) { field.markInvalid(msg); } } if (Ext.isArray(errors)) { eLe...
javascript
{ "resource": "" }
q61115
validation
function(values) { var me = this, v, vLen, val, field; function setVal(fieldId, val) { var field = me.findField(fieldId); if (field) { field.setValue(val); if (me.trackResetOnLoad) { field.resetOriginalValue(); ...
javascript
{ "resource": "" }
q61116
validation
function() { Ext.suspendLayouts(); var me = this, fields = me.getFields().items, f, fLen = fields.length; for (f = 0; f < fLen; f++) { fields[f].clearInvalid(); } Ext.resumeLayouts(true); return me; }
javascript
{ "resource": "" }
q61117
getInfoSync
validation
function getInfoSync(dir) { var fullname = path.join(dir, '.epm/CONFIG'); if (!fs.existsSync(fullname)) { return { name: 'unknown', engine: 'unknown', path: dir }; } var info = JSON.parse(fs.readFileSync(fullname, 'utf-8')); return { name: info.name || 'unknown',...
javascript
{ "resource": "" }
q61118
getDirectories
validation
function getDirectories(dir, cb) { fs.readdir(dir, function(err, objects){ if (err) { return cb && cb(err); } var dirs = objects.filter(function(item){ return fs.statSync(path.join(dir, item)).isDirectory(); }); cb && cb(null, dirs) }) }
javascript
{ "resource": "" }
q61119
getDirectoriesSync
validation
function getDirectoriesSync(dir) { return fs.readdirSync(dir) .filter(function(item){ return fs.statSync(path.join(dir, item)).isDirectory(); }); }
javascript
{ "resource": "" }
q61120
isRepoSync
validation
function isRepoSync(dir){ var dirs if (dir instanceof Array){ dirs = dir } else { dirs = getDirectoriesSync(dir) } var res = dirs.filter(function(name){ return name.match(/\.epm/ig) }); return res.length > 0; }
javascript
{ "resource": "" }
q61121
validation
function(parent, records, suppressEvent) { var me = this, insertIndex = me.indexOf(parent) + 1, toAdd = []; // Used by the TreeView to bracket recursive expand & collapse ops // and refresh the size. This is most effective when folder nodes are loaded, // and thi...
javascript
{ "resource": "" }
q61122
validation
function(parent, records, toAdd) { var me = this, ln = records ? records.length : 0, i, record; // recursive is hardcoded to true in TreeView. if (!me.recursive && parent !== me.node) { return; } if (parent !== this.node && !me.isVisible(pare...
javascript
{ "resource": "" }
q61123
validation
function(parent, records, suppressEvent, callback, scope) { var me = this, collapseIndex = me.indexOf(parent) + 1, node, lastNodeIndexPlus, sibling, found; if (!me.recursive && parent !== me.node) { return; } // Used by the TreeView to bracket recurs...
javascript
{ "resource": "" }
q61124
inlineAndCompile
validation
function inlineAndCompile(filenames, options, reporter, callback, errback) { var depTarget = options && options.depTarget; var referrerName = options && options.referrer; var basePath; if (referrerName) { // The compile occurs two directories down from current directory, // in src/node. Thus the name...
javascript
{ "resource": "" }
q61125
Simple
validation
function Simple() { // If arguments passed in, try and parse the simple date if(arguments.length > 0) { this._parse(arguments[0]); } else { // Note that all dates and times are UTC internally! var date = new Date(); this._year = date.getUTCFullYear(); this._month = date.getUTCMonth(); thi...
javascript
{ "resource": "" }
q61126
validation
function () { var me = this, ret = { minWidth: 20, width: Ext.themeName === 'neptune' ? 70 : 60, items: [], enableOverflow: true }; Ext.each(this.quickStart, function (item) { ret.items.push({ tooltip: { text: item.name...
javascript
{ "resource": "" }
q61127
applyEachOptimization
validation
function applyEachOptimization(rel){ var originalRel = rel rel = JSON.parse(JSON.stringify(rel)) //console.log('rel: ' + JSON.stringify(rel)) try{ var newImplicits = [rel.params[1].implicits[0]] var bindingsUsed = _.extend({}, rel.params[1].bindingsUsed) //1. extract macro params to one or more ~:property...
javascript
{ "resource": "" }
q61128
makeSyncOpGenericGetChangesBetween
validation
function makeSyncOpGenericGetChangesBetween(handle, ws, rel, recurse, paramFuncs){ //paramFuncs.forEach(function(pf){ for(var i=0;i<paramFuncs.length;++i){ var pf = paramFuncs[i] if(pf.isMacro){ //_.errout('cannot apply this method if a param is a macro: ' + JSON.stringify(rel)) return makeGenericGetChange...
javascript
{ "resource": "" }
q61129
validation
function (key, task, done, ttl) { const queue = this.queue; const semaphore = this.semaphore; if (!ttl) ttl = this.ttl; const runTask = (res) => new Promise((resolve) => task( (...args) => resolve(Response.setData(res, args)) ) ); const startThenRunTask = (lock_key) => queue...
javascript
{ "resource": "" }
q61130
Iterator
validation
function Iterator(options, fn) { if (typeof options === 'function') { fn = options; options = {}; } if (typeof fn !== 'function') { throw new TypeError('Iterator expects `fn` to be a function.'); } this.options = options || {}; this.fn = fn; }
javascript
{ "resource": "" }
q61131
domGen
validation
function domGen(tagName) { /** * Generates a dom with the given params. * @param {object} [opts] The options to pass as the second arg of $('<tag/>', arg) * @param {object[]} args The objects to append to the element * @return {jQuery} */ return (opts, ...args) => { if (!seemLikePlainObject(opts...
javascript
{ "resource": "" }
q61132
validation
function(v){ var ots = Object.prototype.toString; var s=typeof v; if(s=='object'){ if(v){ if((ots.call(v).indexOf('HTML')!==-1 && ots.call(v).indexOf('Element')!=-1)){return 'element'} if(v instanceof Array||(!(v instanceof Object)&&(ots.call(v)=='[object Array]')||typeof v.length=='number...
javascript
{ "resource": "" }
q61133
validation
function(identifier){ if(!Bella.contains(this.lines, identifier)){ this.lines.push(identifier); this.Event.onAddOnlineUser(identifier); return true; } return false; }
javascript
{ "resource": "" }
q61134
validation
function(value) { value = value || ''; return this.setStyle({ left : value, right : value, top : value, bottom : value, 'z-index' : '', position : STATIC }); }
javascript
{ "resource": "" }
q61135
validation
function() { var me = this, offsetParent = me.dom.offsetParent, x = me.getStyle('left'); if (!x || x === 'auto') { x = 0; } else if (me.pxRe.test(x)) { x = parseFloat(x); } else { x = me.getX...
javascript
{ "resource": "" }
q61136
validation
function() { var me = this, offsetParent = me.dom.offsetParent, style = me.getStyle(['left', 'top']), x = style.left, y = style.top; if (!x || x === 'auto') { x = 0; } else if (me.pxRe.test(x)) { ...
javascript
{ "resource": "" }
q61137
validation
function() { var me = this, offsetParent = me.dom.offsetParent, y = me.getStyle('top'); if (!y || y === 'auto') { y = 0; } else if (me.pxRe.test(y)) { y = parseFloat(y); } else { y = me.getY(...
javascript
{ "resource": "" }
q61138
validation
function(pos, zIndex, x, y) { var me = this; if (!pos && me.isStyle(POSITION, STATIC)) { me.setStyle(POSITION, RELATIVE); } else if (pos) { me.setStyle(POSITION, pos); } if (zIndex) { me.setStyle(ZINDEX, zIndex)...
javascript
{ "resource": "" }
q61139
validation
function(x, y, width, height, animate) { return this.setBox({ x: x, y: y, width: width, height: height }, animate); }
javascript
{ "resource": "" }
q61140
validation
function(left, top) { var me = this, style = me.dom.style; style.left = me.addUnits(left); style.top = me.addUnits(top); return me; }
javascript
{ "resource": "" }
q61141
validation
function(rec){ var me = this, node = me.getNode(rec, true), el = me.el, adjustmentY = 0, adjustmentX = 0, elRegion = el.getRegion(), nodeRegion; // Viewable region must not include scrollbars, so use ...
javascript
{ "resource": "" }
q61142
validation
function(card) { var me = this, previous; card = me.getComponent(card); if (card) { previous = me.getActiveTab(); if (previous !== card && me.fireEvent('beforetabchange', me, card, previous) === false) { return false; } ...
javascript
{ "resource": "" }
q61143
validation
function() { var me = this, // Ensure the calculated result references a Component result = me.getComponent(me.activeTab); // Sanitize the result in case the active tab is no longer there. if (result && me.items.indexOf(result) != -1) { me.activeTab = result;...
javascript
{ "resource": "" }
q61144
validation
function(syncId, blockCb, makeCb, reifyCb, cb){ _.assertLength(arguments, 5) //_.assertFunction(listenerCb) //_.assertFunction(objectCb) _.assertFunction(blockCb) _.assertFunction(makeCb) _.assertFunction(reifyCb) _.assertFunction(cb); _.assertString(syncId) var e = {syncId: syncId}; //app...
javascript
{ "resource": "" }
q61145
resize
validation
function resize() { var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight; // Get height differently depending on the browser used myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ?...
javascript
{ "resource": "" }
q61146
LoaderType
validation
function LoaderType(options, fn) { if (!(this instanceof LoaderType)) { return new LoaderType(options); } LoaderStack.call(this); this.iterator = new Iterator(options, fn); }
javascript
{ "resource": "" }
q61147
validation
function(oldKey, newKey) { var me = this, map = me.map, indexMap = me.indexMap, index = me.indexOfKey(oldKey), item; if (index > -1) { item = map[oldKey]; delete map[oldKey]; delete indexMap[oldKey]; ...
javascript
{ "resource": "" }
q61148
validation
function(objs) { var me = this, key; if (arguments.length > 1 || Ext.isArray(objs)) { me.insert(me.length, arguments.length > 1 ? arguments : objs); } else { for (key in objs) { if (objs.hasOwnProperty(key)) { if (me.allowF...
javascript
{ "resource": "" }
q61149
validation
function(fn, scope){ var items = Ext.Array.push([], this.items), // each safe for removal i = 0, len = items.length, item; for (; i < len; i++) { item = items[i]; if (fn.call(scope || item, item, i, len) === false) { break; ...
javascript
{ "resource": "" }
q61150
validation
function(index, keys, objects) { var me = this, itemKey, removeIndex, i, len = keys.length, fireAdd = me.hasListeners.add, syncIndices; // External key(s) passed. We cannot reliably find an object's index using the key extraction fn. /...
javascript
{ "resource": "" }
q61151
validation
function(o) { var me = this, removeKey, index; // If // We have not been forced into using linear lookup by a usage of the 2 arg form of add // and // The key extraction function yields a key // Then use indexOfKey. This will use the index...
javascript
{ "resource": "" }
q61152
validation
function(items) { var me = this, i; if (items || me.hasListeners.remove) { // Only perform expensive item-by-item removal if there's a listener or specific items if (items) { for (i = items.length - 1; i >= 0; --i) { me.remove(ite...
javascript
{ "resource": "" }
q61153
validation
function(o) { var me = this, key; if (o != null) { // If // We have not been forced into using linear lookup by a usage of the 2 arg form of add // and // The key extraction function yields a key // Then use the map to dete...
javascript
{ "resource": "" }
q61154
validation
function(property, root, start, end) { var values = this.extractValues(property, root), length = values.length, sum = 0, i; start = start || 0; end = (end || end === 0) ? end : length - 1; for (i = start; i <= end; i++) { sum += valu...
javascript
{ "resource": "" }
q61155
validation
function(property, root, allowNull) { var values = this.extractValues(property, root), length = values.length, hits = {}, unique = [], value, strValue, i; for (i = 0; i < length; i++) { value = values[i]; strValue = String(value)...
javascript
{ "resource": "" }
q61156
validation
function() { var me = this, copy = new this.self(me.initialConfig); copy.add(me.keys, me.items); return copy; }
javascript
{ "resource": "" }
q61157
validation
function(data, force_absolute) { var self = this, editor = self.editor, baseUri = editor.documentBaseURI, sources, attrs, img, i; data.params.src = self.convertUrl(data.params.src, force_absolute); attrs = data.video.attrs; if (attrs) attrs.src = self.convertUrl(attrs.src, force_absolute); ...
javascript
{ "resource": "" }
q61158
validation
function(value) { var i, values, typeItem; // Find type by checking the classes values = tinymce.explode(value, ' '); for (i = 0; i < values.length; i++) { typeItem = this.lookup[values[i]]; if (typeItem) return typeItem; } }
javascript
{ "resource": "" }
q61159
addPlayer
validation
function addPlayer(video_src, poster_src) { var baseUri, flashVars, flashVarsOutput, params, flashPlayer; flashPlayer = editor.getParam('flash_video_player_url', self.convertUrl(self.url + '/moxieplayer.swf')); if (flashPlayer) { baseUri = editor.documentBaseURI; data.params.src = flashPlay...
javascript
{ "resource": "" }
q61160
validation
function(binding){ var me = this, keyCode = binding.key, i, len; if (me.processing) { me.bindings = bindings.slice(0); } if (Ext.isArray(binding)) { for (i = 0, len = binding.length; i < len; i++) { me....
javascript
{ "resource": "" }
q61161
validation
function(binding){ var me = this, bindings = me.bindings, len = bindings.length, i, item, keys; if (me.processing) { me.bindings = bindings.slice(0); } keys = me.processKeys(binding.key); for (i = 0; i < len; +...
javascript
{ "resource": "" }
q61162
validation
function(binding, event){ if (this.checkModifiers(binding, event)) { var key = event.getKey(), handler = binding.fn || binding.handler, scope = binding.scope || this, keyCode = binding.keyCode, defaultEventAction = binding.defaultEventA...
javascript
{ "resource": "" }
q61163
validation
function(binding, e) { var keys = ['shift', 'ctrl', 'alt'], i = 0, len = keys.length, val, key; for (; i < len; ++i){ key = keys[i]; val = binding[key]; if (!(val === undefined || (val === e[key + 'Key']))) { return...
javascript
{ "resource": "" }
q61164
validation
function(key, fn, scope) { var keyCode, shift, ctrl, alt; if (Ext.isObject(key) && !Ext.isArray(key)) { keyCode = key.key; shift = key.shift; ctrl = key.ctrl; alt = key.alt; } else { keyCode = key; } this.addBinding({ ...
javascript
{ "resource": "" }
q61165
validation
function() { var me = this; if (!me.enabled) { me.target.on(me.eventName, me.handleTargetEvent, me); me.enabled = true; } }
javascript
{ "resource": "" }
q61166
validation
function() { var me = this; if (me.enabled) { me.target.removeListener(me.eventName, me.handleTargetEvent, me); me.enabled = false; } }
javascript
{ "resource": "" }
q61167
validation
function(removeTarget) { var me = this, target = me.target; me.bindings = []; me.disable(); if (removeTarget === true) { if (target.isComponent) { target.destroy(); } else { target.remove(); } } ...
javascript
{ "resource": "" }
q61168
validation
function () { var me = this, items = me.flushQueue.clear(), length = items.length, i; if (length) { ++me.flushCount; for (i = 0; i < length; ++i) { items[i].flush(); } } }
javascript
{ "resource": "" }
q61169
validation
function (parent, el) { var id = el.id, children = parent.children, items = this.items; if(children) { Ext.Array.remove(children, items[id]); } delete items[id]; }
javascript
{ "resource": "" }
q61170
validation
function () { var me = this, layouts = me.layoutQueue.clear(), length = layouts.length, i; ++me.cycleCount; // This value is incremented by ContextItem#setProp whenever new values are set // (thereby detecting forward progress): me.progressCo...
javascript
{ "resource": "" }
q61171
validation
function (layout) { var me = this, ownerContext = me.getCmp(layout.owner); layout.pending = false; if (ownerContext.state.blocks) { return; } // We start with the assumption that the layout will finish and if it does not, it // must clear this f...
javascript
{ "resource": "" }
q61172
validation
function(item, width, height) { var items = item, len = 1, contextItem, i; // NOTE: we don't pre-check for validity because: // - maybe only one dimension is valid // - the diagnostics layer will track the setProp call to help find who is trying // ...
javascript
{ "resource": "" }
q61173
validation
function(model, setOnStore) { var me = this; me.model = Ext.ModelManager.getModel(model); me.setReader(this.reader); me.setWriter(this.writer); if (setOnStore && me.store) { me.store.setModel(me.model); } }
javascript
{ "resource": "" }
q61174
validation
function(reader) { var me = this, needsCopy = true, current = me.reader; if (reader === undefined || typeof reader == 'string') { reader = { type: reader }; needsCopy = false; } if (reader.isReader) { ...
javascript
{ "resource": "" }
q61175
validation
function(writer) { var me = this, needsCopy = true; if (writer === undefined || typeof writer == 'string') { writer = { type: writer }; needsCopy = false; } if (!writer.isWriter) { if (needsCopy) { ...
javascript
{ "resource": "" }
q61176
getRequiredFilename
validation
function getRequiredFilename (name, callback) { var filepath = path.join(LOG_DIR, name); function getStats () { fs.stat(filepath, function (err, stats) { if (err) { callback(err, null); } else if (stats && stats.size >= MAX_FILE_SIZE) { createFile(); } else { callback...
javascript
{ "resource": "" }
q61177
getWriteFunction
validation
function getWriteFunction(log) { return function writeLogFile (name, qcb) { var dir = path.join(LOG_DIR, name); function readFile (cb) { fs.readFile(dir, cb); } function updateLogs (logs, cb) { logs.push(log.toJSON()); cb(null, logs); } function writeFile (str, cb) { ...
javascript
{ "resource": "" }
q61178
getLogsObject
validation
function getLogsObject (name, callback) { fs.readFile(path.join(LOG_DIR, name), function (err, data) { if (err) { return callback(err, null); } safejson.parse(data, function (err, logArray) { if (err) { return callback(err, null); } callback(null, { logs: logArray...
javascript
{ "resource": "" }
q61179
deleteFile
validation
function deleteFile(name, callback) { fs.unlink(path.join(LOG_DIR, name), callback); }
javascript
{ "resource": "" }
q61180
validation
function () { this.port = DEFAULT_STUBBATTI_PORT; this.app = express(); this.console = global.console; var stubbatti = this; this.app[KILL_METHOD](KILL_PATH, function (req, res) { res.set('Connection', 'close'); res.end(); stubbatti.stop(); }); }
javascript
{ "resource": "" }
q61181
bravojs_print
validation
function bravojs_print() { var output=""; var i; var stdout; for (i=0; i < arguments.length; i++) output += arguments[i] + (i===arguments.length - 1 ? "" : " "); output.replace(/\t/, " "); if (typeof window.document != "undefined" && (stdout = window.document.getElementById('stdout'))) { ...
javascript
{ "resource": "" }
q61182
Setting
validation
function Setting(settingSpec, settings) { this._settings = settings; Object.keys(settingSpec).forEach(function(key) { this[key] = settingSpec[key]; }, this); this.type = types.getType(this.type); if (this.type == null) { throw new Error('In ' + this.name + ': can\'t fin...
javascript
{ "resource": "" }
q61183
validation
function() { var reply = []; this.getSettingNames().forEach(function(setting) { reply.push({ 'key': setting, 'value': this.getSetting(setting).get() }); }, this); return reply; }
javascript
{ "resource": "" }
q61184
validation
function(data) { // We iterate over data rather than keys so we don't forget values // which don't have a setting yet. for (var key in data) { if (data.hasOwnProperty(key)) { var setting = this._settings[key]; if (setting) { var val...
javascript
{ "resource": "" }
q61185
validation
function() { return this.getSettingNames().map(function(key) { return this._settings[key].type.stringify(this.get(key)); }.bind(this)); }
javascript
{ "resource": "" }
q61186
validation
function(statuses) { var combined = Status.VALID; for (var i = 0; i < statuses.length; i++) { if (statuses[i].valueOf() > combined.valueOf()) { combined = statuses[i]; } } return combined; }
javascript
{ "resource": "" }
q61187
defaultArgsProvider
validation
function defaultArgsProvider(request, callback) { var args = request.args, params = request.command.params; for (var i = 0; i < params.length; i++) { var param = params[i]; // If the parameter is already valid, then don't ask for it anymore. if (request.getParamStatus(param) !...
javascript
{ "resource": "" }
q61188
execute
validation
function execute() { command.exec(env, request.args, request); // If the request isn't asnync and isn't done, then make it done. if (!request.isAsync && !request.isDone) { request.done(); } }
javascript
{ "resource": "" }
q61189
consume_doctype_or_comment
validation
function consume_doctype_or_comment (proc_stack) { let html = "<!"; proc_stack.tSkip(2); html += proc_stack.tAcceptUntil(">") + proc_stack.tAccept(); return html; }
javascript
{ "resource": "" }
q61190
consume_opening_or_closing_tag
validation
function consume_opening_or_closing_tag (proc_stack) { proc_stack.tSkip(); let is_closing = proc_stack.tSkipIf("/"); let tag_name = proc_stack.tAcceptUntilSet(TAG_NAME_DELIMITER).toLocaleLowerCase(); if (!/^[a-z0-9]+(-[a-z0-9]+)*(:[a-z0-9]+(-[a-z0-9]+)*)?$/.test(tag_name)) { throw new SyntaxError(`Invalid H...
javascript
{ "resource": "" }
q61191
consume_directive_entity
validation
function consume_directive_entity (proc_stack) { let pos = proc_stack._tGetNPos(); proc_stack.tSkip(4); let directive_name = proc_stack.tAcceptUntil("("); proc_stack.tSkip(); let raw_args = {}; do { proc_stack.tSkipWhile(WHITESPACE); if (proc_stack.tPeek() == ")") { break; } let arg...
javascript
{ "resource": "" }
q61192
validation
function (method, path, cb) { http.request({hostname: DEFAULT_HOST, port: DEFAULT_PORT, path: path, method: method}, function (res) { res.pipe(concat({encoding: 'string'}, function (data) { cb(data, res.headers, res.statusCode); })); }).end(); }
javascript
{ "resource": "" }
q61193
init
validation
function init() { SXE.initElementDialog('del'); if (SXE.currentAction == "update") { setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); SXE.showRemoveButton(); } }
javascript
{ "resource": "" }
q61194
validation
function() { var me = this, obj = me.getStorageObject(), ids = me.getIds(), len = ids.length, i; //remove all the records for (i = 0; i < len; i++) { obj.removeItem(me.getRecordKey(ids[i])); } //remove the supporting o...
javascript
{ "resource": "" }
q61195
validation
function(packageName, version) { Ext.versions[packageName] = new Version(version); Ext.lastRegisteredVersion = Ext.versions[packageName]; return this; }
javascript
{ "resource": "" }
q61196
validation
function(packageName, since, closure, scope) { if (Version.compare(Ext.getVersion(packageName), since) < 1) { closure.call(scope); } }
javascript
{ "resource": "" }
q61197
setFromObject
validation
function setFromObject(object) { Object.keys(object).forEach((name) => { options[name] = object[name]; }); }
javascript
{ "resource": "" }
q61198
addOptions
validation
function addOptions(flags) { Object.keys(options).forEach(function(name) { var dashedName = toDashCase(name); if ((name in parseOptions) && (name in transformOptions)) { flags.option('--' + dashedName + ' [true|false|parse]', descriptions[name]); flags.on(dashedName, (value) => ...
javascript
{ "resource": "" }
q61199
addFeatureOption
validation
function addFeatureOption(name, kind) { if (kind === EXPERIMENTAL) experimentalOptions[name] = true; Object.defineProperty(parseOptions, name, { get: function() { return !!options[name]; }, enumerable: true, configurable: true }); Object.defineProperty(transformOptions, name, { g...
javascript
{ "resource": "" }