_id
stringlengths
2
6
title
stringlengths
0
58
partition
stringclasses
3 values
text
stringlengths
27
233k
language
stringclasses
1 value
meta_information
dict
q9300
interpolatedOptions
train
function interpolatedOptions(options, context, source, hierarchy = '') { Object.keys(options).forEach((key) => { if (typeof options[key] === 'object') { interpolatedOptions(options[key], context, source, `${hierarchy}.${key}`); } else if (typeof opti...
javascript
{ "resource": "" }
q9301
Executable
train
function Executable(log, command) { /** @type {string} */ this.command = command /** @type {Array.<function(Error, Buffer, Buffer)>} */ this.callbacks = [] /** @type {Arguments} */ this.results = null var startTime = Date.now() child_process.exec(this.command, function() {
javascript
{ "resource": "" }
q9302
execute
train
function execute(log, command, opt_callback) { if (!registry[command]) { registry[command] = new Executable(log, command) }
javascript
{ "resource": "" }
q9303
deserializeNavState
train
function deserializeNavState() { var navID = $('.navigation .nav-accordion-menu').data('nav-id'); if (sessionStorage) { var checkboxMap = sessionStorage.getItem(navID + '-accordion-state'); // If there is no data in session storage then create an empty map. if (checkbox...
javascript
{ "resource": "" }
q9304
hideNavContextMenu
train
function hideNavContextMenu(event) { var contextMenuButton = $('#context-menu'); var popupmenu = $('#contextpopup .mdl-menu__container'); // If an event is defined then make sure it isn't targeting the context menu. if (event) { // Picked element is not the menu if (!...
javascript
{ "resource": "" }
q9305
onNavContextClick
train
function onNavContextClick(event) { // Hides any existing nav context menu. hideNavContextMenu(event); var target = $(this); var packageLink = target.data('package-link'); var packageType = target.data('package-type') || '...'; // Create proper name for package type. swit...
javascript
{ "resource": "" }
q9306
serializeNavState
train
function serializeNavState() { var checkboxMap = {}; $('.navigation .nav-accordion-menu').find('input[type="checkbox"]').each(function() { checkboxMap[$(this).attr('name')] = $(this).is(':checked'); }); var navID
javascript
{ "resource": "" }
q9307
compile
train
function compile(gl, vertSource, fragSource, attribs, verbose) { var log = ""; var vert = loadShader(gl, gl.VERTEX_SHADER, vertSource, verbose); var frag = loadShader(gl, gl.FRAGMENT_SHADER, fragSource, verbose); var vertShader = vert.shader; var fragShader = frag.shader; log += vert.log + "\...
javascript
{ "resource": "" }
q9308
encrypt
train
function encrypt(kms, params, logger) { logger = logger || console; const startMs = Date.now(); return kms.encrypt(params).promise().then( result => { if (logger.traceEnabled) logger.trace(`KMS encrypt success took ${Date.now() - startMs} ms`);
javascript
{ "resource": "" }
q9309
encryptKey
train
function encryptKey(kms, keyId, plaintext, logger) { const params = {KeyId: keyId, Plaintext:
javascript
{ "resource": "" }
q9310
decryptKey
train
function decryptKey(kms, ciphertextBase64, logger) { const params = {CiphertextBlob: new Buffer(ciphertextBase64, 'base64')}; return
javascript
{ "resource": "" }
q9311
genericLog
train
function genericLog(logger, moduletag, logLevel='info'){ const isDebug = logLevel==='debug' const level = isDebug ? 'info' : logLevel const levelLogger = logger[level] const active = isDebug ? enabled(moduletag) : true /** * tagged Logger * @function taggedLog * @param {...string} ta...
javascript
{ "resource": "" }
q9312
mapLog
train
function mapLog(...tags) { /** * Array logge Prinst every value on separated line * @function printArray * @param {Array} message Printed list * @returns {Array} */ function printArray(message) { if (active) { arrayCheck(message) const tag = normalizeDefaults(tags)...
javascript
{ "resource": "" }
q9313
Logger
train
function Logger(moduletag) { const trimmedModule = trim(moduletag) winston.loggers.add(trimmedModule, { console: { colorize: true, label : trimmedModule } }) const logger = winston.loggers.get(trimmedModule) const defs = genericLog(logger, trimmedModule) defs.warn = genericLog(logger, ...
javascript
{ "resource": "" }
q9314
getInvokedFunctionArnFunctionName
train
function getInvokedFunctionArnFunctionName(awsContext) { const invokedFunctionArn = awsContext
javascript
{ "resource": "" }
q9315
train
function(search, type, limit, fields) { if (!search) return Promise.reject(new Error('wotblitz.account.list: search is required')); return request({ hostname: hosts.wotb, path: '/wotb/account/list/' },
javascript
{ "resource": "" }
q9316
train
function(access_token, expires_at) { if (!access_token) return Promise.reject(new Error('wotblitz.auth.prolongate: access_token is required')); return request({ hostname: hosts.wot, path: '/wot/auth/prolongate/' },
javascript
{ "resource": "" }
q9317
train
function(access_token, message_id, filters, fields) { if (!access_token) return Promise.reject(new Error('wotblitz.clanmessages.messages: access_token is required')); return request({ hostname: hosts.wotb, path: '/wotb/clanmessages/messages/' }, Object.assign({ access_token: access_token,
javascript
{ "resource": "" }
q9318
train
function(access_token, title, text, type, importance, expires_at) { if (!expires_at) return Promise.reject(new Error('wotblitz.clanmessages.create: all arguments are required')); return request({ hostname: hosts.wotb, path: '/wotb/clanmessages/create/'
javascript
{ "resource": "" }
q9319
train
function(access_token, message_id) { if (!message_id) return Promise.reject(new Error('wotblitz.clanmessages.delete: all arguments
javascript
{ "resource": "" }
q9320
train
function(access_token, message_id, action) { if (!action) return Promise.reject(new Error('wotblitz.clanmessages.like: all arguments
javascript
{ "resource": "" }
q9321
train
function(access_token, message_id, fields) { if (!access_token) return Promise.reject(new Error('wotblitz.clanmessages.likes: access_token is required')); if (!message_id) return Promise.reject(new Error('wotblitz.clanmessages.likes: message_id is required')); return request({ hostname: hosts.wotb, path:
javascript
{ "resource": "" }
q9322
train
function(search, page_no, limit, fields) { return request({ hostname: hosts.wotb, path: '/wotb/clans/list/' }, { search:
javascript
{ "resource": "" }
q9323
train
function(fields) { return request({ hostname: hosts.wotb, path: '/wotb/clans/glossary/' }, {
javascript
{ "resource": "" }
q9324
train
function(tank_id, nation, fields) { return request({ hostname: hosts.wotb, path: '/wotb/encyclopedia/vehicles/'
javascript
{ "resource": "" }
q9325
train
function(tank_id, profile_id, modules, fields) { if (!tank_id) return Promise.reject(new Error('wotblitz.encyclopedia.vehicleprofile: tank_id is required')); return request({ hostname: hosts.wotb, path: '/wotb/encyclopedia/vehicleprofile/' },
javascript
{ "resource": "" }
q9326
train
function(module_id, fields) { return request({ hostname: hosts.wotb, path: '/wotb/encyclopedia/modules/' }, { module_id: module_id
javascript
{ "resource": "" }
q9327
train
function(tank_id, provision_id, type, fields) { return request({ hostname: hosts.wotb, path: '/wotb/encyclopedia/provisions/' }, { tank_id: tank_id ? tank_id.toString() : '', provision_id: provision_id
javascript
{ "resource": "" }
q9328
train
function(skill_id, vehicle_type, fields) { return request({ hostname: hosts.wotb, path: '/wotb/encyclopedia/crewskills/'
javascript
{ "resource": "" }
q9329
train
function(options, fields) { options = Object.assign({ search: null, status: null, page_no: null, limit: null }, options, { fields: fields
javascript
{ "resource": "" }
q9330
_deepDefaults
train
function _deepDefaults(dest, src) { if(_.isUndefined(dest) || _.isNull(dest) || !_.isPlainObject(dest)) { return dest; } _.each(src, function(v, k) { if(_.isUndefined(dest[k])) { dest[k] = v;
javascript
{ "resource": "" }
q9331
genStorageKey
train
function genStorageKey (ns, key) { return (ns === '') ?
javascript
{ "resource": "" }
q9332
LocalStorage
train
function LocalStorage (params) { events.EventEmitter.call(this); if (!params || typeof params === 'string') { params = { ns: params || '' }; } this.ns = params.ns || ''; if (typeof this.ns !== 'string') { throw new Error('Namespace must be a string.'); } this.preSave = params.preSave...
javascript
{ "resource": "" }
q9333
train
function (invoiceitem, cb) { Invoiceitem.findOrCreate(invoiceitem.id, invoiceitem) .exec(function (err, foundInvoiceitem){ if (err) return cb(err); if (foundInvoiceitem.lastStripeEvent > invoiceitem.lastStripeEvent) return cb(null, foundInvoiceitem); if (foundInvoiceitem.lastStripeEvent == ...
javascript
{ "resource": "" }
q9334
train
function (invoiceitem, cb) { Invoiceitem.destroy(invoiceitem.id) .exec(function (err, destroyedInvoiceitems){ if (err) return cb(err); if (!destroyedInvoiceitems) return cb(null, null);
javascript
{ "resource": "" }
q9335
validateTableConfig
train
function validateTableConfig(obj) { /** If configuration has missing or invalid 'tableName' configuration, throw error */ if ( typeof obj.tableName !== `string` || !obj.tableName.match(/^[a-z_]+$/) ) throw
javascript
{ "resource": "" }
q9336
ev_canvas
train
function ev_canvas(ev) { if(!root.is('.blocked')) { if(ev.layerX || ev.layerX == 0) { // Firefox ev._x = ev.layerX; ev._y = ev.layerY; } else if(ev.offsetX || ev.offsetX == 0) { // Opera ev._x = ev.offsetX; ev._y = ev.offset...
javascript
{ "resource": "" }
q9337
train
function (coupon, cb) { Coupon.findOrCreate(coupon.id, coupon) .exec(function (err, foundCoupon){ if (err) return cb(err); if (foundCoupon.lastStripeEvent > coupon.lastStripeEvent) return cb(null, foundCoupon); if (foundCoupon.lastStripeEvent == coupon.lastStripeEvent) return Coupon.afterSt...
javascript
{ "resource": "" }
q9338
train
function (coupon, cb) { Coupon.destroy(coupon.id) .exec(function (err, destroyedCoupons){ if (err) return cb(err); if(!destroyedCoupons) return cb(null, null);
javascript
{ "resource": "" }
q9339
train
function (account, cb) { Stripeaccount.findOrCreate(account.id, account) .exec(function (err, foundAccount){ if (err) return cb(err); Stripeaccount.update(foundAccount.id, account) .exec(function(err,
javascript
{ "resource": "" }
q9340
checkboxValues
train
function checkboxValues(selection) { return selection.select('.body')
javascript
{ "resource": "" }
q9341
addDepsToRequiredTargets
train
function addDepsToRequiredTargets(target, parents){ if (parents.have(target)){ callback(new Error("Circular dependencies detected")); return; } requiredTargets.add(target);
javascript
{ "resource": "" }
q9342
MPU
train
function MPU (ops) { File.call(this, ops); this._parts = {}; this._bufferParts = [];
javascript
{ "resource": "" }
q9343
find
train
function find(model) { var _this = this; var forceFetch = arguments[1] === undefined ? false : arguments[1]; var record = this.records.get(model); if (record && !forceFetch) { return Promise.resolve(record); } else { model = this._ensureModel(model);
javascript
{ "resource": "" }
q9344
findAll
train
function findAll() { var _this = this; var options = arguments[0] === undefined ? {} : arguments[0]; var forceFetch = arguments[1] === undefined ? false : arguments[1]; if (this._hasSynced && !forceFetch) { return Promise.resolve(this.records); } else {
javascript
{ "resource": "" }
q9345
save
train
function save(model) { var _this = this; var record = this.records.get(model); model = record || this._ensureModel(model); return Promise.resolve(model.save()).then(function () {
javascript
{ "resource": "" }
q9346
insert
train
function insert(model) { model = this.records.add(model, { merge: true });
javascript
{ "resource": "" }
q9347
_ensureModel
train
function _ensureModel(model) { if (model instanceof this.model) { return model; } else
javascript
{ "resource": "" }
q9348
train
function(input, callback) { // Handle non-function `input`. if (!_.isFunction(input)) { callback(null, input) return } // Handle asynchronous `input` function. if (input.length) { input(callback) return
javascript
{ "resource": "" }
q9349
sassVars
train
function sassVars (filePath) { const declarations = collectDeclarations(filePath); let variables = {}; if (!declarations.length) { message('Warning: Zero declarations found'); return; } declarations.forEach(function (declaration) { const parsedDeclaration = parseDeclaration...
javascript
{ "resource": "" }
q9350
getOrderedPlayers
train
function getOrderedPlayers (tnmt) { var res = [] for (var i = 0; i < tnmt.players.length; i++) {
javascript
{ "resource": "" }
q9351
getOrderedTeams
train
function getOrderedTeams (tnmt) { var res = [] for (var i = 0; i <
javascript
{ "resource": "" }
q9352
playerPairingFilter
train
function playerPairingFilter (tnmt) { return function (pairing) { // board number too high? if (tnmt.general[35] &&
javascript
{ "resource": "" }
q9353
NWTIO
train
function NWTIO(args) { this.req = new XMLHttpRequest(); this.config = {}; this.url = args[0]; // Data to send as this.ioData = ''; var chainableSetters = ['success', 'failure', 'serialize'], i, setter, mythis = this, // Returns the setter function getSetter = function (setter) { return function (v...
javascript
{ "resource": "" }
q9354
train
function() { var mythis = this; this.req.onload = function() { if (mythis.config.success) { var response = new NWTIOResponse(mythis.req); mythis.config.success(response); } }; this.req.onerror = function() { if (mythis.config.failure) {
javascript
{ "resource": "" }
q9355
train
function(data, method) { var urlencodedForm = true; if (typeof data == 'string') { this.ioData = data; } else if (typeof data == 'object' && data._node) { if (data.getAttribute('enctype')) { urlencodedForm = false; } this.ioData = new
javascript
{ "resource": "" }
q9356
train
function(data) { // Strip out the old query string and append the new one if (data) { this.url = this.url.split('?', 1)[0] + '?'
javascript
{ "resource": "" }
q9357
train
function(fn) { asyncjs.each(modelNames, function(name, _fn) { // get model definition var modelDefinition = modelDefinitions[name]; modelDefinition.__name = name; // get connection info var connectionInfo = lib.findConnection(m...
javascript
{ "resource": "" }
q9358
train
function(err, model) { if (err) { return _fn(err); } if (!model) { return _fn('No model (' + name + ') returned from `adapter.registerModel`');
javascript
{ "resource": "" }
q9359
train
function(baseURI) { var hash = baseURI.indexOf("#"); if (hash>=0) { baseURI = baseURI.substring(0,hash); } if (options && options.baseURIMap) {
javascript
{ "resource": "" }
q9360
train
function (subscription, cb) { Subscription.findOrCreate(subscription.id, subscription) .exec(function (err, foundSubscription){ if (err) return cb(err); if (foundSubscription.lastStripeEvent > subscription.lastStripeEvent) return cb(null, foundSubscription); if (foundSubscription.lastStripe...
javascript
{ "resource": "" }
q9361
train
function (subscription, cb) { Subscription.destroy(subscription.id) .exec(function (err, destroyedSubscriptions){ if (err) return cb(err);
javascript
{ "resource": "" }
q9362
fetchRepoREADME
train
function fetchRepoREADME (repo) { request({ uri: 'https://api.github.com/repos/' + repo + '/readme', headers: _.extend(headers, { // Get raw README content 'Accept': 'application/vnd.github.VERSION.raw' }) }, function (error, response, body) { if (!error && response.statusCode === 200...
javascript
{ "resource": "" }
q9363
lintMarkdown
train
function lintMarkdown (body, file) { var codeBlocks = parseMarkdown(body); didLogFileBreak = false; var failedCodeBlocks = _.reject(_.compact(codeBlocks), function (codeBlock) { return validateCodeBlock(codeBlock, file); }); numFilesToParse--; if (failedCodeBlocks.length === 0) { if (program.ver...
javascript
{ "resource": "" }
q9364
logFileBreak
train
function logFileBreak (text) { if (numFailedFiles % 2 === 0) { console.log(text.yellow.inverse); }
javascript
{ "resource": "" }
q9365
validateCodeBlock
train
function validateCodeBlock (codeBlock, file) { var lang = codeBlock.lang; var code = codeBlock.code; if (lang === 'json') { try { JSON.parse(code); } catch (e) { console.log(e); console.log(code); return false; } return true; } else if (lang === 'js' || lang === 'javascr...
javascript
{ "resource": "" }
q9366
getAuthToken
train
function getAuthToken () { console.log('You have hit the rate limit for unauthenticated requests, please log in to raise your rate limit:\n'.red); program.prompt('GitHub Username: ', function (user) { console.log('\nAfter entering your password, hit return' + ' twice.\n'.green); var authProcess = spawn('c...
javascript
{ "resource": "" }
q9367
preprocessCode
train
function preprocessCode (code) { // Remove starting comments while (code.indexOf('//') === 0) { code = code.slice(code.indexOf('\n')); } // Starts with an object literal if (code.indexOf('{') === 0) { code = 'var json = ' + code; // Starts with an object property } else if (code.indexOf(':') !=...
javascript
{ "resource": "" }
q9368
processExec
train
function processExec(opts, createOpts, execOpts, callback) { this.execRaw(createOpts, (createErr, exec) => { if( createErr ) { callback(createErr); return } exec.start(execOpts, (execErr, stream) => { if( execErr ) { callback(execErr); return } if( 'live' in opts && opts.live ) { // If the user wants li...
javascript
{ "resource": "" }
q9369
train
function() { // Internal reference. var _self = this; // Loop through our hidden element collection. _self.hidden.each( function( i ) { // Cache this element. var $elem = $( this ), _tmp = _self.tmp[ i ]; // Get the stored 'style' value for this element....
javascript
{ "resource": "" }
q9370
train
function (transfer, cb) { Transfer.findOrCreate(transfer.id, transfer) .exec(function (err, foundTransfer){ if (err) return cb(err); if (foundTransfer.lastStripeEvent > transfer.lastStripeEvent) return cb(null, foundTransfer); if (foundTransfer.lastStripeEvent == transfer.lastStripeEvent) r...
javascript
{ "resource": "" }
q9371
initJSArch
train
async function initJSArch({ CONFIG, EOL, glob, fs, parser, log = noop }) { return jsArch; /** * Compile an run a template * @param {Object} options * Options (destructured) * @param {Object} options.cwd * Current working directory * @param {Object} options.patterns * Patterns to look fil...
javascript
{ "resource": "" }
q9372
getItem
train
function getItem(tableName, key, opts, desc, context) { try { const params = { TableName: tableName, Key: key }; if (opts) merge(opts, params, mergeOpts); if (context.traceEnabled) context.trace(`Loading ${desc} from ${tableName} using params (${JSON.stringify(params)})`); return con...
javascript
{ "resource": "" }
q9373
updateProjectionExpression
train
function updateProjectionExpression(opts, expressions) { if (!expressions || !Array.isArray(expressions) || expressions.length <= 0) return opts; if (!opts) opts = {}; const projectionExpressions = opts.ProjectionExpression ? opts.ProjectionExpression.split(',').filter(isNotBlank).map(trim) : []; expressi...
javascript
{ "resource": "" }
q9374
updateExpressionAttributeNames
train
function updateExpressionAttributeNames(opts, expressionAttributeNames) { if (!expressionAttributeNames || typeof expressionAttributeNames !== 'object') return opts; if (!opts) opts =
javascript
{ "resource": "" }
q9375
updateExpressionAttributeValues
train
function updateExpressionAttributeValues(opts, expressionAttributeValues) { if (!expressionAttributeValues || typeof expressionAttributeValues !== 'object') return opts; if (!opts) opts =
javascript
{ "resource": "" }
q9376
train
function (card, cb) { Card.findOrCreate(card.id, card) .exec(function (err, foundCard){ if (err) return cb(err); if (foundCard.lastStripeEvent > card.lastStripeEvent) return cb(null, foundCard); if (foundCard.lastStripeEvent == card.lastStripeEvent) return Card.afterStripeCustomerCardUpdate...
javascript
{ "resource": "" }
q9377
train
function (card, cb) { Card.destroy(card.id) .exec(function (err, destroyedCards){ if (err) return cb(err); if (!destroyedCards) return cb(null, null);
javascript
{ "resource": "" }
q9378
getOrigin
train
function getOrigin(loc) { var a; if (loc.protocol !== undefined) { a = loc; } else { a = document.createElement("a");
javascript
{ "resource": "" }
q9379
train
function(ev) { var regex = new RegExp(searchBox.value, 'i'), targets = optionsList.querySelectorAll('li'); for (var i=0; i<targets.length; i++) { var target = targets[i]; // With multiple active options are never shown in the options list, with s...
javascript
{ "resource": "" }
q9380
train
function(option, selected) { var item = document.createElement('li'); item.textContent = option.textContent; var activate = function() { // If multiple we just remove this option from the list if (multiple) { item.style.display = '...
javascript
{ "resource": "" }
q9381
train
function () { var self = this; if (typeof this._isIntercepted === 'undefined') { // Got through all injector objects each(res.injectors, function (obj) { if (obj.when(req, res)) { self._isIntercepted = true; obj.active = true; } ...
javascript
{ "resource": "" }
q9382
train
function(status, reasonPhrase, headers) { var self = this; each(headers || reasonPhrase, function(value, name) {
javascript
{ "resource": "" }
q9383
train
function (chunk, encoding) { if (this._interceptCheck()) { if(!this._interceptBuffer) { debug('initializing _interceptBuffer'); this._interceptBuffer = new WritableStream(); }
javascript
{ "resource": "" }
q9384
train
function (data, encoding) { var self = this; var _super = this._super.bind(this); if (!this._interceptCheck()) { debug('not intercepting, ending with original .end'); return _super(data, encoding); } if (data) { this.write(data, encoding); ...
javascript
{ "resource": "" }
q9385
isJavaScriptFile
train
function isJavaScriptFile(filepath) { if (!fs.statSync(filepath).isFile()) { return false; } if (path.basename(filepath) ===
javascript
{ "resource": "" }
q9386
onValue
train
function onValue(dbRef, snapCallback, processedCallback, cancelCallbackOrContext, context) { var storageKey = getStorageKeyFromDbRef(dbRef, 'value'); return _reactNative.AsyncStorage.getItem(storageKey).then(function (value) { // Called processedCallback with cached value. if (value !== null) { var cache...
javascript
{ "resource": "" }
q9387
offValue
train
function offValue(dbRef) { var storageKey = getStorageKeyFromDbRef(dbRef, 'value'); //Turn listener off. dbRef.off(); return new Promise(function (resolve, reject) { if (storageKey in snapPeak) { var dataToCache = snapPeak[storageKey];
javascript
{ "resource": "" }
q9388
onChildAdded
train
function onChildAdded(dbRef, fromCacheCallback, newDataArrivingCallback, snapCallback, cancelCallbackOrContext, context) { var storageKey = getStorageKeyFromDbRef(dbRef, 'child_added'); return _reactNative.AsyncStorage.getItem(storageKey).then(function (value) { // Called processedCallback with cached value. ...
javascript
{ "resource": "" }
q9389
offChildAdded
train
function offChildAdded(dbRef, dataToCache) { var storageKey = getStorageKeyFromDbRef(dbRef, 'child_added'); //Turn listener
javascript
{ "resource": "" }
q9390
onChildRemoved
train
function onChildRemoved(dbRef, callback, cancelCallbackOrContext, context) {
javascript
{ "resource": "" }
q9391
onChildChanged
train
function onChildChanged(dbRef, callback, cancelCallbackOrContext, context) {
javascript
{ "resource": "" }
q9392
onChildMoved
train
function onChildMoved(dbRef, callback, cancelCallbackOrContext, context) {
javascript
{ "resource": "" }
q9393
twice
train
function twice(dbRef, snapCallback, processedCallback, cancelCallbackOrContext, context) { var storageKey = getStorageKeyFromDbRef(dbRef, 'twice'); return _reactNative.AsyncStorage.getItem(storageKey).then(function (value) { // Called processedCallback with cached value. if (value !== null) { var cachedV...
javascript
{ "resource": "" }
q9394
clearCacheForRef
train
function clearCacheForRef(dbRef) { var location = dbRef.toString().substring(dbRef.root.toString().length); var promises = []; acceptedOnVerbs.forEach(function (eventType)
javascript
{ "resource": "" }
q9395
clearCache
train
function clearCache() { return _reactNative.AsyncStorage.getAllKeys().then(function (keys) { var promises = []; keys.forEach(function (key) { if (key.startsWith('@FirebaseLocalCache:')) { //delete it from the cache
javascript
{ "resource": "" }
q9396
parseIntValue
train
function parseIntValue(input) { let value =
javascript
{ "resource": "" }
q9397
XAudioJSMediaStreamPushAudio
train
function XAudioJSMediaStreamPushAudio(event) { var index = 0; var audioLengthRequested = event.data; var samplesPerCallbackAll = XAudioJSSamplesPerCallback * XAudioJSChannelsAllocated; var XAudioJSMediaStreamLengthAlias = audioLengthRequested % XAudioJSSamplesPerCallback; audioLengthRequested = audioLengthRequeste...
javascript
{ "resource": "" }
q9398
listEventSourceMappings
train
function listEventSourceMappings(lambda, params, logger) { logger = logger || console; const functionName = params.FunctionName; const listEventSourceMappingsAsync = Promises.wrap(lambda.listEventSourceMappings); const startMs = Date.now(); return listEventSourceMappingsAsync.call(lambda, params).then( re...
javascript
{ "resource": "" }
q9399
updateEventSourceMapping
train
function updateEventSourceMapping(lambda, params, logger) { logger = logger || console; const functionName = params.FunctionName; const uuid = params.UUID; const updateEventSourceMappingAsync = Promises.wrap(lambda.updateEventSourceMapping); const startMs = Date.now(); return updateEventSourceMappingAsync.c...
javascript
{ "resource": "" }