_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 27 233k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q53600 | train | function (selector) {
var target = _emberViewsSystemJquery.default(selector);
_emberMetalDebug.assert('You tried to replace in (' + selector + ') but that isn\'t in the DOM', target.length > 0);
_emberMetalDebug.assert('You cannot replace an existing Ember.View.', | javascript | {
"resource": ""
} | |
q53601 | normalizeComponentAttributes | train | function normalizeComponentAttributes(component, isAngleBracket, attrs) {
var normalized = {};
var attributeBindings = component.attributeBindings;
var streamBasePath = component.isComponent ? '' : 'view.';
var i, l;
if (attrs.id && _emberHtmlbarsHooksGetValue.default(attrs.id)) {
// Do not a... | javascript | {
"resource": ""
} |
q53602 | train | function (addedEvents, rootElement) {
var event;
var events = this._finalEvents = _emberMetalAssign.default({}, _emberMetalProperty_get.get(this, 'events'), addedEvents);
if (!_emberMetalIs_none.default(rootElement)) {
_emberMetalProperty_set.set(this, 'rootElement', rootElement);
}
... | javascript | {
"resource": ""
} | |
q53603 | train | function (rootElement, event, eventName) {
var self = this;
var owner = _containerOwner.getOwner(this);
var viewRegistry = owner && owner.lookup('-view-registry:main') || _emberViewsViewsView.default.views;
if (eventName === null) {
return;
}
rootElement.on(event + '.ember... | javascript | {
"resource": ""
} | |
q53604 | train | function () {
this._super.apply(this, arguments);
var name = arguments[0];
var method = this[name];
if (method) {
var length | javascript | {
"resource": ""
} | |
q53605 | train | function (view, eventName, event) {
if (view.has(eventName)) {
// Handler should be able to re-dispatch events, so we don't
// preventDefault or stopPropagation.
return _emberMetalInstrumentation.flaggedInstrument('interaction.' + eventName, { event: event, view: view }, function () {
... | javascript | {
"resource": ""
} | |
q53606 | train | function (parsedPath) {
return View._classStringForValue(parsedPath.path, | javascript | {
"resource": ""
} | |
q53607 | wrap | train | function wrap(template) {
if (template === null) {
return null;
}
return {
meta: template.meta,
arity: template.arity,
raw: template,
render: function (self, env, options, blockArguments) {
var scope = env.hooks.createFreshScope();
var contextualElement = opti... | javascript | {
"resource": ""
} |
q53608 | advanceToKey | train | function advanceToKey(key) {
var seek = currentMorph;
while (seek.key !== key) {
candidates[seek.key] = seek;
| javascript | {
"resource": ""
} |
q53609 | Morph | train | function Morph(domHelper, contextualElement) {
this.domHelper = domHelper;
// context if content if current content is detached
this.contextualElement = contextualElement;
// inclusive range of morph
// these should be nodeType 1, 3, or 8
this.firstNode = null;
this.lastNode = null;
// ... | javascript | {
"resource": ""
} |
q53610 | ReferenceIterator | train | function ReferenceIterator(iterable) {
_classCallCheck(this, ReferenceIterator);
this.iterator = null;
| javascript | {
"resource": ""
} |
q53611 | train | function (ch) {
// DEBUG "Processing `" + ch + "`:"
var nextStates = this.nextStates,
child,
charSpec,
chars;
// DEBUG " " + debugState(this)
var returned = [];
for (var i = 0, l = nextStates.length; i < l; i++) {
child = nextStates[i];
| javascript | {
"resource": ""
} | |
q53612 | train | function (handlerName) {
var partitionedArgs = _routerUtils.extractQueryParams(_routerUtils.slice.call(arguments, 1)),
suppliedParams = partitionedArgs[0],
queryParams = partitionedArgs[1];
// Construct a TransitionIntent with the provided params
// and apply it to the present st... | javascript | {
"resource": ""
} | |
q53613 | train | function () {
if (this.isAborted) {
return this;
}
_routerUtils.log(this.router, this.sequence, this.targetName + ": transition was aborted");
this.intent.preTransitionState = this.router.state;
| javascript | {
"resource": ""
} | |
q53614 | race | train | function race(entries, label) {
/*jshint validthis:true */
var Constructor = this;
var promise = new Constructor(_rsvpInternal.noop, label);
if (!_rsvpUtils.isArray(entries)) {
_rsvpInternal.reject(promise, new TypeError('You must pass an array to race.'));
return promise;
}
var l... | javascript | {
"resource": ""
} |
q53615 | fsOperationFailed | train | function fsOperationFailed(stream, sourceFile, err) {
if (err.code !== 'ENOENT') {
| javascript | {
"resource": ""
} |
q53616 | compareLastModifiedTime | train | function compareLastModifiedTime(stream, sourceFile, targetPath) {
return stat(targetPath)
.then(targetStat => {
if | javascript | {
"resource": ""
} |
q53617 | compareContents | train | function compareContents(stream, sourceFile, targetPath) {
return readFile(targetPath)
.then(targetData | javascript | {
"resource": ""
} |
q53618 | train | function (layers) {
var layersArray = this._toArray(layers),
separated = this._checkInGetSeparated(layersArray),
groups = separated.groups,
i, group, id;
// Batch add all single layers.
this._originalAddLayers(separated.singles);
// Add Layer Groups to the map so that they are registered the... | javascript | {
"resource": ""
} | |
q53619 | train | function (layers) {
var layersArray = this._toArray(layers),
separated = this._separateSingleFromGroupLayers(layersArray, {
groups: [],
singles: []
}),
groups = separated.groups,
singles = separated.singles,
i = 0,
group, id;
// Batch remove single layers fro... | javascript | {
"resource": ""
} | |
q53620 | train | function (layer, operationType) {
var duration = this.options.singleAddRemoveBufferDuration,
fn;
if (duration > 0) {
this._singleAddRemoveBuffer.push({
type: operationType,
layer: layer
});
if (!this._singleAddRemoveBufferTimeout) {
fn | javascript | {
"resource": ""
} | |
q53621 | train | function (layerGroup) {
if (layerGroup._proxyMcgLayerSupportGroup === undefined ||
layerGroup._proxyMcgLayerSupportGroup !== this) {
return;
}
delete layerGroup._proxyMcgLayerSupportGroup;
layerGroup.addLayer = layerGroup._originalAddLayer;
layerGroup.removeLayer = layerGroup._originalRemoveLayer;
l... | javascript | {
"resource": ""
} | |
q53622 | train | function (map) {
var layers = this._layers,
toBeReAdded = [],
layer;
for (var id in layers) { | javascript | {
"resource": ""
} | |
q53623 | train | function (layer) {
var id = this.getLayerId(layer);
this._layers[id] = layer;
if (this._map) {
this._proxyMcgLayerSupportGroup.addLayer(layer);
} else | javascript | {
"resource": ""
} | |
q53624 | train | function (layer) {
var id = layer in this._layers ? layer : this.getLayerId(layer); | javascript | {
"resource": ""
} | |
q53625 | wrapRegistrationFunction | train | function wrapRegistrationFunction(object, property, callbackArg) {
if (typeof object[property] !== "function") {
console.error("(long-stack-traces) Object", object, "does not contain function", property);
return;
}
if (!has.call(object, property)) {
console.wa... | javascript | {
"resource": ""
} |
q53626 | makeWrappedCallback | train | function makeWrappedCallback(callback, frameLocation) {
// add a fake stack frame. we can't get a real one since we aren't inside the original function
var traceError = new Error();
traceError.__location = frameLocation;
traceError.__previous = currentTraceError;
return function(... | javascript | {
"resource": ""
} |
q53627 | _parserFirefox | train | function _parserFirefox(error){
// start parse the error stack string
var lines = error.stack.split("\n").slice(0, -1);
var stacktrace = [];
lines.forEach(function(line){
var matches = line.match(/^(.*)@(.+):(\d+)$/);
stacktrace.push(new Stacktrace.Frame({
fct : | javascript | {
"resource": ""
} |
q53628 | _parserPhantomJS | train | function _parserPhantomJS(error){
// start parse the error stack string
var lines = error.stack.split("\n").slice(1);
var stacktrace = [];
lines.forEach(function(line){
if( line.match(/\(native\)$/) ){
var matches = line.match(/^\s*at (.+) \(native\)/);
stacktrace.push(new Stacktrace.Frame({
fct... | javascript | {
"resource": ""
} |
q53629 | typeToString | train | function typeToString(allowedType){
if( allowedType === Number ) return 'Number'
if( allowedType === String ) | javascript | {
"resource": ""
} |
q53630 | merge | train | function merge(target, source) {
// Check if font name is changed
if (source['font-name']) {
target['font-name'] = source['font-name'];
}
// Check if root dir is changed
if (source['root-dir']) {
target['root-dir'] = source['root-dir'];
}
// Check for icon changes
if (source.icons) {
for (... | javascript | {
"resource": ""
} |
q53631 | train | function(grunt, script, sources, params) {
var flag;
var cmd = script;
var args =[];
// Compute JSDoc options
for (flag in params) {
if (params.hasOwnProperty(flag)) {
if (params[flag] !== false) {
args.push('--' + flag);
... | javascript | {
"resource": ""
} | |
q53632 | train | function(grunt) {
var i, binPath, paths;
var nodePath = process.env.NODE_PATH || '';
//check first the base path into the cwd
paths = [
__dirname + '/../../node_modules/.bin/jsdoc',
__dirname + '/../../node_modules/jsdoc/jsdoc.js',
__dirname + '/../..... | javascript | {
"resource": ""
} | |
q53633 | compileTemplates | train | function compileTemplates() {
const mainHtml = fs.readFileSync(path.resolve(docsDir, 'src/template.html'), {
encoding: 'utf8',
});
const mainTemplate = Handlebars.compile(mainHtml);
function createPage(fileName, tab, content) {
const html = mainTemplate({
tabs: [{
title: 'Get started',
... | javascript | {
"resource": ""
} |
q53634 | copyResources | train | function copyResources() {
// Source code deps
fileUtil.copyFile(path.resolve(docsDir, '../dist/leonardo-ui.js'), path.resolve(docsDir, 'dist/leonardo-ui/leonardo-ui.js'));
fileUtil.copyFile(path.resolve(docsDir, '../dist/leonardo-ui.js.map'), path.resolve(docsDir, 'dist/leonardo-ui/leonardo-ui.js.map'));
fileU... | javascript | {
"resource": ""
} |
q53635 | getCanonicalNamePlain | train | function getCanonicalNamePlain(loader, normalized, isPlugin) {
// now just reverse apply paths rules to get canonical name
var pathMatch;
// first check exact path matches
for (var p in loader.paths) {
if (loader.paths[p].indexOf('*') != -1)
continue;
var curPath = normalizePath(loader, loader.p... | javascript | {
"resource": ""
} |
q53636 | createPkgConfigPathObj | train | function createPkgConfigPathObj(path) {
var lastWildcard = path.lastIndexOf('*');
var length = Math.max(lastWildcard + 1, path.lastIndexOf('/'));
return {
length: length,
regEx: new RegExp('^(' + | javascript | {
"resource": ""
} |
q53637 | booleanEnvTrace | train | function booleanEnvTrace(condition) {
var conditionObj = parseCondition(condition);
if (conditionObj.negate) | javascript | {
"resource": ""
} |
q53638 | optimizePackageConfig | train | function optimizePackageConfig(json) {
if (json.systemjs)
json = json.systemjs;
// remove non SystemJS package config properties
var loaderConfigProperties = ['baseDir', 'defaultExtension', 'format', 'meta', 'map', 'main'];
for (var p in json)
if (loaderConfigProperties.indexOf(p) == -1)
delete j... | javascript | {
"resource": ""
} |
q53639 | getCompileHash | train | function getCompileHash(load, compileOpts) {
return createHash('md5')
.update(JSON.stringify({
source: load.source,
metadata: load.metadata,
path: compileOpts.sourceMaps && load.path,
normalize: compileOpts.normalize,
anonymous: compileOpts.anonymous,
systemGlobal: compileOpts.systemGlobal,... | javascript | {
"resource": ""
} |
q53640 | remapLoadRecord | train | function remapLoadRecord(load, mapFunction) {
load = extend({}, load);
load.name = mapFunction(load.name, load.name);
var depMap = {};
Object.keys(load.depMap).forEach(function(dep) {
| javascript | {
"resource": ""
} |
q53641 | train | function(element, htSettings) {
var container = document.createElement('div'),
hot;
container.className = this.containerClassName;
if (htSettings.hotId) {
container.id = htSettings.hotId;
}
element[0].appendChild(container);
| javascript | {
"resource": ""
} | |
q53642 | train | function(settings, scope) {
var
scopeOptions = angular.extend({}, scope),
htOptions, i, length;
settings = settings || {};
angular.extend(scopeOptions, scope.settings || {});
htOptions = this.getAvailableSettings();
for (i = 0, length = htOptions.length; i <... | javascript | {
"resource": ""
} | |
q53643 | train | function(settings, scope) {
var
scopeOptions = angular.extend({}, scope),
htHooks, i, length, attribute;
settings = settings || {};
angular.extend(scopeOptions, scope.settings || {});
htHooks = this.getAvailableHooks();
for (i = 0, length = htHooks.length; i... | javascript | {
"resource": ""
} | |
q53644 | train | function(scopeDefinition, attrs) {
for (var i in scopeDefinition) {
if (scopeDefinition.hasOwnProperty(i) && attrs[i] === void 0 &&
attrs[scopeDefinition[i].substr(1, | javascript | {
"resource": ""
} | |
q53645 | train | function() {
var scopeDefinition = {};
this.applyAvailableSettingsScopeDef(scopeDefinition);
this.applyAvailableHooksScopeDef(scopeDefinition);
| javascript | {
"resource": ""
} | |
q53646 | train | function(scopeDefinition) {
var options, i, length;
options = this.getAvailableSettings();
| javascript | {
"resource": ""
} | |
q53647 | train | function(scopeDefinition) {
var options, i, length;
options = this.getAvailableHooks();
for (i = 0, length = options.length; i < length; i++) {
| javascript | {
"resource": ""
} | |
q53648 | train | function(hyphenateStyle) {
var settings = Object.keys(Handsontable.DefaultSettings.prototype);
if (settings.indexOf('contextMenuCopyPaste') === -1) {
settings.push('contextMenuCopyPaste');
}
if (settings.indexOf('handsontable') === -1) {
settings.push('handsontable')... | javascript | {
"resource": ""
} | |
q53649 | train | function(hyphenateStyle) {
var settings = Handsontable.hooks.getRegistered();
if (hyphenateStyle) {
settings = settings.map(function(hook) {
| javascript | {
"resource": ""
} | |
q53650 | autoClosePopups | train | function autoClosePopups(clear) {
if (clear) {
clearTimeout(modalTimerID);
modalTimerID = undefined;
} else {
modalTimerID | javascript | {
"resource": ""
} |
q53651 | buildUserHtml | train | function buildUserHtml(userLogin, userId, isNew) {
var userHtml = "<a href='#' id='" + userId;
if(isNew){
userHtml += "_new'";
}else{
userHtml += "'";
}
userHtml += " class='col-md-12 col-sm-12 col-xs-12 users_form' onclick='";
userHtml += "clickToAdd";
userHtml += "(\"";
| javascript | {
"resource": ""
} |
q53652 | cleanLaunchStoryboardImages | train | function cleanLaunchStoryboardImages(projectRoot, projectConfig, locations) {
var splashScreens = projectConfig.getSplashScreens('ios');
var platformProjDir = locations.xcodeCordovaProj;
var launchStoryboardImagesDir = getLaunchStoryboardImagesDir(projectRoot, platformProjDir);
if (launchStoryboardImage... | javascript | {
"resource": ""
} |
q53653 | train | function(callback, isInitialConnect) {
Utils.QBLog('[QBChat]', 'Status.CONNECTED at ' + chatUtils.getLocalTime());
var self = this,
xmppClient = Utils.getEnv().browser ? self.connection : self.Client,
presence = Utils.getEnv().browser ? $pres() : chatUtils.createStanza(XMPP.Stan... | javascript | {
"resource": ""
} | |
q53654 | train | function(listWithUpdates, callback) {
/**
* Callback for QB.chat.privacylist.update().
* @param {Object} error - The error object
* @param {Object} response - The privacy list object
* @callback updatePrivacylistCallback
* */
var self = this;
self.g... | javascript | {
"resource": ""
} | |
q53655 | train | function(jid_or_user_id) {
var jid;
if (typeof jid_or_user_id === 'string') {
jid = jid_or_user_id;
} else if (typeof jid_or_user_id === 'number') | javascript | {
"resource": ""
} | |
q53656 | train | function(jid_or_user_id) {
var chatType;
if (typeof jid_or_user_id === 'string') {
chatType = jid_or_user_id.indexOf("muc") > -1 ? 'groupchat' : 'chat';
} else if (typeof jid_or_user_id === 'number') {
chatType = | javascript | {
"resource": ""
} | |
q53657 | train | function(occupantsIds, UserId) {
var recipient = null;
occupantsIds.forEach(function(item) {
| javascript | {
"resource": ""
} | |
q53658 | train | function(userId, appId) {
if(!appId){
return userId + '-' + config.creds.appId + '@' + config.endpoints.chat;
}
| javascript | {
"resource": ""
} | |
q53659 | train | function(jid) {
var s = jid.split('/');
if (s.length < 2) return null;
| javascript | {
"resource": ""
} | |
q53660 | train | function(jid) {
var arrayElements = jid.toString().split('/');
if(arrayElements.length === 0){
return null;
| javascript | {
"resource": ""
} | |
q53661 | filterSupportedArgs | train | function filterSupportedArgs(args) {
var filtered = [];
var sargs = ['--device', '--emulator', '--nobuild', '--list', '--target', '--debug', '--release'];
var re = new RegExp(sargs.join('|'));
args.forEach(function(element) {
// supported args not found, we add
| javascript | {
"resource": ""
} |
q53662 | clickSendMessage | train | function clickSendMessage() {
var currentText = $('#message_text').val().trim();
if (!currentText.length) {
return;
| javascript | {
"resource": ""
} |
q53663 | showMessage | train | function showMessage(userId, msg, attachmentFileId) {
var userLogin = getUserLoginById(userId);
var messageHtml = buildMessageHTML(msg.body, userLogin, | javascript | {
"resource": ""
} |
q53664 | sendTypingStatus | train | function sendTypingStatus() {
if (currentDialog.type == 3) {
QB.chat.sendIsTypingStatus(opponentId);
} else if (currentDialog && | javascript | {
"resource": ""
} |
q53665 | sendStopTypinStatus | train | function sendStopTypinStatus() {
if (currentDialog.type == 3) {
QB.chat.sendIsStopTypingStatus(opponentId);
| javascript | {
"resource": ""
} |
q53666 | showUserIsTypingView | train | function showUserIsTypingView(isTyping, userId, dialogId) {
if (isMessageForCurrentDialog(userId, dialogId)) {
if (!isTyping) {
$('#' + userId + '_typing').remove();
} else if (userId != currentUser.id) {
var userLogin = getUserLoginById(userId);
var typingUserHt... | javascript | {
"resource": ""
} |
q53667 | isMessageForCurrentDialog | train | function isMessageForCurrentDialog(userId, dialogId) {
var result = false;
if (dialogId == currentDialog._id || (dialogId === null && currentDialog.type == 3 | javascript | {
"resource": ""
} |
q53668 | checkTool | train | function checkTool (tool, minVersion, message, toolFriendlyName) {
toolFriendlyName = toolFriendlyName || tool;
// Check whether tool command is available at all
var tool_command = shell.which(tool);
if (!tool_command) {
return Q.reject(toolFriendlyName + ' was not found. ' + (message || ''));
... | javascript | {
"resource": ""
} |
q53669 | SoundMeter | train | function SoundMeter(context) {
this.context = context;
this.instant = 0.0;
this.slow = 0.0;
this.clip = 0.0;
this.script = context.createScriptProcessor(2048, 1, 1);
var that = this;
this.script.onaudioprocess = function(event) {
var input = event.inputBuffer.getChannelData(0);
var i;
var sum ... | javascript | {
"resource": ""
} |
q53670 | Device | train | function Device() {
this.available = false;
this.platform = null;
this.version = null;
this.uuid = null;
this.cordova = null;
this.model = null;
this.manufacturer = null;
this.isVirtual = null;
this.serial = null;
var me = this;
channel.onCordovaReady.subscribe(function() {... | javascript | {
"resource": ""
} |
q53671 | train | function(isCompactOrCallback, callback) {
var self = this;
var isCompact, cb;
if(isFunction(isCompactOrCallback)) {
cb = isCompactOrCallback;
} else {
isCompact = isCompactOrCallback;
cb = callback;
}
if(!isFunction(cb)) {
throw new Error('The QB.addressbook.get accept ... | javascript | {
"resource": ""
} | |
q53672 | WebRTCSession | train | function WebRTCSession(params) {
this.ID = params.sessionID ? params.sessionID : generateUUID();
this.state = WebRTCSession.State.NEW;
this.initiatorID = parseInt(params.initiatorID);
this.opponentsIDs = params.opIDs;
this.callType = parseInt(params.callType);
this.peerConnections = {};
t... | javascript | {
"resource": ""
} |
q53673 | _prepareExtension | train | function _prepareExtension(extension) {
var ext = {};
try {
if ( ({}).toString.call(extension) === '[object Object]' ) {
ext.userInfo = extension;
ext = JSON.parse( JSON.stringify(ext).replace(/null/g, "\"\"") );
} else {
| javascript | {
"resource": ""
} |
q53674 | defaultImageSrcGenerator | train | function defaultImageSrcGenerator(icon, options) {
return | javascript | {
"resource": ""
} |
q53675 | grabTheRightIcon | train | function grabTheRightIcon(icon, variant) {
// if variant is present as \uFE0F
return toCodePoint(
variant === '\uFE0F' ?
// the icon should not contain it
icon.slice(0, -1) :
| javascript | {
"resource": ""
} |
q53676 | sendMessage | train | function sendMessage(text, attachmentFileId) {
stickerpipe.onUserMessageSent(stickerpipe.isSticker(text));
var msg = {
type: currentDialog.type === 3 ? 'chat' : 'groupchat',
body: text,
extension: {
save_to_history: 1,
},
markable: 1
};
if(attachment... | javascript | {
"resource": ""
} |
q53677 | createNewDialog | train | function createNewDialog() {
var usersIds = [];
var usersNames = [];
$('#users_list .users_form.active').each(function(index) {
usersIds[index] = $(this).attr('id');
usersNames[index] = $(this).text();
});
$("#add_new_dialog").modal("hide");
$('#add_new_dialog .progress').show();
var dialogName... | javascript | {
"resource": ""
} |
q53678 | showDialogInfoPopup | train | function showDialogInfoPopup() {
if(Object.keys(currentDialog).length !== 0) {
$('#update_dialog').modal('show');
$('#update_dialog .progress').hide();
| javascript | {
"resource": ""
} |
q53679 | parseAndroidPreferences | train | function parseAndroidPreferences(preferences, configData){
var type = 'preference';
_.each(preferences, function (preference) {
// Extract pre-defined preferences (deprecated)
var target,
prefData;
if(preference.attrib.name.match(/^android-manifest\/... | javascript | {
"resource": ""
} |
q53680 | updateWp8Manifest | train | function updateWp8Manifest(targetFilePath, configItems) {
var tempManifest = fileUtils.parseElementtreeSync(targetFilePath),
root = tempManifest.getroot();
_.each(configItems, function (item) {
// if parent is not found on the root, child/grandchild nodes are searched
... | javascript | {
"resource": ""
} |
q53681 | updateIosPbxProj | train | function updateIosPbxProj(xcodeProjectPath, configItems) {
var xcodeProject = xcode.project(xcodeProjectPath);
xcodeProject.parse(function(err){
if(err){
// shell is undefined if android platform has been removed and added with a new package id but ios stayed the same.
... | javascript | {
"resource": ""
} |
q53682 | updateXCBuildConfiguration | train | function updateXCBuildConfiguration(item, buildConfig, mode){
var modified = false;
for(var blockName in buildConfig){
var block = buildConfig[blockName];
if(typeof(block) !== "object" || !(block["buildSettings"])) continue;
var literalMatch = !!block["buildSettings"... | javascript | {
"resource": ""
} |
q53683 | train | function(className, params) {
var result = Utils.getUrl(config.urls.data, className + '/' + params.id + | javascript | {
"resource": ""
} | |
q53684 | train | function(params, callback) {
/**
* Callback for QB.content.createAndUpload(params, callback).
* @callback createAndUploadFileCallback
* @param {object} error - The error object
* @param {object} response - The file object (blob-object-access)
*/
var _this = t... | javascript | {
"resource": ""
} | |
q53685 | train | function (id, callback) {
/**
* Callback for QB.content.getInfo(id, callback)
* @callback getFileInfoByIdCallback
* @param {object} error - The error object
* @param {object} response - The file object (blob-object-access)
*/
| javascript | {
"resource": ""
} | |
q53686 | blockNavigation | train | function blockNavigation($scope, mainBlockUI, blockUIConfig) {
if (blockUIConfig.blockBrowserNavigation) {
function registerLocationChange() {
$scope.$on('$locationChangeStart', function (event) {
// console.log('$locationChangeStart', mainBlockUI.$_blockLocationChange + ' ' + mainBlockUI... | javascript | {
"resource": ""
} |
q53687 | unsubscribe | train | function unsubscribe(handler) {
for (var i = handlers.length - 1; i >= 0; --i) {
if (handlers[i] === handler) {
handlers.splice(i, 1);
}
}
| javascript | {
"resource": ""
} |
q53688 | installGlobalHandler | train | function installGlobalHandler() {
if (_onErrorHandlerInstalled === true) {
return;
}
| javascript | {
"resource": ""
} |
q53689 | processLastException | train | function processLastException() {
var _lastExceptionStack = lastExceptionStack,
_lastException = lastException;
lastExceptionStack = null;
| javascript | {
"resource": ""
} |
q53690 | loadSource | train | function loadSource(url) {
if (!TraceKit.remoteFetching) { //Only attempt request if remoteFetching is on.
return '';
}
try {
var getXHR = function() {
try {
return new window.XMLHttpRequest();
} catch (e) {
... | javascript | {
"resource": ""
} |
q53691 | findSourceInUrls | train | function findSourceInUrls(re, urls) {
var source, m;
for (var i = 0, j = urls.length; i < j; ++i) {
if ((source = getSource(urls[i])).length) {
source = source.join('\n');
if ((m = re.exec(source))) {
return {
'url'... | javascript | {
"resource": ""
} |
q53692 | findSourceByFunctionBody | train | function findSourceByFunctionBody(func) {
if (_isUndefined(window && window.document)) {
return;
}
var urls = [window.location.href],
scripts = window.document.getElementsByTagName('script'),
body,
code = '' + func,
codeRE = /^function... | javascript | {
"resource": ""
} |
q53693 | computeStackTraceFromStacktraceProp | train | function computeStackTraceFromStacktraceProp(ex) {
// Access and store the stacktrace property before doing ANYTHING
// else to it because Opera is not very good at providing it
// reliably in other circumstances.
var stacktrace = ex.stacktrace;
if (!stacktrace) {
ret... | javascript | {
"resource": ""
} |
q53694 | callHandler | train | function callHandler(callback, context, args) {
switch (args.length) {
case 0: return callback.call(context);
case 1: return callback.call(context, args[0]);
case 2: return callback.call(context, args[0], args[1]);
case 3: return | javascript | {
"resource": ""
} |
q53695 | removeHandler | train | function removeHandler(store, name, callback, context) {
var event = store[name];
if (
(!callback || (callback === event.callback || callback === event.callback._callback)) &&
| javascript | {
"resource": ""
} |
q53696 | _partial | train | function _partial(channelName) {
return _logs[channelName] | javascript | {
"resource": ""
} |
q53697 | train | function(channelName, eventName) {
if (typeof console === 'undefined') { return; }
var args = _.toArray(arguments).slice(2); | javascript | {
"resource": ""
} | |
q53698 | train | function(channelName) {
var channel = Radio.channel(channelName);
channel._tunedIn = true;
| javascript | {
"resource": ""
} | |
q53699 | train | function(channelName) {
var channel = Radio.channel(channelName);
channel._tunedIn | javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.