keepData is for internal use only--do not document
171501
function( selector, keepData ) {
		var elem,
			i = 0;

		for ( ; (elem = this[i]) != null; i++ ) {
			if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
				if ( !keepData && elem.nodeType === 1 ) {
					jQuery.cleanData( elem.getElementsByTagName("*") );
					jQuery.cleanData( [ elem ] );
				}

				if ( elem.parentNode ) {
					elem.parentNode.removeChild( elem );
				}
			}
		}

		return this;
	}
267096
def SaveDataToFD(self, raw_data, fd):
    """"""
    fd.write(yaml.Dump(raw_data).encode("utf-8"))
1138423
private void parseReadOnly(CloudTrailEventData eventData) throws IOException {
        jsonParser.nextToken();
        Boolean readOnly = null;
        if (jsonParser.getCurrentToken() != JsonToken.VALUE_NULL) {
            readOnly = jsonParser.getBooleanValue();
        }
        eventData.add(CloudTrailEventField.readOnly.name(), readOnly);
    }
982210
private synchronized void disableDeferredReferenceData() {
        deferredReferenceDataEnabled = false;
        if (parent != null && deferredReferenceDatas != null) {
            parent.removeDeferredReferenceData(this);
            deferredReferenceDatas = null;
        }
    }
68516
private void save(OutputStream os, String id, SessionData data) throws IOException {
        DataOutputStream out = new DataOutputStream(os);
        out.writeUTF(id);
        out.writeLong(data.getCreationTime());
        out.writeLong(data.getAccessedTime());
        out.writeLong(data.getLastAccessedTime());
        out.writeLong(data.getExpiryTime());
        out.writeLong(data.getMaxInactiveInterval());

        List<String> keys = new ArrayList<>(data.getKeys());
        out.writeInt(keys.size());
        ObjectOutputStream oos = new ObjectOutputStream(out);
        for (String name : keys) {
            oos.writeUTF(name);
            oos.writeObject(data.getAttribute(name));
        }
    }
845389
public void write(ObjectWriter out, PersistedValueData vd) throws IOException
   {
      out.writeInt(SerializationConstants.PERSISTED_VALUE_DATA);
      out.writeInt(vd.getOrderNumber());

      boolean isByteArray = vd.isByteArray();
      out.writeBoolean(isByteArray);

      if (isByteArray)
      {
         byte[] data = vd.getAsByteArray();
         out.writeInt(data.length);
         out.write(data);
      }
      else
      {
         // write file content
         FilePersistedValueData streamed = (FilePersistedValueData)vd;

         InputStream in = null;

         if (streamed.getFile() == null && vd instanceof StreamPersistedValueData)
         {
            if (((StreamPersistedValueData)vd).getTempFile() != null)
            {
               in = PrivilegedFileHelper.fileInputStream(((StreamPersistedValueData)vd).getTempFile());
            }
         }
         else
         {
            in = streamed.getAsStream();
         }

         if (streamed.getFile() instanceof SerializationSpoolFile)
         {
            SerializationSpoolFile ssf = (SerializationSpoolFile)streamed.getFile();
            out.writeString(ssf.getId());
            out.writeLong(0);
         }
         else
         {
            // write property id - used for reread data optimization
            String id = IdGenerator.generate();
            out.writeString(id);

            if (in == null)
            {
               // Deleted state usecase
               out.writeLong(SerializationConstants.NULL_FILE);
            }
            else
            {
               out.writeLong(vd.getLength());
               try
               {
                  byte[] buf = new byte[SerializationConstants.INTERNAL_BUFFER_SIZE];
                  int l = 0;
                  while ((l = in.read(buf)) >= 0)
                  {
                     out.write(buf, 0, l);
                  }
               }
               finally
               {
                  in.close();
               }
            }
         }
      }
   }
361541
function () {
                    script.onreadystatechange = script.onload = script.onerror = null;
                    rawDocument.body.removeChild(script);
                    if (done) {
                        done();
                    }
                }
473986
@SubscribeEvent
	public void onDataSave(ChunkDataEvent.Save event)
	{
		NBTTagCompound nbt = event.getData();

		for (HandlerInfo<?> handlerInfo : handlerInfos.values())
		{
			ChunkData<?> chunkData = chunkData(handlerInfo.identifier, event.getWorld(), event.getChunk());
			if (chunkData != null && chunkData.hasData())
			{
				//				MalisisCore.message("onDataSave (" + event.getChunk().xPosition + "/" + event.getChunk().zPosition + ") for "
				//						+ handlerInfo.identifier);
				ByteBuf buf = Unpooled.buffer();
				chunkData.toBytes(buf);
				nbt.setByteArray(handlerInfo.identifier, buf.capacity(buf.writerIndex()).array());
			}

			//unload data on save because saving is called after unload
			if (event.getChunk().unloadQueued)
				datas.get().remove(handlerInfo.identifier, event.getChunk());

		}
	}
226105
def save_data(self,session, exp_id, content):
    ''''''
    from expfactory.database.models import (
        Participant,
        Result
    )
    subid = session.get('subid')
    token = session.get('token') 

    self.logger.info('Saving data for subid %s' % subid)    

    # We only attempt save if there is a subject id, set at start
    if subid is not None:
        p = Participant.query.filter(Participant.id == subid).first() # better query here

        # Does 
        if self.headless and p.token != token:
            self.logger.warning('%s attempting to use mismatched token [%s] skipping save' %(p.id, token))
        elif self.headless and p.token.endswith(('finished','revoked')):
            self.logger.warning('%s attempting to use expired token [%s] skipping save' %(p.id, token))
        else:

            # Preference is to save data under 'data', otherwise do all of it
            if "data" in content:
                content = content['data']

            result = Result(data=content,
                            exp_id=exp_id,
                            participant_id=p.id) # check if changes from str/int

            # Create and save the result
            self.session.add(result)
            p.results.append(result)
            self.session.commit()

            self.logger.info("Save [participant] %s [result] %s" %(p, result))
698824
function removeElData(el) {
  var id = el[elIdAttr];

  if (!id) {
    return;
  }

  // Remove all stored data
  delete elData[id];

  // Remove the elIdAttr property from the DOM node
  try {
    delete el[elIdAttr];
  } catch (e) {
    if (el.removeAttribute) {
      el.removeAttribute(elIdAttr);
    } else {
      // IE doesn't appear to support removeAttribute on the document element
      el[elIdAttr] = null;
    }
  }
}
552827
function (data) {
      var include = function (path, includeData) {
        var d = utils.shallowCopy({}, data);
        if (includeData) {
          d = utils.shallowCopy(d, includeData);
        }
        var p = includeFile(path, opts)(d);
        return p;
      };
      
      var error = null;
      
      var outputStreamOpts = utils.shallowCopy({}, opts.streamOptions);
      var outputStreamBufferOpts = utils.shallowCopy({}, opts.streamOptions);
      outputStreamBufferOpts.flush = function (cb) {
        cb(error);
      }
      
      var outputStream = new PassThrough(outputStreamOpts);
      var outputStreamBuffer = new PassThrough(outputStreamBufferOpts);
      
      // outputStream.write('');
      outputStream.pipe(outputStreamBuffer);
      
      var p = utils.wrapToPromise(fn, opts.context, Promise, data || {}, escape, include, rethrow, Promise, utils.wrapToPromise, outputStream, Stream);
      
      p.shouldUseBuffer = true;
      p.noBuffer = function () {
        p.outputBuffer = ""
        p.shouldUseBuffer = false;
      }
      p.useBuffer = function () {
        p.shouldUseBuffer = true;
      }
      
      
      // do not continue the script if it is not appropriate to resume writing data to the stream.
      // https://nodejs.org/api/stream.html#stream_event_drain
      p.shouldWaitFlush = false;
      Object.defineProperty(outputStream, 'shouldWaitFlush', {
        get: function () {
          return p.shouldWaitFlush
        },
        set: function (val) {
          p.shouldWaitFlush = val
          return true;
        }
      })
      p.waitFlush = function () {
        p.shouldWaitFlush = true;
      }
      p.noWaitFlush = function () {
        p.shouldWaitFlush = false;
      }
      
      
      p.outputBuffer = ""
      // since the stream got consumed immediatly, we need another stream to buffer it;
      p.outputStream = outputStreamBuffer;
      // a test only property
      p._outputStream = outputStream;
      // since we need to escape the text, and escape only works on string
      outputStream.setEncoding('utf8');
      
      // redirect data to the buffer
      outputStream.on('data', function (data) {
        if (!p.shouldUseBuffer) return;
        p.outputBuffer += data;
      })
      
      // resolve the promise after stream end, so we can get all data.
      outputStream.on('end', function (data) {
        p.defered.resolve(p.outputBuffer)
      })
      
      // hook after generator exit normally
      p.defered.onResolve = function (defered) {
        outputStream.end();
        // force it to flush all buffer since a pipe to fulfilled target prohibit
        // the stream from flushing the data
        // outputStream.uncork();
        
        // use read directly, since uncork sometimes fail to dunp the stream
        while (outputStream.read()) {}
      }
      
      // hook for situation the generator throws
      p.defered.onReject = function (defered, err) {
        // the promise should be reject before stream got end, 
        // or it will cause the stream to think it terminate normally, 
        // since there is not any error event before the end event and promise reject
        defered.reject(err)
        
        // emit only if the user decide to listen to stream's error event instead of promise reject
        // the stream.pipe bind a error listener to stream, so we need to count it
        if (outputStreamBuffer.listenerCount('error') > 1) {
          error = err;
        }
        outputStream.end();
        // force it to flush all buffer since a pipe to fulfilled target prohibit
        // the stream from flushing the data
        // outputStream.uncork();
        
        // use read directly, since uncork sometimes fail to dunp the stream
        while (outputStream.read()) {}
      }
      
      // terminate the stream, prevent further writing
      p.defered.onInterrupt = function (cb) {
        outputStream.end();
        cb();
      }
      
      setTimeout(function() {
        p.execute();
      }, 0)
      return p;
    }
523285
function storeMetaData(metaData, file) {
	var json
		, stream;

	try {
		json = JSON.stringify(metaData);
		stream = fs.createWriteStream(file);

		stream.write(json);
		stream.end();
	} catch(e) {
		console.error('Could not save meta data for ' + file);
	}
}
1092021
function (newData) {
            var result = new $.Deferred();
            var path = this.path;
            var prefFile = FileSystem.getFileForPath(path);

            if (path) {
                try {
                    var text = JSON.stringify(newData, null, 4);

                    // maintain the original line endings
                    text = FileUtils.translateLineEndings(text, this._lineEndings);
                    prefFile.write(text, {}, function (err) {
                        if (err) {
                            result.reject("Unable to save prefs at " + path + " " + err);
                        } else {
                            result.resolve();
                        }
                    });
                } catch (e) {
                    result.reject("Unable to convert prefs to JSON" + e.toString());
                }
            } else {
                result.resolve();
            }
            return result.promise();
        }
892584
function Document(db, raw) 
{
  var self = this, raw;
  if (raw===undefined) raw = { };
  if (typeof(raw)==="string") raw = deserialize(raw);
  
  Object.defineProperty(this, "save", { value: function(cb) {
    return db.save(self, cb);
  }, writable: false  });

  Object.defineProperty(this, "remove", { value: function(cb) {
    if (! self._id) return cb(); // TODO maybe emit error
    return db.remove({ _id: self._id }, { }, cb);
  }, writable: false  });

  Object.defineProperty(this, "update", { value: function(modifier, cb) {
    if (self._id === undefined) self._id = db.createNewId();
    return db.update({ _id: self._id }, modifier, { upsert: true }, cb);
  }, writable: false  });

  Object.defineProperty(this, "copy", { value: function(strict) { 
    return deepCopy(self, strict);
  }, writable: false });

  Object.defineProperty(this, "serialize", { value: function(strict) {
    return serialize(self);
  }, writable: false });

  // Special methods
  for (var method in db._methods) Object.defineProperty(this, method, { value: db._methods[method], writable: false });

  // Persist to LevelUP
  Object.defineProperty(this, "_persist", { value: function(cb, quiet) {
    if (!quiet) db.emit("save", self);
    db.store.put(self._id, self.serialize(), function(err) {
      cb(err || null, err ? undefined : self);  
    });
  } });

  _.extend(this, raw.constructor.modelName ? deepCopy(raw) : raw); // Clone it deeply if it's schema-constructed
  schemas.construct(this, db.schema);
  db.emit("construct", self);
}
157709
private void onDataRead(int streamId, ByteBuf data, int padding, boolean endOfStream) {
    flowControlPing().onDataRead(data.readableBytes(), padding);
    NettyClientStream.TransportState stream = clientStream(requireHttp2Stream(streamId));
    stream.transportDataReceived(data, endOfStream);
    if (keepAliveManager != null) {
      keepAliveManager.onDataReceived();
    }
  }
202378
def save(self, obj, data, is_m2m=False):
        
        if not self.readonly:
            attrs = self.attribute.split('__')
            for attr in attrs[:-1]:
                obj = getattr(obj, attr, None)
            cleaned = self.clean(data)
            if cleaned is not None or self.saves_null_values:
                if not is_m2m:
                    setattr(obj, attrs[-1], cleaned)
                else:
                    getattr(obj, attrs[-1]).set(cleaned)
707160
function processRetrievedContent(content, filePrismicMetadata, queryKey, ctx) {
            if (content.results != null && content.results.length > 0) {
                var queryMetadata = filePrismicMetadata[queryKey];
                for (var i = 0; i < content.results.length; i++) {
                    var result = processRetrievedDocument(content.results[i], filePrismicMetadata, queryKey, ctx);
                    filePrismicMetadata[queryKey].results.push(result);
                }
            }
        }