Append all of 'nc' onto the current NewChunk.  Kill nc.
337992
public void add( NewChunk nc ) {
    assert _cidx >= 0;
    assert _sparseLen <= _len;
    assert nc._sparseLen <= nc._len:"_sparseLen = " + nc._sparseLen + ", _len = " + nc._len;
    if( nc._len == 0 ) return;
    if(_len == 0){
      _ls = nc._ls; nc._ls = null;
      _xs = nc._xs; nc._xs = null;
      _id = nc._id; nc._id = null;
      _ds = nc._ds; nc._ds = null;
      _sparseLen = nc._sparseLen;
      _len = nc._len;
      return;
    }
    if(nc.sparse() != sparse()){ // for now, just make it dense
      cancel_sparse();
      nc.cancel_sparse();
    }
    if( _ds != null ) throw H2O.unimpl();
    while( _sparseLen+nc._sparseLen >= _xs.length )
      _xs = MemoryManager.arrayCopyOf(_xs,_xs.length<<1);
    _ls = MemoryManager.arrayCopyOf(_ls,_xs.length);
    System.arraycopy(nc._ls,0,_ls,_sparseLen,nc._sparseLen);
    System.arraycopy(nc._xs,0,_xs,_sparseLen,nc._sparseLen);
    if(_id != null) {
      assert nc._id != null;
      _id = MemoryManager.arrayCopyOf(_id,_xs.length);
      System.arraycopy(nc._id,0,_id,_sparseLen,nc._sparseLen);
      for(int i = _sparseLen; i < _sparseLen + nc._sparseLen; ++i) _id[i] += _len;
    } else assert nc._id == null;

    _sparseLen += nc._sparseLen;
    _len += nc._len;
    nc._ls = null;  nc._xs = null; nc._id = null; nc._sparseLen = nc._len = 0;
    assert _sparseLen <= _len;
  }
206582
def do_quit(self, arg):
        
        for name, fh in self._backup:
            setattr(sys, name, fh)
        self.console.writeline('*** Aborting program ***\n')
        self.console.flush()
        self.console.close()
        WebPdb.active_instance = None
        return Pdb.do_quit(self, arg)
1358795
def append(self, filename, content, binary=False):
        """"""

        self._raise_if_none()
        fn = path_join(self.path, filename)

        if binary:
            flags = 'ab'
        else:
            flags = 'a'

        with open(fn, 'a') as f:
            f.write(content)
            return True
1032293
def _remove_init_all(r):
    """"""
    new_r = redbaron.NodeList()
    for n in r.node_list:
        if n.type == 'assignment' and n.target.value == '__all__':
            pass
        else:
            new_r.append(n)
    return new_r
76020
void markSuccess() {
    // It's possible that the dag is killed before this method is called.
    assertRunningOrKilling();
    changeStatus(Status.SUCCESS);
    for (final Node child : this.children) {
      child.runIfAllowed();
    }
    this.dag.updateDagStatus();
  }
635952
public void finishAppending()
  {
    checkStateTransition(this.state, SegmentState.APPENDING, SegmentState.APPEND_FINISHED);
    this.state = SegmentState.APPEND_FINISHED;
  }
648669
private void addShutdownHook() {
    if (!running) {
      destroyProcessThread = new ProcessDestroyerImpl();
      Runtime.getRuntime().addShutdownHook(destroyProcessThread);
      added = true;
    }
  }
659377
def _killall(self, force=False):
        """"""
        for_termination = []

        for n, p in iteritems(self._processes):
            if 'returncode' not in p:
                for_termination.append(n)

        for n in for_termination:
            p = self._processes[n]
            signame = 'SIGKILL' if force else 'SIGTERM'
            self._system_print("sending %s to %s (pid %s)\n" %
                               (signame, n, p['pid']))
            if force:
                self._env.kill(p['pid'])
            else:
                self._env.terminate(p['pid'])
791185
def append(self, newContent, keep=True):
        
        content = self.__content + newContent
        if keep:
            self.__content = content

        if self.__needsRewrite:
            """
            Replace the content of the file.
            A temporary file is used to avoid loss of data through an interrupt.
            """
            tmpFilename = self.filename + ".tmp"

            util.write_file(content, tmpFilename)

            os.rename(tmpFilename, self.filename)
        else:
            with open(self.filename, "a") as file:
                file.write(newContent)

        self.__needsRewrite = not keep
1142222
def append(self, element):
        '''
        
        '''
        assert element.locus == self.locus, (
            "Element locus (%s) != Pileup locus (%s)"
            % (element.locus, self.locus))
        self.elements[element] = None
873392
def append(self, item):
        """"""
        if len(self) == 0:
            # Special case, we make this the current item
            self.index = 0

        self.items.append(item)
251409
private int append(FA add) {
        int relocation;
        int idx;

        relocation = used;
        ensureCapacity(used + add.used);
        for (idx = 0; idx < add.used; idx++) {
            states[relocation + idx] =
                new State(add.states[idx], relocation);
        }
        used += add.used;
        return relocation;
    }
566036
def empty(self, name, **kwargs):
        """"""
        return self._write_op(self._empty_nosync, name, **kwargs)
583898
public void endNewElement() {
		if (this.currentFeature != null) {
			if (!hasPassedLocalFilter) {
				hasPassedLocalFilter = false;
				return;
			}

			if (writerContentHandler != null) {
				this.currentFeatureGeoJSON = this.fillCategories(writerContentHandler, this.currentFeatureGeoJSON,
						service);
				this.currentFeatureGeoJSON = this.fillService(writerContentHandler, this.currentFeatureGeoJSON,
						service);

				this.fillEmptyAttributes(writerContentHandler, this.currentFeatureGeoJSON, service);

				this.currentFeatureGeoJSON = writerContentHandler.addPointToFeature(this.currentFeatureGeoJSON,
						writerContentHandler.endPoint(this.currentGeometryGeoJSON, this.service.getSRS(),
								DescribeService.DEFAULT_SRS));
				this.currentFeatureGeoJSON = writerContentHandler.endFeature(this.currentFeatureGeoJSON);
				writerContentHandler.addFeatureToCollection(this.geoJSON, this.currentFeatureGeoJSON);
			}
			this.currentFeature = this.fillCategories(contentHandler, this.currentFeature, service);
			this.currentFeature = this.fillService(contentHandler, this.currentFeature, service);

			this.currentFeature = contentHandler.addPointToFeature(this.currentFeature,
					contentHandler.endPoint(this.currentPoint, this.service.getSRS(), DescribeService.DEFAULT_SRS));
			this.currentFeature = contentHandler.endFeature(this.currentFeature);
			contentHandler.addFeatureToCollection(this.featureCollection, this.currentFeature);
			hasPassedLocalFilter = false;
		}
	}
644241
def append(self, _, child, name=None):
        """"""
        self._insert(child, name=name)
        return self
672945
public void append(long startDrId, long endDrId, long spUniqueId, long mpUniqueId) {
        assert(startDrId <= endDrId && (m_map.isEmpty() || startDrId > end(m_map.span())));

        addRange(startDrId, endDrId, spUniqueId, mpUniqueId);
    }
651481
protected void doDelete(int n) throws CorruptIndexException, IOException {
        if (transientDeletions) {
            deletedDocs.add(n);
            modCount.incrementAndGet(); // doDelete won't be executed, so incrementing modCount
        } else {
            super.doDelete(n);
            modCount.incrementAndGet();
        }
    }